Get a script or search template

GET /_scripts/{id}

Retrieves a stored script or search template.

Path parameters

  • id string Required

    Identifier for the stored script or search template.

Query parameters

Responses

GET /_scripts/{id}
curl \
 -X GET http://api.example.com/_scripts/{id}
Response examples (200)
{
  "_id": "string",
  "found": true,
  "script": {
    "": "painless",
    "options": {
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "source": "string"
  }
}