Run query
POST
/api/v1/queries/{env}
const url = 'https://osctrl.net/api/v1/queries/example';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"environment_list":["example"],"exp_hours":1,"hidden":true,"host_list":["example"],"path":"example","platform_list":["example"],"query":"example","tag_list":["example"],"uuid_list":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”env
required
string
Environment name or UUID
Request Bodyrequired
Section titled “Request Bodyrequired”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" ]}Responses
Section titled “Responses”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"}