Browse AI
  1. robots
Browse AI
  • system
    • Endpoint for checking the status of Browse AI infrastructure
      GET
  • internal
    • Retrieve list of teams under user account
      GET
  • robots
    • Retrieve list of robots under your account
      GET
    • Retrieve single robot by ID
      GET
    • Update a robot's cookies
      PATCH
  • tasks
    • Get all tasks by a robot
      GET
    • Run a robot
      POST
    • Retrieve a task
      GET
  • monitors
    • Retrieve a robot's monitors
      GET
    • Create a new monitor on a robot
      POST
    • Retrieve a robot's monitor
      GET
    • Update a robot's monitor
      PATCH
    • Delete a robot's monitor
      DELETE
  • bulk runs
    • Bulk run tasks
      POST
    • Retrieve a robot's bulk runs list
      GET
    • Retrieve a robot's bulk run
      GET
  • webhooks
    • Retrieve a robot's webhooks
      GET
    • Create a new webhook on a robot
      POST
    • Delete a robot's webhook
      DELETE
  1. robots

Update a robot's cookies

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
PATCH
/robots/{robotId}/cookies
robots
Update a robot's cookies
请求示例请求示例
Go
Java
Objective-C
Shell
curl --location --request PATCH 'http://dev-cn.your-api-server.com/robots/c3689adb-50aa-44af-b265-a7e0d4e5846e/cookies' \
--header 'authorization: Bearer YOUR_SECRET_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '[
    {
        "name": "ACCOUNT_CHOOSER",
        "value": 12341234,
        "domain": ".example.com",
        "expirationDate": 1723659417,
        "path": "/products/",
        "secure": true,
        "httpOnly": true,
        "hostOnly": true
    }
]'
响应示例响应示例
200 - 示例 1
{
    "statusCode": 200,
    "messageCode": "success",
    "cookies": [
        {
            "name": "ACCOUNT_CHOOSER",
            "value": 12341234,
            "domain": ".example.com",
            "expirationDate": 1723659417,
            "path": "/products/",
            "secure": true,
            "httpOnly": true,
            "hostOnly": true
        }
    ]
}

请求参数

Path 参数
robotId
string 
必需
Unique robot ID
You can find a robot's ID by opening it on the dashboard and copying its ID in the browser address bar.
示例值:
c3689adb-50aa-44af-b265-a7e0d4e5846e
Header 参数
authorization
string 
必需
You can generate a new API key on your dashboard if you do not have one.
示例值:
Bearer YOUR_SECRET_API_KEY
Body 参数application/json
array of:
name
string 
必需
The name of the cookie.
示例值:
ACCOUNT_CHOOSER
value
string 
必需
The value of the cookie.
示例值:
12341234
domain
string 
可选
The domain associated with the cookie. Specifies the domains to which the cookie should be sent.
示例值:
.example.com
expirationDate
number <int64>
可选
The expiration date of the cookie in seconds since the UNIX epoch (e.g., POSIX time). If not provided, the cookie will be treated as a session cookie.
示例值:
1723659417
path
string 
可选
The URL path to which the cookie should be sent. If not provided, it defaults to the current path of the document location.
示例值:
/products/
secure
boolean 
可选
Indicates whether the cookie should only be sent over secure (HTTPS) connections. If true, the cookie will not be sent over unencrypted HTTP connections.
示例值:
true
httpOnly
boolean 
可选
If true, the cookie is accessible only through the HTTP(S) protocol and cannot be accessed through JavaScript or other client-side scripts.
示例值:
true
hostOnly
boolean 
可选
If true, the cookie is only sent to the exact domain specified in the "domain" property. If false, the cookie is sent to subdomains as well, provided that the "domain" property allows it.
示例值:
true
示例

返回响应

🟢200A JSON object containing the updated monitor.
application/json
Body
statusCode
enum<number> 
必需
枚举值:
200
messageCode
enum<string> 
必需
枚举值:
success
cookies
array[object (RobotCookie) {8}] 
可选
name
string 
必需
The name of the cookie.
示例值:
ACCOUNT_CHOOSER
value
string 
必需
The value of the cookie.
示例值:
12341234
domain
string 
可选
The domain associated with the cookie. Specifies the domains to which the cookie should be sent.
示例值:
.example.com
expirationDate
number <int64>
可选
The expiration date of the cookie in seconds since the UNIX epoch (e.g., POSIX time). If not provided, the cookie will be treated as a session cookie.
示例值:
1723659417
path
string 
可选
The URL path to which the cookie should be sent. If not provided, it defaults to the current path of the document location.
示例值:
/products/
secure
boolean 
可选
Indicates whether the cookie should only be sent over secure (HTTPS) connections. If true, the cookie will not be sent over unencrypted HTTP connections.
示例值:
true
httpOnly
boolean 
可选
If true, the cookie is accessible only through the HTTP(S) protocol and cannot be accessed through JavaScript or other client-side scripts.
示例值:
true
hostOnly
boolean 
可选
If true, the cookie is only sent to the exact domain specified in the "domain" property. If false, the cookie is sent to subdomains as well, provided that the "domain" property allows it.
示例值:
true
🟠400A JSON containing error attributes. This will happen if any of the parameters are not valid.
🟠401The request is not authorized
🟠404The resource is not found
🔴500There was an error on the server
修改于 2024-02-20 02:11:12
上一页
Retrieve single robot by ID
下一页
Get all tasks by a robot
Built with