import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.extensions.upload({ file: fs.createReadStream('path/to/file') });
console.log(response.id);{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"size_bytes": 123,
"name": "<string>",
"last_used_at": "2023-11-07T05:31:56Z"
}Upload a zip file containing an unpacked browser extension. Optionally provide a unique name for later reference.
import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.extensions.upload({ file: fs.createReadStream('path/to/file') });
console.log(response.id);{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"size_bytes": 123,
"name": "<string>",
"last_used_at": "2023-11-07T05:31:56Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Extension uploaded successfully
A browser extension uploaded to Kernel.
Unique identifier for the extension
Timestamp when the extension was created
Size of the extension archive in bytes
Optional, easier-to-reference name for the extension. Must be unique within the organization.
Timestamp when the extension was last used