Skip to content

Indexes

All operations require authentication.

6 operationsv2/publicCloud/project
Agent setup

List indexesBeta

GET
/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/index

Returns the indexes of the service with their document count, size and shards.

Path parameters

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200Index[]successful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the index was created

documentCount
read-only
integer

Number of documents stored in this index

id
read-only
stringuuid

Unique identifier of the index

name
read-only
string

Name of the OpenSearch index

replicaCount
read-only
integer

Number of replica shards for this index

shardCount
read-only
integer

Number of primary shards for this index

size
read-only
integer

Total size of the index in bytes

Example uses projectId = string, serviceId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/index \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "documentCount": 0, "id": "00000000-0000-0000-0000-000000000000", "name": "string", "replicaCount": 0, "shardCount": 0, "size": 0 }]

Get an indexBeta

GET
/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/index/{indexId}

Returns the document count, the size in bytes and the primary and replica shard counts of the index.

Path parameters

indexId
required
stringuuid

Index ID

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

Response

200Indexsuccessful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the index was created

documentCount
read-only
integer

Number of documents stored in this index

id
read-only
stringuuid

Unique identifier of the index

name
read-only
string

Name of the OpenSearch index

replicaCount
read-only
integer

Number of replica shards for this index

shardCount
read-only
integer

Number of primary shards for this index

size
read-only
integer

Total size of the index in bytes

Example uses indexId = 00000000-0000-0000-0000-000000000000, projectId = string, serviceId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/index/{indexId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "documentCount": 0, "id": "00000000-0000-0000-0000-000000000000", "name": "string", "replicaCount": 0, "shardCount": 0, "size": 0}

List index patternsBeta

GET
/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/pattern

Returns the index patterns of the service with their maximum number of indexes.

Path parameters

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200Pattern[]successful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the index pattern

maximumIndexCount
read-only
integer

Maximum number of indexes matching this pattern. Oldest indexes are deleted when this limit is reached.

pattern
read-only
string

Glob pattern matching index names

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses projectId = string, serviceId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/pattern \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "maximumIndexCount": 0, "pattern": "string", "updatedAt": "2024-01-01T12:00:00Z" }]

Get an index patternBeta

GET
/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/pattern/{patternId}

Returns the glob pattern and the maximum number of indexes it keeps.

Path parameters

patternId
required
stringuuid

Pattern ID

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

Response

200Patternsuccessful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the index pattern

maximumIndexCount
read-only
integer

Maximum number of indexes matching this pattern. Oldest indexes are deleted when this limit is reached.

pattern
read-only
string

Glob pattern matching index names

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses patternId = 00000000-0000-0000-0000-000000000000, projectId = string, serviceId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/pattern/{patternId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "maximumIndexCount": 0, "pattern": "string", "updatedAt": "2024-01-01T12:00:00Z"}

Create an index patternBeta

POST
/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/pattern

Creates a glob pattern matching index names, with a maximum number of matching indexes. When the limit is reached, the oldest indexes are deleted.

Path parameters

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

Request body (required)

maximumIndexCount
required
integer

Maximum number of indexes matching this pattern

pattern
required
string

Glob pattern matching index names

Response

200Patternsuccessful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the index pattern

maximumIndexCount
read-only
integer

Maximum number of indexes matching this pattern. Oldest indexes are deleted when this limit is reached.

pattern
read-only
string

Glob pattern matching index names

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses projectId = string, serviceId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/pattern \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "maximumIndexCount": 0, "pattern": "string", "updatedAt": "2024-01-01T12:00:00Z"}

Delete an index patternBeta

DELETE
/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/pattern/{patternId}

Deletes the index pattern and the indexes matching it.

Path parameters

patternId
required
stringuuid

Pattern ID

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

Response

200Patternsuccessful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the index pattern

maximumIndexCount
read-only
integer

Maximum number of indexes matching this pattern. Oldest indexes are deleted when this limit is reached.

pattern
read-only
string

Glob pattern matching index names

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses patternId = 00000000-0000-0000-0000-000000000000, projectId = string, serviceId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/pattern/{patternId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "maximumIndexCount": 0, "pattern": "string", "updatedAt": "2024-01-01T12:00:00Z"}