Services
The Services endpoints allow you to manage services, including listing, and cancelling services.
GET/services
List Services
This endpoint allows you to list all available services.
Request
GET
/servicescurl -G https://api.puregpu.com/services \
-H "X-API-Key: {token}"
Response
{
"result": "success",
"services": [
{
"id": 11,
"pid": 1,
"regdate": "2024-06-05",
"name": "4090-1x-server",
"domain": "test",
"dedicatedip": "",
"suspensionreason": "",
"status": "Cancelled",
"billingcycle": "hourly",
"billingamount": "0.50"
},
{
"id": 12,
"pid": 1,
"regdate": "2024-06-05",
"name": "4090-1x-server",
"domain": "test2",
"dedicatedip": "",
"suspensionreason": "",
"status": "Active",
"billingcycle": "Monthly",
"billingamount": "400.00"
},
]
}
GET/services/:serviceId
Get Service
This endpoint allows you to get a single service.
Required attributes
- Name
serviceId
- Type
- integer
- Description
The ID of the service to get, fetched from the List Services endpoint.
Request
GET
/services/:serviceIdcurl -G https://api.puregpu.com/services/:serviceId \
-H "X-API-Key: {token}"
Response
{
"result": "success",
"service": {
"id": 12,
"pid": 1,
"regdate": "2024-06-05",
"name": "4090-1x-server",
"domain": "test2",
"dedicatedip": "",
"suspensionreason": "",
"status": "Active",
"meta": {
"gpu_name": "RTX 4090",
"gpu_vram": "24",
"gpu_manufacturer": "NVIDIA",
"gpu_count": "1",
"cpu_name": "AMD EPYC 9334",
"cpu_cores": "16",
"cpu_clock": "3.9",
"cpu_manufacturer": "AMD",
"ram": "128",
"ram_type": "DDR5",
"disk_space": "1024",
"disk_type": "NVME"
},
"billingcycle": "Monthly",
"billingamount": "400.00"
}
}
POST/services/:serviceId/cancel
Cancel Service
This endpoint allows you to cancel a service.
Required attributes
- Name
serviceId
- Type
- integer
- Description
The ID of the service to get, fetched from the List Services endpoint.
Request
POST
/services/:serviceId/cancelcurl -X POST https://api.puregpu.com/services/:serviceId/cancel \
-H "X-API-Key: {token}"
Response
{
"result": "success"
}