Skip to content

Run query

POST
/api/v1/queries/{env}
curl --request POST \
--url https://osctrl.net/api/v1/queries/example \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "environment_list": [ "example" ], "exp_hours": 1, "hidden": true, "host_list": [ "example" ], "path": "example", "platform_list": [ "example" ], "query": "example", "tag_list": [ "example" ], "uuid_list": [ "example" ] }'

Starts a new distributed query.

env
required
string

Environment name or UUID

Request body

Media typeapplication/json
object
environment_list
Array<string>
exp_hours
integer
hidden
boolean
host_list
Array<string>
path
string
platform_list
Array<string>
query
string
tag_list
Array<string>
uuid_list
Array<string>
Examplegenerated
{
"environment_list": [
"example"
],
"exp_hours": 1,
"hidden": true,
"host_list": [
"example"
],
"path": "example",
"platform_list": [
"example"
],
"query": "example",
"tag_list": [
"example"
],
"uuid_list": [
"example"
]
}

OK

Media typeapplication/json
object
query_name
string
Examplegenerated
{
"query_name": "example"
}

Bad request

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Unauthorized

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Forbidden

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Not found

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Conflict

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Too many requests

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Internal server error

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Service unavailable

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}