Delete an osquery extension
DELETE
/api/v1/extensions/{id}
const url = 'https://example.com/api/v1/extensions/1';const options = {method: 'DELETE', 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 DELETE \ --url https://example.com/api/v1/extensions/1 \ --header 'Authorization: <Authorization>'Removes an extension and its files. Refused while it is assigned to any environment or node, or, for a command-execution extension, while a host reports it kept (osctrld could not remove it). Super admins only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Extension ID
Responses
Section titled “Responses”No content
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"}