Using APIs Explorer

This guide describes how to use the APIs Explorer to try out Stackdriver Monitoring API methods.

The APIs Explorer is an excellent way to try out the Stackdriver Monitoring API. The Explorer presents a form showing the parameters to each method. Fill in the form, execute the API call, and see the results. Visit the APIs Explorer by clicking the following button:

Try It!

Authorizing the APIs Explorer

You see the APIs Explorer form, the top of which is shown below:

APIs Explorer form

Click Authorize requests using OAuth 2.0. You see the Select OAuth 2.0 scopes form shown below:

APIs Explorer authorization

Select all the scopes in the list and click Authorize. You see the original APIs Explorer form for the Stackdriver Monitoring API, with a list of API methods.

Choosing a method

Choose the method you want to call. For now, click monitoring.projects.metricDescriptors.list, shown below:

Try-it form

Fill in the parameters

You see the metricDescriptors.list method form, shown below:

Try-it form

Fill in the following fields on the form. Substitute your project ID for {your-project-id}`, but copy all the other fields without changes:

  • name: projects/{your-project-id}
  • filter: metric.type=ends_with("utilization")
  • fields: metricDescriptors.type,metricDescriptors.description

Note: These fields hold string values, but do not put quotes around the values. If a value has inner strings, like filter, then use double quotation marks around the inner strings.

Execute the method

Click the Execute button. In the following sample response, you see the descriptions of three metrics matching the filter:

Try-it form

If you do not see output like that shown, check that you entered the information as shown above. Make any changes in the form and click Execute again. (You might have to click Execute twice.) If you still have difficulty, see Troubleshooting API calls.

Feel free to explore the API methods and forms on your own.

Tip: After you get the output you want, bookmark the APIs Explorer URL. When you want to run the method again, paste the URL into your browser. You see the form already populated with your values. Make any change you wish and then re-authorize the Explorer and click Execute to run the method.

Try It! buttons

In the how-to sections, you will see Try It! buttons like the following:

Try It!

Clicking the button brings up the APIs Explorer in the proper method and populates the fields. You must edit some of the fields to match your own project, such as the value for {your-project-id}.

Trouble? Don't forget to change the project ID in the APIs Explorer form. If you still have trouble, see Troubleshooting API calls.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Stackdriver Monitoring