blob: 1d620857dcddd883c3b5f46df42f6eefc4e8ef60 [file] [log] [blame]
{
"kind": "discovery#restDescription",
"etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/DzLQ-VL8eehvuaCXtFxXGiH0oVI\"",
"discoveryVersion": "v1",
"id": "pubsub:v1beta1a",
"name": "pubsub",
"version": "v1beta1a",
"revision": "20150213",
"title": "Google Cloud Pub/Sub API",
"description": "Provides reliable, many-to-many, asynchronous messaging between applications.",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"documentationLink": "",
"protocol": "rest",
"baseUrl": "https://pubsub.googleapis.com/v1beta1a/",
"basePath": "/v1beta1a/",
"rootUrl": "https://pubsub.googleapis.com/",
"servicePath": "v1beta1a/",
"batchPath": "batch",
"parameters": {
"alt": {
"type": "string",
"description": "Data format for the response.",
"default": "json",
"enum": [
"json"
],
"enumDescriptions": [
"Responses with Content-Type of application/json"
],
"location": "query"
},
"fields": {
"type": "string",
"description": "Selector specifying which fields to include in a partial response.",
"location": "query"
},
"key": {
"type": "string",
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query"
},
"oauth_token": {
"type": "string",
"description": "OAuth 2.0 token for the current user.",
"location": "query"
},
"prettyPrint": {
"type": "boolean",
"description": "Returns response with indentations and line breaks.",
"default": "true",
"location": "query"
},
"quotaUser": {
"type": "string",
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
"location": "query"
},
"userIp": {
"type": "string",
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"location": "query"
}
},
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/cloud-platform": {
"description": "View and manage your data across Google Cloud Platform services"
},
"https://www.googleapis.com/auth/pubsub": {
"description": "View and manage Pub/Sub topics and subscriptions"
}
}
}
},
"schemas": {
"AcknowledgeRequest": {
"id": "AcknowledgeRequest",
"type": "object",
"properties": {
"ackId": {
"type": "array",
"items": {
"type": "string"
}
},
"subscription": {
"type": "string"
}
}
},
"Empty": {
"id": "Empty",
"type": "object"
},
"Label": {
"id": "Label",
"type": "object",
"properties": {
"key": {
"type": "string"
},
"numValue": {
"type": "string",
"format": "int64"
},
"strValue": {
"type": "string"
}
}
},
"ListSubscriptionsResponse": {
"id": "ListSubscriptionsResponse",
"type": "object",
"properties": {
"nextPageToken": {
"type": "string"
},
"subscription": {
"type": "array",
"items": {
"$ref": "Subscription"
}
}
}
},
"ListTopicsResponse": {
"id": "ListTopicsResponse",
"type": "object",
"properties": {
"nextPageToken": {
"type": "string"
},
"topic": {
"type": "array",
"items": {
"$ref": "Topic"
}
}
}
},
"ModifyAckDeadlineRequest": {
"id": "ModifyAckDeadlineRequest",
"type": "object",
"properties": {
"ackDeadlineSeconds": {
"type": "integer",
"format": "int32"
},
"ackId": {
"type": "string"
},
"subscription": {
"type": "string"
}
}
},
"ModifyPushConfigRequest": {
"id": "ModifyPushConfigRequest",
"type": "object",
"properties": {
"pushConfig": {
"$ref": "PushConfig"
},
"subscription": {
"type": "string"
}
}
},
"PublishBatchRequest": {
"id": "PublishBatchRequest",
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"$ref": "PubsubMessage"
}
},
"topic": {
"type": "string"
}
}
},
"PublishBatchResponse": {
"id": "PublishBatchResponse",
"type": "object",
"properties": {
"messageIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"PublishRequest": {
"id": "PublishRequest",
"type": "object",
"properties": {
"message": {
"$ref": "PubsubMessage"
},
"topic": {
"type": "string"
}
}
},
"PubsubEvent": {
"id": "PubsubEvent",
"type": "object",
"properties": {
"deleted": {
"type": "boolean"
},
"message": {
"$ref": "PubsubMessage"
},
"subscription": {
"type": "string"
},
"truncated": {
"type": "boolean"
}
}
},
"PubsubMessage": {
"id": "PubsubMessage",
"type": "object",
"properties": {
"data": {
"type": "string",
"format": "byte"
},
"label": {
"type": "array",
"items": {
"$ref": "Label"
}
},
"messageId": {
"type": "string"
}
}
},
"PullBatchRequest": {
"id": "PullBatchRequest",
"type": "object",
"properties": {
"maxEvents": {
"type": "integer",
"format": "int32"
},
"returnImmediately": {
"type": "boolean"
},
"subscription": {
"type": "string"
}
}
},
"PullBatchResponse": {
"id": "PullBatchResponse",
"type": "object",
"properties": {
"pullResponses": {
"type": "array",
"items": {
"$ref": "PullResponse"
}
}
}
},
"PullRequest": {
"id": "PullRequest",
"type": "object",
"properties": {
"returnImmediately": {
"type": "boolean"
},
"subscription": {
"type": "string"
}
}
},
"PullResponse": {
"id": "PullResponse",
"type": "object",
"properties": {
"ackId": {
"type": "string"
},
"pubsubEvent": {
"$ref": "PubsubEvent"
}
}
},
"PushConfig": {
"id": "PushConfig",
"type": "object",
"properties": {
"pushEndpoint": {
"type": "string"
}
}
},
"Subscription": {
"id": "Subscription",
"type": "object",
"properties": {
"ackDeadlineSeconds": {
"type": "integer",
"format": "int32"
},
"name": {
"type": "string"
},
"pushConfig": {
"$ref": "PushConfig"
},
"topic": {
"type": "string"
}
}
},
"Topic": {
"id": "Topic",
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
},
"resources": {
"subscriptions": {
"methods": {
"acknowledge": {
"id": "pubsub.subscriptions.acknowledge",
"path": "subscriptions/acknowledge",
"httpMethod": "POST",
"description": "Acknowledges a particular received message: the Pub/Sub system can remove the given message from the subscription. Acknowledging a message whose Ack deadline has expired may succeed, but the message could have been already redelivered. Acknowledging a message more than once will not result in an error. This is only used for messages received via pull.",
"request": {
"$ref": "AcknowledgeRequest"
},
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"create": {
"id": "pubsub.subscriptions.create",
"path": "subscriptions",
"httpMethod": "POST",
"description": "Creates a subscription on a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.",
"request": {
"$ref": "Subscription"
},
"response": {
"$ref": "Subscription"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"delete": {
"id": "pubsub.subscriptions.delete",
"path": "subscriptions/{+subscription}",
"httpMethod": "DELETE",
"description": "Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.",
"parameters": {
"subscription": {
"type": "string",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"subscription"
],
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"get": {
"id": "pubsub.subscriptions.get",
"path": "subscriptions/{+subscription}",
"httpMethod": "GET",
"description": "Gets the configuration details of a subscription.",
"parameters": {
"subscription": {
"type": "string",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"subscription"
],
"response": {
"$ref": "Subscription"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"list": {
"id": "pubsub.subscriptions.list",
"path": "subscriptions",
"httpMethod": "GET",
"description": "Lists matching subscriptions.",
"parameters": {
"maxResults": {
"type": "integer",
"format": "int32",
"location": "query"
},
"pageToken": {
"type": "string",
"location": "query"
},
"query": {
"type": "string",
"location": "query"
}
},
"response": {
"$ref": "ListSubscriptionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"modifyAckDeadline": {
"id": "pubsub.subscriptions.modifyAckDeadline",
"path": "subscriptions/modifyAckDeadline",
"httpMethod": "POST",
"description": "Modifies the Ack deadline for a message received from a pull request.",
"request": {
"$ref": "ModifyAckDeadlineRequest"
},
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"modifyPushConfig": {
"id": "pubsub.subscriptions.modifyPushConfig",
"path": "subscriptions/modifyPushConfig",
"httpMethod": "POST",
"description": "Modifies the 74code76PushConfig74/code76 for a specified subscription. This method can be used to suspend the flow of messages to an endpoint by clearing the 74code76PushConfig74/code76 field in the request. Messages will be accumulated for delivery even if no push configuration is defined or while the configuration is modified.",
"request": {
"$ref": "ModifyPushConfigRequest"
},
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"pull": {
"id": "pubsub.subscriptions.pull",
"path": "subscriptions/pull",
"httpMethod": "POST",
"description": "Pulls a single message from the server. If return_immediately is true, and no messages are available in the subscription, this method returns FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no messages are available in a reasonable amount of time (to reduce system load).",
"request": {
"$ref": "PullRequest"
},
"response": {
"$ref": "PullResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"pullBatch": {
"id": "pubsub.subscriptions.pullBatch",
"path": "subscriptions/pullBatch",
"httpMethod": "POST",
"description": "Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The system is free to return UNAVAILABLE if there are too many pull requests outstanding for the given subscription.",
"request": {
"$ref": "PullBatchRequest"
},
"response": {
"$ref": "PullBatchResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
}
}
},
"topics": {
"methods": {
"create": {
"id": "pubsub.topics.create",
"path": "topics",
"httpMethod": "POST",
"description": "Creates the given topic with the given name.",
"request": {
"$ref": "Topic"
},
"response": {
"$ref": "Topic"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"delete": {
"id": "pubsub.topics.delete",
"path": "topics/{+topic}",
"httpMethod": "DELETE",
"description": "Deletes the topic with the given name. All subscriptions to this topic are also deleted. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name.",
"parameters": {
"topic": {
"type": "string",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"topic"
],
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"get": {
"id": "pubsub.topics.get",
"path": "topics/{+topic}",
"httpMethod": "GET",
"description": "Gets the configuration of a topic. Since the topic only has the name attribute, this method is only useful to check the existence of a topic. If other attributes are added in the future, they will be returned here.",
"parameters": {
"topic": {
"type": "string",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"topic"
],
"response": {
"$ref": "Topic"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"list": {
"id": "pubsub.topics.list",
"path": "topics",
"httpMethod": "GET",
"description": "Lists matching topics.",
"parameters": {
"maxResults": {
"type": "integer",
"format": "int32",
"location": "query"
},
"pageToken": {
"type": "string",
"location": "query"
},
"query": {
"type": "string",
"location": "query"
}
},
"response": {
"$ref": "ListTopicsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"publish": {
"id": "pubsub.topics.publish",
"path": "topics/publish",
"httpMethod": "POST",
"description": "Adds a message to the topic. Returns NOT_FOUND if the topic does not exist.",
"request": {
"$ref": "PublishRequest"
},
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
},
"publishBatch": {
"id": "pubsub.topics.publishBatch",
"path": "topics/publishBatch",
"httpMethod": "POST",
"description": "Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.",
"request": {
"$ref": "PublishBatchRequest"
},
"response": {
"$ref": "PublishBatchResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"
]
}
}
}
}
}