列出代理任务 (v1)
deprecated
已废弃:请改用 v2 get agent job。检索指定 domain 的所有代理任务,包括其状态和详细信息。
GET
/
v1
/
agent
/
{projectId}
/
jobs
获取所有代理任务(v1)
curl --request GET \
--url https://api.mintlify.com/v1/agent/{projectId}/jobs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mintlify.com/v1/agent/{projectId}/jobs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mintlify.com/v1/agent/{projectId}/jobs', 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.mintlify.com/v1/agent/{projectId}/jobs",
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: Bearer <token>"
],
]);
$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.mintlify.com/v1/agent/{projectId}/jobs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mintlify.com/v1/agent/{projectId}/jobs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mintlify.com/v1/agent/{projectId}/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"allSessions": [
{
"sessionId": "<string>",
"subdomain": "<string>",
"branch": "<string>",
"haulted": true,
"pullRequestLink": "<string>",
"messageToUser": "<string>",
"todos": [
{
"content": "<string>",
"id": "<string>"
}
],
"userId": "<string>",
"title": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}此端点已废弃。请改用 v2 获取代理任务 端点。
用法
响应
Authorizations
Authorization 头部需要 Bearer 令牌。请使用以 mint_ 为前缀的管理员 API 密钥。这是服务端使用的机密凭证。你可以在控制台的 API keys 页面 中生成一个。
Query Parameters
用于分页的跳过结果数。
Required range:
x >= 0返回的结果数量。最大 100。
Required range:
1 <= x <= 100Response
200 - application/json
已成功检索所有代理任务
该 domain 的所有代理会话数组。
Show child attributes
Show child attributes
⌘I
获取所有代理任务(v1)
curl --request GET \
--url https://api.mintlify.com/v1/agent/{projectId}/jobs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mintlify.com/v1/agent/{projectId}/jobs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mintlify.com/v1/agent/{projectId}/jobs', 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.mintlify.com/v1/agent/{projectId}/jobs",
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: Bearer <token>"
],
]);
$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.mintlify.com/v1/agent/{projectId}/jobs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mintlify.com/v1/agent/{projectId}/jobs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mintlify.com/v1/agent/{projectId}/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"allSessions": [
{
"sessionId": "<string>",
"subdomain": "<string>",
"branch": "<string>",
"haulted": true,
"pullRequestLink": "<string>",
"messageToUser": "<string>",
"todos": [
{
"content": "<string>",
"id": "<string>"
}
],
"userId": "<string>",
"title": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}