Skip to main content
POST
/
projects
/
{projectId}
/
indexes
cURL
curl --request POST \
  --url https://{baseUrl}/{version}/projects/{projectId}/indexes \
  --header 'content-type: <content-type>' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "indexName": "<string>",
  "mappings": {},
  "indexClass": "STANDARD",
  "sourceProjectId": "<string>",
  "sourceIndexName": "<string>",
  "sourceProjectApiKey": "<string>"
}'
{
  "projectId": "<string>",
  "indexName": "<string>",
  "mappings": {},
  "numDocs": 123,
  "cloneSourceInfo": {
    "sourceProjectId": "<string>",
    "sourceIndexName": "<string>",
    "sourceIndexVersionId": "<string>"
  },
  "indexStatus": "CREATING",
  "indexClass": "STANDARD"
}

Headers

content-type
string
default:application/json
required
x-api-key
string
required

Project API Key.

Path Parameters

projectId
string
required

Project ID.

Body

application/json
indexName
string
required

Index name must be unique within a project and the supported maximum length is 52.

mappings
object
indexClass
enum<string>
default:STANDARD

Index class.

Available options:
STANDARD,
INFREQUENT_ACCESS
sourceProjectId
string
sourceIndexName
string
sourceProjectApiKey
string

Response

202 - application/json

Created index

projectId
string

Project ID.

indexName
string

Index name.

mappings
object
numDocs
integer

Total number of documents.

cloneSourceInfo
object

Clone source information.

indexStatus
enum<string>

Status

Available options:
CREATING,
ACTIVE,
DELETING
indexClass
enum<string>
default:STANDARD

Index class.

Available options:
STANDARD,
INFREQUENT_ACCESS