Skip to main content

List Instances

POST
/instance/list

List all instances for the current user.

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.

FieldTypeRequiredDescription
pagerobjectYesPagination configuration

Pager Configuration​

The pager object contains:

FieldTypeRequiredDescription
currentPagenumberYesCurrent page number (starts from 1)
pageSizenumberYesNumber of items per page

Example Request​

{
"pager": {
"currentPage": 1,
"pageSize": 10
}
}

cURL Example​

curl 'https://www.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​

FieldTypeDescription
instancesarrayArray of instance objects
pagerobjectPagination information

Instance Object​

Each object in the instances array contains the following fields:

FieldTypeDescription
instanceMetadataobjectInstance metadata information
instanceSpecInfoobjectInstance specification information
instanceRuntimeInfoobjectInstance runtime information

Instance Metadata​

The instanceMetadata object contains:

FieldTypeDescription
instanceAuthobjectInstance authentication information
instanceIdstringUnique instance ID
instanceUsernamestringInstance username

Instance Auth​

The instanceAuth object contains:

FieldTypeDescription
ownerUserNamestringOwner user ID

Instance Spec Info​

The instanceSpecInfo object contains:

FieldTypeDescription
namestringInstance name
instanceBillingInfoobjectBilling information
imageInfoobjectImage information
instanceConfigurationobjectInstance configuration
instanceTypeInfoobjectInstance type information
regionInfoobjectRegion information
remoteStoragesarrayArray of remote storage configurations
nodePortsarrayArray of node port configurations
isSpotInstancebooleanWhether this is a spot instance

Billing Information​

The instanceBillingInfo object contains:

FieldTypeDescription
chargeModestringBilling mode (perHour, tidePerHour, perDay, perWeek, perMonth)
durationnumberBilling duration
pricenumberPrice per unit
unitstringPrice unit ($)
typestringBilling type (On-Demand, etc.)

Image Information​

The imageInfo object contains:

FieldTypeDescription
architecturestringImage architecture
isPublicstringWhether the image is public
namestringImage name
tagsarrayImage tags
typestringImage type

Instance Configuration​

The instanceConfiguration object contains:

FieldTypeDescription
enableCommonDatabooleanWhether common data is enabled
enableDockerbooleanWhether Docker is enabled
InstanceDiskAmountRequestobjectDisk amount request configuration
dockerStorageSizenumberDocker storage size in GB

Instance Disk Amount Request​

The InstanceDiskAmountRequest object contains:

FieldTypeDescription
rootDiskAmountGiReqnumberRequested root disk amount in GB
dataDiskAmountGiReqnumberRequested data disk amount in GB

Instance Type Information​

The instanceTypeInfo object contains:

FieldTypeDescription
instanceIdstringInstance type ID
instanceTypeNamestringInstance type name
cpuobjectCPU configuration
memoryobjectMemory configuration
gpuobjectGPU configuration
diskobjectDisk configuration

CPU Configuration​

The cpu object contains:

FieldTypeDescription
amountnumberNumber of CPU cores
typestringCPU type
unitstringCPU unit

Memory Configuration​

The memory object contains:

FieldTypeDescription
amountnumberMemory amount
typestringMemory type
unitstringMemory unit (GB)

GPU Configuration​

The gpu object contains:

FieldTypeDescription
amountnumberNumber of GPUs
typestringGPU type
unitstringGPU unit

Disk Configuration​

The disk object contains:

FieldTypeDescription
amountnumberDisk amount
typestringDisk type
unitstringDisk unit (GB)

Region Information​

The regionInfo object contains:

FieldTypeDescription
domainstringDomain name
locationstringGeographic location
namestringRegion name
sshAddressstringSSH connection ip address
valuestringRegion value
regionIdstringRegion ID

Node Ports Configuration​

Each object in the nodePorts array contains:

FieldTypeDescription
portnumberPort number in notebook
addressstringIP address
nodePortnumberNode port number (access from outside)

Instance Runtime Information​

The instanceRuntimeInfo object contains:

FieldTypeDescription
createAtUnixMsnumberCreation timestamp in milliseconds
statusstringInstance status (Running, Stopped, Starting, StartingFailed, Initializing, InitializationFailed, Archived, Released, PullingImage, Restarting)
phasestringInstance phase
messagestringStatus message
diagnosisReasonstringDiagnosis reason
diagnosisMessagestringDiagnosis message
healthybooleanWhether the instance is healthy
subUrlstringSub-URL for accessing the jupyter notebook
instanceDiskUsageInfoobjectDisk usage information
instanceDiskAmountInfoobjectDisk amount information
stopTimestampnumberStop timestamp
scheduledStopTimestampnumberScheduled stop timestamp

Disk Usage Information​

The instanceDiskUsageInfo object contains:

FieldTypeDescription
rootDiskUsedGinumberRoot disk usage in GB
dataDiskUsedGinumberData disk usage in GB

Disk Amount Information​

The instanceDiskAmountInfo object contains:

FieldTypeDescription
rootDiskAmountGinumberTotal root disk amount in GB
dataDiskAmountGinumberTotal data disk amount in GB

Pagination Information​

The pager object contains:

FieldTypeDescription
currentPagenumberCurrent page number
pageSizenumberNumber of items per page
totalEntriesnumberTotal 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"
}