Skip to content

Update an osquery extension

PATCH
/api/v1/extensions/{id}
curl --request PATCH \
--url https://example.com/api/v1/extensions/1 \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "command_execution": true, "description": "example", "version": "example" }'

Changes the fields that are set. Command execution can only change while the extension is not assigned, and cannot be switched off while a host reports it kept (osctrld could not remove it). Super admins only.

id
required
integer

Extension ID

Fields to change

Media typeapplication/json
object
command_execution
boolean
description
string
version
string
Examplegenerated
{
"command_execution": true,
"description": "example",
"version": "example"
}

OK

Media typeapplication/json
object
command_execution
boolean
created_by
string
description
string
environments
integer
files
Array<object>
object
arch
string
filename
string
platform
string
sha256
string
size
integer
updated_at
string
updated_by
string
id
integer
name
string
nodes
integer
updated_at
string
version
string
Examplegenerated
{
"command_execution": true,
"created_by": "example",
"description": "example",
"environments": 1,
"files": [
{
"arch": "example",
"filename": "example",
"platform": "example",
"sha256": "example",
"size": 1,
"updated_at": "example",
"updated_by": "example"
}
],
"id": 1,
"name": "example",
"nodes": 1,
"updated_at": "example",
"version": "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"
}

Extension is assigned, or still on a host that could not remove it

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