Help Center/ ModelArts/ API Reference/ Development Environment Management/ Querying the List of Switchable Specifications Supported by Notebook Instances
Updated on 2025-08-20 GMT+08:00

Querying the List of Switchable Specifications Supported by Notebook Instances

Function

This API is used to obtain the available specifications that can be switched during notebook instance creation.

This API applies to the following scenario: When you want to know the configuration options supported by a notebook instance, you can use this API to query the list of available specifications. Before using this API, ensure that you have logged in to the system and have the permission to create a notebook instance. After this API is called, the system returns the switchable specifications supported by the notebook instance. For example, the memory and CPU. If you do not have the permission to create a notebook instance, the API will return an error message.

Constraints

No constraints

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v1/{project_id}/notebooks/{id}/flavors

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Definition: Notebook instance ID. The ID is in the format of a Universally Unique Identifier (UUID). For details about how to obtain the ID, see Querying Notebook Instances.

Constraints: N/A

Range: N/A

Default Value: N/A

project_id

Yes

String

Definition: Project ID. For details, see Obtaining a Project ID and Name.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Definition: Number of valid specifications displayed on each page. There is no limit by default.

Constraints: N/A

Range: N/A

Default Value: N/A

offset

No

Integer

Definition: Start offset of the records on each page

Constraints: N/A

Range: N/A

Default Value: 0

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

current

Integer

Definition: Current page number.

Range: Positive integers

data

Array of NotebookFlavor objects

Definition: Pagination data.

flavors

Array of NotebookFlavor objects

Definition: List of flavors that can be switched.

pages

Integer

Definition: Total number of pages.

Range: Positive integers

size

Integer

Definition: Number of records on each page

Range: Positive integers

total

Long

Definition: Total number of records.

Range: Non-negative integers

Table 4 NotebookFlavor

Parameter

Type

Description

arch

String

Definition: Architecture type.

Range:

  • X86_64

  • AARCH64

ascend

AscendInfo object

Description: NPU information.

billing

BillingInfo object

Definition: CDR information.

category

String

Definition: Processor type.

Range:

  • CPU

  • GPU

  • ASCEND

description

String

Definition: Specifications description.

Range: N/A

feature

String

Definition: Instance type.

Range:

  • DEFAULT: free CodeLab instance. Each user can create only one.

  • NOTEBOOK: billed instance.

free

Boolean

Definition: Whether free specifications are used.

Range: Boolean

  • true: free specifications

  • false: non-free specifications

gpu

GPUInfo object

Description: GPU information.

id

String

Definition: Specification ID.

Range: N/A

memory

Long

Definition: Memory size.

Range: N/A

name

String

Definition: Specification name.

Range: N/A

sold_out

Boolean

Definition: Whether resources are sufficient.

Range: Boolean

  • true: Resources are insufficient.

  • false: Resources are sufficient.

storages

Array of strings

Definition: Storage type supported by the specification. Range:

  • EFS

  • EVS

vcpus

Integer

Definition: Number of CPU cores.

Range: N/A

Table 5 AscendInfo

Parameter

Type

Description

npu

Integer

Definition: Number of NPUs.

Range: N/A

npu_memory

String

Definition: NPU memory.

Range: N/A

type

String

Definition: NPU type.

Range: N/A

Table 6 BillingInfo

Parameter

Type

Description

code

String

Definition: Billing code.

Range: N/A

unit_num

Integer

Definition: Billing unit.

Range: N/A

Table 7 GPUInfo

Parameter

Type

Description

gpu

Integer

Number of GPUs.

gpu_memory

String

Definition: GPU memory.

Range: N/A

type

String

Definition: GPU type.

Range: N/A

Example Requests

GET https://{endpoint}/v1/{project_id}/notebooks/{id}/flavors

Example Responses

Status code: 200

OK

{
  "current" : 1,
  "data" : [ {
    "arch" : "aarch64",
    "ascend" : {
      "npu_memory" : "32",
      "npu" : 2,
      "type" : "ascend-snt9"
    },
    "billing" : {
      "code" : "modelarts.kat1.xlarge",
      "unit_num" : 2
    },
    "category" : "ASCEND",
    "description" : "The Ascend specification is suitable for deep learning code running and debugging",
    "feature" : "NOTEBOOK",
    "free" : false,
    "id" : "modelarts.bm.snt9.xlarge.2",
    "memory" : 201326592,
    "name" : "Ascend: 2*Ascend snt9|CPU: 48vCPUs 192GB",
    "sold_out" : false,
    "storages" : [ "EFS" ],
    "vcpus" : 48
  }, {
    "arch" : "aarch64",
    "ascend" : {
      "npu_memory" : "128",
      "npu" : 8,
      "type" : "ascend-snt9"
    },
    "billing" : {
      "code" : "modelarts.kat1.8xlarge",
      "unit_num" : 1
    },
    "category" : "ASCEND",
    "description" : "The Ascend specification is suitable for deep learning code running and debugging",
    "feature" : "NOTEBOOK",
    "free" : false,
    "id" : "modelarts.bm.snt9.xlarge.8",
    "memory" : 805306368,
    "name" : "Ascend: 8*Ascend snt9|CPU: 192vCPUs 768GB",
    "sold_out" : false,
    "storages" : [ "EFS" ],
    "vcpus" : 192
  } ],
  "flavors" : [ {
    "arch" : "aarch64",
    "ascend" : {
      "npu_memory" : "32",
      "npu" : 2,
      "type" : "ascend-snt9"
    },
    "billing" : {
      "code" : "modelarts.kat1.xlarge",
      "unit_num" : 2
    },
    "category" : "ASCEND",
    "description" : "The Ascend specification is suitable for deep learning code running and debugging",
    "feature" : "NOTEBOOK",
    "free" : false,
    "id" : "modelarts.bm.snt9.xlarge.2",
    "memory" : 201326592,
    "name" : "Ascend: 2*Ascend snt9|CPU: 48vCPUs 192GB",
    "sold_out" : false,
    "storages" : [ "EFS" ],
    "vcpus" : 48
  }, {
    "arch" : "aarch64",
    "ascend" : {
      "npu_memory" : "128",
      "npu" : 8,
      "type" : "ascend-snt9"
    },
    "billing" : {
      "code" : "modelarts.kat1.8xlarge",
      "unit_num" : 1
    },
    "category" : "ASCEND",
    "description" : "The Ascend specification is suitable for deep learning code running and debugging",
    "feature" : "NOTEBOOK",
    "free" : false,
    "id" : "modelarts.bm.snt9.xlarge.8",
    "memory" : 805306368,
    "name" : "Ascend: 8*Ascend snt9|CPU: 192vCPUs 768GB",
    "sold_out" : false,
    "storages" : [ "EFS" ],
    "vcpus" : 192
  } ],
  "pages" : 1,
  "size" : 2,
  "total" : 2
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not found

Error Codes

See Error Codes.