Assign command-execution extension to node
PUT
/api/v1/nodes/{env}/node/{uuid}/extensions/{id}
const url = 'https://example.com/api/v1/nodes/example/node/example/extensions/1';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"expires_at":"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/extensions/1 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "expires_at": "example" }'Allows command execution on the node through the extension until expires_at. The body must be exactly {“expires_at”: …}: a future RFC 3339 time, or an explicit null for no expiry. A missing expires_at, any other key or trailing data is refused with 400. Ordinary extensions are refused with 409. Super admins only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”env
required
string
Environment name or UUID
uuid
required
string
Node UUID
id
required
integer
Extension ID
Request Bodyrequired
Section titled “Request Bodyrequired”Expiry
Media typeapplication/json
object
expires_at
required
string
Examplegenerated
{ "expires_at": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
assignments
Array<object>
object
created_at
string
created_by
string
expired
boolean
expires_at
string
extension_id
integer
name
string
effective
Array<object>
object
available
boolean
command_execution
boolean
name
string
platforms
Array<string>
source
string
library
Array<object>
object
command_execution
boolean
description
string
id
integer
name
string
platforms
Array<string>
version
string
status
Array<object>
object
at
string
error
string
lingering
Lingering is set by osctrl when osctrld reports a command-execution extension as kept (its removal failed) and the node has no unexpired assignment for it.
boolean
name
string
reported_at
string
result
string
sha256
string
Examplegenerated
{ "assignments": [ { "created_at": "example", "created_by": "example", "expired": true, "expires_at": "example", "extension_id": 1, "name": "example" } ], "effective": [ { "available": true, "command_execution": true, "name": "example", "platforms": [ "example" ], "source": "example" } ], "library": [ { "command_execution": true, "description": "example", "id": 1, "name": "example", "platforms": [ "example" ], "version": "example" } ], "status": [ { "at": "example", "error": "example", "lingering": true, "name": "example", "reported_at": "example", "result": "example", "sha256": "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"}Not a command-execution extension
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"}