Method: indexing.datasources.items.index

Updates Item ACL, metadata, and content. It will insert the Item if it does not exist. This method does not support partial updates. Fields with no provided values are cleared out in the Cloud query.search index.

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/*}:index

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
item.name

string

Name of the Item. Format: datasources/{source_id}/items/{itemId}
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,
    "acl": {
      object (ItemAcl)
    },
    "metadata": {
      object (ItemMetadata)
    },
    "structuredData": {
      object (ItemStructuredData)
    },
    "content": {

      // Union field content can be only one of the following:

      // End of list of possible types for union field content.
    },
    "version": string,
    "status": {
      object (ItemStatus)
    },
    "queue": string,
    "payload": string,
    "itemType": enum (ItemType)
  },
  "connectorName": string,
  "mode": enum (Mode),
  "debugOptions": {
    object (DebugOptions)
  },
  "indexItemOptions": {
    object (IndexItemOptions)
  }
}
Fields
item.acl

object (ItemAcl)

Access control list for this item.

item.metadata

object (ItemMetadata)

Metadata information.

item.structuredData

object (ItemStructuredData)

The structured data for the item that should conform to a registered object definition in the schema for the data source.

item.content

object (ItemContent)

Item content to be indexed and made text searchable.

item.version

string (bytes format)

Required. The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering.

Cloud query.search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes.

A base64-encoded string.

item.status

object (ItemStatus)

Status of the item. Output only field.

item.queue

string

Queue this item belongs to. The maximum length is 100 characters.

item.payload

string (bytes format)

Additional state connector can store for this item. The maximum length is 10000 bytes.

A base64-encoded string.

item.itemType

enum (ItemType)

Type for this item.

connectorName

string

Name of connector making this call.
Format: datasources/{source_id}/connectors/{ID}

mode

enum (Mode)

Required. The RequestMode for this request.

debugOptions

object (DebugOptions)

Common debug options.

indexItemOptions

object (IndexItemOptions)

Response body

If successful, the response body contains an instance of Operation.

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 OAuth 2.0 Overview.

IndexItemOptions

JSON representation
{
  "allowUnknownGsuitePrincipals": boolean
}
Fields
allowUnknownGsuitePrincipals

boolean

Specifies if the index request should allow gsuite principals that do not exist or are deleted in the index request.

Try it!