Stay organized with collections Save and categorize content based on your preferences.
Set up Service Usage for a development environmentThis page describes how to set up your development environment to use the Service Usage API.
curl
command to test the API without setting up a full application development environment.This section describes the basic steps necessary to set up your local environment to experiment with the Service Usage API using the curl
command. It is aimed at developers who need to program against the Service Usage API.
gcloud
command line interface. Enable the Service Usage API
To use the Service Usage API, you must first enable it in the Google Cloud project you want to use it for:
Define a convenient shell alias for calling Google REST APIs:
alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'
Set an environment variable PROJECT_ID
with the identifier of your project. This can be the project id or number:
PROJECT_ID="my-project-id"
Ensure that you are logged into 'gcloud':
gcloud auth login
List the enabled APIs and services in this project:
gcurl "https://serviceusage.googleapis.com/v1/projects/${PROJECT_ID}/services?filter=state:ENABLED&fields=services.config.title,services.config.name"
If you see output like this, then your setup is successful:
{
"services": [
{
"config": {
"name": "bigquery.googleapis.com",
"title": "BigQuery API"
}
},
{
"config": {
"name": "bigquerystorage.googleapis.com",
"title": "BigQuery Storage API"
}
},
...
Follow Listing Services to list the APIs and services that are enabled or available in your Google Cloud projects.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4