Get environment osquery target
const url = 'https://example.com/api/v1/environments/osquery/example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Environment name or UUID
Responses
Section titled “Responses”OK
object
Available lists the library version names (no digests), ascending.
object
Rollout is the environment’s latest rollout, null when it never had one.
object
object
object
RolledBackHosts is newest first, at most 50.
object
object
WindowsHosts is the number of Windows hosts in the environment; Windows upgrades cannot be rolled back automatically.
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
object
Examplegenerated
{ "code": "example", "error": "example"}Forbidden
object
Examplegenerated
{ "code": "example", "error": "example"}Not found
object
Examplegenerated
{ "code": "example", "error": "example"}Internal server error
object
Examplegenerated
{ "code": "example", "error": "example"}