- [Resource: Api](https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis#Api)
  - [JSON representation](https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis#Api.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis#State)
- [Methods](https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis#METHODS_SUMMARY)

## Resource: Api

An API that can be served by one or more Gateways.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "displayName": string, "managedService": string, "state": enum (`https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis#State`) } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Resource name of the API. Format: projects/{project}/locations/global/apis/{api} |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Created time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Updated time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `labels` | `map (key: string, value: string)` Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. <https://cloud.google.com/compute/docs/labeling-resources> An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `displayName` | `string` Optional. Display name. |
| `managedService` | `string` Optional. Immutable. The name of a Google Managed Service ( <https://cloud.google.com/service-infrastructure/docs/glossary#managed)>. If not specified, a new Service will automatically be created in the same project as this API. |
| `state` | ``enum (`https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis#State`)`` Output only. State of the API. |

## State

All the possible API states.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | API does not have a state yet. |
| `CREATING` | API is being created. |
| `ACTIVE` | API is active. |
| `FAILED` | API creation failed. |
| `DELETING` | API is being deleted. |
| `UPDATING` | API is being updated. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis/create` | Creates a new Api in a given project and location. |
| ### `https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis/delete` | Deletes a single Api. |
| ### `https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis/get` | Gets details of a single Api. |
| ### `https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis/getIamPolicy` | Gets the access control policy for a resource. |
| ### `https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis/list` | Lists Apis in a given project and location. |
| ### `https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis/patch` | Updates the parameters of a single Api. |
| ### `https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis/setIamPolicy` | Sets the access control policy on the specified resource. |
| ### `https://docs.cloud.google.com/api-gateway/docs/reference/rest/v1/projects.locations.apis/testIamPermissions` | Returns permissions that a caller has on the specified resource. |