# Cloud Pub/Sub API

- [REST Resource: v1.projects.schemas](https://docs.cloud.google.com/pubsub/docs/reference/rest#v1.projects.schemas)
- [REST Resource: v1.projects.snapshots](https://docs.cloud.google.com/pubsub/docs/reference/rest#v1.projects.snapshots)
- [REST Resource: v1.projects.subscriptions](https://docs.cloud.google.com/pubsub/docs/reference/rest#v1.projects.subscriptions)
- [REST Resource: v1.projects.topics](https://docs.cloud.google.com/pubsub/docs/reference/rest#v1.projects.topics)
- [REST Resource: v1.projects.topics.snapshots](https://docs.cloud.google.com/pubsub/docs/reference/rest#v1.projects.topics.snapshots)
- [REST Resource: v1.projects.topics.subscriptions](https://docs.cloud.google.com/pubsub/docs/reference/rest#v1.projects.topics.subscriptions)

## Service: pubsub.googleapis.com

To call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

### Discovery document

A [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:

- <https://pubsub.googleapis.com/$discovery/rest?version=v1>

### Service endpoint

A [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

- `https://pubsub.googleapis.com`

### Regional service endpoint

A regional service endpoint is a base URL that specifies the network address of an API service in a single region. A service that is available in multiple regions might have multiple regional endpoints. Select a location to see its regional service endpoint for this service.
<button value="global" default="">global</button> <button value="africa-south1">africa-south1</button> <button value="asia-east1">asia-east1</button> <button value="asia-east2">asia-east2</button> <button value="asia-northeast1">asia-northeast1</button> <button value="asia-northeast2">asia-northeast2</button> <button value="asia-northeast3">asia-northeast3</button> <button value="asia-south1">asia-south1</button> <button value="asia-south2">asia-south2</button> <button value="asia-southeast1">asia-southeast1</button> <button value="asia-southeast2">asia-southeast2</button> <button value="asia-southeast3">asia-southeast3</button> <button value="australia-southeast1">australia-southeast1</button> <button value="australia-southeast2">australia-southeast2</button> <button value="europe-central2">europe-central2</button> <button value="europe-north1">europe-north1</button> <button value="europe-north2">europe-north2</button> <button value="europe-southwest1">europe-southwest1</button> <button value="europe-west1">europe-west1</button> <button value="europe-west2">europe-west2</button> <button value="europe-west3">europe-west3</button> <button value="europe-west4">europe-west4</button> <button value="europe-west6">europe-west6</button> <button value="europe-west8">europe-west8</button> <button value="europe-west9">europe-west9</button> <button value="europe-west10">europe-west10</button> <button value="europe-west12">europe-west12</button> <button value="me-central1">me-central1</button> <button value="me-central2">me-central2</button> <button value="me-west1">me-west1</button> <button value="northamerica-northeast1">northamerica-northeast1</button> <button value="northamerica-northeast2">northamerica-northeast2</button> <button value="northamerica-south1">northamerica-south1</button> <button value="southamerica-east1">southamerica-east1</button> <button value="southamerica-west1">southamerica-west1</button> <button value="us-central1">us-central1</button> <button value="us-central2">us-central2</button> <button value="us-east1">us-east1</button> <button value="us-east4">us-east4</button> <button value="us-east5">us-east5</button> <button value="us-east7">us-east7</button> <button value="us-south1">us-south1</button> <button value="us-west1">us-west1</button> <button value="us-west2">us-west2</button> <button value="us-west3">us-west3</button> <button value="us-west4">us-west4</button> <button value="us-west8">us-west8</button>   
- `https://pubsub.googleapis.com`

<br />

## REST Resource: [v1.projects.schemas](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/commit` | `POST /v1/{name}:commit` Commits a new schema revision to an existing schema. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/create` | `POST /v1/{parent}/schemas` Creates a schema. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/delete` | `DELETE /v1/{name}` Deletes a schema. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/deleteRevision` | `DELETE /v1/{name}:deleteRevision` Deletes a specific schema revision. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/get` | `GET /v1/{name}` Gets a schema. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/list` | `GET /v1/{parent}/schemas` Lists schemas in a project. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/listRevisions` | `GET /v1/{name}:listRevisions` Lists all schema revisions for the named schema. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/rollback` | `POST /v1/{name}:rollback` Creates a new schema revision that is a copy of the provided revision_id. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/validate` | `POST /v1/{parent}/schemas:validate` Validates a schema. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/validateMessage` | `POST /v1/{parent}/schemas:validateMessage` Validates a message against a schema. |

## REST Resource: [v1.projects.snapshots](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.snapshots)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.snapshots/create` | `PUT /v1/{name}` Creates a snapshot from the requested subscription. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.snapshots/delete` | `DELETE /v1/{snapshot}` Removes an existing snapshot. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.snapshots/get` | `GET /v1/{snapshot}` Gets the configuration details of a snapshot. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.snapshots/getIamPolicy` | `GET /v1/{resource}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.snapshots/list` | `GET /v1/{project}/snapshots` Lists the existing snapshots. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.snapshots/patch` | `PATCH /v1/{snapshot.name}` Updates an existing snapshot by updating the fields specified in the update mask. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.snapshots/setIamPolicy` | `POST /v1/{resource}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.snapshots/testIamPermissions` | `POST /v1/{resource}:testIamPermissions` Returns permissions that a caller has on the specified resource. |

## REST Resource: [v1.projects.subscriptions](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/acknowledge` | `POST /v1/{subscription}:acknowledge` Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/create` | `PUT /v1/{name}` Creates a subscription to a given topic. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/delete` | `DELETE /v1/{subscription}` Deletes an existing subscription. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/detach` | `POST /v1/{subscription}:detach` Detaches a subscription from this topic. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/get` | `GET /v1/{subscription}` Gets the configuration details of a subscription. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/getIamPolicy` | `GET /v1/{resource}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/list` | `GET /v1/{project}/subscriptions` Lists matching subscriptions. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/modifyAckDeadline` | `POST /v1/{subscription}:modifyAckDeadline` Modifies the ack deadline for a specific message. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/modifyPushConfig` | `POST /v1/{subscription}:modifyPushConfig` Modifies the `PushConfig` for a specified subscription. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/patch` | `PATCH /v1/{subscription.name}` Updates an existing subscription by updating the fields specified in the update mask. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/pull` | `POST /v1/{subscription}:pull` Pulls messages from the server. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/seek` | `POST /v1/{subscription}:seek` Seeks an existing subscription to a point in time or to a given snapshot, whichever is provided in the request. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/setIamPolicy` | `POST /v1/{resource}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/testIamPermissions` | `POST /v1/{resource}:testIamPermissions` Returns permissions that a caller has on the specified resource. |

## REST Resource: [v1.projects.topics](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/create` | `PUT /v1/{name}` Creates the given topic with the given name. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/delete` | `DELETE /v1/{topic}` Deletes the topic with the given name. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/get` | `GET /v1/{topic}` Gets the configuration of a topic. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/getIamPolicy` | `GET /v1/{resource}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/list` | `GET /v1/{project}/topics` Lists matching topics. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/patch` | `PATCH /v1/{topic.name}` Updates an existing topic by updating the fields specified in the update mask. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/publish` | `POST /v1/{topic}:publish` Adds one or more messages to the topic. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/setIamPolicy` | `POST /v1/{resource}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/testIamPermissions` | `POST /v1/{resource}:testIamPermissions` Returns permissions that a caller has on the specified resource. |

## REST Resource: [v1.projects.topics.snapshots](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics.snapshots)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics.snapshots/list` | `GET /v1/{topic}/snapshots` Lists the names of the snapshots on this topic. |

## REST Resource: [v1.projects.topics.subscriptions](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics.subscriptions)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics.subscriptions/list` | `GET /v1/{topic}/subscriptions` Lists the names of the attached subscriptions on this topic. |