获取 CPU 产品列表
curl --request GET \
--url https://api.ppio.com/gpu-instance/openapi/v1/cpu/products \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpu-instance/openapi/v1/cpu/products"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpu-instance/openapi/v1/cpu/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ppio.com/gpu-instance/openapi/v1/cpu/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ppio.com/gpu-instance/openapi/v1/cpu/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ppio.com/gpu-instance/openapi/v1/cpu/products")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpu-instance/openapi/v1/cpu/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"cpuNum": 123,
"memorySize": 123,
"rootfsSize": 123,
"localVolumeSize": 123,
"availableDeploy": true,
"price": 123
}产品
获取 CPU 产品列表
GET
/
gpu-instance
/
openapi
/
v1
/
cpu
/
products
获取 CPU 产品列表
curl --request GET \
--url https://api.ppio.com/gpu-instance/openapi/v1/cpu/products \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpu-instance/openapi/v1/cpu/products"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpu-instance/openapi/v1/cpu/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ppio.com/gpu-instance/openapi/v1/cpu/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ppio.com/gpu-instance/openapi/v1/cpu/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ppio.com/gpu-instance/openapi/v1/cpu/products")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpu-instance/openapi/v1/cpu/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"cpuNum": 123,
"memorySize": 123,
"rootfsSize": 123,
"localVolumeSize": 123,
"availableDeploy": true,
"price": 123
}请求头
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
查询参数
筛选指定集群 ID。字符串,长度限制:0-255 字符。
筛选的产品名称(模糊匹配)。字符串,长度限制:0-255 字符。
响应参数
CPU 产品 ID。
CPU 产品名称。
CPU 数。单位为核。
内存大小。单位为 GB。
系统盘大小。单位为 GB。
本地盘大小。单位为 GB。
该产品是否可以创建实例。取值:
- true:该产品可以创建实例。
- false::该产品资源不足,不能创建实例。
产品单价。
最后修改于 2026年1月12日
⌘I