Google APIs
Intro
Notes on accessing GCP APIs
Documentation
Getting Started on Google APIs.
Read this on authentication Authentication overview
Discovery document
A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:
https://www.googleapis.com/discovery/v1/apis/compute/v1/rest (specific to the compute engine APIs)
Tips and Tidbits
When an application calls a Cloud API, the project that owns the application credentials is called the client project, and the project that owns the target resource is called the resource project.
One API request may touch multiple resources, hence multiple resource projects are involved.
To use a Cloud API, you must enable it for your project.
To enable an API you need permission
serviceusage.services.enable
on the project and permissionservicemanagement.services.bind
on the API.Cloud APIs use application credentials for identifying the calling applications.
Use
oauth2l
to experiment with your application credentials and Cloud APIs before writing any application code.For building an application using Cloud APIs, use Google Cloud Client Libraries.
Enabling Google APIs
Navigate to the Cloud Console API Library.
Select the project you want to enable API access for.
Search for the API to be enabled and click on the Enable button.
You can also do it via this HTTP (substitute APIs needed)
https://console.cloud.google.com/flows/enableapi?apiid=cloudfunctions,cloudbuild.googleapis.com
Cloud API Dashboard
In the cloud API dashboard, you can see some usge stats for all the APIs that are enabled.
API Broswer
You can try an API directly from your browser
API Key
Some APIs allow you to provide an API key in order to access them. You can use the credentials wizards to create a key (project specific): https://console.developers.google.com/apis/credentials/wizard
Calling APIs With Curl