Skip to content

Get environment osquery target

GET
/api/v1/environments/osquery/{env}
curl --request GET \
--url https://example.com/api/v1/environments/osquery/example \
--header 'Authorization: <Authorization>'

Returns the osquery version the environment is rolled out to and the number of its hosts per installed version, plus the names (no digests) of the library versions it can be set to, and the latest staged rollout (null when none). The installed versions, and the host names and reasons in the rollout’s paused and rolled_back_hosts fields, are reported by the hosts and are untrusted. Environment admins.

env
required
string

Environment name or UUID

OK

Media typeapplication/json
object
available

Available lists the library version names (no digests), ascending.

Array<string>
counts
Array<object>
object
count
integer
version
string
rollout

Rollout is the environment’s latest rollout, null when it never had one.

object
counts
object
eligible
integer
rolled_back
integer
upgraded
integer
waiting
integer
next_stage_at
string
paused
object
at
string
host
string
reason
string
request_id
string
rolled_back_hosts

RolledBackHosts is newest first, at most 50.

Array<object>
object
at
string
host
string
reason
string
stage
integer
stage_opened_at
string
stages
Array<integer>
state
string
version
string
target
object
request_id
string
updated_at
string
updated_by
string
version
string
windows_hosts

WindowsHosts is the number of Windows hosts in the environment; Windows upgrades cannot be rolled back automatically.

integer
Examplegenerated
{
"available": [
"example"
],
"counts": [
{
"count": 1,
"version": "example"
}
],
"rollout": {
"counts": {
"eligible": 1,
"rolled_back": 1,
"upgraded": 1,
"waiting": 1
},
"next_stage_at": "example",
"paused": {
"at": "example",
"host": "example",
"reason": "example"
},
"request_id": "example",
"rolled_back_hosts": [
{
"at": "example",
"host": "example",
"reason": "example"
}
],
"stage": 1,
"stage_opened_at": "example",
"stages": [
1
],
"state": "example",
"version": "example"
},
"target": {
"request_id": "example",
"updated_at": "example",
"updated_by": "example",
"version": "example"
},
"windows_hosts": 1
}

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"
}

Internal server error

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