Google

Cloud Billing API

Allows developers to manage billing for their Google Cloud Platform projects programmatically.

Finance & banking#openapi#analytics#media

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Allows developers to manage billing for their Google Cloud Platform projects programmatically.

Endpoints 26

billingAccounts

  • GETLists the billing accounts that the current authenticated user has permission to…/v1/billingAccounts?filter=string&pageSize=0&pageToken=string&parent=stringLists the billing accounts that the current authenticated user has permission to view.
  • POSTThis method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts)/v1/billingAccounts?parent=stringThis method creates billing subaccounts. Google Cloud resellers should use the Channel Services APIs, accounts.customers.create and…
  • PATCHUpdates a billing account's fields/v1/:name?updateMask=stringUpdates a billing account's fields. Currently the only field that can be edited is display_name. The current authenticated user must have the…
  • GETGets the access control policy for a billing account/v1/:resource:getIamPolicy?options.requestedPolicyVersion=0Gets the access control policy for a billing account. The caller must have the billing.accounts.getIamPolicy permission on the account, which is often given…
  • POSTChanges which parent organization a billing account belongs to./v1/:name:moveChanges which parent organization a billing account belongs to.
  • POSTSets the access control policy for a billing account/v1/:resource:setIamPolicySets the access control policy for a billing account. Replaces any existing policy. The caller must have the billing.accounts.setIamPolicy permission on the…
  • POSTTests the access control policy for a billing account/v1/:resource:testIamPermissionsTests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input…

tasks.pushNotificationConfigs

  • GETGet a push notification config for a task./v1/:name?tenant=stringGet a push notification config for a task.
  • DELETEDelete a push notification config for a task./v1/:name?tenant=stringDelete a push notification config for a task.
  • POSTSet a push notification config for a task./v1/:parent?configId=string&tenant=stringSet a push notification config for a task.
  • GETGet a list of push notifications configured for a task./v1/:parent/pushNotificationConfigs?pageSize=0&pageToken=string&tenant=stringGet a list of push notifications configured for a task.

billingAccounts.projects

  • GETLists the projects associated with a billing account/v1/:name/projects?pageSize=0&pageToken=stringLists the projects associated with a billing account. The current authenticated user must have the billing.resourceAssociations.list IAM permission, which is…

billingAccounts.subAccounts

  • GETLists the billing accounts that the current authenticated user has permission to…/v1/:parent/subAccounts?filter=string&pageSize=0&pageToken=stringLists the billing accounts that the current authenticated user has permission to view.
  • POSTThis method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts)/v1/:parent/subAccountsThis method creates billing subaccounts. Google Cloud resellers should use the Channel Services APIs, accounts.customers.create and…

message

  • POSTSend a message to the agent/v1/message:sendSend a message to the agent. This is a blocking call that will return the task once it is completed, or a LRO if requested.
  • POSTSendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an…/v1/message:streamSendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an interrupted or terminal state.

organizations.billingAccounts

  • GETLists the billing accounts that the current authenticated user has permission to…/v1/:parent/billingAccounts?filter=string&pageSize=0&pageToken=stringLists the billing accounts that the current authenticated user has permission to view.
  • POSTThis method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts)/v1/:parent/billingAccountsThis method creates billing subaccounts. Google Cloud resellers should use the Channel Services APIs, accounts.customers.create and…
  • GETChanges which parent organization a billing account belongs to./v1/:destinationParent/:name:moveChanges which parent organization a billing account belongs to.

projects

  • GETGets the billing information for a project/v1/:name/billingInfoGets the billing information for a project. The current authenticated user must have the resourcemanager.projects.get permission for the project, which can be…
  • PUTSets or updates the billing account associated with a project/v1/:name/billingInfoSets or updates the billing account associated with a project. You specify the new billing account by setting the billing_account_name in the…

services

  • GETLists all public cloud services./v1/services?pageSize=0&pageToken=stringLists all public cloud services.

services.skus

  • GETLists all publicly available SKUs for a given cloud service./v1/:parent/skus?currencyCode=string&endTime=string&pageSize=0&pageToken=string&startTime=stringLists all publicly available SKUs for a given cloud service.

tasks

  • POSTCancel a task from the agent/v1/:name:cancelCancel a task from the agent. If supported one should expect no more task updates for the task.
  • GETTaskSubscription is a streaming call that will return a stream of task update events/v1/:name:subscribe?tenant=stringTaskSubscription is a streaming call that will return a stream of task update events. This attaches the stream to an existing in process task. If the task is…

v1

  • GETGetAgentCard returns the agent card for the agent./v1/card?tenant=stringGetAgentCard returns the agent card for the agent.

API details

Base URL
https://cloudbilling.googleapis.com
Authentication
OAuth 2.0 (authorization code flow) with 3 scopes
An API key in the key query parameter
Operations
26 operations on 20 pathsGET 13POST 10PUT 1PATCH 1DELETE 1
Main resources
billingAccounts 7tasks.pushNotificationConfigs 4organizations.billingAccounts 3billingAccounts.subAccounts 2message 2projects 2tasks 2billingAccounts.projects 1services 1services.skus 1
Response formats
application/json
Description format
Google API Discovery, API version v1

How to test the Cloud Billing API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Cloud Billing API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 3 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Lists the billing accounts that the current authenticated user has permission to…” (GET /v1/billingAccounts?filter=string&pageSize=0&pageToken=string&parent=string), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Cloud Billing API?

Allows developers to manage billing for their Google Cloud Platform projects programmatically. It is listed under Finance & banking and has 26 endpoints.

Who publishes the Cloud Billing API?

It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Cloud Billing API?

Requests go to https://cloudbilling.googleapis.com. Endpoint paths are added to this base URL.

How do I authenticate with the Cloud Billing API?

It accepts 2 methods: OAuth 2.0 (authorization code flow) with 3 scopes; an API key in the key query parameter.

How many endpoints does the Cloud Billing API have?

26 operations on 20 paths (13 GET, 10 POST, 1 PUT, 1 PATCH, 1 DELETE). The largest groups are billingAccounts, tasks.pushNotificationConfigs, organizations.billingAccounts, billingAccounts.subAccounts.

Is forking the Cloud Billing API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.