Skip to content

Instantly share code, notes, and snippets.

@safoorsafdar
Last active December 31, 2020 14:02
Show Gist options
  • Save safoorsafdar/ad0b18bb93f7be611d4c05ecd920e5da to your computer and use it in GitHub Desktop.
Save safoorsafdar/ad0b18bb93f7be611d4c05ecd920e5da to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "StackStorm API",
"description": "\n## Welcome\n\nWelcome to the StackStorm API Reference documentation! You can use the StackStorm API to integrate StackStorm with 3rd-party systems and custom applications. Example integrations include writing your own self-service user portal, or integrating with other orquestation systems.\n\nThis document provides an overview of how to use the API. Use the menu on the left to look up details of specific API endpoints. For more information about how StackStorm works, and how to use it, check out the main [StackStorm documentation](https://docs.stackstorm.com).\n\n> ### A Quick Note\n> This API is intended for software developers, and those are who are comfortable working with RESTful APIs, and writing some code. You do not need to use this API to work with StackStorm, or to use and write integration packs for StackStorm.\n\n## Accessing the API\n\nUsually the API is available at `https://$ST2_HOSTNAME/api`. The default implementation is to use Nginx as a front-end, passing `/api` requests through to the `st2api` service, which by default listens on port `9101`. On a [reference single-system deployment](https://docs.stackstorm.com/install/index.html), all processes run on the same system. If you have a [multi-system deployment](https://docs.stackstorm.com/reference/ha.html), the components may be running on multiple systems, and may be load-balanced.\n\n## Authentication\n\nTo authenticate against the StackStorm API, either an authentication token or an API key (but not both) should be provided in the HTTP request headers. The headers are named `X-Auth-Token` and `St2-Api-Key` respectively. In situation when it is impossble to provide a header to the response, query parameters `x-auth-token` and `st2-api-key` could be used instead, but would require you to weight in on security implications.\n\nAn authentication token is a time-limited access token, granted once a user authenticates, typically using a username and password. This is suitable for short-term, interactive sessions. [API Keys](https://docs.stackstorm.com/authentication.html#api-keys) do not expire, and are therefore better suited for use with integrating other applications.\n\n### Authentication Tokens\n\nIf you are using authentication tokens, you need to first obtain a token using the `/auth` endpoint, and then use the token for future requests against the `/api` endpoint. To obain a token:\n\n```\ncurl -X POST -u 'yourusername:yourpassword' https://$ST2_HOSTNAME/auth/v1/tokens\n```\n\nYou can then use the token like this:\n\n```\n# Token as header\ncurl -H \"X-Auth-Token: 4d76e023841a4a91a9c66aa4541156fe\" https://$ST2_HOSTNAME/api/v1/actions\n\n# Token as query parameter\ncurl \"https://$ST2_HOSTNAME/api/v1/actions?x-auth-token=4d76e023841a4a91a9c66aa4541156fe\"\n```\n\n### API Keys\n\nAPI Keys can be generated once, and then used indefinitely. To obtain an API Key, you can use the `st2` CLI:\n\n```\nst2 apikey create -k -m '{\"used_by\": \"my integration\"}'\n```\n\nNote the use of the option `-m` flag to provide key metadata. This is good practice, because it helps to identify what the key is used for. This is useful if you need to later revoke or disable keys.\n\nKeys can also be created using the [apikeys](api/v1/apikeys/) API.\n\nUsing the API key:\n\n```\n# Key as header\ncurl -H \"St2-Api-Key: <API-KEY-VALUE>\" https://$ST2_HOSTNAME/api/v1/actions\n\n# Key as query parameter\ncurl https://$ST2_HOSTNAME/api/v1/actions?st2-api-key=<API-KEY-VALUE>\n```\n\n## HTTP Methods\n\nThe StackStorm API supports these HTTP methods:\n\n* **GET:** Use to retrieve data, e.g. current status of an execution. GET requests will not update or change data.\n* **POST:** Use to create new resources. For example, make a POST request to create a new rule, or execute an action.\n* **PUT:** Use to create or update a resource, e.g. to update an existing Key-Value pair.\n* **DELETE:** Remove a resource, e.g. delete an API key.\n\nThere is also an implicit support of **OPTIONS** method that will return a set of CORS-related headers.\n\nMethods **HEAD** and **PATCH** are not supported in API v1, but might be considered in future iterations.\n\n## SSL\n\nThe default StackStorm installation creates a self-signed certificate. If you are testing this with `curl`, you may need to disable certificate validation with `curl -k`. We **strongly** recommend you configure valid, signed certificates for StackStorm.\n\n## JSON\n\nThe StackStorm API only supports JSON, not XML. Most POST requests require a well-formatted JSON object body.\n\n## Code Examples\n\nThese are some examples to show how to use the StackStorm API with cURL. You can use any REST-capable client, library or programming language to access the StackStorm API.\n\nObtaining an authentication token:\n\n```\n$ curl -X POST -k -u st2admin:'Ch@ngeMe' https://$ST2_HOSTNAME/auth/v1/tokens\n{\"user\": \"st2admin\", \"token\": \"866218ad67e141e4aaddbbb92964e67e\", \"expiry\": \"2017-04-06T01:15:06.602758Z\", \"id\": \"58e4451ac4da5f1e040fb859\", \"metadata\": {}}\n```\n\nList rules for the ChatOps pack:\n\n```\n$ curl -k -X GET -H 'X-Auth-Token: b99d3f74a16e471992f2a10935637916' 'https://$ST2_HOSTNAME/api/v1/rules?limit=50&pack=chatops'\n[{\"description\": \"Notification rule to send results of action executions to stream for chatops\", \"tags\": [], \"type\": {\"ref\": \"standard\", \"parameters\": {}}, \"enabled\": true, \"name\": \"notify\", \"trigger\": {\"ref\": \"core.st2.generic.notifytrigger\", \"type\": \"core.st2.generic.notifytrigger\", \"parameters\": {}}, \"criteria\": {\"trigger.route\": {\"pattern\": \"hubot\", \"type\": \"equals\"}}, \"action\": {\"ref\": \"chatops.post_result\", \"parameters\": {\"user\": \"{{trigger.data.user}}\", \"execution_id\": \"{{trigger.execution_id}}\", \"channel\": \"{{trigger.data.source_channel}}\"}}, \"pack\": \"chatops\", \"ref\": \"chatops.notify\", \"id\": \"58b7089ac4da5f6aa779b85a\", \"uid\": \"rule:chatops:notify\"}]\n```\n\nLoad a new rule:\n\n```\n$ curl -X POST -H 'content-type: application/json' -H 'X-Auth-Token: b99d3f74a16e471992f2a10935637916' --data-binary '{\"description\": \"Sample rule using an Interval Timer.\", \"enabled\": false, \"trigger\": {\"type\": \"core.st2.IntervalTimer\", \"parameters\": {\"unit\": \"seconds\", \"delta\": 5}}, \"criteria\": {}, \"action\": {\"ref\": \"core.local\", \"parameters\": {\"cmd\": \"echo \\\"{{trigger.executed_at}}\\\"\"}}, \"pack\": \"examples\", \"name\": \"sample_rule_with_timer\"}' https://$ST2_HOSTNAME/api/v1/rules\n{\n \"description\": \"Sample rule using an Interval Timer.\",\n \"tags\": [],\n \"type\": {\n \"ref\": \"standard\",\n \"parameters\": {}\n },\n \"enabled\": false,\n \"name\": \"sample_rule_with_timer\",\n \"trigger\": {\n \"ref\": \"core.cab3cb5f-f0c5-466b-b27c-dc481fc19fac\",\n \"type\": \"core.st2.IntervalTimer\",\n \"parameters\": {\n \"unit\": \"seconds\",\n \"delta\": 5\n }\n },\n \"criteria\": {},\n \"action\": {\n \"ref\": \"core.local\",\n \"parameters\": {\n \"cmd\": \"echo \\\"{{trigger.executed_at}}\\\"\"\n }\n },\n \"pack\": \"examples\",\n \"ref\": \"examples.sample_rule_with_timer\",\n \"id\": \"58eddb871878c12be65c9fdd\",\n \"uid\": \"rule:examples:sample_rule_with_timer\"\n}\n```\n\n### Further examples\n\nFor further examples of using the API, check out the `st2 --debug` command. If you know which st2 command you want, run `st2 --debug <st2 command>`, and it will display the equivalent cURL commands. For example:\n\n```\nst2 --debug action list -p chatops\n2017-04-05 00:56:01,935 DEBUG - Using cached token from file \"/home/vagrant/.st2/token-st2admin\"\n# -------- begin 37703888 request ----------\ncurl -X GET -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-requests/2.11.1' -H 'X-Auth-Token: b99d3f74a16e471992f2a10935637916' 'http://127.0.0.1:9101/v1/actions?pack=chatops'\n# -------- begin 37703888 response ----------\n[{\"name\": \"format_execution_result\", \"parameters\": {\"execution_id\": {\"required\": true, \"type\": \"string\", \"description\": \"Id of execution to format\"}}, \"tags\": [], \"description\": \"Format an execution result for chatops\", \"enabled\": true, \"entry_point\": \"format_execution_result.py\", \"notify\": {}, \"uid\": \"action:chatops:format_execution_result\", \"pack\": \"chatops\", \"ref\": \"chatops.format_execution_result\", \"id\": \"58b7089ac4da5f6aa779b847\", \"runner_type\": \"python-script\"}, {\"name\": \"post_message\", \"parameters\": {\"extra\": {\"type\": \"object\", \"description\": \"Extra adapter-specific parameters.\"}, \"whisper\": {\"default\": false, \"type\": \"boolean\", \"description\": \"Send a private message to user\"}, \"route\": {\"default\": \"chatops\"}, \"experimental\": {\"default\": true, \"immutable\": true}, \"user\": {\"type\": \"string\", \"description\": \"Explicitly notify a user\"}, \"message\": {\"required\": true, \"type\": \"string\", \"description\": \"Message to send.\"}, \"channel\": {\"required\": true, \"type\": \"string\", \"description\": \"Channel to post to\"}}, \"tags\": [], \"description\": \"Post a message to stream for chatops\", \"enabled\": true, \"entry_point\": \"\", \"notify\": {}, \"uid\": \"action:chatops:post_message\", \"pack\": \"chatops\", \"ref\": \"chatops.post_message\", \"id\": \"58b7089ac4da5f6aa779b848\", \"runner_type\": \"announcement\"}, {\"name\": \"post_result\", \"parameters\": {\"whisper\": {\"default\": false, \"type\": \"boolean\", \"description\": \"Send a private message to user\"}, \"user\": {\"type\": \"string\", \"description\": \"Explicitly notify a user\"}, \"execution_id\": {\"required\": true, \"type\": \"string\", \"description\": \"ID of an execution to send\"}, \"channel\": {\"required\": true, \"type\": \"string\", \"description\": \"Channel to post to\"}}, \"tags\": [], \"description\": \"Post an execution result to stream for chatops\", \"enabled\": true, \"entry_point\": \"workflows/post_result.yaml\", \"notify\": {}, \"uid\": \"action:chatops:post_result\", \"pack\": \"chatops\", \"ref\": \"chatops.post_result\", \"id\": \"58b7089ac4da5f6aa779b849\", \"runner_type\": \"action-chain\"}]\n# -------- end 37703888 response ------------\n\n+---------------------------------+---------+--------------------------------------------+\n| ref | pack | description |\n+---------------------------------+---------+--------------------------------------------+\n| chatops.format_execution_result | chatops | Format an execution result for chatops |\n| chatops.post_message | chatops | Post a message to stream for chatops |\n| chatops.post_result | chatops | Post an execution result to stream for |\n| | | chatops |\n+---------------------------------+---------+--------------------------------------------+\n```\n\n**NOTE**: The URL displayed in the `curl` commands above is directly accessing the API service on port 9101. If you are connecting to the ST2 API from a remote system, you should modify this to work with Nginx on port 443. In the above output, `http://127.0.0.1:9101/v1/actions?pack=chatops` would become `https://myhost.example.com/api/v1/actions?pack=chatops`.\n\n## Errors\n\nAPI errors have a standard HTTP response code, and a human-readable message. For example, if you try to create a rule with the same name as an existing rule, you will see an HTTP 409 response:\n\n```\n< HTTP/1.1 409 Conflict\n< Server: nginx/1.10.3\n< Date: Wed, 05 Apr 2017 00:44:32 GMT\n< Content-Type: application/json\n< Content-Length: 230\n< Connection: keep-alive\n< Access-Control-Allow-Origin: http://127.0.0.1:3000\n< Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS\n< Access-Control-Allow-Headers: Content-Type,Authorization,X-Auth-Token,St2-Api-Key,X-Request-ID\n< Access-Control-Expose-Headers: Content-Type,X-Limit,X-Total-Count,X-Request-ID\n< X-Request-ID: 68de2f2a-6fc0-4827-9ee9-b7124553d3e8\n<\n{\n \"conflict-id\": \"58e43d58c4da5f35c286a81f\",\n \"faultstring\": \"Tried to save duplicate unique keys (E11000 duplicate key error collection: st2.rule_d_b index: uid_1 dup key: { : \\\"rule:examples:sample_rule_with_timer\\\" })\"\n}\n```\n\n`4xx` codes indicate a bad request, whereas `5xx` errors indicate a server-side problem with StackStorm.\n\n## Support\n\nJoin our [Slack Community](https://stackstorm.com/community-signup) to get help from the engineering team and fellow users. You can also create issues against the main [StackStorm GitHub repo](https://github.com/StackStorm/st2/issues), or the [st2apidocs repo](https://github.com/StackStorm/st2apidocs) for documentation-specific issues.\n\nWe also recommend reviewing the main [StackStorm documentation](https://docs.stackstorm.com/).\n"
},
"paths": {
"/api/v1/": {
"get": {
"operationId": "st2api.controllers.root:root_controller.index",
"description": "General API info.",
"responses": {
"200": {
"description": "General API info.",
"schema": {
"type": "object",
"properties": {
"version": {
"type": "string"
},
"docs_url": {
"type": "string"
}
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/user": {
"get": {
"operationId": "st2api.controllers.v1.user:user_controller.get",
"description": "Metadata information about the authenticated user.",
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
},
{
"name": "auth_info",
"in": "context",
"x-as": "auth_info",
"description": "Information on how user authenticated."
}
],
"responses": {
"200": {
"description": "Metadata information about the authenticated user.",
"schema": {
"type": "object"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actions": {
"get": {
"operationId": "st2api.controllers.v1.actions:actions_controller.get_all",
"x-permissions": "action_list",
"description": "Returns a list of all actions.",
"x-log-result": false,
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "limit",
"in": "query",
"description": "Number of actions to get",
"type": "integer"
},
{
"name": "offset",
"in": "query",
"description": "Number of actions to offset",
"type": "integer",
"default": 0
},
{
"name": "id",
"in": "query",
"description": "Action id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Action name filter",
"type": "string"
},
{
"name": "pack",
"in": "query",
"description": "Action pack name filter",
"type": "string"
},
{
"name": "tags",
"in": "query",
"description": "Action tags name filter",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of actions",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Action"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"operationId": "st2api.controllers.v1.actions:actions_controller.post",
"description": "Create a new action.\n",
"parameters": [
{
"name": "action",
"in": "body",
"description": "Action content",
"schema": {
"$ref": "#/definitions/ActionCreateRequest"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"201": {
"description": "Single action being created",
"schema": {
"$ref": "#/definitions/Action"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actions/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.actions:actions_controller.get_one",
"description": "Get one action.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Action requested",
"schema": {
"$ref": "#/definitions/Action"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.actions:actions_controller.put",
"description": "Update an action.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
},
{
"name": "action",
"in": "body",
"description": "Action content",
"schema": {
"$ref": "#/definitions/ActionUpdateRequest"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Action updated",
"schema": {
"$ref": "#/definitions/Action"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"delete": {
"operationId": "st2api.controllers.v1.actions:actions_controller.delete",
"description": "Delete an action.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"204": {
"description": "Action deleted"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actions/views/parameters/{action_id}": {
"get": {
"operationId": "st2api.controllers.v1.action_views:parameters_view_controller.get_one",
"description": "Get parameters for an action.\n",
"parameters": [
{
"name": "action_id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "An object containing action parameters",
"schema": {
"$ref": "#/definitions/ActionParameters"
},
"examples": {
"application/json": {
"parameters": {
"cmd": {
"type": "string"
}
}
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actions/views/overview": {
"get": {
"operationId": "st2api.controllers.v1.action_views:overview_controller.get_all",
"x-permissions": "action_list",
"description": "Returns a list of all the actions with runner parameters included.",
"x-log-result": false,
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "limit",
"in": "query",
"description": "Number of actions to get",
"type": "integer"
},
{
"name": "offset",
"in": "query",
"description": "Number of actions to offset",
"type": "integer",
"default": 0
},
{
"name": "id",
"in": "query",
"description": "Action id filter",
"type": "string"
},
{
"name": "name",
"in": "query",
"description": "Action name filter",
"type": "string"
},
{
"name": "pack",
"in": "query",
"description": "Action pack name filter",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of actions",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Action"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actions/views/overview/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.action_views:overview_controller.get_one",
"description": "Get one action with runner parameters included.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User running the action"
}
],
"responses": {
"200": {
"description": "Action requested",
"schema": {
"$ref": "#/definitions/Action"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actions/views/entry_point/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.action_views:entry_point_controller.get_one",
"description": "Get code of the action's entry_point.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Entry point code",
"schema": {
"type": "string"
},
"examples": {
"text/plain": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# and stuff"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actionalias": {
"get": {
"operationId": "st2api.controllers.v1.actionalias:action_alias_controller.get_all",
"x-permissions": "action_alias_list",
"description": "Get list of action-aliases.\n",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "string"
},
{
"name": "pack",
"in": "query",
"description": "Only return resources belonging to the provided pack",
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Number of keys to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of keys to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of action aliases.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ActionAlias"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"operationId": "st2api.controllers.v1.actionalias:action_alias_controller.post",
"description": "Create actionalias.\n",
"parameters": [
{
"name": "action_alias",
"in": "body",
"description": "Action alias file.",
"schema": {
"$ref": "#/definitions/ActionAlias"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"201": {
"description": "Action alias created",
"schema": {
"$ref": "#/definitions/ActionAlias"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actionalias/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.actionalias:action_alias_controller.get_one",
"x-requirements": {
"ref_or_id": "(?!match)(?!help).*"
},
"description": "Get a specific actionalias based on ref or id.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Action alias requested",
"schema": {
"$ref": "#/definitions/ActionAlias"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.actionalias:action_alias_controller.put",
"description": "Update action alias",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Name or ID of the action alias.",
"type": "string",
"required": true
},
{
"name": "action_alias",
"in": "body",
"description": "JSON/YAML file containing the action alias to update.",
"schema": {
"$ref": "#/definitions/ActionAlias"
},
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Action alias updated.",
"schema": {
"$ref": "#/definitions/ActionAlias"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"delete": {
"operationId": "st2api.controllers.v1.actionalias:action_alias_controller.delete",
"description": "Delete action alias based on ref_or_id.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Name or ID of the action alias.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"204": {
"description": "Action alias deleted"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actionalias/match": {
"post": {
"operationId": "st2api.controllers.v1.actionalias:action_alias_controller.match",
"x-permissions": "action_alias_match",
"description": "Match action alias based on format (representation or display).\n",
"parameters": [
{
"name": "action_alias_match_api",
"in": "body",
"description": "Object containing the format to be matched.",
"schema": {
"$ref": "#/definitions/ActionAliasMatchRequest"
}
}
],
"responses": {
"200": {
"description": "Action alias match pattern",
"schema": {
"$ref": "#/definitions/ActionAliasMatch"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/actionalias/help": {
"get": {
"operationId": "st2api.controllers.v1.actionalias:action_alias_controller.help",
"x-permissions": "action_alias_help",
"description": "Get available help strings for action aliases.\n",
"parameters": [
{
"name": "pack",
"in": "query",
"description": "Entity pack",
"type": "string"
},
{
"name": "filter",
"in": "query",
"description": "Regex filter",
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Number of actions alias to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of actions alias to offset",
"type": "integer",
"default": 0
}
],
"responses": {
"200": {
"description": "Action alias match pattern",
"schema": {
"$ref": "#/definitions/ActionAliasHelp"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/aliasexecution": {
"post": {
"operationId": "st2api.controllers.v1.aliasexecution:action_alias_execution_controller.post",
"description": "Create alias execution.\n",
"parameters": [
{
"name": "payload",
"in": "body",
"description": "Alias execution payload.",
"schema": {
"$ref": "#/definitions/AliasExecution"
}
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"201": {
"description": "Action alias created",
"schema": {
"$ref": "#/definitions/AliasExecution"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/aliasexecution/match_and_execute": {
"post": {
"operationId": "st2api.controllers.v1.aliasexecution:action_alias_execution_controller.match_and_execute",
"description": "Create executions based on action alias match (if any).\n",
"parameters": [
{
"name": "input_api",
"in": "body",
"description": "Input data.",
"schema": {
"$ref": "#/definitions/AliasMatchAndExecuteInputAPI"
}
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"201": {
"description": "Action alias executions created",
"schema": {
"type": "object",
"properties": {
"results": {
"description": "List of all matched and executed actions",
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/AliasExecution"
}
}
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/executions": {
"get": {
"operationId": "st2api.controllers.v1.actionexecutions:action_executions_controller.get_all",
"x-permissions": "execution_list",
"x-log-result": false,
"description": "Returns a list of all executions.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "limit",
"in": "query",
"description": "Number of executions to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of executions to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "sort_asc",
"in": "query",
"description": "Sort in ascending order",
"type": "string"
},
{
"name": "sort_desc",
"in": "query",
"description": "Sort in descending order",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Execution id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "status",
"in": "query",
"description": "Execution status filter",
"type": "string"
},
{
"name": "parent",
"in": "query",
"description": "Parent execution filter",
"type": "string"
},
{
"name": "trigger_type",
"in": "query",
"description": "Trigger type filter",
"type": "string"
},
{
"name": "trigger",
"in": "query",
"description": "Trigger filter",
"type": "string"
},
{
"name": "trigger_instance",
"in": "query",
"description": "Trigger instance filter",
"type": "string"
},
{
"name": "rule",
"in": "query",
"description": "Rule filter",
"type": "string"
},
{
"name": "action",
"in": "query",
"description": "Action ref filter",
"type": "string"
},
{
"name": "runner",
"in": "query",
"description": "Runner filter",
"type": "string"
},
{
"name": "user",
"in": "query",
"description": "User filter",
"type": "string"
},
{
"name": "liveaction",
"in": "query",
"description": "Liveaction id filter",
"type": "string"
},
{
"name": "timestamp",
"in": "query",
"description": "Start timestamp filter",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
{
"name": "timestamp_lt",
"in": "query",
"description": "Start timestamp less than filter",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
{
"name": "timestamp_gt",
"in": "query",
"description": "Start timestamp greater than filter",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "filter",
"in": "query",
"x-as": "advanced_filters",
"description": "Advanced filter string. Overrides other filters.",
"type": "string"
},
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of executions",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Execution"
}
},
"examples": {
"application/json": [
{
"trigger": {
"type": "object"
},
"action": {
"type": "object"
}
}
]
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"operationId": "st2api.controllers.v1.actionexecutions:action_executions_controller.post",
"x-log-result": false,
"description": "Create a new execution.\n",
"parameters": [
{
"name": "liveaction_api",
"in": "body",
"description": "Execution request",
"schema": {
"$ref": "#/definitions/ExecutionRequest"
}
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
},
{
"name": "st2-context",
"in": "header",
"x-as": "context_string",
"description": "Additional execution context",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"201": {
"description": "Execution being created",
"schema": {
"$ref": "#/definitions/Execution"
},
"examples": {
"application/json": {
"trigger": {
"type": "object"
},
"action": {
"type": "object"
}
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/executions/{id}": {
"get": {
"operationId": "st2api.controllers.v1.actionexecutions:action_executions_controller.get_one",
"x-log-result": false,
"x-submit-metrics": false,
"description": "Get one execution.\n",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
},
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Execution requested",
"schema": {
"$ref": "#/definitions/Execution"
},
"examples": {
"application/json": {
"trigger": {
"type": "object"
},
"action": {
"type": "object"
}
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.actionexecutions:action_executions_controller.put",
"description": "Update status and result for an execution.\n",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
},
{
"name": "liveaction_api",
"in": "body",
"description": "Execution update request",
"schema": {
"$ref": "#/definitions/ExecutionUpdateRequest"
}
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Execution that was updated",
"schema": {
"$ref": "#/definitions/Execution"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"delete": {
"operationId": "st2api.controllers.v1.actionexecutions:action_executions_controller.delete",
"description": "Cancel an execution.\n",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Execution cancelled"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/executions/{id}/output": {
"get": {
"operationId": "st2api.controllers.v1.actionexecutions:action_execution_output_controller.get_one",
"x-log-result": false,
"x-submit-metrics": false,
"description": "Retrieve execution output.\n",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Execution id",
"type": "string",
"required": true
},
{
"name": "output_type",
"in": "query",
"description": "Type of output to retrieve (stdout, stderr). If not provided, all output type is returned.",
"type": "string",
"enum": [
"all",
"stdout",
"stderr"
],
"default": "all"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Execution output."
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/executions/{id}/re_run": {
"post": {
"operationId": "st2api.controllers.v1.actionexecutions:action_execution_rerun_controller.post",
"x-log-result": false,
"x-submit-metrics": false,
"description": "Create a new execution.\n",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
},
{
"name": "spec_api",
"in": "body",
"description": "Execution request",
"schema": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
"default": {}
},
"tasks": {
"type": "array",
"default": []
},
"reset": {
"type": "array",
"default": []
},
"user": {
"type": "string",
"default": ""
},
"delay": {
"description": "How long (in milliseconds) to delay the execution before scheduling.",
"type": "integer"
}
}
}
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"201": {
"description": "Single action being created",
"schema": {
"$ref": "#/definitions/Execution"
},
"examples": {
"application/json": {
"trigger": {
"type": "object"
},
"action": {
"type": "object"
}
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/executions/{id}/attribute/{attribute}": {
"get": {
"operationId": "st2api.controllers.v1.actionexecutions:action_execution_attribute_controller.get",
"x-log-result": false,
"x-submit-metrics": false,
"description": "Get one execution.\n",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
},
{
"name": "attribute",
"in": "path",
"description": "Attribute to fetch",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Execution attribute requested",
"examples": {
"application/json": {
"trigger": {
"type": "object"
}
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/executions/{id}/children": {
"get": {
"operationId": "st2api.controllers.v1.actionexecutions:action_execution_children_controller.get_one",
"x-log-result": false,
"x-submit-metrics": false,
"description": "Get one execution.\n",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
},
{
"name": "depth",
"in": "query",
"description": "Depth to fetch",
"type": "integer",
"default": -1
},
{
"name": "result_fmt",
"in": "query",
"description": "Result format",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Execution attribute requested",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Execution"
}
},
"examples": {
"application/json": {
"trigger": {
"type": "object"
}
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/executions/views/filters": {
"get": {
"operationId": "st2api.controllers.v1.execution_views:filters_controller.get_all",
"x-permissions": "execution_views_filters_list",
"description": "Get a list of distinct values for the execution filters.\n",
"parameters": [
{
"name": "types",
"in": "query",
"description": "List of types of filters to return",
"type": "array",
"items": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A number of distinct values for the requested filters",
"schema": {
"$ref": "#/definitions/ExecutionFilters"
},
"examples": {
"application/json": {
"trigger": {
"type": "object"
},
"action": {
"type": "object"
}
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/inquiries": {
"get": {
"operationId": "st2api.controllers.v1.inquiries:inquiries_controller.get_all",
"x-permissions": "inquiry_list",
"description": "Returns a list of all inquiries",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "Number of inquiries to get",
"type": "integer",
"default": 20
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of inquries",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Inquiry"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/inquiries/{inquiry_id}": {
"get": {
"operationId": "st2api.controllers.v1.inquiries:inquiries_controller.get_one",
"description": "Get a specific Inquiry based on ID.\n",
"parameters": [
{
"name": "inquiry_id",
"in": "path",
"description": "Inquiry ID",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Inquiry requested.",
"schema": {
"$ref": "#/definitions/Inquiry"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.inquiries:inquiries_controller.put",
"description": "Respond to an Inquiry.\n",
"parameters": [
{
"name": "inquiry_id",
"in": "path",
"description": "Inquiry ID",
"type": "string",
"required": true
},
{
"name": "response_data",
"in": "body",
"required": true,
"description": "Inquiry response",
"schema": {
"$ref": "#/definitions/InquiryResponseResult"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Response received",
"schema": {
"$ref": "#/definitions/InquiryResponseResult"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/keys": {
"get": {
"operationId": "st2api.controllers.v1.keyvalue:key_value_pair_controller.get_all",
"x-permissions": null,
"description": "Returns a list of all key value pairs.",
"parameters": [
{
"name": "prefix",
"in": "query",
"description": "Only return values which name starts with the provided prefix.\n",
"type": "string"
},
{
"name": "scope",
"in": "query",
"description": "Scope the item is under. Example: 'user'.",
"type": "string"
},
{
"name": "decrypt",
"in": "query",
"description": "Decrypt secrets and display plain text",
"type": "boolean"
},
{
"name": "user",
"in": "query",
"description": "Entity owner",
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Number of keys to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of keys to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "string"
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of key value pairs",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValuePair"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/keys/{name}": {
"get": {
"operationId": "st2api.controllers.v1.keyvalue:key_value_pair_controller.get_one",
"description": "Get a specific key value pair based on key_name.\n",
"parameters": [
{
"name": "name",
"in": "path",
"description": "Key Name",
"type": "string",
"required": true
},
{
"name": "scope",
"in": "query",
"description": "Scope the item is under. Example: 'user'.",
"type": "string"
},
{
"name": "decrypt",
"in": "query",
"description": "Decrypt secrets and display plain text.",
"type": "boolean"
},
{
"name": "user",
"in": "query",
"description": "Entity owner",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Key value pair requested.",
"schema": {
"$ref": "#/definitions/KeyValuePair"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.keyvalue:key_value_pair_controller.put",
"description": "Create a new key value pair or update an existing one.\n",
"parameters": [
{
"name": "name",
"in": "path",
"description": "Key Name.",
"type": "string",
"required": true
},
{
"name": "kvp",
"in": "body",
"description": "Key Value pair content.",
"schema": {
"$ref": "#/definitions/KeyValuePairRequest"
},
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Key set/updated.",
"schema": {
"$ref": "#/definitions/KeyValuePair"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"delete": {
"operationId": "st2api.controllers.v1.keyvalue:key_value_pair_controller.delete",
"description": "Delete a Key.",
"parameters": [
{
"name": "name",
"in": "path",
"description": "Key Name.",
"type": "string",
"required": true
},
{
"name": "scope",
"in": "query",
"description": "Scope the item is under. Example: 'user'.",
"type": "string"
},
{
"name": "user",
"in": "query",
"description": "Entity owner",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"204": {
"description": "Key deleted."
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs": {
"get": {
"operationId": "st2api.controllers.v1.packs:packs_controller.get_all",
"x-permissions": "pack_list",
"description": "Get list of installed packs.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "Number of packs to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of packs to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "string"
},
{
"name": "ref",
"in": "query",
"description": "Entity ref filter",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of installed packs.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/PacksList"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.packs:packs_controller.get_one",
"x-requirements": {
"ref_or_id": "(?!index)(?!views).*"
},
"description": "Get information about an installed pack.",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Reference of the pack.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Information about a pack.",
"schema": {
"$ref": "#/definitions/PackView"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs/install": {
"post": {
"operationId": "st2api.controllers.v1.packs:packs_controller.install.post",
"x-permissions": "pack_install",
"description": "Install new packs..\n",
"parameters": [
{
"name": "pack_install_request",
"in": "body",
"description": "Packs to be installed",
"schema": {
"$ref": "#/definitions/PacksInstall"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"202": {
"description": "Pack installation request has been accepted",
"schema": {
"$ref": "#/definitions/AsyncRequest"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs/uninstall": {
"post": {
"operationId": "st2api.controllers.v1.packs:packs_controller.uninstall.post",
"x-permissions": "pack_uninstall",
"description": "Uninstall packs.\n",
"parameters": [
{
"name": "pack_uninstall_request",
"in": "body",
"description": "Packs to be uninstalled",
"schema": {
"$ref": "#/definitions/PacksUninstall"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"202": {
"description": "Pack uninstallation request has been accepted",
"schema": {
"$ref": "#/definitions/AsyncRequest"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs/register": {
"post": {
"operationId": "st2api.controllers.v1.packs:packs_controller.register.post",
"x-permissions": "pack_register",
"description": "Register pack(s): sync all file changes with DB.\n",
"parameters": [
{
"name": "pack_register_request",
"in": "body",
"description": "Pack(s) to be Registered",
"schema": {
"$ref": "#/definitions/PacksRegister"
}
}
],
"responses": {
"200": {
"description": "Pack(s) Registered.",
"schema": {
"$ref": "#/definitions/PacksList"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs/index": {
"get": {
"operationId": "st2api.controllers.v1.packs:packs_controller.index.get_all",
"x-permissions": "pack_search",
"description": "To list all the packs of all indexes used by your StackStorm instance.",
"responses": {
"200": {
"description": "Pack index.",
"schema": {
"$ref": "#/definitions/PackIndex"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs/index/search": {
"post": {
"operationId": "st2api.controllers.v1.packs:packs_controller.index.search.post",
"x-permissions": "pack_search",
"description": "Search the index with a query or Get information about an available pack from the index.\n",
"parameters": [
{
"name": "pack_search_request",
"in": "body",
"description": "A query to search a pack or a pack name to get its details",
"schema": {
"$ref": "#/definitions/PacksSearchShow"
}
}
],
"responses": {
"200": {
"description": "Pack search results.",
"schema": {
"type": [
"array",
"object"
]
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs/index/health": {
"get": {
"operationId": "st2api.controllers.v1.packs:packs_controller.index.health.get",
"x-permissions": "pack_views_index_health",
"description": "To get the state of all indexes used by your StackStorm instance.",
"responses": {
"200": {
"description": "Index health.",
"schema": {
"$ref": "#/definitions/PackIndex"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs/views/files/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.packs:packs_controller.views.files.get_one",
"x-log-result": false,
"description": "Get information about an installed pack.",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Reference of the pack.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Information about a pack.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/PackView"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/packs/views/file/{ref_or_id}/{file_path}": {
"get": {
"operationId": "st2api.controllers.v1.packs:packs_controller.views.file.get_one",
"x-requirements": {
"file_path": ".*"
},
"x-log-result": false,
"x-submit-metrics": false,
"description": "Get information about an installed pack.",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Reference of the pack.",
"type": "string",
"required": true
},
{
"name": "file_path",
"in": "path",
"description": "Path to the file.",
"type": "string",
"required": true
},
{
"name": "if-none-match",
"in": "header",
"x-as": "if_none_match",
"description": "ETag to compare to.",
"type": "string"
},
{
"name": "if-modified-since",
"in": "header",
"x-as": "if_modified_since",
"description": "Date of last known modification.",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Content of the file."
},
"304": {
"description": "File has not been modified."
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/configs": {
"get": {
"operationId": "st2api.controllers.v1.pack_configs:pack_configs_controller.get_all",
"x-permissions": "pack_list",
"description": "Retrieve configs for all the packs.",
"parameters": [
{
"name": "limit",
"in": "query",
"description": "Number of configs to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of configs to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Get packs config.",
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/configs/{pack_ref}": {
"get": {
"operationId": "st2api.controllers.v1.pack_configs:pack_configs_controller.get_one",
"description": "Retrieve config for a particular pack.",
"parameters": [
{
"name": "pack_ref",
"type": "string",
"in": "path",
"description": "Pack ref to retrieve config for the pack.",
"required": true
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Config for a particular pack.",
"schema": {
"$ref": "#/definitions/PackConfigView"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.pack_configs:pack_configs_controller.put",
"x-permissions": "pack_config",
"description": "Create a new config for the action.",
"parameters": [
{
"name": "pack_ref",
"in": "path",
"description": "Pack ref to create config.",
"type": "string",
"required": true
},
{
"name": "pack_config_content",
"in": "body",
"description": "Pack config content",
"schema": {
"$ref": "#/definitions/PackConfigContent"
}
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Config for a particular pack.",
"schema": {
"$ref": "#/definitions/PackConfigCreate"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/config_schemas": {
"get": {
"operationId": "st2api.controllers.v1.pack_config_schemas:pack_config_schema_controller.get_all",
"x-permissions": "pack_list",
"description": "Retrieve config schema for all the packs.",
"parameters": [
{
"name": "limit",
"in": "query",
"description": "Number of config schemas to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of config schemas to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "array",
"items": {
"type": "string"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Get packs config schema.",
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/config_schemas/{pack_ref}": {
"get": {
"operationId": "st2api.controllers.v1.pack_config_schemas:pack_config_schema_controller.get_one",
"description": "Retrieve config schema for a particular pack.",
"parameters": [
{
"name": "pack_ref",
"type": "string",
"in": "path",
"description": "Pack ref to retrieve config schema for the pack.",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Config schema for a particular pack.",
"schema": {
"$ref": "#/definitions/PackConfigView"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/policytypes": {
"get": {
"operationId": "st2api.controllers.v1.policies:policy_type_controller.get_all",
"x-permissions": "policy_type_list",
"description": "Returns a list of all the policy types.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "resource_type",
"in": "query",
"description": "Policy type resource type",
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Number of policy types to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of policy types to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "array",
"items": {
"type": "string"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of policy types",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/PolicyTypeList"
}
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/policytypes/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.policies:policy_type_controller.get_one",
"description": "Returns a policy types based on id.",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Specific policy type.",
"schema": {
"$ref": "#/definitions/PolicyTypeList"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/policies": {
"get": {
"operationId": "st2api.controllers.v1.policies:policy_controller.get_all",
"x-permissions": "policy_list",
"description": "List of policies\n",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "pack",
"in": "query",
"description": "Policies pack",
"type": "string"
},
{
"name": "name",
"in": "query",
"description": "Policies name",
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Number of policies to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of policies to offset",
"type": "integer",
"default": 0
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Policy created successfully.",
"schema": {
"type": "array",
"items": [
{
"$ref": "#/definitions/PolicyList"
}
]
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"operationId": "st2api.controllers.v1.policies:policy_controller.post",
"description": "Create Policy\n",
"parameters": [
{
"name": "instance",
"in": "body",
"description": "Policy details in yaml/json file",
"schema": {
"$ref": "#/definitions/PolicyCreate"
},
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"201": {
"description": "Policy created successfully.",
"schema": {
"$ref": "#/definitions/PolicyList"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/policies/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.policies:policy_controller.get_one",
"description": "Get deatials of specific policy based on ref or id\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Policy found.",
"schema": {
"$ref": "#/definitions/PolicyList"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.policies:policy_controller.put",
"description": "Update Policy\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id.",
"type": "string",
"required": true
},
{
"name": "instance",
"in": "body",
"description": "Policy details in yaml/json file",
"schema": {
"$ref": "#/definitions/PolicyCreate"
},
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Policy updated successfully.",
"schema": {
"$ref": "#/definitions/PolicyList"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"delete": {
"operationId": "st2api.controllers.v1.policies:policy_controller.delete",
"description": "Delete a policy.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"204": {
"description": "Policy deleted"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rbac/permission_types": {
"get": {
"operationId": "st2api.controllers.v1.rbac:permission_types_controller.get_all",
"description": "Returns a list of all permission types.",
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Dictionary of permission types by resource types.",
"schema": {
"type": "object"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rbac/permission_types/{resource_type}": {
"get": {
"operationId": "st2api.controllers.v1.rbac:permission_types_controller.get_one",
"description": "Returns a list of all permission types for particular resource type.",
"parameters": [
{
"name": "resource_type",
"in": "path",
"description": "Resource type.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of permission types.",
"schema": {
"type": "object"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rbac/roles": {
"get": {
"operationId": "st2api.controllers.v1.rbac:roles_controller.get_all",
"description": "Returns a list of all roles.",
"parameters": [
{
"name": "system",
"in": "query",
"description": "True to only return system roles.",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of all roles.",
"schema": {
"type": "array",
"items": {
"type": "object"
}
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rbac/roles/{name_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.rbac:roles_controller.get_one",
"description": "Get one role.",
"parameters": [
{
"name": "name_or_id",
"in": "path",
"description": "Entity name or id.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of roles.",
"schema": {
"type": "object"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rbac/role_assignments": {
"get": {
"operationId": "st2api.controllers.v1.rbac:role_assignments_controller.get_all",
"description": "Returns a list of all the role assignments.",
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"parameters": [
{
"name": "user",
"in": "query",
"description": "User to filter on and return role assignments for.",
"type": "string"
},
{
"name": "role",
"in": "query",
"description": "Role to filter on.",
"type": "string"
},
{
"name": "source",
"in": "query",
"description": "Source to filter on.",
"type": "string"
},
{
"name": "remote",
"in": "query",
"description": "Only include remote role assignments.",
"type": "boolean"
}
],
"responses": {
"200": {
"description": "List of all role assignments.",
"schema": {
"type": "array",
"items": {
"type": "object"
}
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rbac/role_assignments/{id}": {
"get": {
"operationId": "st2api.controllers.v1.rbac:role_assignments_controller.get_one",
"description": "Get one role.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Role assignment id.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Role assignment object.",
"schema": {
"type": "object"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rules": {
"get": {
"operationId": "st2api.controllers.v1.rules:rule_controller.get_all",
"x-permissions": "rule_list",
"description": "Returns a list of all rules.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "limit",
"in": "query",
"description": "Number of entities to get",
"type": "integer"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "string"
},
{
"name": "pack",
"in": "query",
"description": "Entity pack name filter",
"type": "string"
},
{
"name": "action",
"in": "query",
"description": "Action ref filter",
"type": "string"
},
{
"name": "trigger",
"in": "query",
"description": "Trigger filter",
"type": "string"
},
{
"name": "enabled",
"in": "query",
"description": "Enabled filter",
"type": "string"
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of rules",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Rule"
}
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"operationId": "st2api.controllers.v1.rules:rule_controller.post",
"description": "Create a new rule.\n",
"parameters": [
{
"name": "rule",
"in": "body",
"description": "Rule content",
"schema": {
"$ref": "#/definitions/Rule"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"201": {
"description": "Single action being created",
"schema": {
"$ref": "#/definitions/Rule"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rules/{ref_or_id}": {
"get": {
"x-requirements": {
"ref_or_id": "(?!views).*"
},
"operationId": "st2api.controllers.v1.rules:rule_controller.get_one",
"description": "Get one rule.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Rule requested",
"schema": {
"$ref": "#/definitions/Rule"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rules/{rule_ref_or_id}": {
"put": {
"operationId": "st2api.controllers.v1.rules:rule_controller.put",
"description": "Update a rule.\n",
"parameters": [
{
"name": "rule_ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
},
{
"name": "rule",
"in": "body",
"description": "Rule content",
"schema": {
"$ref": "#/definitions/Rule"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Action updated",
"schema": {
"$ref": "#/definitions/Rule"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"delete": {
"operationId": "st2api.controllers.v1.rules:rule_controller.delete",
"description": "Delete a rule.\n",
"parameters": [
{
"name": "rule_ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"204": {
"description": "Rule deleted"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rules/views": {
"get": {
"operationId": "st2api.controllers.v1.rule_views:rule_view_controller.get_all",
"x-permissions": "rule_list",
"description": "Returns a list of all rules.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "limit",
"in": "query",
"description": "Number of entities to get",
"type": "integer"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "string"
},
{
"name": "pack",
"in": "query",
"description": "Entity pack name filter",
"type": "string"
},
{
"name": "action",
"in": "query",
"description": "Action ref filter",
"type": "string"
},
{
"name": "trigger",
"in": "query",
"description": "Trigger filter",
"type": "string"
},
{
"name": "enabled",
"in": "query",
"description": "Enabled filter",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of rules",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Rule"
}
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/rules/views/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.rule_views:rule_view_controller.get_one",
"description": "Get one rule.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User running the action"
}
],
"responses": {
"200": {
"description": "Rule requested",
"schema": {
"$ref": "#/definitions/Rule"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/ruletypes": {
"get": {
"operationId": "st2api.controllers.v1.ruletypes:rule_types_controller.get_all",
"description": "Returns a list of all rule types.",
"responses": {
"200": {
"description": "List of rules",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RuleType"
}
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/ruletypes/{id}": {
"get": {
"operationId": "st2api.controllers.v1.ruletypes:rule_types_controller.get_one",
"description": "Get one rule type.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Entity id.",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "RuleType requested",
"schema": {
"$ref": "#/definitions/RuleType"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/runnertypes": {
"get": {
"operationId": "st2api.controllers.v1.runnertypes:runner_types_controller.get_all",
"x-permissions": "runner_type_list",
"description": "Returns a list of all runner types.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "limit",
"in": "query",
"description": "Number of runner types to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of runner types to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "array",
"items": {
"type": "string"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of rules",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RunnerType"
}
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/runnertypes/{name_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.runnertypes:runner_types_controller.get_one",
"description": "Get one runner type.\n",
"parameters": [
{
"name": "name_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "RunnerType requested",
"schema": {
"$ref": "#/definitions/RunnerType"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.runnertypes:runner_types_controller.put",
"description": "Update a runner type.\n",
"parameters": [
{
"name": "name_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
},
{
"name": "runner_type_api",
"in": "body",
"description": "RunnerType content",
"schema": {
"$ref": "#/definitions/RunnerType"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "RunnerType updated",
"schema": {
"$ref": "#/definitions/RunnerType"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/sensortypes": {
"get": {
"operationId": "st2api.controllers.v1.sensors:sensor_type_controller.get_all",
"x-permissions": "sensor_type_list",
"description": "Returns a list of all sensor types.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "limit",
"in": "query",
"description": "Number of entities to get",
"type": "integer"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "string"
},
{
"name": "pack",
"in": "query",
"description": "Entity pack name filter",
"type": "string"
},
{
"name": "trigger",
"in": "query",
"description": "Trigger filter",
"type": "string"
},
{
"name": "enabled",
"in": "query",
"description": "Enabled filter",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of rules",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/SensorType"
}
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/sensortypes/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.sensors:sensor_type_controller.get_one",
"description": "Get one sensor type.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "SensorType requested",
"schema": {
"$ref": "#/definitions/SensorType"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.sensors:sensor_type_controller.put",
"description": "Update a sensor type.\n",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
},
{
"name": "sensor_type",
"in": "body",
"description": "SensorType content",
"schema": {
"$ref": "#/definitions/SensorType"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "SensorType updated",
"schema": {
"$ref": "#/definitions/SensorType"
},
"examples": {
"application/json": {
"ref": "core.webhook"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/apikeys": {
"get": {
"operationId": "st2api.controllers.v1.auth:api_key_controller.get_all",
"x-permissions": "api_key_list",
"description": "Returns a list of all apikeys.",
"parameters": [
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
},
{
"name": "limit",
"in": "query",
"description": "Number of API keys to get",
"type": "integer",
"default": 50
},
{
"name": "offset",
"in": "query",
"description": "Number of API keys to offset",
"type": "integer",
"default": 0
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of actions",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ApiKey"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"operationId": "st2api.controllers.v1.auth:api_key_controller.post",
"description": "Create a new apikey.\n",
"parameters": [
{
"name": "api_key_api",
"in": "body",
"description": "Action content",
"schema": {
"$ref": "#/definitions/ApiKey"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"201": {
"description": "Single action being created",
"schema": {
"$ref": "#/definitions/ApiKey"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/apikeys/{api_key_id_or_key}": {
"get": {
"operationId": "st2api.controllers.v1.auth:api_key_controller.get_one",
"description": "Get one apikey.\n",
"parameters": [
{
"name": "api_key_id_or_key",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
},
{
"name": "show_secrets",
"in": "query",
"description": "Show secrets in plain text",
"type": "boolean"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Action requested",
"schema": {
"$ref": "#/definitions/ApiKey"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.auth:api_key_controller.put",
"description": "Update an apikey.\n",
"parameters": [
{
"name": "api_key_id_or_key",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
},
{
"name": "api_key_api",
"in": "body",
"description": "Action content",
"schema": {
"$ref": "#/definitions/ApiKey"
}
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Action updated",
"schema": {
"$ref": "#/definitions/ApiKey"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"delete": {
"operationId": "st2api.controllers.v1.auth:api_key_controller.delete",
"description": "Delete an apikey.\n",
"parameters": [
{
"name": "api_key_id_or_key",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"204": {
"description": "Action deleted"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/ruleenforcements": {
"get": {
"operationId": "st2api.controllers.v1.rule_enforcements:rule_enforcements_controller.get_all",
"x-permissions": "rule_enforcement_list",
"description": "Returns a list of all the rule enforcements.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "List N most recent rule enforcements.",
"type": "integer",
"default": 50
},
{
"name": "offset",
"in": "query",
"description": "Number of rule enforcements to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "execution",
"in": "query",
"description": "Execution to filter the list.",
"type": "string"
},
{
"name": "rule_ref",
"in": "query",
"description": "Rule ref to filter the list.",
"type": "string"
},
{
"name": "rule_id",
"in": "query",
"description": "Rule id to filter the list..",
"type": "string"
},
{
"name": "trigger_instance",
"in": "query",
"description": "Trace instance id to filter the list.",
"type": "string"
},
{
"name": "enforced_at_gt",
"in": "query",
"description": "Only return enforcements with enforced_at greater than the one provided. Use time in the format.\n",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
{
"name": "enforced_at_lt",
"in": "query",
"description": "Only return enforcements with enforced_at lower than the one provided. Use time in the format.\n",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of rule enforcements",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RuleEnforcementsList"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/ruleenforcements/views": {
"get": {
"operationId": "st2api.controllers.v1.rule_enforcement_views:rule_enforcement_view_controller.get_all",
"x-permissions": "rule_enforcement_list",
"description": "Returns a list of all the rule enforcements.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "List N most recent rule enforcements.",
"type": "integer",
"default": 50
},
{
"name": "offset",
"in": "query",
"description": "Number of rule enforcements to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "execution",
"in": "query",
"description": "Execution to filter the list.",
"type": "string"
},
{
"name": "rule_ref",
"in": "query",
"description": "Rule ref to filter the list.",
"type": "string"
},
{
"name": "rule_id",
"in": "query",
"description": "Rule id to filter the list..",
"type": "string"
},
{
"name": "trigger_instance",
"in": "query",
"description": "Trace instance id to filter the list.",
"type": "string"
},
{
"name": "enforced_at_gt",
"in": "query",
"description": "Only return enforcements with enforced_at greater than the one provided. Use time in the format.\n",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
{
"name": "enforced_at_lt",
"in": "query",
"description": "Only return enforcements with enforced_at lower than the one provided. Use time in the format.\n",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of rule enforcements",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RuleEnforcementsList"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/ruleenforcements/{id}": {
"get": {
"operationId": "st2api.controllers.v1.rule_enforcements:rule_enforcements_controller.get_one",
"description": "Return a specific rule enforcement based on id.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Rule Enforcements based on ref or id",
"schema": {
"$ref": "#/definitions/RuleEnforcementsList"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/ruleenforcements/views/{id}": {
"get": {
"operationId": "st2api.controllers.v1.rule_enforcement_views:rule_enforcement_view_controller.get_one",
"description": "Return a specific rule enforcement based on id.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Rule Enforcements based on ref or id",
"schema": {
"$ref": "#/definitions/RuleEnforcementsList"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/timers": {
"get": {
"operationId": "st2api.controllers.v1.timers:timers_controller.get_all",
"x-permissions": "timer_list",
"description": "Returns a list of all the timers.",
"parameters": [
{
"name": "timer_type",
"in": "query",
"description": "Type of timer",
"type": "string"
}
],
"responses": {
"200": {
"description": "List of timers",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TimersList"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/timers/{ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.timers:timers_controller.get_one",
"description": "Return a specific timer based on id.",
"parameters": [
{
"name": "ref_or_id",
"in": "path",
"description": "entities id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation"
}
],
"responses": {
"200": {
"description": "Trace",
"schema": {
"$ref": "#/definitions/TimersList"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/traces": {
"get": {
"operationId": "st2api.controllers.v1.traces:traces_controller.get_all",
"x-permissions": "trace_list",
"description": "Returns a list of all the traces.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "Number of traces to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of traces to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "trace_tag",
"in": "query",
"description": "Trace-tag to filter the list.",
"type": "string"
},
{
"name": "execution",
"in": "query",
"description": "Execution to filter the list.",
"type": "string"
},
{
"name": "rule",
"in": "query",
"description": "Rule to filter the list..",
"type": "string"
},
{
"name": "trigger_instance",
"in": "query",
"description": "TraceInstance to filter the list.",
"type": "string"
},
{
"name": "sort_asc",
"in": "query",
"description": "Sort in ascending order by start timestamp, asc/ascending (earliest first)\n",
"type": "string"
},
{
"name": "sort_desc",
"in": "query",
"description": "Sort in descending order by start timestamp, desc/descending (latest first)\n",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of traces",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TracesList"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/traces/{id}": {
"get": {
"operationId": "st2api.controllers.v1.traces:traces_controller.get_one",
"description": "Returns a list of all the traces.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "entities id",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation"
}
],
"responses": {
"200": {
"description": "Trace",
"schema": {
"$ref": "#/definitions/TracesList"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/triggertypes": {
"get": {
"operationId": "st2api.controllers.v1.triggers:triggertype_controller.get_all",
"description": "Returns a list of all trigger types.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "Number of trigger types to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of trigger types to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "pack",
"in": "query",
"description": "Pack name filter",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of trigger types",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TriggerType"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"operationId": "st2api.controllers.v1.triggers:triggertype_controller.post",
"description": "Create a new trigger type.\n",
"parameters": [
{
"name": "triggertype",
"in": "body",
"description": "TriggerType content",
"schema": {
"$ref": "#/definitions/TriggerTypeRequest"
}
}
],
"responses": {
"201": {
"description": "Single trigger type being created",
"schema": {
"$ref": "#/definitions/TriggerType"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/triggertypes/{triggertype_ref_or_id}": {
"get": {
"operationId": "st2api.controllers.v1.triggers:triggertype_controller.get_one",
"description": "Get one trigger type.\n",
"parameters": [
{
"name": "triggertype_ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "TriggerType requested",
"schema": {
"$ref": "#/definitions/TriggerType"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.triggers:triggertype_controller.put",
"description": "Update a trigger type.\n",
"parameters": [
{
"name": "triggertype_ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
},
{
"name": "triggertype",
"in": "body",
"description": "TriggerType content",
"schema": {
"$ref": "#/definitions/TriggerTypeRequest"
}
}
],
"responses": {
"200": {
"description": "TriggerType updated",
"schema": {
"$ref": "#/definitions/TriggerType"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"delete": {
"operationId": "st2api.controllers.v1.triggers:triggertype_controller.delete",
"description": "Delete a trigger type.\n",
"parameters": [
{
"name": "triggertype_ref_or_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"responses": {
"204": {
"description": "TriggerType deleted"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/triggers": {
"get": {
"operationId": "st2api.controllers.v1.triggers:trigger_controller.get_all",
"description": "Returns a list of all triggers.",
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of triggers",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Trigger"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"operationId": "st2api.controllers.v1.triggers:trigger_controller.post",
"description": "Create a new triggers.\n",
"parameters": [
{
"name": "trigger",
"in": "body",
"description": "Trigger content",
"schema": {
"$ref": "#/definitions/TriggerRequest"
}
}
],
"responses": {
"201": {
"description": "Single trigger being created",
"schema": {
"$ref": "#/definitions/Trigger"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/triggers/{trigger_id}": {
"get": {
"operationId": "st2api.controllers.v1.triggers:trigger_controller.get_one",
"description": "Get one trigger.\n",
"parameters": [
{
"name": "trigger_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "Trigger requested",
"schema": {
"$ref": "#/definitions/Trigger"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "st2api.controllers.v1.triggers:trigger_controller.put",
"description": "Update a trigger.\n",
"parameters": [
{
"name": "trigger_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
},
{
"name": "trigger",
"in": "body",
"description": "Trigger content",
"schema": {
"$ref": "#/definitions/TriggerRequest"
}
}
],
"responses": {
"200": {
"description": "Trigger updated",
"schema": {
"$ref": "#/definitions/Trigger"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"delete": {
"operationId": "st2api.controllers.v1.triggers:trigger_controller.delete",
"description": "Delete a trigger.\n",
"parameters": [
{
"name": "trigger_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"responses": {
"204": {
"description": "Trigger deleted"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/triggerinstances": {
"get": {
"operationId": "st2api.controllers.v1.triggers:triggerinstance_controller.get_all",
"description": "Returns a list of all trigger instances.",
"parameters": [
{
"name": "exclude_attributes",
"in": "query",
"description": "List of attributes to exclude",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "include_attributes",
"in": "query",
"description": "List of attributes to include",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "Number of trigger instances to get",
"type": "integer",
"default": 100
},
{
"name": "offset",
"in": "query",
"description": "Number of trigger instances to offset",
"type": "integer",
"default": 0
},
{
"name": "sort",
"in": "query",
"description": "Comma-separated list of fields to sort by",
"type": "string"
},
{
"name": "id",
"in": "query",
"description": "Entity id filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Entity name filter",
"type": "array",
"items": {
"type": "string"
}
},
{
"name": "trigger",
"in": "query",
"description": "Trigger filter",
"type": "string"
},
{
"name": "timestamp_lt",
"in": "query",
"description": "Start timestamp less than filter",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
{
"name": "timestamp_gt",
"in": "query",
"description": "Start timestamp greater than filter",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
{
"name": "trigger_type",
"in": "query",
"description": "Trigger type filter",
"type": "string"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of trigger instances",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TriggerInstance"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/triggerinstances/{instance_id}": {
"get": {
"operationId": "st2api.controllers.v1.triggers:triggerinstance_controller.get_one",
"description": "Get one trigger instance.\n",
"parameters": [
{
"name": "instance_id",
"in": "path",
"description": "Entity reference or id",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "Trigger instance requested",
"schema": {
"$ref": "#/definitions/TriggerInstance"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/triggerinstances/{trigger_instance_id}/re_emit": {
"post": {
"operationId": "st2api.controllers.v1.triggers:triggerinstance_resend_controller.post",
"description": "Re-emit a trigger instance.\n",
"parameters": [
{
"name": "trigger_instance_id",
"in": "path",
"description": "Entity id",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "Trigger instance being re-emitted",
"schema": {
"$ref": "#/definitions/TriggerInstance"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/webhooks": {
"get": {
"operationId": "st2api.controllers.v1.webhooks:webhooks_controller.get_all",
"x-permissions": "webhook_list",
"description": "Returns a list of all webhooks.",
"responses": {
"200": {
"description": "List of webhooks",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Webhook"
}
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/webhooks/{hook}": {
"post": {
"operationId": "st2api.controllers.v1.webhooks:webhooks_controller.post",
"x-requirements": {
"hook": ".*"
},
"description": "Trigger a webhook.\n",
"parameters": [
{
"name": "hook",
"in": "path",
"description": "Webhook path",
"type": "string",
"required": true
},
{
"name": "webhook_body_api",
"in": "body",
"description": "Webhook payload",
"schema": {
"$ref": "#/definitions/WebhookBody"
}
}
],
"x-parameters": [
{
"name": "headers",
"in": "request",
"description": "List of headers attached to the request."
},
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"202": {
"description": "Single action being created",
"schema": {
"$ref": "#/definitions/WebhookBody"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/webhooks/{url}": {
"get": {
"operationId": "st2api.controllers.v1.webhooks:webhooks_controller.get_one",
"description": "Get one action.\n",
"parameters": [
{
"name": "url",
"in": "path",
"description": "Webhook relative URL path",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "Action requested",
"schema": {
"$ref": "#/definitions/Webhook"
},
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/workflows/inspect": {
"post": {
"operationId": "st2api.controllers.v1.workflow_inspection:workflow_inspection_controller.post",
"description": "Inspect workflow definition (support orquesta workflow only).",
"parameters": [
{
"name": "wf_def",
"in": "body",
"description": "Workflow definition in YAML",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List of inspection errors separated by categories.",
"schema": {
"$ref": "#/definitions/WorkflowInspectionErrors"
},
"examples": {
"application/json": [
{
"type": "content",
"message": "The action \"std.noop\" is not registered in the database.",
"schema_path": "properties.tasks.patternProperties.^\\w+$.properties.action",
"spec_path": "tasks.task3.action"
},
{
"type": "context",
"language": "yaql",
"expression": "<% ctx().foobar %>",
"message": "Variable \"foobar\" is referenced before assignment.",
"schema_path": "properties.tasks.patternProperties.^\\w+$.properties.input",
"spec_path": "tasks.task1.input"
},
{
"type": "expression",
"language": "yaql",
"expression": "<% <% succeeded() %>",
"message": "Parse error: unexpected '<' at position 0 of expression '<% succeeded()'",
"schema_path": "properties.tasks.patternProperties.^\\w+$.properties.next.items.properties.when",
"spec_path": "tasks.task2.next[0].when"
},
{
"type": "syntax",
"message": "[{'cmd': 'echo <% ctx().macro %>'}] is not of type 'object'",
"schema_path": "properties.tasks.patternProperties.^\\w+$.properties.input.type",
"spec_path": "tasks.task2.input"
}
]
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/service_registry/groups": {
"get": {
"operationId": "st2api.controllers.v1.service_registry:groups_controller.get_all",
"description": "Retrieve available service registry groups.",
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of available groups.",
"schema": {
"type": "object"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/api/v1/service_registry/groups/{group_id}/members": {
"get": {
"operationId": "st2api.controllers.v1.service_registry:members_controller.get_one",
"description": "Retrieve active / available members for a particular group.",
"parameters": [
{
"name": "group_id",
"in": "path",
"description": "Group ID.",
"type": "string",
"required": true
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "List of available members.",
"schema": {
"type": "object"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/auth/v1/tokens": {
"post": {
"x-log-result": false,
"operationId": "st2auth.controllers.v1.auth:token_controller.post",
"description": "Authenticates a user with `Authorization` header and returns a `token`\nobject.\n",
"parameters": [
{
"name": "authorization",
"in": "header",
"description": "base64 encoded string containing login and password",
"type": "string"
},
{
"name": "x-forwarded-for",
"in": "header",
"description": "set externally to indicate real source of the request",
"type": "string"
},
{
"name": "request",
"in": "body",
"description": "Lifespan of the token",
"schema": {
"$ref": "#/definitions/TokenRequest"
}
}
],
"x-parameters": [
{
"name": "remote_addr",
"in": "environ",
"description": "source of the request",
"type": "string"
},
{
"name": "remote_user",
"in": "environ",
"description": "set externally to indicate user identity in case of proxy auth",
"type": "string"
}
],
"responses": {
"201": {
"description": "New token has been created",
"schema": {
"$ref": "#/definitions/Token"
},
"headers": {
"x-api-url": {
"type": "string"
}
},
"examples": {
"application/json": {
"user": "st2admin",
"token": "5e86421776f946e98faea36c29e5a7c7",
"expiry": "2016-05-28T12:39:28.650231Z",
"id": "574840001878c10d0b6e8fbf",
"metadata": {}
}
}
},
"401": {
"description": "Invalid or missing credentials has been provided",
"schema": {
"$ref": "#/definitions/Error"
},
"examples": {
"application/json": {
"faultstring": "Invalid or missing credentials"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"security": []
}
},
"/auth/v1/tokens/validate": {
"post": {
"operationId": "st2auth.controllers.v1.auth:token_validation_controller.post",
"description": "Validates a token provided in the request body.\n",
"parameters": [
{
"name": "request",
"in": "body",
"description": "Token to validate",
"schema": {
"$ref": "#/definitions/TokenValidationRequest"
}
}
],
"responses": {
"200": {
"description": "Validation results",
"schema": {
"$ref": "#/definitions/TokenValidationResult"
},
"examples": {
"application/json": {
"valid": false
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/auth/v1/sso": {
"get": {
"operationId": "st2auth.controllers.v1.sso:sso_controller.get",
"description": "Returns a flag indicating if SSO is enabled or not.",
"responses": {
"200": {
"description": "Returns a flag indicating if SSO is enabled",
"schema": {
"$ref": "#/definitions/SSOEnabledResult"
},
"examples": {
"application/json": {
"enabled": false
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"security": []
}
},
"/auth/v1/sso/request": {
"get": {
"operationId": "st2auth.controllers.v1.sso:sso_request_controller.get",
"description": "Redirects to the SSO Idp login page.",
"parameters": [
{
"name": "referer",
"in": "header",
"description": "set externally to indicate real source of the request",
"type": "string"
}
],
"responses": {
"307": {
"description": "Temporary redirect"
}
},
"security": []
}
},
"/auth/v1/sso/callback": {
"post": {
"operationId": "st2auth.controllers.v1.sso:idp_callback_controller.post",
"description": "Handle callback from the SSO Idp.",
"parameters": [
{
"name": "response",
"in": "body",
"description": "SSO response",
"schema": {
"type": "object"
}
}
],
"responses": {
"200": {
"description": "SSO response valid"
},
"401": {
"description": "Invalid or missing credentials has been provided",
"schema": {
"$ref": "#/definitions/Error"
},
"examples": {
"application/json": {
"faultstring": "Invalid or missing credentials"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"security": []
}
},
"/stream/v1/stream": {
"get": {
"operationId": "st2stream.controllers.v1.stream:stream_controller.get_all",
"x-is-streaming-endpoint": true,
"x-permissions": "stream_view",
"description": "Event stream endpoint.\n",
"parameters": [
{
"name": "end_execution_id",
"in": "query",
"description": "execution id used to find last event in stream",
"type": "string",
"required": false
},
{
"name": "end_event",
"in": "query",
"description": "event to end sse stream",
"type": "string",
"required": false
},
{
"name": "events",
"in": "query",
"description": "List of events to listen for. If not provided, it listens to all events.",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "action_refs",
"in": "query",
"description": "List of action refs to filter on.",
"type": "array",
"items": {
"type": "string"
},
"required": false
},
{
"name": "execution_ids",
"in": "query",
"description": "List of execution ids to filter on.",
"type": "array",
"items": {
"type": "string"
},
"required": false
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "EventSource compatible stream of events",
"examples": {
"application/json": {
"ref": "core.local"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/stream/v1/executions/{id}/output": {
"get": {
"operationId": "st2stream.controllers.v1.executions:action_execution_output_controller.get_one",
"x-is-streaming-endpoint": true,
"x-permissions": "stream_view",
"description": "Action execution output event stream endpoint.\n",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Execution id",
"type": "string",
"required": true
},
{
"name": "output_type",
"in": "query",
"description": "Type of output to retrieve (stdout, stderr). If not provided, all output type is returned.",
"type": "string",
"enum": [
"all",
"stdout",
"stderr"
],
"default": "all"
}
],
"x-parameters": [
{
"name": "user",
"in": "context",
"x-as": "requester_user",
"description": "User performing the operation."
}
],
"responses": {
"200": {
"description": "EventSource compatible stream of events"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Action": {
"x-api-model": "st2common.models.api.action:ActionAPI",
"type": "object",
"required": [
"name",
"runner_type"
],
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the action."
},
"ref": {
"type": "string",
"description": "System computed user friendly reference for the action. Provided value will be overridden by computed value.\n"
},
"uid": {
"type": "string"
},
"name": {
"type": "string",
"description": "The name of the action."
},
"description": {
"type": "string",
"description": "The description of the action."
},
"enabled": {
"type": "boolean",
"description": "Enable or disable the action from invocation.",
"default": true
},
"runner_type": {
"type": "string",
"description": "The type of runner that executes the action."
},
"entry_point": {
"type": "string",
"description": "The entry point for the action.",
"default": ""
},
"pack": {
"type": "string",
"description": "The content pack this action belongs to."
},
"parameters": {
"$ref": "#/definitions/ActionParametersSubSchema"
},
"tags": {
"type": "array",
"description": "User associated metadata assigned to this object.",
"items": {
"type": "object"
}
},
"notify": {
"description": "Notification settings for action.",
"type": "object",
"properties": {
"on-complete": {
"$ref": "#/definitions/NotificationPropertySubSchema"
},
"on-failure": {
"$ref": "#/definitions/NotificationPropertySubSchema"
},
"on-success": {
"$ref": "#/definitions/NotificationPropertySubSchema"
}
},
"additionalProperties": false
}
}
},
"ActionCreateRequest": {
"x-api-model": "st2common.models.api.action:ActionCreateAPI",
"allOf": [
{
"type": "object",
"properties": {
"pack": {
"type": "string",
"description": "The content pack this action belongs to.",
"default": "default"
}
}
},
{
"$ref": "#/definitions/Action"
},
{
"$ref": "#/definitions/DataFilesSubSchema"
}
]
},
"ActionUpdateRequest": {
"x-api-model": "st2common.models.api.action:ActionUpdateAPI",
"allOf": [
{
"$ref": "#/definitions/Action"
},
{
"$ref": "#/definitions/DataFilesSubSchema"
}
]
},
"ActionParameters": {
"type": "object",
"properties": {
"parameters": {
"$ref": "#/definitions/ActionParametersSubSchema"
}
}
},
"ActionAlias": {
"x-api-model": "st2common.models.api.action:ActionAliasAPI",
"type": "object"
},
"ActionAliasRequest": {
"type": "object",
"required": [
"name",
"ref",
"pack",
"action_ref"
],
"properties": {
"name": {
"description": "Alias name.",
"type": "string"
},
"ref": {
"description": "Alias reference (pack + name).",
"type": "string"
},
"pack": {
"description": "Pack to which this alias belongs.",
"type": "string"
},
"action_ref": {
"description": "Reference of an action this alias belongs.",
"type": "string"
},
"id": {
"type": "string",
"description": "The unique identifier for the action."
},
"uid": {
"type": "string"
},
"enabled": {
"type": "boolean",
"description": "Enable or disable the action from invocation.",
"default": true
}
}
},
"ActionAliasMatchRequest": {
"type": "object",
"required": [
"command"
],
"properties": {
"command": {
"description": "Command string to try to match the aliases against.",
"type": "string"
}
}
},
"ActionAliasMatch": {
"type": "object"
},
"ActionAliasHelp": {
"type": "object",
"properties": {
"avaliable": {
"description": "Total number of matching help strings",
"type": "integer"
},
"helpstrings": {
"description": "List of matched helpstrings",
"type": "array",
"items": {
"type": "object",
"properties": {
"pack": {
"type": "string"
},
"display": {
"type": "string"
},
"description": {
"description": "Description of the Action Alias",
"type": "string"
}
}
}
}
}
},
"AliasExecution": {
"x-api-model": "st2common.models.api.action:AliasExecutionAPI",
"type": "object",
"properties": {
"actionalias": {
"type": "object",
"description": "Alias for an action",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the action alias."
},
"ref": {
"type": "string",
"description": "System computed user friendly reference for the alias. Provided\nvalue will be overridden by computed value.\n"
},
"uid": {
"type": "string"
},
"name": {
"type": "string",
"description": "Name of the action alias."
},
"pack": {
"type": "string",
"description": "The content pack this actionalias belongs to."
},
"description": {
"type": "string",
"description": "Description of the executed alias.",
"default": ""
},
"enabled": {
"type": "boolean",
"description": "Flag indicating if action alias is enabled.",
"default": true
},
"action_ref": {
"type": "string",
"description": "Reference to the aliased action"
},
"formats": {
"type": "array",
"description": "Possible parameter format.",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"description": "Matched alias formats",
"properties": {
"representation": {
"type": "array",
"description": "Alias format representations",
"items": {
"type": "string"
}
},
"match_multiple": {
"type": "boolean",
"optional": true
},
"display": {
"type": "string",
"description": "Display string of alias format"
}
}
}
]
}
},
"ack": {
"type": "object",
"description": "Acknowledgement message format.",
"properties": {
"enabled": {
"type": "boolean"
},
"format": {
"type": "string"
},
"extra": {
"type": "object"
},
"append_url": {
"type": "boolean"
}
}
},
"result": {
"type": "object",
"description": "Execution message format.",
"properties": {
"enabled": {
"type": "boolean"
},
"format": {
"type": "string"
},
"extra": {
"type": "object"
}
}
},
"extra": {
"type": "object",
"description": "Extra parameters, usually adapter-specific"
},
"delay": {
"description": "How long (in milliseconds) to delay the execution before scheduling.",
"type": "integer"
}
}
},
"execution": {
"type": "object",
"description": "Execution result",
"properties": {
"$ref": "#/definitions/Execution"
}
},
"message": {
"type": "string"
}
}
},
"AliasMatchAndExecuteInputAPI": {
"x-api-model": "st2common.models.api.action:AliasMatchAndExecuteInputAPI",
"type": "object",
"required": [
"command",
"source_channel",
"user"
],
"properties": {
"command": {
"type": "string",
"description": "Command string to parse (eg: message from chat)"
},
"user": {
"type": "string",
"description": "User that requested the execution (or messaged in chat)"
},
"source_channel": {
"type": "string",
"description": "Channel the message is from (different than the notification channel)"
},
"notification_channel": {
"type": "string",
"description": "StackStorm notification channel to use to respond",
"default": ""
},
"notification_route": {
"type": "string",
"description": "StackStorm notification route to use to respond",
"default": ""
}
}
},
"Execution": {
"title": "ActionExecution",
"description": "Record of the execution of an action.",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"trigger": {
"$ref": "#/definitions/Trigger"
},
"trigger_type": {
"$ref": "#/definitions/TriggerType"
},
"trigger_instance": {
"$ref": "#/definitions/TriggerInstance"
},
"rule": {
"$ref": "#/definitions/Rule"
},
"action": {
"$ref": "#/definitions/Action"
},
"runner": {
"$ref": "#/definitions/RunnerType"
},
"liveaction": {
"$ref": "#/definitions/LiveAction"
},
"task_execution": {
"type": "string"
},
"workflow_execution": {
"type": "string"
},
"status": {
"description": "The current status of the action execution.",
"type": "string",
"enum": [
"requested",
"scheduled",
"delayed",
"running",
"succeeded",
"failed",
"timeout",
"abandoned",
"canceling",
"canceled",
"pending",
"pausing",
"paused",
"resuming"
]
},
"start_timestamp": {
"description": "The start time when the action is executed.",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
"end_timestamp": {
"description": "The timestamp when the action has finished.",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
"elapsed_seconds": {
"description": "Time duration in seconds taken for completion of this execution.",
"type": "number"
},
"web_url": {
"description": "History URL for this execution if you want to view in UI.",
"type": "string"
},
"parameters": {
"description": "Input parameters for the action.",
"type": "object"
},
"context": {
"type": "object"
},
"result": {
"type": "object"
},
"parent": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"log": {
"description": "Contains information about execution state transitions.",
"type": "array",
"items": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
"status": {
"type": "string",
"enum": [
"requested",
"scheduled",
"delayed",
"running",
"succeeded",
"failed",
"timeout",
"abandoned",
"canceling",
"canceled",
"pending",
"pausing",
"paused",
"resuming"
]
}
}
}
},
"delay": {
"description": "How long (in milliseconds) to delay the execution before scheduling.",
"type": "integer"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"ExecutionRequest": {
"allOf": [
{
"$ref": "#/definitions/LiveAction"
},
{
"type": "object",
"properties": {
"user": {
"type": "string",
"x-nullable": true,
"description": "User context under which action should run (admins only)",
"default": ""
}
}
}
]
},
"ExecutionUpdateRequest": {
"type": "object",
"properties": {
"status": {
"description": "The current status of the action execution.",
"type": "string",
"enum": [
"requested",
"scheduled",
"delayed",
"running",
"succeeded",
"failed",
"timeout",
"abandoned",
"canceling",
"canceled",
"pending",
"pausing",
"paused",
"resuming"
]
},
"result": {
"type": "object"
}
},
"additionalProperties": false
},
"ExecutionFilters": {
"type": "object"
},
"Inquiry": {
"type": "object",
"required": [
"id",
"schema",
"roles",
"users",
"route",
"ttl"
],
"properties": {
"id": {
"description": "ID of this inquiry",
"type": "string"
},
"schema": {
"description": "JSON schema used to validate repsonse(s)",
"type": "object"
},
"roles": {
"description": "List of RBAC roles permitted to respond to this inquiry",
"type": "array",
"items": {
"type": "string"
}
},
"users": {
"description": "List of users permitted to respond to this inquiry",
"type": "array",
"items": {
"type": "string"
}
},
"route": {
"description": "An arbitrary value for allowing rules to route to proper notification channel",
"type": "string"
},
"ttl": {
"description": "Time (in minutes) that an unacknowledged Inquiry is cleaned up",
"type": "integer"
}
}
},
"InquiryResponseResult": {
"type": "object",
"required": [
"id",
"response"
],
"properties": {
"id": {
"description": "Inquiry ID",
"type": "string"
},
"response": {
"description": "response data",
"type": "object"
}
}
},
"KeyValuePair": {
"type": "object"
},
"KeyValuePairRequest": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"description": "Key Name.",
"type": "string"
},
"value": {
"description": "Key's value.",
"type": "string"
},
"secret": {
"description": "Encrypt value before saving the value.",
"type": "boolean"
},
"encrypted": {
"description": "Value provided is already encrypted with this instances crypto key and should be stored as-is. This is useful when migrating / loading keys from one StackStorm instance to another.",
"type": "boolean"
},
"scope": {
"description": "Scope the item is under. Example: 'user'.",
"type": "string"
},
"ttl": {
"description": "TTL (in seconds) for this value.",
"type": "integer"
},
"user": {
"description": "User for user scoped items (admin only).",
"type": "string",
"x-nullable": true
}
}
},
"PacksList": {
"type": "object",
"properties": {
"author": {
"description": "Author of the pack.",
"type": "string"
},
"description": {
"description": "Description of the pack.",
"type": "string"
},
"name": {
"description": "Name of the pack.",
"type": "string"
},
"ref": {
"description": "Reference of the pack.",
"type": "string"
},
"version": {
"description": "Version of the pack.",
"type": "string"
},
"content": {
"description": "Content type in the pack.",
"type": "object"
},
"keywords": {
"description": "Keywords associated with the pack.",
"type": "array",
"items": {
"type": "string"
}
},
"repo_url": {
"description": "URL of the Pack's repo.",
"type": "string"
}
}
},
"PackView": {
"type": "object",
"properties": {
"author": {
"description": "Author of the pack.",
"type": "string"
},
"description": {
"description": "Description of the pack.",
"type": "string"
},
"email": {
"description": "Email of the author.",
"type": "string"
},
"keywords": {
"description": "Keywords associated with the pack.",
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"description": "Name of the pack.",
"type": "string"
},
"version": {
"description": "Version of the pack.",
"type": "string"
}
}
},
"PacksInstall": {
"type": "object",
"properties": {
"packs": {
"description": "ref of the packs in Exchange, or a git repo URL.",
"type": "array",
"items": {
"type": "string"
}
},
"python3": {
"description": "Use Python 3 binary for pack virtual environment.",
"type": "boolean",
"default": false
},
"force": {
"description": "Force pack installation.",
"type": "boolean",
"default": false
},
"skip_dependencies": {
"type": "boolean",
"description": "Set to True to skip pack dependency installations.",
"required": false,
"default": false
}
}
},
"PacksUninstall": {
"type": "object",
"properties": {
"ref_or_id": {
"description": "ref or id of the pack",
"type": "string"
},
"packs": {
"description": "Name of the packs in Exchange, or a git repo URL.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"PacksRegister": {
"type": "object",
"properties": {
"packs": {
"description": "ref of the packs in Exchange, or a git repo URL.",
"type": "array",
"items": {
"type": "string"
}
},
"types": {
"description": "Types of content to register.",
"type": "array",
"items": {
"$ref": "#/definitions/PacksContentRegisterType"
}
}
}
},
"PacksContentRegisterType": {
"type": "string",
"enum": [
"all",
"runner",
"action",
"actions",
"trigger",
"triggers",
"sensor",
"sensors",
"rule",
"rules",
"rule_type",
"rule_types",
"alias",
"aliases",
"policy_type",
"policy_types",
"policy",
"policies",
"config",
"configs"
]
},
"PacksSearchShow": {
"type": "object",
"properties": {
"pack": {
"description": "Name of the pack to show.",
"type": "string"
},
"query": {
"description": "Search query.",
"type": "string"
}
}
},
"PackIndex": {
"type": "object",
"properties": {
"indexes": {
"description": "Index details.",
"type": "object",
"properties": {
"count": {
"description": "Number of index.",
"type": "integer"
},
"errors": {
"description": "Errors.",
"type": "object"
},
"invalid": {
"description": "Invalid.",
"type": "integer"
},
"status": {
"description": "Status of the index.",
"type": "array"
},
"valid": {
"description": "Valid.",
"type": "integer"
}
}
},
"packs": {
"description": "Number of packs in the index.",
"type": "object"
}
}
},
"PackConfig": {
"type": "array",
"items": {
"type": "object"
}
},
"PackConfigView": {
"type": "object"
},
"PackConfigContent": {
"type": "object"
},
"PackConfigCreate": {
"type": "object"
},
"PolicyTypeList": {
"type": "object"
},
"PolicyList": {
"type": "object"
},
"PolicyCreate": {
"x-api-model": "st2common.models.api.policy:PolicyAPI",
"type": "object"
},
"RunnerType": {
"type": "object"
},
"Rule": {
"x-api-model": "st2common.models.api.rule:RuleAPI",
"type": "object"
},
"RuleType": {
"type": "object"
},
"RuleEnforcementsList": {
"type": "object"
},
"SensorType": {
"type": "object"
},
"TimersList": {
"type": "object"
},
"TracesList": {
"type": "object"
},
"Trigger": {
"type": "object"
},
"TriggerRequest": {
"type": "object"
},
"TriggerType": {
"type": "object"
},
"TriggerTypeRequest": {
"type": "object"
},
"TriggerInstance": {
"type": "object"
},
"LiveAction": {
"title": "liveaction",
"description": "An execution of an action.",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for the action execution.",
"type": "string"
},
"status": {
"description": "The current status of the action execution.",
"type": "string",
"enum": [
"requested",
"scheduled",
"delayed",
"running",
"succeeded",
"failed",
"timeout",
"abandoned",
"canceling",
"canceled",
"pending",
"pausing",
"paused",
"resuming"
]
},
"start_timestamp": {
"description": "The start time when the action is executed.",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
"end_timestamp": {
"description": "The timestamp when the action has finished.",
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
"action": {
"description": "Reference to the action to be executed.",
"type": "string"
},
"action_is_workflow": {
"description": "Flag indicating workflow action.",
"type": "boolean"
},
"parameters": {
"description": "Input parameters for the action.",
"type": "object"
},
"result": {
"type": "object"
},
"context": {
"type": "object"
},
"callback": {
"type": "object"
},
"runner_info": {
"type": "object"
},
"notify": {
"description": "Notification settings for liveaction.",
"type": "object",
"properties": {
"on-complete": {
"$ref": "#/definitions/NotificationPropertySubSchema"
},
"on-failure": {
"$ref": "#/definitions/NotificationPropertySubSchema"
},
"on-success": {
"$ref": "#/definitions/NotificationPropertySubSchema"
}
},
"additionalProperties": false
},
"delay": {
"description": "How long (in milliseconds) to delay the execution before scheduling.",
"type": "integer"
}
},
"required": [
"action"
]
},
"Webhook": {
"type": "object"
},
"WebhookBody": {
"description": "Given support of Content-Type header, that could be anything.",
"x-api-model": "st2common.models.api.webhook:WebhookBodyAPI",
"type": [
"object",
"array"
]
},
"ActionParametersSubSchema": {
"type": "object",
"description": "Input parameters for the action.",
"x-additional-check": "st2api.controllers.resource:parameter_validation",
"default": {}
},
"AsyncRequest": {
"type": "object",
"properties": {
"execution_id": {
"type": "string"
}
},
"required": [
"execution_id"
],
"additionalProperties": false
},
"DataFilesSubSchema": {
"type": "object",
"properties": {
"data_files": {
"description": "Optional action script and data files which are written to the filesystem.",
"type": "array",
"items": {
"type": "object",
"required": [
"file_path",
"content"
],
"properties": {
"file_path": {
"type": "string",
"description": "Path to the file relative to the pack actions directory (e.g. my_action.py)."
},
"content": {
"type": "string",
"description": "Raw file content."
}
},
"additionalProperties": false
},
"default": []
}
}
},
"NotificationPropertySubSchema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message to use for notification"
},
"data": {
"type": "object",
"description": "Data to be sent as part of notification"
},
"routes": {
"type": "array",
"description": "Channels to post notifications to.",
"items": {
"type": "string"
}
},
"channels": {
"type": "array",
"description": "Channels to post notifications to.",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"TokenRequest": {
"type": "object",
"properties": {
"ttl": {
"type": [
"integer",
"null"
],
"minimum": 1
}
}
},
"Token": {
"type": "object",
"properties": {
"expiry": {
"type": "string",
"format": "datetime"
},
"id": {
"type": "string",
"format": "uuid"
},
"metadata": {
"type": "object"
},
"token": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"TokenValidationRequest": {
"type": "object",
"properties": {
"token": {
"type": [
"string",
"null"
]
}
}
},
"TokenValidationResult": {
"type": "object",
"properties": {
"valid": {
"type": "boolean"
}
}
},
"SSOEnabledResult": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"ApiKey": {
"x-api-model": "st2common.models.api.auth:ApiKeyAPI",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the API key."
},
"uid": {
"type": "string"
},
"user": {
"type": "string"
},
"key_hash": {
"type": "string"
},
"metadata": {
"type": "object"
},
"created_at": {
"type": "string",
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}(\\s|T)\\d{2}:\\d{2}:\\d{2}(\\.\\d{3,6})?(Z|\\+00|\\+0000|\\+00:00)$"
},
"enabled": {
"type": "boolean",
"default": true
}
}
},
"WorkflowInspectionError": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"language": {
"type": "string"
},
"expression": {
"type": "string"
},
"message": {
"type": "string"
},
"schema_path": {
"type": "string"
},
"spec_path": {
"type": "string"
}
}
},
"WorkflowInspectionErrors": {
"type": "array",
"items": {
"$ref": "#/definitions/WorkflowInspectionError"
}
},
"ValidationError": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"path": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"Error": {
"type": "object",
"properties": {
"faultstring": {
"type": "string"
}
},
"required": [
"faultstring"
]
}
},
"securityDefinitions": {
"auth-token-header": {
"description": "Header representing user's short-lived access token.",
"type": "apiKey",
"name": "X-Auth-Token",
"in": "header",
"x-operationId": "st2common.util.auth:validate_token",
"x-set-cookie": "auth-token"
},
"api-key-header": {
"description": "Header representing service's long-lived API key.",
"type": "apiKey",
"name": "St2-Api-Key",
"in": "header",
"x-operationId": "st2common.util.auth:validate_api_key"
},
"auth-token-query": {
"description": "Query parameter representing user's short-lived access token. Used as a backup authentication strategy for environments where it is impossible to provide a header.",
"type": "apiKey",
"name": "x-auth-token",
"in": "query",
"x-operationId": "st2common.util.auth:validate_token",
"x-set-cookie": "auth-token"
},
"api-key-query": {
"description": "Query parameter representing service's long-lived API key. Used as a backup authentication strategy for environments where it is impossible to provide a header.",
"type": "apiKey",
"name": "st2-api-key",
"in": "query",
"x-operationId": "st2common.util.auth:validate_api_key"
},
"auth-token-cookie": {
"description": "Cookie representing user's short-lived access token.",
"type": "apiKey",
"name": "auth-token",
"in": "cookie",
"x-operationId": "st2common.util.auth:validate_token"
}
},
"security": [
{
"auth-token-header": []
},
{
"api-key-header": []
},
{
"auth-token-query": []
},
{
"api-key-query": []
},
{
"auth-token-cookie": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment