Browse AI
  1. monitors
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. monitors

Create a new monitor on a robot

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/robots/{robotId}/monitors
monitors
Create a new monitor on a robot.
请求示例请求示例
Go
Java
Objective-C
Shell
curl --location --request POST 'http://dev-cn.your-api-server.com/robots/c3689adb-50aa-44af-b265-a7e0d4e5846e/monitors' \
--header 'authorization: Bearer YOUR_SECRET_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Monitor Products",
    "inputParameters": {
        "originUrl": "https://www.ycombinator.com/companies/airbnb",
        "companies_skip": 0,
        "companies_limit": 10
    },
    "schedules": [
        {
            "type": "FIXED_INTERVAL",
            "everyMinutes": 60
        }
    ],
    "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR",
    "notifyOnCapturedScreenshotChange": true,
    "notifyOnCapturedTextChange": true,
    "capturedScreenshotNotificationThreshold": 15
}'
响应示例响应示例
200 - 示例 1
{
    "statusCode": 200,
    "messageCode": "success",
    "monitor": {
        "id": "f6fb62b6-f06a-4bf7-a623-c6a35c2e70b0",
        "name": "Monitor Products",
        "status": "active",
        "pausedReason": "lowCredits",
        "inputParameters": {
            "originUrl": "https://www.ycombinator.com/companies/airbnb",
            "companies_skip": 0,
            "companies_limit": 10
        },
        "schedules": [
            {
                "type": "FIXED_INTERVAL",
                "everyMinutes": 60
            }
        ],
        "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR",
        "notifyOnCapturedScreenshotChange": true,
        "notifyOnCapturedTextChange": true,
        "capturedScreenshotNotificationThreshold": 15,
        "createdAt": 1678795867879,
        "pausedAt": 1678795867879,
        "updatedAt": 1678795867879
    }
}

请求参数

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
name
string 
必需
Monitor name
>= 1 字符<= 200 字符
示例值:
Monitor Products
inputParameters
object (InputParameters) 
必需
An object of input parameters to override default input parameters.
示例值:
{"originUrl":"https://www.ycombinator.com/companies/airbnb","companies_skip":0,"companies_limit":10}
额外字段
可选
schedules
array[object (Fixed interval schedule) {2}] 
已废弃
Array of schedules.
示例值:
[{"type":"FIXED_INTERVAL","everyMinutes":60}]
type
enum<string> 
已废弃
Schedule type
枚举值:
FIXED_INTERVAL
示例值:
FIXED_INTERVAL
everyMinutes
number 
已废弃
Schedule interval in minutes
示例值:
60
schedule
string 
可选
recurring schedule.
示例值:
FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR
notifyOnCapturedScreenshotChange
boolean 
必需
If set to true, an email notification will be sent to you when a change is detected in captured screenshots.
示例值:
true
notifyOnCapturedTextChange
boolean 
必需
If set to true, an email notification will be sent to you when a change is detected in captured texts.
示例值:
true
capturedScreenshotNotificationThreshold
number 
必需
The "screenshot changed" email notification will be sent to you if the change is greater than this threshold (in percent).
示例值:
15
示例

返回响应

🟢200A JSON object containing the newly created monitor.
application/json
Body
statusCode
enum<number> 
必需
枚举值:
200
messageCode
enum<string> 
必需
枚举值:
success
monitor
object (Monitor) 
必需
id
string 
必需
Unique robot monitor ID
示例值:
f6fb62b6-f06a-4bf7-a623-c6a35c2e70b0
name
string 
必需
Monitor name
示例值:
Monitor Products
status
enum<string> 
必需
Represents the current state of the monitor. 'active' indicates that the monitor is currently operational and performing its intended functions, while 'paused' signifies that the monitor's activities are temporarily suspended. The 'paused' state may be due to reasons specified in the 'pausedReason' attribute.
枚举值:
activepaused
示例值:
active
pausedReason
enum<string>  | enum<null> 
必需
Specifies the reason why the monitor is in a paused state.
枚举值:
lowCreditstooManyFailuresuserRequesteduserInactivity
示例值:
null
inputParameters
object (InputParameters) 
必需
An object of input parameters to override default input parameters.
示例值:
{"originUrl":"https://www.ycombinator.com/companies/airbnb","companies_skip":0,"companies_limit":10}
schedules
array[object (Fixed interval schedule) {2}] 
已废弃
Array of schedules.
示例值:
[{"type":"FIXED_INTERVAL","everyMinutes":60}]
schedule
string 
可选
recurring schedule.
示例值:
FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR
notifyOnCapturedScreenshotChange
boolean 
必需
If set to true, an email notification will be sent to you when a change is detected in captured screenshots.
示例值:
true
notifyOnCapturedTextChange
boolean 
必需
If set to true, an email notification will be sent to you when a change is detected in captured texts.
示例值:
true
capturedScreenshotNotificationThreshold
number 
必需
The "screenshot changed" email notification will be sent to you if the change is greater than this threshold (in percent).
示例值:
15
createdAt
integer 
必需
Monitor creation date and time in the form of a Unix timestamp.
示例值:
1678795867879
pausedAt
integer  | null 
可选
Monitor pause date and time in the form of a Unix timestamp.
示例值:
1678795867879
updatedAt
integer  | null 
可选
Monitor last update date and time in the form of a Unix timestamp.
示例值:
1678795867879
🟠400A JSON containing error attributes. This will happen if any of the parameters are not valid.
🟠401The request is not authorized
🟠403A JSON containing error attributes.
🟠404The resource is not found
🔴500There was an error on the server
修改于 2024-02-20 02:11:12
上一页
Retrieve a robot's monitors
下一页
Retrieve a robot's monitor
Built with