List contexts
GET
/browser/v1/contexts● SupportedRequest parameters
namestringoptional按登录态名称精确匹配;名称在当前账户内唯一,所以最多返回一条。省略时列出全部登录态。
cursorstringoptional上一页返回的 nextCursor,原样传入以继续读取;省略时读取第一页。
limitintegeroptional每页最多返回的登录态数量;默认 25,范围 1–100。
Returns
200
Errors contain statusCode, error and message; the native API adds code. The request ID is in X-Request-Id. Errors
Request example
curl
curl -X GET "https://api.deepraxis.com/browser/v1/contexts" \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
import os, requests
response = requests.request("GET", f"https://api.deepraxis.com/browser/v1/contexts",
headers={"Authorization": "Bearer " + os.environ["PRAXIS_API_KEY"]}
)
print(response.status_code, response.text)TypeScript
const response = await fetch(`https://api.deepraxis.com/browser/v1/contexts`, {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.PRAXIS_API_KEY}` },
});
console.log(response.status, await response.text());Response
HTTP 200
请求成功。
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | 本页查询匹配的记录;没有匹配项时为空数组。 |
| data[].id | string | 登录态 ID;使用创建或列出登录态返回的 id,以 bsc_ 开头。 |
| data[].projectId | string | 兼容项目标识,当前账户的登录态固定返回 default。 |
| data[].createdAt | string | 登录态创建时刻,UTC ISO 8601 时间。 |
| data[].updatedAt | string | 登录态名称、标签或保存内容最近一次更新的时刻,UTC ISO 8601 时间。 |
| data[].name | string | 登录态名称;非空时为 1–128 个 ASCII 字母、数字或 . _ : -,在当前账户内唯一;空字符串表示不设名称或清除名称。 |
| data[].labels | object | 自定义字符串标签;最多 32 项,键最多 128 个 UTF-8 字节,值最多 1024 个 UTF-8 字节。 |
| data[].sites | array<string> | 已保存的 localStorage 主机名和 cookie 域名,去掉 cookie 域名前导点后去重排序。 |
| data[].cookieCount | integer | 登录态中已保存的 cookie 条目数量;新登录态为 0。 |
| data[].bytes | integer | 登录态加密后保存内容的大小,单位为 UTF-8 字节。 |
| data[].lockedBy | string | 当前登录态写入租约的持有者标识;无有效租约时省略。 |
| data[].lastUsedAt | string | UTC timestamp when a session last started with this context; absent if it has never been used. |
| data[].proxy | object | 登录态绑定的固定外部代理(只含保管库引用,不含密码);没有绑定时省略。 |
| nextCursor | string | null | 下一页游标;原样传入 cursor,null 表示没有更多结果。 |