List Kernels
List All Available Kernels for a Droplet
client.gpuDroplets.listKernels(numberdropletID, GPUDropletListKernelsParams { page, per_page } query?, RequestOptionsoptions?): GPUDropletListKernelsResponse { meta, kernels, links }
/v2/droplets/{droplet_id}/kernels
To retrieve a list of all kernels available to a Droplet, send a GET request
to /v2/droplets/$DROPLET_ID/kernels
The response will be a JSON object that has a key called kernels
. This will
be set to an array of kernel
objects, each of which contain the standard
kernel
attributes.
Parameters
dropletID: number
Returns
List All Available Kernels for a Droplet
import Gradient from '@digitalocean/gradient';
const client = new Gradient();
const response = await client.gpuDroplets.listKernels(3164444);
console.log(response.meta);
{
"meta": {
"total": 1
},
"kernels": [
{
"id": 7515,
"name": "DigitalOcean GrubLoader v0.2 (20160714)",
"version": "2016.07.13-DigitalOcean_loader_Ubuntu"
}
],
"links": {
"pages": {
"last": "https://api.digitalocean.com/v2/images?page=2",
"next": "https://api.digitalocean.com/v2/images?page=2"
}
}
}
Returns Examples
{
"meta": {
"total": 1
},
"kernels": [
{
"id": 7515,
"name": "DigitalOcean GrubLoader v0.2 (20160714)",
"version": "2016.07.13-DigitalOcean_loader_Ubuntu"
}
],
"links": {
"pages": {
"last": "https://api.digitalocean.com/v2/images?page=2",
"next": "https://api.digitalocean.com/v2/images?page=2"
}
}
}