This page describes how to set up your development environment to work with
the Service Management API. The simplest approach to using the
Service Management API (other than just using the
[Google Cloud console](https://console.cloud.google.com)
web UI), and our recommendation for most operational use cases, is via the
`gcloud`
[command line interface](https://docs.cloud.google.com/sdk/gcloud/reference/services). If
you need to program against the Service Management API, we recommend that
you use one of our provided
[client libraries](https://docs.cloud.google.com/service-infrastructure/docs/service-management/libraries.md.txt).
To experiment with the API, you can follow the alternative setup instructions
below and use the `curl` command to play with the API without setting up a full
application development environment.

> [!NOTE]
> **Note:** If you're creating a service using [Cloud Endpoints](https://docs.cloud.google.com/endpoints), you should follow the relevant [Endpoints quickstart](https://docs.cloud.google.com/endpoints/docs/quickstarts) to find out how to set up and get started with the Service Management API for Cloud Endpoints.

## Setup using gcloud

<br />

## Setup to call the API directly

This section describes the basic steps necessary to set up your local
environment to experiment with the Service Management API using the
`curl` command. It is aimed at developers who need to program against the
Service Management API.

### Initial setup

<br />

### Test with curl

1. 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"'

2. Try listing publicly accessible services:

       $ gcurl https://servicemanagement.googleapis.com/v1/services

   If you see a list of services, the setup is successful.

## Next steps

If you are creating a [managed service](https://docs.cloud.google.com/service-infrastructure/docs/glossary.md.txt#managed) and
you are not using Cloud Endpoints:

1. Follow [Creating and Deleting Services](https://docs.cloud.google.com/service-infrastructure/docs/create-services) to create managed services. This will create a top level managed service resource.
2. Follow [Managing Service Configurations](https://docs.cloud.google.com/service-infrastructure/docs/manage-config.md.txt)
   to submit [service configurations](https://docs.cloud.google.com/service-infrastructure/docs/glossary.md.txt#config) to describe features
   used by the service.

   > [!NOTE]
   > **Note:** Service configuration does not take effect after submitting. You need to follow Step 3 to rollout configurations.

3. Follow [Rolling Out Service Configurations](https://docs.cloud.google.com/service-infrastructure/docs/rollout.md.txt) to
   roll out your service configurations.