---
title: "POST /v1/settings/datasources"
method: POST
path: "/v1/settings/datasources"
tags: ["settings"]
---

# POST /v1/settings/datasources

`POST /v1/settings/datasources`

Creates a datasource. **Note:** This API requires an admin account to execute.

## Request body

- DataSource — Datasource is a logical namespace for items to be indexed. All items must belong to a datasource. This is the prerequisite before items can be indexed into Cloud Search.
  - `name` string — The name of the datasource resource. Format: datasources/{source_id}. The name is ignored when creating a datasource.
  - `disableServing` boolean — Disable serving any search or assist results.
  - `returnThumbnailUrls` boolean — Can a user request to get thumbnail URI for Items indexed in this data source.
  - `operationIds` string[] — IDs of the Long Running Operations (LROs) currently running for this schema.
  - `disableModifications` boolean — If true, sets the datasource to read-only mode. In read-only mode, the Indexing API rejects any requests to index or delete items in this source. Enabling read-only mode does not stop the processing of previously accepted data.
  - `displayName` string — Required. Display name of the datasource The maximum length is 300 characters.
  - `shortName` string — A short name or alias for the source. This value will be used to match the 'source' operator. For example, if the short name is *<value>* then queries like *source:<value>* will only return results for this source. The value must be unique across all datasources. The value must only contain alphanumeric characters (a-zA-Z0-9). The value cannot start with 'google' and cannot be one of the following: mail, gmail, docs, drive, groups, sites, calendar, hangouts, gplus, keep, people, teams. Its maximum length is 32 characters.
  - `itemsVisibility` GSuitePrincipal[] — This field restricts visibility to items at the datasource level. Items within the datasource are restricted to the union of users and groups included in this field. Note that, this does not ensure access to a specific item, as users need to have ACL permissions on the contained items. This ensures a high level access on the entire datasource, and that the individual items are not shared outside this visibility.
    - `gsuiteUserEmail` string — This principal references a Google Workspace user account.
    - `gsuiteGroupEmail` string — This principal references a Google Workspace group name.
    - `gsuiteDomain` boolean — This principal represents all users of the Google Workspace domain of the customer.
  - `indexingServiceAccounts` string[] — List of service accounts that have indexing access.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/cloudsearch.md) · [All operations](https://skmtc.dev/google/apis/cloudsearch/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/cloudsearch/revisions/d64d6afc59a6/schema)
