The OpenSearch REST API JSON specification is a collection of JSON files that formalize and standardize the OpenSearch HTTP API. This specification is intended to facilitate the development of client libraries and integrations by providing a machine-readable definition of the API surface.
Each API definition in the specification typically includes:
- API Name: The identifier (e.g.,
indices.create) which usually corresponds to client library calls. - Documentation Link: A live URL to the official documentation.
- Stability Level: Indicates the API's lifecycle state.
- Request URL: Defines the HTTP method, path, and path parameters (parts).
- Request Parameters: Defines query or URL parameters.
- Request Body: Defines the schema for the JSON body.
If an API is stable but returns an arbitrary map of key-value pairs, it is noted using the treat_json_as_key_value flag in the response object.
{
"indices.create": {
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html"
},
"stability": "stable",
"url":{
"paths":[
{
"path":"/{index}",
"method":"PUT",
"parts":{
"index":{
"type":"string",
"description":"The name of the index"
}
}
}
]
},
"params": {
"timeout": {
"type" : "time",
"description" : "Explicit operation timeout"
}
},
"body": {
"description" : "The configuration for the index (`settings` and `mappings`)"
}
}
}