Method: indexing.datasources.items.push

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

string

The name of the item to push into the indexing queue.

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 (PushItem.Type),
    "metadataHash": string,
    "structuredDataHash": string,
    "contentHash": string,
    "payload": string,
    "queue": string,
    "repositoryError": {
      "type": enum (RepositoryError.Type),
      "httpStatusCode": integer,
      "errorMessage": string
    }
  },
  "connectorName": string,
  "debugOptions": {
    object (DebugOptions)
  }
}
Fields
item.type

enum (PushItem.Type)

The type of the push operation that defines the push behavior.

item.metadataHash

string

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 type field results in argument error. The maximum length is 2048 characters.

item.structuredDataHash

string

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 type field results in argument error. The maximum length is 2048 characters.

item.contentHash

string

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 type field results in argument error. The maximum length is 2048 characters.

item.payload

string (bytes format)

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

string

Queue to which this item belongs. The default queue is chosen if this field is not specified. The maximum length is 512 characters.

item.repositoryError

object (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 type is REPOSITORY_ERROR.

connectorName

string

The name of connector making this call.

Format: datasources/{sourceId}/connectors/{ID}

debugOptions

object (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 (PushItem.Type),
  "metadataHash": string,
  "structuredDataHash": string,
  "contentHash": string,
  "payload": string,
  "queue": string,
  "repositoryError": {
    object (RepositoryError)
  }
}
Fields
name

string

The name of the item to push into the indexing queue.

Format: datasources/{sourceId}/items/{ID}

This is a required field. The maximum length is 1536 characters.

type

enum (PushItem.Type)

The type of the push operation that defines the push behavior.

metadataHash

string

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 type field results in argument error. The maximum length is 2048 characters.

structuredDataHash

string

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 type field results in argument error. The maximum length is 2048 characters.

contentHash

string

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 type field results in argument error. The maximum length is 2048 characters.

payload

string (bytes format)

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

string

Queue to which this item belongs. The default queue is chosen if this field is not specified. The maximum length is 512 characters.

repositoryError

object (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 type is REPOSITORY_ERROR.

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.