查询 Job 详情
curl --request GET \
--url https://api.ppio.com/gpus/v2/jobs/{job_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpus/v2/jobs/{job_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpus/v2/jobs/{job_id}', 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/gpus/v2/jobs/{job_id}",
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/gpus/v2/jobs/{job_id}"
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/gpus/v2/jobs/{job_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpus/v2/jobs/{job_id}")
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": "job-id",
"type": "saveImage",
"envs": [],
"status": {
"status": "Succeeded",
"error": "",
"message": ""
},
"log": "https://example.com/logs/job-id",
"created_at": 1714982400,
"member_id": "member-id",
"owner_id": "owner-id",
"deleted_time": 0,
"update_at": 1714982600,
"instance_id": "instance-id"
}任务
查询 Job 详情
GET
/
gpus
/
v2
/
jobs
/
{job_id}
查询 Job 详情
curl --request GET \
--url https://api.ppio.com/gpus/v2/jobs/{job_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpus/v2/jobs/{job_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpus/v2/jobs/{job_id}', 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/gpus/v2/jobs/{job_id}",
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/gpus/v2/jobs/{job_id}"
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/gpus/v2/jobs/{job_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpus/v2/jobs/{job_id}")
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": "job-id",
"type": "saveImage",
"envs": [],
"status": {
"status": "Succeeded",
"error": "",
"message": ""
},
"log": "https://example.com/logs/job-id",
"created_at": 1714982400,
"member_id": "member-id",
"owner_id": "owner-id",
"deleted_time": 0,
"update_at": 1714982600,
"instance_id": "instance-id"
}请求头
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
路径参数
任务 ID。字符串,长度限制:1-255 字符。
响应
200 - application/json
查询成功
任务 ID
示例:
"job-id"
任务类型
示例:
"saveImage"
任务环境变量
示例:
[]
任务状态
Show child attributes
Show child attributes
Job 日志地址
示例:
"https://example.com/logs/job-id"
创建时间。Unix 时间戳
示例:
1714982400
创建者 member ID。原 creator 字段语义
示例:
"member-id"
所属用户 UUID。原 uuid 字段语义
示例:
"owner-id"
删除时间。Unix 时间戳
示例:
0
更新时间。保持 v1 字段语义,Unix 时间戳
示例:
1714982600
关联实例 ID
示例:
"instance-id"
最后修改于 2026年6月22日
⌘I