Upload an osquery extension file
PUT
/api/v1/extensions/{id}/files/{platform}/{arch}
const url = 'https://example.com/api/v1/extensions/1/files/example/example';const form = new FormData();form.append('file', 'file');
const options = {method: 'PUT', headers: {Authorization: '<Authorization>'}};
options.body = form;
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/extensions/1/files/example/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: multipart/form-data' \ --form file=@fileStores or replaces the binary for one platform and arch from the multipart field file (at most 64 MiB). Platforms: darwin (amd64, arm64, universal), linux (amd64, arm64), windows (amd64). Super admins only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Extension ID
platform
required
string
Platform
arch
required
string
Architecture
Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
file
required
Extension binary
string format: binary
Responses
Section titled “Responses”OK
Media typeapplication/json
object
arch
string
filename
string
platform
string
sha256
string
size
integer
updated_at
string
updated_by
string
Examplegenerated
{ "arch": "example", "filename": "example", "platform": "example", "sha256": "example", "size": 1, "updated_at": "example", "updated_by": "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"}File too large
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"}