# Cloud Search API

Cloud Search provides cloud-based search capabilities over Google Workspace data. The Cloud Search API allows indexing of non-Google Workspace data into Cloud Search.

- [REST Resource: v1](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1)
- [REST Resource: v1.debug.datasources.items](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.debug.datasources.items)
- [REST Resource: v1.debug.datasources.items.unmappedids](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.debug.datasources.items.unmappedids)
- [REST Resource: v1.debug.identitysources.items](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.debug.identitysources.items)
- [REST Resource: v1.debug.identitysources.unmappedids](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.debug.identitysources.unmappedids)
- [REST Resource: v1.indexing.datasources](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.indexing.datasources)
- [REST Resource: v1.indexing.datasources.items](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.indexing.datasources.items)
- [REST Resource: v1.media](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.media)
- [REST Resource: v1.operations](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.operations)
- [REST Resource: v1.query](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.query)
- [REST Resource: v1.query.sources](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.query.sources)
- [REST Resource: v1.settings](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.settings)
- [REST Resource: v1.settings.datasources](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.settings.datasources)
- [REST Resource: v1.settings.searchapplications](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.settings.searchapplications)
- [REST Resource: v1.stats](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.stats)
- [REST Resource: v1.stats.index.datasources](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.stats.index.datasources)
- [REST Resource: v1.stats.query.searchapplications](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.stats.query.searchapplications)
- [REST Resource: v1.stats.session.searchapplications](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.stats.session.searchapplications)
- [REST Resource: v1.stats.user.searchapplications](https://developers.google.com/workspace/cloud-search/docs/reference/rest#v1.stats.user.searchapplications)

## Service: cloudsearch.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://cloudsearch.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://cloudsearch.googleapis.com`

## REST Resource: [v1](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/TopLevel)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/TopLevel/initializeCustomer` | `POST /v1:initializeCustomer` Enables `third party` support in Google Cloud Search. |

## REST Resource: [v1.debug.datasources.items](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/checkAccess` | `POST /v1/debug/{name=datasources/*/items/*}:checkAccess` Checks whether an item is accessible by specified principal. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/searchByViewUrl` | `POST /v1/debug/{name=datasources/*}/items:searchByViewUrl` Fetches the item whose viewUrl exactly matches that of the URL provided in the request. |

## REST Resource: [v1.debug.datasources.items.unmappedids](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items.unmappedids)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items.unmappedids/list` | `GET /v1/debug/{parent=datasources/*/items/*}/unmappedids` List all unmapped identities for a specific item. |

## REST Resource: [v1.debug.identitysources.items](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.identitysources.items)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.identitysources.items/listForunmappedidentity` | `GET /v1/debug/{parent=identitysources/*}/items:forunmappedidentity` Lists names of items associated with an unmapped identity. |

## REST Resource: [v1.debug.identitysources.unmappedids](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.identitysources.unmappedids)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.identitysources.unmappedids/list` | `GET /v1/debug/{parent=identitysources/*}/unmappedids` Lists unmapped user identities for an identity source. |

## REST Resource: [v1.indexing.datasources](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources/deleteSchema` | `DELETE /v1/indexing/{name=datasources/*}/schema` Deletes the schema of a data source. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources/getSchema` | `GET /v1/indexing/{name=datasources/*}/schema` Gets the schema of a data source. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources/updateSchema` | `PUT /v1/indexing/{name=datasources/*}/schema` Updates the schema of a data source. |

## REST Resource: [v1.indexing.datasources.items](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items/delete` | `DELETE /v1/indexing/{name=datasources/*/items/*}` Deletes `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items#Item` for the specified resource name. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items/deleteQueueItems` | `POST /v1/indexing/{name=datasources/*}/items:deleteQueueItems` Deletes all items in a queue. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items/get` | `GET /v1/indexing/{name=datasources/*/items/*}` Gets `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items#Item` by item name. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items/index_` | `POST /v1/indexing/{item.name=datasources/*/items/*}:index` Updates `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items#Item` ACL, metadata, and content. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items/list` | `GET /v1/indexing/{name=datasources/*}/items` Lists all or a subset of `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items#Item`. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items/poll` | `POST /v1/indexing/{name=datasources/*}/items:poll` Polls for unreserved items from the indexing queue and marks a set as reserved, starting with items that have the oldest timestamp from the highest priority `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/ItemStatus.Code`. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items/push` | `POST /v1/indexing/{item.name=datasources/*/items/*}:push` Pushes an item onto a queue for later polling and updating. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items/unreserve` | `POST /v1/indexing/{name=datasources/*}/items:unreserve` Unreserves all items from a queue, making them all eligible to be polled. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items/upload` | `POST /v1/indexing/{name=datasources/*/items/*}:upload` Creates an upload session for uploading item content. |

## REST Resource: [v1.media](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/media)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/media/upload` | `POST /v1/media/{resourceName=**}` `POST /upload/v1/media/{resourceName=**}` Uploads media for indexing. |

## REST Resource: [v1.operations](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/operations)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/operations/get` | `GET /v1/{name=operations/**}` Gets the latest state of a long-running operation. |

## REST Resource: [v1.query](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query/removeActivity` | `POST /v1/query:removeActivity` Provides functionality to remove logged activity for a user. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query/search` | `POST /v1/query/search` The Cloud Search Query API provides the search method, which returns the most relevant results from a user query. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query/suggest` | `POST /v1/query/suggest` Provides suggestions for autocompleting the query. |

## REST Resource: [v1.query.sources](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list` | `GET /v1/query/sources` Returns list of sources that user can use for Search and Suggest APIs. |

## REST Resource: [v1.settings](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings/getCustomer` | `GET /v1/settings/customer` Get customer settings. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings/updateCustomer` | `PATCH /v1/settings/customer` Update customer settings. |

## REST Resource: [v1.settings.datasources](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.datasources)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/create` | `POST /v1/settings/datasources` Creates a datasource. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/delete` | `DELETE /v1/settings/{name=datasources/*}` Deletes a datasource. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/get` | `GET /v1/settings/{name=datasources/*}` Gets a datasource. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/list` | `GET /v1/settings/datasources` Lists datasources. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/patch` | `PATCH /v1/settings/{source.name=datasources/*}` Updates a datasource. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/update` | `PUT /v1/settings/{source.name=datasources/*}` Updates a datasource. |

## REST Resource: [v1.settings.searchapplications](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/create` | `POST /v1/settings/searchapplications` Creates a search application. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/delete` | `DELETE /v1/settings/{name=searchapplications/*}` Deletes a search application. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/get` | `GET /v1/settings/{name=searchapplications/*}` Gets the specified search application. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/list` | `GET /v1/settings/searchapplications` Lists all search applications. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/patch` | `PATCH /v1/settings/{searchApplication.name=searchapplications/*}` Updates a search application. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/reset` | `POST /v1/settings/{name=searchapplications/*}:reset` Resets a search application to default settings. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/update` | `PUT /v1/settings/{searchApplication.name=searchapplications/*}` Updates a search application. |

## REST Resource: [v1.stats](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getIndex` | `GET /v1/stats/index` Gets indexed item statistics aggreggated across all data sources. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getQuery` | `GET /v1/stats/query` Get the query statistics for customer. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSearchapplication` | `GET /v1/stats/searchapplication` Get search application stats for customer. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getSession` | `GET /v1/stats/session` Get the # of search sessions, % of successful sessions with a click query statistics for customer. |
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats/getUser` | `GET /v1/stats/user` Get the users statistics for customer. |

## REST Resource: [v1.stats.index.datasources](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats.index.datasources)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats.index.datasources/get` | `GET /v1/stats/index/{name=datasources/*}` Gets indexed item statistics for a single data source. |

## REST Resource: [v1.stats.query.searchapplications](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats.query.searchapplications)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats.query.searchapplications/get` | `GET /v1/stats/query/{name=searchapplications/*}` Get the query statistics for search application. |

## REST Resource: [v1.stats.session.searchapplications](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats.session.searchapplications)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats.session.searchapplications/get` | `GET /v1/stats/session/{name=searchapplications/*}` Get the # of search sessions, % of successful sessions with a click query statistics for search application. |

## REST Resource: [v1.stats.user.searchapplications](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats.user.searchapplications)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/stats.user.searchapplications/get` | `GET /v1/stats/user/{name=searchapplications/*}` Get the users statistics for search application. |