Skip to content
  • Auto
  • Light
  • Dark

List Kernels

List All Available Kernels for a Droplet
gpu_droplets.list_kernels(intdroplet_id, GPUDropletListKernelsParams**kwargs) -> metaMetaPropertieskernelslistlinksPageLinksGPUDropletListKernelsResponse
get/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
droplet_idint
minimum1
pageint
optional

Which 'page' of paginated results to return.

minimum1
per_pageint
optional

Number of items returned per page

minimum1
maximum200
Returns
GPUDropletListKernelsResponseclass
Hide ParametersShow Parameters
metatotalintMetaProperties

Information about the response itself.

kernelslist
optional
Optional[List[Optional[Kernel]]]
Hide ParametersShow Parameters
idint
optional

A unique number used to identify and reference a specific kernel.

namestr
optional

The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question.

versionstr
optional

A standard kernel version string representing the version, patch, and release information.

from do_gradientai import GradientAI

client = GradientAI()
response = client.gpu_droplets.list_kernels(
    droplet_id=3164444,
)
print(response.meta)
200 Example
{
  "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"
    }
  }
}