younifyd
Menu

Get script

Get script

GET/_scripts/{id}

Use it in a workflow

  1. Add a step and choose the OpenSearch connector.
  2. Pick the Get script action (under core).
  3. Fill in the fields below, then reference the result from later steps as {{getScript.response.data}}.

Request

Path parameters

idstringrequired

Identifier for the stored script or search template.

Query parameters

cluster_manager_timeoutstring

Operation timeout for connection to cluster-manager node.

master_timeoutstring

Specify timeout for connection to master

prettyboolean

Whether to pretty-format the returned JSON response.

Default false

humanboolean

Whether to return human-readable values for statistics.

Default false

error_traceboolean

Whether to include the stack trace of returned errors.

Default false

sourcestring

The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

filter_pathoneOf

A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.

Response

Returns 200 with an object. Read it in later steps with {{getScript.response.data.<field>}}.

_idstring

The unique identifier for a resource.

foundboolean
scriptobject

The definition of a stored script.

langoneOfrequired
optionsobject

The options for the script.

sourcestringrequired

The location of the source code for the script.

json
{
  "_id": "string",
  "found": false,
  "script": {
    "lang": null,
    "source": "string",
    "options": {}
  }
}

Need more? See the OpenSearch guide for connection setup and behaviour shared by every action.

Get script — OpenSearch — Documentation