Skip to content

Compute Engine API API

by googleapis.com

OAuthHTTPSAnalytics
Open documentation ↗

Overview

Creates and runs virtual machines on Google Cloud Platform.

Compute Engine API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 694 endpoints.

At a glance

Authentication
OAuth
HTTPS
Yes
CORS
Unknown
Category
Analytics
Base URL
https://compute.googleapis.com/compute/v1
Version
v1
Endpoints
694
Spec updated
2023-04-13

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://compute.googleapis.com/compute/v1/locations/global/firewallPolicies" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://compute.googleapis.com/compute/v1/locations/global/firewallPolicies", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://compute.googleapis.com/compute/v1/locations/global/firewallPolicies",
    headers={
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/locations/global/firewallPoliciesLists all the policies that have been configured for the specified folder or organization.
POST/locations/global/firewallPoliciesCreates a new policy in the specified project using the data included in the request.
GET/locations/global/firewallPolicies/listAssociationsLists associations of a specified target, i.e., organization or folder.
GET/locations/global/firewallPolicies/{firewallPolicy}Returns the specified firewall policy.
PATCH/locations/global/firewallPolicies/{firewallPolicy}Patches the specified policy with the data included in the request.
DELETE/locations/global/firewallPolicies/{firewallPolicy}Deletes the specified policy.
POST/locations/global/firewallPolicies/{firewallPolicy}/addAssociationInserts an association for the specified firewall policy.
POST/locations/global/firewallPolicies/{firewallPolicy}/addRuleInserts a rule into a firewall policy.
POST/locations/global/firewallPolicies/{firewallPolicy}/cloneRulesCopies rules to the specified firewall policy.
GET/locations/global/firewallPolicies/{firewallPolicy}/getAssociationGets an association with the specified name.
GET/locations/global/firewallPolicies/{firewallPolicy}/getRuleGets a rule of the specified priority.
POST/locations/global/firewallPolicies/{firewallPolicy}/moveMoves the specified firewall policy.
POST/locations/global/firewallPolicies/{firewallPolicy}/patchRulePatches a rule of the specified priority.
POST/locations/global/firewallPolicies/{firewallPolicy}/removeAssociationRemoves an association for the specified firewall policy.
POST/locations/global/firewallPolicies/{firewallPolicy}/removeRuleDeletes a rule of the specified priority.
GET/locations/global/firewallPolicies/{resource}/getIamPolicyGets the access control policy for a resource. May be empty if no such policy or resource exists.
POST/locations/global/firewallPolicies/{resource}/setIamPolicySets the access control policy on the specified resource. Replaces any existing policy.
POST/locations/global/firewallPolicies/{resource}/testIamPermissionsReturns permissions that a caller has on the specified resource.
GET/locations/global/operationsRetrieves a list of Operation resources contained within the specified organization.
GET/locations/global/operations/{operation}Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.
DELETE/locations/global/operations/{operation}Deletes the specified Operations resource.
GET/projects/{project}Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field
GET/projects/{project}/aggregated/acceleratorTypesRetrieves an aggregated list of accelerator types.
GET/projects/{project}/aggregated/addressesRetrieves an aggregated list of addresses.
GET/projects/{project}/aggregated/autoscalersRetrieves an aggregated list of autoscalers.
GET/projects/{project}/aggregated/backendServicesRetrieves the list of all BackendService resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/commitmentsRetrieves an aggregated list of commitments by region.
GET/projects/{project}/aggregated/diskTypesRetrieves an aggregated list of disk types.
GET/projects/{project}/aggregated/disksRetrieves an aggregated list of persistent disks.
GET/projects/{project}/aggregated/forwardingRulesRetrieves an aggregated list of forwarding rules.
GET/projects/{project}/aggregated/healthChecksRetrieves the list of all HealthCheck resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/instanceGroupManagersRetrieves the list of managed instance groups and groups them by zone.
GET/projects/{project}/aggregated/instanceGroupsRetrieves the list of instance groups and sorts them by zone.
GET/projects/{project}/aggregated/instanceTemplatesRetrieves the list of all InstanceTemplates resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/instancesRetrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is spec
GET/projects/{project}/aggregated/interconnectAttachmentsRetrieves an aggregated list of interconnect attachments.
GET/projects/{project}/aggregated/machineTypesRetrieves an aggregated list of machine types.
GET/projects/{project}/aggregated/networkAttachmentsRetrieves the list of all NetworkAttachment resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/networkEdgeSecurityServicesRetrieves the list of all NetworkEdgeSecurityService resources available to the specified project.
GET/projects/{project}/aggregated/networkEndpointGroupsRetrieves the list of network endpoint groups and sorts them by zone.
GET/projects/{project}/aggregated/nodeGroupsRetrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.
GET/projects/{project}/aggregated/nodeTemplatesRetrieves an aggregated list of node templates.
GET/projects/{project}/aggregated/nodeTypesRetrieves an aggregated list of node types.
GET/projects/{project}/aggregated/operationsRetrieves an aggregated list of all operations.
GET/projects/{project}/aggregated/packetMirroringsRetrieves an aggregated list of packetMirrorings.
GET/projects/{project}/aggregated/publicDelegatedPrefixesLists all PublicDelegatedPrefix resources owned by the specific project across all scopes.
GET/projects/{project}/aggregated/reservationsRetrieves an aggregated list of reservations.
GET/projects/{project}/aggregated/resourcePoliciesRetrieves an aggregated list of resource policies.
GET/projects/{project}/aggregated/routersRetrieves an aggregated list of routers.
GET/projects/{project}/aggregated/securityPoliciesRetrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/serviceAttachmentsRetrieves the list of all ServiceAttachment resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/sslCertificatesRetrieves the list of all SslCertificate resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/sslPoliciesRetrieves the list of all SslPolicy resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/subnetworksRetrieves an aggregated list of subnetworks.
GET/projects/{project}/aggregated/subnetworks/listUsableRetrieves an aggregated list of all usable subnetworks in the project.
GET/projects/{project}/aggregated/targetHttpProxiesRetrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/targetHttpsProxiesRetrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/targetInstancesRetrieves an aggregated list of target instances.
GET/projects/{project}/aggregated/targetPoolsRetrieves an aggregated list of target pools.
GET/projects/{project}/aggregated/targetTcpProxiesRetrieves the list of all TargetTcpProxy resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/targetVpnGatewaysRetrieves an aggregated list of target VPN gateways.
GET/projects/{project}/aggregated/urlMapsRetrieves the list of all UrlMap resources, regional and global, available to the specified project.
GET/projects/{project}/aggregated/vpnGatewaysRetrieves an aggregated list of VPN gateways.
GET/projects/{project}/aggregated/vpnTunnelsRetrieves an aggregated list of VPN tunnels.
POST/projects/{project}/disableXpnHostDisable this project as a shared VPC host project.
POST/projects/{project}/disableXpnResourceDisable a service resource (also known as service project) associated with this host project.
POST/projects/{project}/enableXpnHostEnable this project as a shared VPC host project.
POST/projects/{project}/enableXpnResourceEnable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
GET/projects/{project}/getXpnHostGets the shared VPC host project that this project links to. May be empty if no link exists.
GET/projects/{project}/getXpnResourcesGets service resources (a.k.a service project) associated with this host project.
GET/projects/{project}/global/addressesRetrieves a list of global addresses.
POST/projects/{project}/global/addressesCreates an address resource in the specified project by using the data included in the request.
GET/projects/{project}/global/addresses/{address}Returns the specified address resource.
DELETE/projects/{project}/global/addresses/{address}Deletes the specified address resource.
POST/projects/{project}/global/addresses/{resource}/setLabelsSets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.
GET/projects/{project}/global/backendBucketsRetrieves the list of BackendBucket resources available to the specified project.
POST/projects/{project}/global/backendBucketsCreates a BackendBucket resource in the specified project using the data included in the request.
GET/projects/{project}/global/backendBuckets/{backendBucket}Returns the specified BackendBucket resource.
PUT/projects/{project}/global/backendBuckets/{backendBucket}Updates the specified BackendBucket resource with the data included in the request.
PATCH/projects/{project}/global/backendBuckets/{backendBucket}Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format an
DELETE/projects/{project}/global/backendBuckets/{backendBucket}Deletes the specified BackendBucket resource.
POST/projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKeyAdds a key for validating requests with signed URLs for this backend bucket.
POST/projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKeyDeletes a key for validating requests with signed URLs for this backend bucket.
POST/projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicySets the edge security policy for the specified backend bucket.
GET/projects/{project}/global/backendServicesRetrieves the list of BackendService resources available to the specified project.
POST/projects/{project}/global/backendServicesCreates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .
GET/projects/{project}/global/backendServices/{backendService}Returns the specified BackendService resource.
PUT/projects/{project}/global/backendServices/{backendService}Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
PATCH/projects/{project}/global/backendServices/{backendService}Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports P
DELETE/projects/{project}/global/backendServices/{backendService}Deletes the specified BackendService resource.
POST/projects/{project}/global/backendServices/{backendService}/addSignedUrlKeyAdds a key for validating requests with signed URLs for this backend service.
POST/projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKeyDeletes a key for validating requests with signed URLs for this backend service.
POST/projects/{project}/global/backendServices/{backendService}/getHealthGets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
POST/projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicySets the edge security policy for the specified backend service.
POST/projects/{project}/global/backendServices/{backendService}/setSecurityPolicySets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
GET/projects/{project}/global/backendServices/{resource}/getIamPolicyGets the access control policy for a resource. May be empty if no such policy or resource exists.
POST/projects/{project}/global/backendServices/{resource}/setIamPolicySets the access control policy on the specified resource. Replaces any existing policy.
GET/projects/{project}/global/externalVpnGatewaysRetrieves the list of ExternalVpnGateway available to the specified project.
POST/projects/{project}/global/externalVpnGatewaysCreates a ExternalVpnGateway in the specified project using the data included in the request.
GET/projects/{project}/global/externalVpnGateways/{externalVpnGateway}Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.

Showing the first 100 of 694 endpoints; the full list is in the documentation.

Questions

Does the Compute Engine API API need an API key?

Yes. The Compute Engine API API uses OAuth authentication; the documentation explains how to get credentials.

Does the Compute Engine API API support HTTPS?

Yes, the Compute Engine API API is served over HTTPS.

How many endpoints does the Compute Engine API API have?

Its OpenAPI description lists 694 endpoints in version v1. The first 100 are shown on this page.

What are alternatives to the Compute Engine API API?

Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.

Compare alternatives →

Google Play Integrity API

Analytics

The Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.

OAuth1 endpoints

versionhistory.googleapis.com API

Analytics

Version History API - Prod

No auth4 endpoints

Doc Converter

Analytics

This api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)

No auth1 endpoints

Perspective Comment Analyzer API

Analytics

The Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.

OAuth2 endpoints

Safe Browsing API

Analytics

Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.

No auth7 endpoints

Web Fonts Developer API

Analytics

The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.

No auth1 endpoints

Listed from APIs.guru (CC0).