GET /api/endpoint/scripts_library

Spaces method and path for this operation:

get /s/{space_id}/api/endpoint/scripts_library

Refer to Spaces for more information.

Retrieve a list of scripts

Query parameters

  • page integer

    Page number of the results to return. Defaults to 1.

    Minimum value is 1. Default value is 1.

  • pageSize integer

    Number of results to return per page. Defaults to 10. Max value is 1000.

  • sortField string

    The field to sort the results by. Defaults to name.

    Values are name, createdAt, createdBy, updatedAt, or updatedBy.

  • sortDirection string

    The direction to sort the results by. Defaults to asc (ascending).

    Values are asc or desc.

  • kuery string

    A KQL query string to filter the list of scripts. Nearly all fields in the script object are searchable.

Responses

  • 200 application/json

    List of scripts response

    Hide response attributes Show response attributes object
    • data array[object]
      Hide data attributes Show data attributes object
      • createdAt string(date-time)
      • createdBy string
      • description string

        Description of the script and its purpose/functionality

      • downloadUri string

        URI to download the script file. Note that this is the relative path and does not include the space (if applicable)

      • example string
      • fileHash string

        SHA256 hash of the script file that was uploaded

      • fileName string

        Name of the script file that was uploaded

      • fileSize integer

        Size of the script file that was uploaded in bytes

      • id string(uuid)
      • instructions string

        Instructions for using the script, including details around its supported input arguments

      • name string
      • pathToExecutable string

        The relative path to the file included in the archive that should be executed once its contents are extracted. Applicable only for scripts uploaded as an archive (.zip file for example).

      • platform array[string]

        Values are linux, macos, or windows.

      • requiresInput boolean
      • updatedAt string(date-time)
      • updatedBy string
      • version string
    • page integer

      Page number

      Minimum value is 1. Default value is 1.

    • pageSize integer
    • sortDirection string

      Determines the sort order.

      Values are asc or desc.

    • sortField string

      Determines which field is used to sort the results.

      Values are name, createdAt, createdBy, updatedAt, or updatedBy.

    • total integer

      The total number of scripts matching the query

GET /api/endpoint/scripts_library
curl \ --request GET 'https://<KIBANA_URL>/api/endpoint/scripts_library' \ --header "Authorization: $API_KEY"
Response examples (200)
{ "data": [], "page": 1, "total": 100, "pageSize": 10, "sortField": "name", "sortDirection": "asc" }