- HTTP request
- Path parameters
- Request body
- Response body
- Authorization Scopes
- PushItem
- PushItem.Type
- Try it!
Pushes an item onto a queue for later polling and updating.
This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
HTTP request
POST https://cloudsearch.googleapis.com/v1/indexing/{item.name=datasources/*/items/*}:push
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
item.name |
The name of the Format: datasources/{sourceId}/items/{ID} This is a required field. The maximum length is 1536 characters. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "item": { "name": string, "type": enum ( |
Fields | |
---|---|
item.type |
The type of the push operation that defines the push behavior. |
item.metadataHash |
The metadata hash of the item according to the repository. If specified, this is used to determine how to modify this item's status. Setting this field and the |
item.structuredDataHash |
Structured data hash of the item according to the repository. If specified, this is used to determine how to modify this item's status. Setting this field and the |
item.contentHash |
Content hash of the item according to the repository. If specified, this is used to determine how to modify this item's status. Setting this field and the |
item.payload |
Provides additional document state information for the connector, such as an alternate repository ID and other metadata. The maximum length is 8192 bytes. A base64-encoded string. |
item.queue |
Queue to which this item belongs. The |
item.repositoryError |
Populate this field to store Connector or repository error details. This information is displayed in the Admin Console. This field may only be populated when the |
connectorName |
The name of connector making this call. Format: datasources/{sourceId}/connectors/{ID} |
debugOptions |
Common debug options. |
Response body
If successful, the response body contains an instance of Item
.
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud_search.indexing
https://www.googleapis.com/auth/cloud_search
For more information, see the Authorization guide.
PushItem
Represents an item to be pushed to the indexing queue.
JSON representation |
---|
{ "name": string, "type": enum ( |
Fields | |
---|---|
name |
The name of the Format: datasources/{sourceId}/items/{ID} This is a required field. The maximum length is 1536 characters. |
type |
The type of the push operation that defines the push behavior. |
metadataHash |
The metadata hash of the item according to the repository. If specified, this is used to determine how to modify this item's status. Setting this field and the |
structuredDataHash |
Structured data hash of the item according to the repository. If specified, this is used to determine how to modify this item's status. Setting this field and the |
contentHash |
Content hash of the item according to the repository. If specified, this is used to determine how to modify this item's status. Setting this field and the |
payload |
Provides additional document state information for the connector, such as an alternate repository ID and other metadata. The maximum length is 8192 bytes. A base64-encoded string. |
queue |
Queue to which this item belongs. The |
repositoryError |
Populate this field to store Connector or repository error details. This information is displayed in the Admin Console. This field may only be populated when the |
PushItem.Type
The type of the push operation that defines the push behavior.
Enums | |
---|---|
UNSPECIFIED |
Default UNSPECIFIED. Specifies that the push operation should not modify ItemStatus |
MODIFIED |
Indicates that the repository document has been modified or updated since the previous update call. This changes status to MODIFIED state for an existing item. If this is called on a non existing item, the status is changed to NEW_ITEM . |
NOT_MODIFIED |
Item in the repository has not been modified since the last update call. This push operation will set status to ACCEPTED state. |
REPOSITORY_ERROR |
Connector is facing a repository error regarding this item. Change status to REPOSITORY_ERROR state. Item is unreserved and rescheduled at a future time determined by exponential backoff. |
REQUEUE |
Call push with REQUEUE only for items that have been reserved. This action unreserves the item and resets its available time to the wall clock time. |