Pin node osquery version
const url = 'https://example.com/api/v1/nodes/example/node/example/osquery';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"expires_at":"example","version":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/nodes/example/node/example/osquery \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "expires_at": "example", "version": "example" }'Pins the node to a version of the library, overriding the environment target, optionally until expires_at (RFC 3339, in the future). Changing only the expiry of the pinned version (in the same environment) keeps its request_id, so a version the host rejected is not retried; setting the same version with the same expiry again (or another version) gets a new request_id and retries. Unknown body fields are refused. The installed version and the upgrade result, version, reason and request_id are reported by the host and are untrusted. Environment admins.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Environment name or UUID
Node UUID
Request Bodyrequired
Section titled “Request Bodyrequired”Pin
object
Examplegenerated
{ "expires_at": "example", "version": "example"}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, version not in the library or expiry in the past
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"}Request body too large
object
Examplegenerated
{ "code": "example", "error": "example"}Internal server error
object
Examplegenerated
{ "code": "example", "error": "example"}