Get node osquery upgrade state
const url = 'https://example.com/api/v1/nodes/example/node/example/osquery';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/nodes/example/node/example/osquery \ --header 'Authorization: <Authorization>'Returns the node’s pin, the version it is rolled out to (the unexpired pin, else the environment target), the osquery version it reports as installed, whether its platform is unsupported by osctrld upgrades (no package, e.g. freebsd), its stage in the environment rollout (rollout, null unless the environment target is a running or paused rollout; eligible_at is when that stage opens and is null when paused or already open), the names (no digests) of the library versions it can be pinned to and the last upgrade report of its osctrld. The installed version and the upgrade result, version, reason and request_id are reported by the host and are untrusted; reported_at is the server’s receive time. Environment admins.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Environment name or UUID
Node UUID
Responses
Section titled “Responses”OK
object
Available lists the library version names (no digests), ascending.
object
PlatformUnsupported is true when the node’s stored platform has no osquery package (for example freebsd), so osctrld cannot upgrade it. Windows is supported.
Rollout is set only while the environment’s staged rollout (running or paused) is what the node’s target comes from; null otherwise.
object
object
Pin or environment
object
Examplegenerated
{ "available": [ "example" ], "installed_version": "example", "pin": { "expires_at": "example", "request_id": "example", "updated_at": "example", "updated_by": "example", "version": "example" }, "platform_unsupported": true, "rollout": { "eligible_at": "example", "stage": 1, "stages": [ 1 ], "state": "example" }, "target": { "source": "example", "version": "example" }, "upgrade": { "reason": "example", "reported_at": "example", "request_id": "example", "result": "example", "version": "example" }}Bad request
object
Examplegenerated
{ "code": "example", "error": "example"}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"}