List Instances
List all instances for the current user.
/instance/list
Authorization
You can find the AccessToken in the Request Header, or copy it from the web page(copy Auth Token). This token is generated each time you log in and will expire after one day.
You can also request the login api to get another token. See login api.
The AccessToken should be included in the request as a cookie. In the cURL example below, you can see how the token is passed using the -b
flag:
-b 'AccessToken=your_token_here'
Note: Replace your_token_here
with your actual AccessToken. The token is a JWT (JSON Web Token) that contains your authentication information and permissions.
Request Body
The request body contains pagination parameters.
Field | Type | Required | Description |
---|---|---|---|
pager | object | Yes | Pagination configuration |
Pager Configuration
The pager
object contains:
Field | Type | Required | Description |
---|---|---|---|
currentPage | number | Yes | Current page number (starts from 1) |
pageSize | number | Yes | Number of items per page |
Example Request
{
"pager": {
"currentPage": 1,
"pageSize": 10
}
}
cURL Example
curl 'https://hpc-ai.com/api/instance/list' \
-H 'content-type: application/json' \
-b 'AccessToken=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicGxhdGZvcm0uY29sb3NzYWxhaS5jb20iXSwiZXhwIjoxNzUxNjExOTE2LCJncm91cCI6WyJhZG1pbiJdLCJpYXQiOjE3NTE1MjU1MTYsImlzcyI6ImhwY2FpdGVjaC5jb20iLCJzdWIiOiIwOGY2ZjI2MS1hNzY2LTQ2M2UtOGJhNC04NWU2YWUzMmY0OTIifQ.hDEYrfq5zksB7ywx7scoNM-IJmyW88mYTtz435kamqoO8etsSPHy1yLe2L7WKAkUx_eJOISUauwTUX6Of8ys5gj8MP4BK6Ixh_saAWylRdF7IrFMDb16Yaxc2a91yAhK26IsiDCOoygSBYZ8tMHMUJkudkY2CqzSJvb3Z-kCqJfK8wlgY45Dgx6dTkVeYvA9bohnRQ6R4hI57HJo8fnav3VxkzEbYcs9UmLSNgfPYdC-mCURsSsPUaCTVEUxk9oJaHXmyH61uo7ZQKOHXNqsCHVgwFJPAm3YjPCx3n1jNYPGH-amnrLt0PQVpFa-PGWwjySrOVyjmjtlsxxxxxx' \
--data-raw '{"pager":{"currentPage":1,"pageSize":10}}'
Response Fields
Field | Type | Description |
---|---|---|
instances | array | Array of instance objects |
pager | object | Pagination information |
Instance Object
Each object in the instances
array contains the following fields:
Field | Type | Description |
---|---|---|
instanceMetadata | object | Instance metadata information |
instanceSpecInfo | object | Instance specification information |
instanceRuntimeInfo | object | Instance runtime information |
Instance Metadata
The instanceMetadata
object contains:
Field | Type | Description |
---|---|---|
instanceAuth | object | Instance authentication information |
instanceId | string | Unique instance ID |
instanceUsername | string | Instance username |
Instance Auth
The instanceAuth
object contains:
Field | Type | Description |
---|---|---|
ownerUserName | string | Owner user ID |
Instance Spec Info
The instanceSpecInfo
object contains:
Field | Type | Description |
---|---|---|
name | string | Instance name |
instanceBillingInfo | object | Billing information |
imageInfo | object | Image information |
instanceConfiguration | object | Instance configuration |
instanceTypeInfo | object | Instance type information |
regionInfo | object | Region information |
remoteStorages | array | Array of remote storage configurations |
nodePorts | array | Array of node port configurations |
isSpotInstance | boolean | Whether this is a spot instance |
Billing Information
The instanceBillingInfo
object contains:
Field | Type | Description |
---|---|---|
chargeMode | string | Billing mode (perHour, tidePerHour, perDay, perWeek, perMonth) |
duration | number | Billing duration |
price | number | Price per unit |
unit | string | Price unit ($) |
type | string | Billing type (On-Demand, etc.) |
Image Information
The imageInfo
object contains:
Field | Type | Description |
---|---|---|
architecture | string | Image architecture |
isPublic | string | Whether the image is public |
name | string | Image name |
tags | array | Image tags |
type | string | Image type |
Instance Configuration
The instanceConfiguration
object contains:
Field | Type | Description |
---|---|---|
enableCommonData | boolean | Whether common data is enabled |
enableDocker | boolean | Whether Docker is enabled |
InstanceDiskAmountRequest | object | Disk amount request configuration |
dockerStorageSize | number | Docker storage size in GB |
Instance Disk Amount Request
The InstanceDiskAmountRequest
object contains:
Field | Type | Description |
---|---|---|
rootDiskAmountGiReq | number | Requested root disk amount in GB |
dataDiskAmountGiReq | number | Requested data disk amount in GB |
Instance Type Information
The instanceTypeInfo
object contains:
Field | Type | Description |
---|---|---|
instanceId | string | Instance type ID |
instanceTypeName | string | Instance type name |
cpu | object | CPU configuration |
memory | object | Memory configuration |
gpu | object | GPU configuration |
disk | object | Disk configuration |
CPU Configuration
The cpu
object contains:
Field | Type | Description |
---|---|---|
amount | number | Number of CPU cores |
type | string | CPU type |
unit | string | CPU unit |
Memory Configuration
The memory
object contains:
Field | Type | Description |
---|---|---|
amount | number | Memory amount |
type | string | Memory type |
unit | string | Memory unit (GB) |
GPU Configuration
The gpu
object contains:
Field | Type | Description |
---|---|---|
amount | number | Number of GPUs |
type | string | GPU type |
unit | string | GPU unit |
Disk Configuration
The disk
object contains:
Field | Type | Description |
---|---|---|
amount | number | Disk amount |
type | string | Disk type |
unit | string | Disk unit (GB) |
Region Information
The regionInfo
object contains:
Field | Type | Description |
---|---|---|
domain | string | Domain name |
location | string | Geographic location |
name | string | Region name |
sshAddress | string | SSH connection ip address |
value | string | Region value |
regionId | string | Region ID |
Node Ports Configuration
Each object in the nodePorts
array contains:
Field | Type | Description |
---|---|---|
port | number | Port number in notebook |
address | string | IP address |
nodePort | number | Node port number (access from outside) |
Instance Runtime Information
The instanceRuntimeInfo
object contains:
Field | Type | Description |
---|---|---|
createAtUnixMs | number | Creation timestamp in milliseconds |
status | string | Instance status (Running, Stopped, Starting, StartingFailed, Initializing, InitializationFailed, Archived, Released, PullingImage, Restarting) |
phase | string | Instance phase |
message | string | Status message |
diagnosisReason | string | Diagnosis reason |
diagnosisMessage | string | Diagnosis message |
healthy | boolean | Whether the instance is healthy |
subUrl | string | Sub-URL for accessing the jupyter notebook |
instanceDiskUsageInfo | object | Disk usage information |
instanceDiskAmountInfo | object | Disk amount information |
stopTimestamp | number | Stop timestamp |
scheduledStopTimestamp | number | Scheduled stop timestamp |
Disk Usage Information
The instanceDiskUsageInfo
object contains:
Field | Type | Description |
---|---|---|
rootDiskUsedGi | number | Root disk usage in GB |
dataDiskUsedGi | number | Data disk usage in GB |
Disk Amount Information
The instanceDiskAmountInfo
object contains:
Field | Type | Description |
---|---|---|
rootDiskAmountGi | number | Total root disk amount in GB |
dataDiskAmountGi | number | Total data disk amount in GB |
Pagination Information
The pager
object contains:
Field | Type | Description |
---|---|---|
currentPage | number | Current page number |
pageSize | number | Number of items per page |
totalEntries | number | Total number of entries |
Example Response
Success Response
{
"instances": [
{
"instanceMetadata": {
"instanceAuth": {
"ownerUserName": "08f6f261-xxxx-xxxx-xxxx-85e6ae32f492"
},
"instanceId": "notebook-5ac72ea0-xxxx-xxxx-xxxx-eea5891c2019",
"instanceUsername": "username"
},
"instanceSpecInfo": {
"name": "example-instance",
"instanceBillingInfo": {
"chargeMode": "perHour",
"duration": 1,
"price": 0.23999999463558197,
"unit": "$",
"type": "On-Demand"
},
"imageInfo": {
"architecture": "",
"isPublic": "",
"name": "",
"tags": null,
"type": ""
},
"instanceConfiguration": {
"enableCommonData": false,
"enableDocker": false,
"InstanceDiskAmountRequest": {
"rootDiskAmountGiReq": 0,
"dataDiskAmountGiReq": 0
},
"dockerStorageSize": 0
},
"instanceTypeInfo": {
"instanceId": "ee90dd8f-xxxx-xxxx-xxxx-c3ff72915722",
"instanceTypeName": "",
"cpu": {
"amount": 8,
"type": "INTEL(R) XEON(R) PLATINUM 8558",
"unit": ""
},
"memory": {
"amount": 16,
"type": "",
"unit": "GB"
},
"gpu": {
"amount": 0,
"type": "",
"unit": ""
},
"disk": {
"amount": 50,
"type": "nvme",
"unit": "GB"
}
},
"regionInfo": {
"domain": "asia-sg-1.hpc-ai.com",
"location": "Asia,Singapore",
"name": "asia-sg-1",
"sshAddress": "122.xx.xx.202",
"value": "",
"regionId": "fce31a0c-xxxx-xxxx-xxxx-41caa1bdd251"
},
"remoteStorages": [],
"nodePorts": [
{
"port": 22,
"address": "122.xx.xx.202",
"nodePort": 31674
}
],
"isSpotInstance": false
},
"instanceRuntimeInfo": {
"createAtUnixMs": 1751527726179,
"status": "Running",
"phase": "",
"message": "",
"diagnosisReason": "",
"diagnosisMessage": "",
"healthy": true,
"subUrl": "/notebook/notebook-5ac72ea0-xxxx-xxxx-xxxx-eea5891c2019/notebook-5ac72ea0-xxxx-xxxx-xxxx-eea5891c2019-0",
"instanceDiskUsageInfo": {
"rootDiskUsedGi": 2.48,
"dataDiskUsedGi": 0
},
"instanceDiskAmountInfo": {
"rootDiskAmountGi": 50,
"dataDiskAmountGi": 50
},
"stopTimestamp": 0,
"scheduledStopTimestamp": 0
}
}
],
"pager": {
"currentPage": 1,
"pageSize": 3,
"totalEntries": 92
}
}
Error Response
{
"code": -1,
"message": "Not logged in or login expired, please log in again"
}