openapi: 3.0.3 info: title: Browse AI API Documentation description: >- If you are still using the deprecated API v1 version, you can see its documentation [here](https://www.browse.ai/docs/api/v1). version: v2 servers: - url: https://api.browse.ai/v2 tags: - description: > Each robot on Browse AI can optionally have one or more monitors. Monitoring robots come with one monitor by default. For example, if you set up a monitoring robot to monitor a category page on an e-commerce site for changes daily, you can set up additional monitors to monitor other category pages on the same site using the same robot. Each monitor can have different input parameters and schedule. name: monitors x-displayName: Monitors - description: > A robot can be trained do almost anything you do manually on the web. For example: - Open a webpage, - Log in, - Click on buttons, - Fill out forms, - Extract structured data from a webpage into a spreadsheet, - Take screenshots, - Monitor specific parts of webpages for visual or content changes. Robots are created either by using Prebuilt Robots or using Browse AI Recorder and its click-and-extract interface. Every robot has a few input parameters (like the webpage address) that you can adjust every time you run it. name: robots x-displayName: Robots - description: > Each robot is trained to perform a certain task. Every time you run that robot, it will perform that task and the details, including the extracted data, will be stored under that task. If you set up a monitoring robot to monitor a webpage for changes daily, it will have to run a task every day or about 30 tasks per month for you. name: tasks x-displayName: Tasks - description: | After a robot finishes a task, its webhooks will be called. name: webhooks x-displayName: Webhooks - description: > You can run up to 50,000 tasks at once using a robot with different input parameters for each task. name: bulk runs x-displayName: Bulk Runs - description: > There are some endpoints that are only used by our integrations, so we don't add this tag to our core resources name: internal x-displayName: Internal - description: > This tag is used for endpoints that are used to check the status of Browse AI infrastructure name: system x-displayName: System paths: /status: get: tags: - system summary: Endpoint for checking the status of Browse AI infrastructure operationId: System_checkInfrastructureStatus description: > This endpoint provides you with real-time information regarding the operational status of the Browse AI infrastructure. It gives insights into the condition of the tasks queue, thus allowing you to understand if the services are running smoothly or are under maintenance. responses: '200': description: A JSON containing Browse AI infrastructure status content: application/json: schema: $ref: '#/components/schemas/getSystemStatus-200' x-codeSamples: - lang: C# label: C# source: | var client = new RestClient("https://api.browse.ai/v2/status"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/status\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/status") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/status", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/status', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/status"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/status", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: | import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/status", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: | import requests url = "https://api.browse.ai/v2/status" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: | require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/status") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url https://api.browse.ai/v2/status \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/status - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/status")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /teams: get: tags: - internal summary: Retrieve list of teams under user account operationId: Internal_getTeamsByAuth0AccessToken description: > this endpoint be used on Browse AI integrations to fetch all of the teams by auth0 access token parameters: - $ref: '#/components/parameters/authorization' responses: '200': description: A JSON containing the total number of the user. content: application/json: schema: $ref: '#/components/schemas/getUserTeams-200' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' x-codeSamples: - lang: C# label: C# source: | var client = new RestClient("https://api.browse.ai/v2/teams"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/teams\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/teams") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/teams", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/teams', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/teams"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/teams", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: | import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/teams", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: | import requests url = "https://api.browse.ai/v2/teams" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: | require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/teams") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url https://api.browse.ai/v2/teams \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/teams - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/teams")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots: get: tags: - robots summary: Retrieve list of robots under your account operationId: Robots_listRetrieval description: > If you have already created a few robots on [your dashboard](https://dashboard.browse.ai), you can use this endpoint to retrieve a list of them. You can then use other endpoints to retrieve more information about your robots or run robots. parameters: - $ref: '#/components/parameters/authorization' responses: '200': description: >- A JSON containing the total number of robots and an array of robots under this team. content: application/json: schema: $ref: '#/components/schemas/getRobots-200' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' x-codeSamples: - lang: C# label: C# source: | var client = new RestClient("https://api.browse.ai/v2/robots"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/robots") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/robots', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: | import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/robots", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: | import requests url = "https://api.browse.ai/v2/robots" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: | require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url https://api.browse.ai/v2/robots \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/robots - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}: get: tags: - robots summary: Retrieve single robot by ID operationId: Robots_getById description: | You can use this endpoint to retrieve a single robot by ID. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e responses: '200': description: >- A JSON containing the total number of robots and an array of robots under this team. content: application/json: schema: $ref: '#/components/schemas/getRobot-200' '400': description: A JSON containing an error code and message. content: application/json: schema: $ref: '#/components/schemas/getRobot-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/robots/{robotId}") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/robots/{robotId}', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: | import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/robots/{robotId}", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: | import requests url = "https://api.browse.ai/v2/robots/{robotId}" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: | require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url https://api.browse.ai/v2/robots/{robotId} \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId} - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}/cookies: patch: tags: - robots summary: Update a robot's cookies operationId: Robots_updateCookies description: Update a robot's cookies parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RobotsUpdateCookiesRequest' responses: '200': description: A JSON object containing the updated monitor. content: application/json: schema: $ref: '#/components/schemas/upsertRobotCookies-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/upsertRobotCookies-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); request.AddParameter("undefined", "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"Monitor products\\\",\\\"inputParameters\\\":{\\\"originUrl\\\":\\\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\\\"},\\\"schedule\\\":\\\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\\\",\\\"notifyOnCapturedScreenshotChange\\\":false,\\\"notifyOnCapturedTextChange\\\":true,\\\"capturedScreenshotNotificationThreshold\\\":16}\")\n\n\treq, _ := http.NewRequest(\"PATCH\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.patch("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .body("{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "PATCH", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/monitors/{monitorId}", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({ name: 'Monitor products', inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' }, schedule: 'FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR', notifyOnCapturedScreenshotChange: false, notifyOnCapturedTextChange: true, capturedScreenshotNotificationThreshold: 16 })); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'PATCH', url: 'https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'}, body: { name: 'Monitor products', inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' }, schedule: 'FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR', notifyOnCapturedScreenshotChange: false, notifyOnCapturedTextChange: true, capturedScreenshotNotificationThreshold: 16 }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSDictionary *parameters = @{ @"name": @"Monitor products", @"inputParameters": @{ @"originUrl": @"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines" }, @"schedule": @"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", @"notifyOnCapturedScreenshotChange": @NO, @"notifyOnCapturedTextChange": @YES, @"capturedScreenshotNotificationThreshold": @16 }; NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"PATCH"]; [request setAllHTTPHeaderFields:headers]; [request setHTTPBody:postData]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PATCH", CURLOPT_POSTFIELDS => "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}", CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") payload = "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}" headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("PATCH", "/v2/robots/{robotId}/monitors/{monitorId}", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}" payload = { "name": "Monitor products", "inputParameters": {"originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"}, "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", "notifyOnCapturedScreenshotChange": False, "notifyOnCapturedTextChange": True, "capturedScreenshotNotificationThreshold": 16 } headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("PATCH", url, json=payload, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' request.body = "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}" response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request PATCH \ --url https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId} \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --data '{"name":"Monitor products","inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"},"schedule":"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR","notifyOnCapturedScreenshotChange":false,"notifyOnCapturedTextChange":true,"capturedScreenshotNotificationThreshold":16}' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method PATCH \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --body-data '{"name":"Monitor products","inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"},"schedule":"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR","notifyOnCapturedScreenshotChange":false,"notifyOnCapturedTextChange":true,"capturedScreenshotNotificationThreshold":16}' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId} - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let parameters = [ "name": "Monitor products", "inputParameters": ["originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"], "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", "notifyOnCapturedScreenshotChange": false, "notifyOnCapturedTextChange": true, "capturedScreenshotNotificationThreshold": 16 ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}/tasks: get: tags: - tasks summary: Get all tasks by a robot operationId: Tasks_getAllByRobot description: | Get all of a robot's tasks parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e - description: Page number in: query name: page schema: type: integer minimum: 1 example: 1 required: false - description: Page size in: query name: pageSize schema: type: integer minimum: 1 maximum: 10 default: 10 example: 10 required: false - description: Task status in: query name: status schema: type: string enum: - failed - successful - in-progress example: successful required: false - description: filter the result based on robot bulk run ID in: query name: robotBulkRunId schema: type: string example: f6fb62b6-f06a-4bf7-a623-c6a35c2e70b0 required: false - description: >- A comma separated list of fields to sort by. Default sorting is ascending and prefixing field names with a hyphen '-' yields a descending order. in: query name: sort schema: type: string example: '-createdAt,finishedAt' required: false - description: by passing false you can exclude the retried tasks in: query name: includeRetried schema: type: boolean example: false required: false - description: From task creation date and time in the form of a Unix timestamp in: query name: fromDate schema: type: integer example: 1678795867879 required: false - description: To task creation date and time in the form of a Unix timestamp in: query name: toDate schema: type: integer example: 1678795867879 required: false responses: '200': description: A JSON including robots list. content: application/json: schema: $ref: '#/components/schemas/getRobotTasks-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/getRobotTasks-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/tasks?page=1"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/tasks?page=1\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/robots/{robotId}/tasks?page=1") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/tasks?page=1", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/robots/{robotId}/tasks', qs: {page: '1'}, headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/tasks?page=1"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/tasks?page=1", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/robots/{robotId}/tasks?page=1", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/tasks" querystring = {"page":"1"} headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text) - lang: Ruby label: Ruby source: | require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/tasks?page=1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url 'https://api.browse.ai/v2/robots/{robotId}/tasks?page=1' \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - 'https://api.browse.ai/v2/robots/{robotId}/tasks?page=1' - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/tasks?page=1")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() post: tags: - tasks summary: Run a robot operationId: Tasks_runRobotTask description: > Run a robot on-demand with custom input parameters. When you need to run a robot and get its captured data, you can use this endpoint to run the task, and then use webhooks to receive the captured data as soon as the task is finished. Alternatively, you can poll the GET endpoint to retrieve a task's details as soon as it is finished. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/NewRobotTaskBodyParams' responses: '200': description: A JSON including robots list. content: application/json: schema: $ref: '#/components/schemas/newRobotTask-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/newRobotTask-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '403': description: The request can not be processed content: application/json: schema: $ref: '#/components/schemas/CreditsLimitReachedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' '503': description: A JSON containing error attributes. content: application/json: schema: $ref: '#/components/schemas/RobotUnderMaintenanceResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/tasks"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); request.AddParameter("undefined", "{\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/tasks\"\n\n\tpayload := strings.NewReader(\"{\\\"inputParameters\\\":{\\\"originUrl\\\":\\\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\\\"}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.post("https://api.browse.ai/v2/robots/{robotId}/tasks") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .body("{\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"}}") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "POST", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/tasks", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({ inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' } })); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'POST', url: 'https://api.browse.ai/v2/robots/{robotId}/tasks', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'}, body: { inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' } }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSDictionary *parameters = @{ @"inputParameters": @{ @"originUrl": @"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines" } }; NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/tasks"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"POST"]; [request setAllHTTPHeaderFields:headers]; [request setHTTPBody:postData]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/tasks", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"}}", CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") payload = "{\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"}}" headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("POST", "/v2/robots/{robotId}/tasks", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/tasks" payload = {"inputParameters": {"originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"}} headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("POST", url, json=payload, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/tasks") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' request.body = "{\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"}}" response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request POST \ --url https://api.browse.ai/v2/robots/{robotId}/tasks \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --data '{"inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"}}' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method POST \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --body-data '{"inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"}}' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/tasks - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let parameters = ["inputParameters": ["originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/tasks")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}/tasks/{taskId}: get: tags: - tasks summary: Retrieve a task operationId: Tasks_getTaskDetails description: Retrieve a task's details and captured data. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e - description: Unique task ID in: path name: taskId schema: type: string required: true example: f3672790-4561-424b-8a7b-7b7df182b236 responses: '200': description: A JSON including robots list. content: application/json: schema: $ref: '#/components/schemas/getRobotTask-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/getRobotTask-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId}"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId}\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId}") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/tasks/{taskId}", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId}', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId}"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId}", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/robots/{robotId}/tasks/{taskId}", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: | import requests url = "https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId}" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId} \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId} - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/tasks/{taskId}")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}/monitors: get: tags: - monitors summary: Retrieve a robot's monitors operationId: Monitors_getList description: Retrieve a robot's monitors list. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e responses: '200': description: A JSON including monitors list. content: application/json: schema: $ref: '#/components/schemas/getMonitors-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/getMonitors-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/monitors"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/monitors\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/robots/{robotId}/monitors") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/monitors", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/robots/{robotId}/monitors', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/monitors"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/monitors", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/robots/{robotId}/monitors", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: | import requests url = "https://api.browse.ai/v2/robots/{robotId}/monitors" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: | require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/monitors") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url https://api.browse.ai/v2/robots/{robotId}/monitors \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/monitors - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/monitors")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() post: tags: - monitors summary: Create a new monitor on a robot operationId: Monitors_createNew description: Create a new monitor on a robot. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateNewMonitorRequestBody' responses: '200': description: A JSON object containing the newly created monitor. content: application/json: schema: $ref: '#/components/schemas/createNewMonitor-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/CreateOrUpdateMonitorBadRequestResponse' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '403': description: A JSON containing error attributes. content: application/json: schema: $ref: '#/components/schemas/CreateOrUpdateMonitorForbiddenResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/monitors"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); request.AddParameter("undefined", "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/monitors\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"Monitor products\\\",\\\"inputParameters\\\":{\\\"originUrl\\\":\\\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\\\"},\\\"schedule\\\":\\\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\\\",\\\"notifyOnCapturedScreenshotChange\\\":true,\\\"notifyOnCapturedTextChange\\\":true,\\\"capturedScreenshotNotificationThreshold\\\":15}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.post("https://api.browse.ai/v2/robots/{robotId}/monitors") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .body("{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "POST", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/monitors", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({ name: 'Monitor products', inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' }, schedule: 'FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR', notifyOnCapturedScreenshotChange: true, notifyOnCapturedTextChange: true, capturedScreenshotNotificationThreshold: 15 })); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'POST', url: 'https://api.browse.ai/v2/robots/{robotId}/monitors', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'}, body: { name: 'Monitor products', inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' }, schedule: 'FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR', notifyOnCapturedScreenshotChange: true, notifyOnCapturedTextChange: true, capturedScreenshotNotificationThreshold: 15 }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSDictionary *parameters = @{ @"name": @"Monitor products", @"inputParameters": @{ @"originUrl": @"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines" }, @"schedule": @"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", @"notifyOnCapturedScreenshotChange": @YES, @"notifyOnCapturedTextChange": @YES, @"capturedScreenshotNotificationThreshold": @15 }; NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/monitors"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"POST"]; [request setAllHTTPHeaderFields:headers]; [request setHTTPBody:postData]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/monitors", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}", CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") payload = "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}" headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("POST", "/v2/robots/{robotId}/monitors", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/monitors" payload = { "name": "Monitor products", "inputParameters": {"originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"}, "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", "notifyOnCapturedScreenshotChange": True, "notifyOnCapturedTextChange": True, "capturedScreenshotNotificationThreshold": 15 } headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("POST", url, json=payload, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/monitors") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' request.body = "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}" response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request POST \ --url https://api.browse.ai/v2/robots/{robotId}/monitors \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --data '{"name":"Monitor products","inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"},"schedule":"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR","notifyOnCapturedScreenshotChange":true,"notifyOnCapturedTextChange":true,"capturedScreenshotNotificationThreshold":15}' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method POST \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --body-data '{"name":"Monitor products","inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"},"schedule":"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR","notifyOnCapturedScreenshotChange":true,"notifyOnCapturedTextChange":true,"capturedScreenshotNotificationThreshold":15}' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/monitors - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let parameters = [ "name": "Monitor products", "inputParameters": ["originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"], "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", "notifyOnCapturedScreenshotChange": true, "notifyOnCapturedTextChange": true, "capturedScreenshotNotificationThreshold": 15 ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/monitors")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}/monitors/{monitorId}: get: tags: - monitors summary: Retrieve a robot's monitor operationId: Monitors_getRobotMonitor description: Retrieve a robot's monitor. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e - description: > Unique monitor ID You can find a monitor's ID by opening it on the dashboard and copying its ID in the browser address bar. in: path name: monitorId schema: type: string required: true example: e524ab69-4269-4d9d-b3d8-678112a10d29 responses: '200': description: A JSON object containing the monitor. content: application/json: schema: $ref: '#/components/schemas/getMonitor-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/getMonitor-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/monitors/{monitorId}", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/robots/{robotId}/monitors/{monitorId}", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId} \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId} - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() patch: tags: - monitors summary: Update a robot's monitor operationId: Monitors_updateRobotMonitor description: Update a robot's monitor parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e - description: > Unique monitor ID You can find a monitor's ID by opening it on the dashboard and copying its ID in the browser address bar. in: path name: monitorId schema: type: string required: true example: e524ab69-4269-4d9d-b3d8-678112a10d29 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MonitorUpdateBodyParams' responses: '200': description: A JSON object containing the updated monitor. content: application/json: schema: $ref: '#/components/schemas/updateMonitor-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/CreateOrUpdateMonitorBadRequestResponse' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '403': description: A JSON containing error attributes. content: application/json: schema: $ref: '#/components/schemas/CreateOrUpdateMonitorForbiddenResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); request.AddParameter("undefined", "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"Monitor products\\\",\\\"inputParameters\\\":{\\\"originUrl\\\":\\\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\\\"},\\\"schedule\\\":\\\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\\\",\\\"notifyOnCapturedScreenshotChange\\\":false,\\\"notifyOnCapturedTextChange\\\":true,\\\"capturedScreenshotNotificationThreshold\\\":16}\")\n\n\treq, _ := http.NewRequest(\"PATCH\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.patch("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .body("{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "PATCH", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/monitors/{monitorId}", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({ name: 'Monitor products', inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' }, schedule: 'FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR', notifyOnCapturedScreenshotChange: false, notifyOnCapturedTextChange: true, capturedScreenshotNotificationThreshold: 16 })); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'PATCH', url: 'https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'}, body: { name: 'Monitor products', inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' }, schedule: 'FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR', notifyOnCapturedScreenshotChange: false, notifyOnCapturedTextChange: true, capturedScreenshotNotificationThreshold: 16 }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSDictionary *parameters = @{ @"name": @"Monitor products", @"inputParameters": @{ @"originUrl": @"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines" }, @"schedule": @"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", @"notifyOnCapturedScreenshotChange": @NO, @"notifyOnCapturedTextChange": @YES, @"capturedScreenshotNotificationThreshold": @16 }; NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"PATCH"]; [request setAllHTTPHeaderFields:headers]; [request setHTTPBody:postData]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PATCH", CURLOPT_POSTFIELDS => "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}", CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") payload = "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}" headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("PATCH", "/v2/robots/{robotId}/monitors/{monitorId}", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}" payload = { "name": "Monitor products", "inputParameters": {"originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"}, "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", "notifyOnCapturedScreenshotChange": False, "notifyOnCapturedTextChange": True, "capturedScreenshotNotificationThreshold": 16 } headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("PATCH", url, json=payload, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' request.body = "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":false,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":16}" response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request PATCH \ --url https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId} \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --data '{"name":"Monitor products","inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"},"schedule":"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR","notifyOnCapturedScreenshotChange":false,"notifyOnCapturedTextChange":true,"capturedScreenshotNotificationThreshold":16}' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method PATCH \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --body-data '{"name":"Monitor products","inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"},"schedule":"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR","notifyOnCapturedScreenshotChange":false,"notifyOnCapturedTextChange":true,"capturedScreenshotNotificationThreshold":16}' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId} - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let parameters = [ "name": "Monitor products", "inputParameters": ["originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"], "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", "notifyOnCapturedScreenshotChange": false, "notifyOnCapturedTextChange": true, "capturedScreenshotNotificationThreshold": 16 ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() delete: tags: - monitors summary: Delete a robot's monitor operationId: Monitors_deleteRobotMonitor description: Delete a robot's monitor. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e - description: > Unique monitor ID You can find a monitor's ID by opening it on the dashboard and copying its ID in the browser address bar. in: path name: monitorId schema: type: string required: true example: e524ab69-4269-4d9d-b3d8-678112a10d29 responses: '200': description: A JSON object containing the deleted monitor. content: application/json: schema: $ref: '#/components/schemas/deleteMonitor-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/deleteMonitor-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}"); var request = new RestRequest(Method.DELETE); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.delete("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "DELETE", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/monitors/{monitorId}", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'DELETE', url: 'https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"DELETE"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("DELETE", "/v2/robots/{robotId}/monitors/{monitorId}", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("DELETE", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Delete.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request DELETE \ --url https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId} \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method DELETE \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId} - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/monitors/{monitorId}")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}/bulk-runs: post: tags: - bulk runs summary: Bulk run tasks operationId: BulkRuns_executeTasks description: Bulk run up to 1,000 tasks at a time using a robot. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BulkRunBodyParams' responses: '200': description: A JSON object containing the newly created Bulk run. content: application/json: schema: $ref: '#/components/schemas/newBulkRun-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/newBulkRun-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '403': description: A JSON containing error attributes. content: application/json: schema: $ref: '#/components/schemas/newBulkRun-403' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' '503': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/RobotUnderMaintenanceResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/bulk-runs"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); request.AddParameter("undefined", "{\"title\":\"Bulk Run Title\",\"inputParameters\":[{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories\"},{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers\"}]}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/bulk-runs\"\n\n\tpayload := strings.NewReader(\"{\\\"title\\\":\\\"Bulk Run Title\\\",\\\"inputParameters\\\":[{\\\"originUrl\\\":\\\"https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories\\\"},{\\\"originUrl\\\":\\\"https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers\\\"}]}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.post("https://api.browse.ai/v2/robots/{robotId}/bulk-runs") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .body("{\"title\":\"Bulk Run Title\",\"inputParameters\":[{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories\"},{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers\"}]}") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "POST", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/bulk-runs", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({ title: 'Bulk Run Title', inputParameters: [ { originUrl: 'https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories' }, { originUrl: 'https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers' } ] })); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'POST', url: 'https://api.browse.ai/v2/robots/{robotId}/bulk-runs', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'}, body: { title: 'Bulk Run Title', inputParameters: [ { originUrl: 'https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories' }, { originUrl: 'https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers' } ] }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSDictionary *parameters = @{ @"title": @"Bulk Run Title", @"inputParameters": @[ @{ @"originUrl": @"https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories" }, @{ @"originUrl": @"https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers" } ] }; NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/bulk-runs"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"POST"]; [request setAllHTTPHeaderFields:headers]; [request setHTTPBody:postData]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/bulk-runs", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"title\":\"Bulk Run Title\",\"inputParameters\":[{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories\"},{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers\"}]}", CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") payload = "{\"title\":\"Bulk Run Title\",\"inputParameters\":[{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories\"},{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers\"}]}" headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("POST", "/v2/robots/{robotId}/bulk-runs", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/bulk-runs" payload = { "title": "Bulk Run Title", "inputParameters": [{"originUrl": "https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories"}, {"originUrl": "https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers"}] } headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("POST", url, json=payload, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/bulk-runs") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' request.body = "{\"title\":\"Bulk Run Title\",\"inputParameters\":[{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories\"},{\"originUrl\":\"https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers\"}]}" response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request POST \ --url https://api.browse.ai/v2/robots/{robotId}/bulk-runs \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --data '{"title":"Bulk Run Title","inputParameters":[{"originUrl":"https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories"},{"originUrl":"https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers"}]}' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method POST \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --body-data '{"title":"Bulk Run Title","inputParameters":[{"originUrl":"https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories"},{"originUrl":"https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers"}]}' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/bulk-runs - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let parameters = [ "title": "Bulk Run Title", "inputParameters": [["originUrl": "https://www.seattlecoffeegear.com/shop-gear/accessories/espresso-accessories"], ["originUrl": "https://www.seattlecoffeegear.com/shop-gear/coffee-makers/drip-brewers"]] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/bulk-runs")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() get: tags: - bulk runs summary: Retrieve a robot's bulk runs list operationId: BulkRuns_getList description: Retrieve a robot's bulk runs list. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e - description: Page number in: query name: page schema: type: integer minimum: 1 example: 1 required: false responses: '200': description: A JSON object containing the bulk runs list. content: application/json: schema: $ref: '#/components/schemas/getBulkRuns-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/getBulkRuns-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/bulk-runs?page=1"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/bulk-runs?page=1\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/robots/{robotId}/bulk-runs?page=1") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/bulk-runs?page=1", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/robots/{robotId}/bulk-runs', qs: {page: '1'}, headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/bulk-runs?page=1"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/bulk-runs?page=1", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/robots/{robotId}/bulk-runs?page=1", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/bulk-runs" querystring = {"page":"1"} headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/bulk-runs?page=1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url 'https://api.browse.ai/v2/robots/{robotId}/bulk-runs?page=1' \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - 'https://api.browse.ai/v2/robots/{robotId}/bulk-runs?page=1' - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/bulk-runs?page=1")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}/bulk-runs/{bulkRunId}: get: tags: - bulk runs summary: Retrieve a robot's bulk run operationId: BulkRuns_getRobotBulkRun description: >- Retrieve a robot's bulk run along with a list of tasks run within the bulk run. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e - description: | Unique bulk run ID in: path name: bulkRunId schema: type: string required: true example: 5aa4df52-25bb-48da-bf38-ce4f2bd98dd5 - description: Page number in: query name: page schema: type: integer minimum: 1 example: 1 required: false responses: '200': description: >- A JSON object containing the bulk run information along with a paginated list of all its tasks. content: application/json: schema: $ref: '#/components/schemas/getBulkRun-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/getBulkRun-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}', qs: {page: '1'}, headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}" querystring = {"page":"1"} headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url 'https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1' \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - 'https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1' - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/bulk-runs/{bulkRunId}?page=1")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}/webhooks: get: tags: - webhooks summary: Retrieve a robot's webhooks operationId: Webhooks_getList description: Retrieve a robot's webhook list. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e responses: '200': description: A JSON including monitors list. content: application/json: schema: $ref: '#/components/schemas/getWebhooks-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/getWebhooks-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/webhooks"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/webhooks\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.get("https://api.browse.ai/v2/robots/{robotId}/webhooks") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "GET", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/webhooks", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'GET', url: 'https://api.browse.ai/v2/robots/{robotId}/webhooks', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/webhooks"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/webhooks", 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 YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("GET", "/v2/robots/{robotId}/webhooks", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: | import requests url = "https://api.browse.ai/v2/robots/{robotId}/webhooks" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("GET", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: | require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/webhooks") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request GET \ --url https://api.browse.ai/v2/robots/{robotId}/webhooks \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method GET \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/webhooks - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/webhooks")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() post: tags: - webhooks summary: Create a new webhook on a robot operationId: Webhooks_createNewOnRobot description: Create a new webhook on a robot parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateNewWebhookBodyParams' responses: '200': description: A JSON object containing the newly created monitor. content: application/json: schema: $ref: '#/components/schemas/createNewWebhook-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/createNewWebhook-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/monitors"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); request.AddParameter("undefined", "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/monitors\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"Monitor products\\\",\\\"inputParameters\\\":{\\\"originUrl\\\":\\\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\\\"},\\\"schedule\\\":\\\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\\\",\\\"notifyOnCapturedScreenshotChange\\\":true,\\\"notifyOnCapturedTextChange\\\":true,\\\"capturedScreenshotNotificationThreshold\\\":15}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.post("https://api.browse.ai/v2/robots/{robotId}/monitors") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .body("{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "POST", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/monitors", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({ name: 'Monitor products', inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' }, schedule: 'FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR', notifyOnCapturedScreenshotChange: true, notifyOnCapturedTextChange: true, capturedScreenshotNotificationThreshold: 15 })); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'POST', url: 'https://api.browse.ai/v2/robots/{robotId}/monitors', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'}, body: { name: 'Monitor products', inputParameters: { originUrl: 'https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines' }, schedule: 'FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR', notifyOnCapturedScreenshotChange: true, notifyOnCapturedTextChange: true, capturedScreenshotNotificationThreshold: 15 }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSDictionary *parameters = @{ @"name": @"Monitor products", @"inputParameters": @{ @"originUrl": @"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines" }, @"schedule": @"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", @"notifyOnCapturedScreenshotChange": @YES, @"notifyOnCapturedTextChange": @YES, @"capturedScreenshotNotificationThreshold": @15 }; NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/monitors"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"POST"]; [request setAllHTTPHeaderFields:headers]; [request setHTTPBody:postData]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/monitors", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}", CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") payload = "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}" headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("POST", "/v2/robots/{robotId}/monitors", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/monitors" payload = { "name": "Monitor products", "inputParameters": {"originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"}, "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", "notifyOnCapturedScreenshotChange": True, "notifyOnCapturedTextChange": True, "capturedScreenshotNotificationThreshold": 15 } headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("POST", url, json=payload, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/monitors") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' request.body = "{\"name\":\"Monitor products\",\"inputParameters\":{\"originUrl\":\"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines\"},\"schedule\":\"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR\",\"notifyOnCapturedScreenshotChange\":true,\"notifyOnCapturedTextChange\":true,\"capturedScreenshotNotificationThreshold\":15}" response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request POST \ --url https://api.browse.ai/v2/robots/{robotId}/monitors \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --data '{"name":"Monitor products","inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"},"schedule":"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR","notifyOnCapturedScreenshotChange":true,"notifyOnCapturedTextChange":true,"capturedScreenshotNotificationThreshold":15}' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method POST \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --body-data '{"name":"Monitor products","inputParameters":{"originUrl":"https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"},"schedule":"FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR","notifyOnCapturedScreenshotChange":true,"notifyOnCapturedTextChange":true,"capturedScreenshotNotificationThreshold":15}' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/monitors - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let parameters = [ "name": "Monitor products", "inputParameters": ["originUrl": "https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines"], "schedule": "FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR", "notifyOnCapturedScreenshotChange": true, "notifyOnCapturedTextChange": true, "capturedScreenshotNotificationThreshold": 15 ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/monitors")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() /robots/{robotId}/webhooks/{webhookId}: delete: tags: - webhooks summary: Delete a robot's webhook operationId: Webhooks_deleteRobotWebhook description: Delete a robot's webhook. parameters: - $ref: '#/components/parameters/authorization' - description: > 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. in: path name: robotId schema: type: string required: true example: c3689adb-50aa-44af-b265-a7e0d4e5846e - description: | Unique webhookId ID in: path name: webhookId schema: type: string required: true example: 6d7f1218-43fb-4735-ac71-21e81b1ab23e responses: '200': description: A JSON object containing the deleted monitor. content: application/json: schema: $ref: '#/components/schemas/deleteWebhook-200' '400': description: >- A JSON containing error attributes. This will happen if any of the parameters are not valid. content: application/json: schema: $ref: '#/components/schemas/deleteWebhook-400' '401': description: The request is not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '404': description: The resource is not found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '500': description: There was an error on the server content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' x-codeSamples: - lang: C# label: C# source: > var client = new RestClient("https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId}"); var request = new RestRequest(Method.DELETE); request.AddHeader("Authorization", "Bearer YOUR_SECRET_API_KEY"); IRestResponse response = client.Execute(request); - lang: Go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId}\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer YOUR_SECRET_API_KEY\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n" - lang: Java label: Java source: > HttpResponse response = Unirest.delete("https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId}") .header("Authorization", "Bearer YOUR_SECRET_API_KEY") .asString(); - lang: Node label: Node (Native) source: | const http = require("https"); const options = { "method": "DELETE", "hostname": "api.browse.ai", "port": null, "path": "/v2/robots/{robotId}/webhooks/{webhookId}", "headers": { "Authorization": "Bearer YOUR_SECRET_API_KEY" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); - lang: Node label: Node (request) source: | const request = require('request'); const options = { method: 'DELETE', url: 'https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId}', headers: {Authorization: 'Bearer YOUR_SECRET_API_KEY'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); - lang: Objective-C label: Objective-C source: > #import NSDictionary *headers = @{ @"Authorization": @"Bearer YOUR_SECRET_API_KEY" }; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId}"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"DELETE"]; [request setAllHTTPHeaderFields:headers]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume]; - lang: PHP label: PHP source: | "https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_SECRET_API_KEY" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: Python label: Python (python3) source: > import http.client conn = http.client.HTTPSConnection("api.browse.ai") headers = { 'Authorization': "Bearer YOUR_SECRET_API_KEY" } conn.request("DELETE", "/v2/robots/{robotId}/webhooks/{webhookId}", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: Python label: Python (requests) source: > import requests url = "https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId}" headers = {"Authorization": "Bearer YOUR_SECRET_API_KEY"} response = requests.request("DELETE", url, headers=headers) print(response.text) - lang: Ruby label: Ruby source: > require 'uri' require 'net/http' require 'openssl' url = URI("https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Delete.new(url) request["Authorization"] = 'Bearer YOUR_SECRET_API_KEY' response = http.request(request) puts response.read_body - lang: Shell label: Shell (cURL) source: | curl --request DELETE \ --url https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId} \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' - lang: Shell label: Shell (wget) source: | wget --quiet \ --method DELETE \ --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \ --output-document \ - https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId} - lang: Swift label: Swift source: > import Foundation let headers = ["Authorization": "Bearer YOUR_SECRET_API_KEY"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.browse.ai/v2/robots/{robotId}/webhooks/{webhookId}")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() components: parameters: authorization: description: > You can generate a new API key on [your dashboard](https://dashboard.browse.ai/api) if you do not have one. in: header name: authorization required: true schema: type: string example: Bearer YOUR_SECRET_API_KEY schemas: getSystemStatus-200: type: object required: - tasksQueueStatus properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success tasksQueueStatus: type: string enum: - OK - UNDER_MAINTENANCE example: OK Team: type: object required: - id - api - createdAt properties: id: description: Unique team ID type: string example: b04eaafa-00c2-41a2-9c6a-7f7d32805a91 name: description: Team name type: string nullable: true example: Browse AI team api: description: API accessibility type: boolean example: true createdAt: description: Team creation date and time in the form of a Unix timestamp type: integer example: 1678795867879 getUserTeams-200: type: object required: - statusCode - messageCode - teams properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success teams: type: object required: - totalCount - items properties: totalCount: description: Total number of Team this user has. type: integer example: 20 items: type: array items: $ref: '#/components/schemas/Team' UnauthorizedResponse: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 401 messageCode: type: string enum: - unauthorized - no_api_access example: unauthorized CommonParameterPart: type: object required: - name - label properties: type: description: Parameter type type: string name: description: Parameter name type: string example: originUrl label: description: Parameter title type: string example: Origin URL TextParameter: title: Text Parameter allOf: - $ref: '#/components/schemas/CommonParameterPart' - type: object required: - defaultValue - encrypted properties: encrypted: description: Whether parameter value and defaultValue are encrypted type: boolean example: false defaultValue: description: > Parameter default value that will be used as a fallback if you do not specify a parameter's value when running a robot. If `encrypted` is `true`, this will appear as an arbitrary string like `******`. Parameter default values can be updated on robot Settings page on your dashboard. type: string example: >- https://www.espressozone.com/espresso-machines/semi-automatic-espresso-machines value: description: > Parameter value specified when running robot. If `encrypted` is `true`, this will appear as an arbitrary string like `******`. type: type: string enum: ["text"] example: "text" description: Parameter type pattern: type: string description: Parameter Pattern type: string nullable: true example: null NumberParameter: title: Numeric Parameter allOf: - $ref: '#/components/schemas/CommonParameterPart' - type: object required: - type - name - label - defaultValue properties: type: description: Parameter type type: string enum: - number example: number name: description: Parameter name type: string example: limit label: description: Parameter title type: string example: Limit defaultValue: description: >- Parameter default value that will be used if you do not specify a parameter's value when running a robot. type: number example: 10 value: description: Parameter value specified when running robot. type: number nullable: true example: null min: description: Minimum value this parameter accepts type: number nullable: true example: 0 max: description: Maximum value this parameter accepts type: number nullable: true example: 200 URLParameter: title: URL Parameter allOf: - $ref: '#/components/schemas/TextParameter' - type: object required: - type - encrypted properties: type: description: Parameter type type: string enum: - url example: url encrypted: description: Whether parameter value and defaultValue are encrypted type: boolean example: false SelectParameterOption: type: object required: - label - value properties: label: description: The label for the select option type: string example: Option 1 value: description: The value for the select option type: string example: option1 SelectParameter: title: Select Parameter allOf: - $ref: '#/components/schemas/CommonParameterPart' - type: object required: - type - name - label - defaultValue - options properties: type: description: Parameter type type: string enum: - select example: select name: description: Parameter name type: string example: choice label: description: Parameter title type: string example: Choice defaultValue: description: > Parameter default value that will be used as a fallback if you do not specify a parameter's value when running a robot. It should be an array of string values. Each string value should be one of the `value` or `label` of the `options` array. For each string value, if there is a matching `value` in the `options` array, it will be used as the default value. Otherwise, it looks for the `label` in the `options` and uses the `value` of the option with that `label`. If no matching `value` or `label` is found, it throws an error. type: array items: type: string example: - option_1 - option_2 value: description: > Parameter value specified when running robot. If it is specified, it should be an array of string values. Each string value should be one of the `value` or `label` of the `options` array. For each string value, if there is a matching `value` in the `options` array, it will be used as the default value. Otherwise, it looks for the `label` in the `options` and uses the `value` of the option with that `label`. If no matching `value` or `label` is found, it throws an error. type: array items: type: string nullable: true example: - option_1 - option_2 options: description: Available options for the select parameter type: array items: $ref: '#/components/schemas/SelectParameterOption' example: - label: Option 1 label value: option_1 - label: Option 2 label value: option_2 RobotInputParameters: type: array items: oneOf: - $ref: '#/components/schemas/TextParameter' - $ref: '#/components/schemas/NumberParameter' - $ref: '#/components/schemas/URLParameter' - $ref: '#/components/schemas/SelectParameter' Robot: type: object required: - id - createdAt properties: id: description: Unique robot ID type: string example: 4f5cd7ff-6c98-4cac-8cf0-d7d0cb050b06 name: description: Robot name type: string example: Extract data from Realtor.com createdAt: description: Robot creation date and time in the form of a Unix timestamp type: integer example: 1678795867879 inputParameters: $ref: '#/components/schemas/RobotInputParameters' getRobots-200: type: object required: - statusCode - messageCode - robots properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success robots: type: object required: - totalCount - items properties: totalCount: description: Total number of robots this team has. type: integer example: 20 items: type: array items: $ref: '#/components/schemas/Robot' getRobot-200: type: object required: - statusCode - messageCode - robot properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success robot: $ref: '#/components/schemas/Robot' getRobot-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - bad_request - invalid_robot_id example: bad_request NotFoundResponse: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 404 messageCode: type: string enum: - not_found InternalServerResponse: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 500 messageCode: type: string enum: - internal_server_error RobotCookie: type: object properties: name: description: The name of the cookie. type: string example: ACCOUNT_CHOOSER value: description: The value of the cookie. type: string example: 12341234 domain: description: >- The domain associated with the cookie. Specifies the domains to which the cookie should be sent. type: string example: .example.com expirationDate: description: >- 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. type: number format: int64 example: 1723659417 path: description: >- The URL path to which the cookie should be sent. If not provided, it defaults to the current path of the document location. type: string example: /products/ secure: description: >- Indicates whether the cookie should only be sent over secure (HTTPS) connections. If true, the cookie will not be sent over unencrypted HTTP connections. type: boolean example: true httpOnly: description: >- If true, the cookie is accessible only through the HTTP(S) protocol and cannot be accessed through JavaScript or other client-side scripts. type: boolean example: true hostOnly: description: >- 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. type: boolean example: true required: - name - value upsertRobotCookies-200: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success cookies: type: array items: $ref: '#/components/schemas/RobotCookie' CookieError: type: object required: - summary - fields properties: summary: description: Summary of the error type: string example: Errors found in existing cookie fields name: description: Name of the cookie type: string example: ACCOUNT_CHOOSER fields: type: array items: type: object required: - field - message properties: field: description: Field name with the error type: string example: value message: description: Error message for the field type: string example: Required upsertRobotCookies-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - invalid_robot_id - bad_request - body_parse_error example: bad_request errors: type: array items: $ref: '#/components/schemas/CookieError' InputParameters: description: An object of input parameters to override default input parameters. type: object example: originUrl: https://www.ycombinator.com/companies/airbnb companies_skip: 0 companies_limit: 10 additionalProperties: oneOf: - type: string - type: number - type: array items: type: string CapturedTexts: description: Captured texts type: object example: Product Name: Alexis Width: '15' Pattern Repeat: PATTERN REPEAT Construction: Hand woven Fiber: 100% Wool Color: null Main Image: >- https://isteam.wsimg.com/ip/e31f7bba-252b-4669-9209-639d1c00765d/ols/258_original additionalProperties: type: string nullable: true CapturedScreenshots: description: All screenshots captured in this task. type: object example: top-ads: id: b4d132f3-12d9-4770-ac7d-88e481fc5b47 name: Top ads src: >- https://prod-browseai-captured-data.s3.amazonaws.com/1fae674a-2788-46a8-83c8-95c4664c6d25/6326b3c1-7b16-4256-a323-7d8d8954bd4e/1061671f-7f71-42ac-bb9a-207d126d1f3a/00001-user-1620230947-6f113cf2-90ef-4c66-a448-9d5c6bd64873.png width: 600 height: 120 x: 201 'y': 142 deviceScaleFactor: 1.2 full: page comparedToScreenshotId: 29d742c2-6f45-4f29-9d48-ba6fe66e6e3d diffImageSrc: >- https://prod-browseai-captured-data.s3.amazonaws.com/1fae674a-2788-46a8-83c8-95c4664c6d25/6326b3c1-7b16-4256-a323-7d8d8954bd4e/1061671f-7f71-42ac-bb9a-207d126d1f3a/00001-user-1620230947-6f113cf2-90ef-4c66-a448-9d5c6bd64873.png changePercentage: 20 diffThreshold: 5 fileRemovedAt: 1678795867879 additionalProperties: type: object required: - id - src - width - height - x - 'y' - deviceScaleFactor - changePercentage - diffThreshold properties: id: description: Unique screenshot ID type: string example: b4d132f3-12d9-4770-ac7d-88e481fc5b47 name: description: Screenshot name type: string nullable: true example: Top ads src: description: Screenshot image link type: string example: >- https://prod-browseai-captured-data.s3.amazonaws.com/1fae674a-2788-46a8-83c8-95c4664c6d25/6326b3c1-7b16-4256-a323-7d8d8954bd4e/1061671f-7f71-42ac-bb9a-207d126d1f3a/00001-user-1620230947-6f113cf2-90ef-4c66-a448-9d5c6bd64873.png width: description: Screenshot rectangle width in pixels type: number example: 600 minimum: 0 height: description: Screenshot rectangle height in pixels type: number example: 120 minimum: 0 x: description: >- Screenshot rectangle distance from the left edge of the page in pixels type: number example: 201 'y': description: >- Screenshot rectangle distance from the top edge of the page in pixels type: number example: 142 deviceScaleFactor: description: Device scale factor when screenshot was taken type: number example: 1.2 full: description: > Whether this is a full *page* screenshot, a *viewport* screenshot, or a different type of screenshot. `null` means it is either an HTML element screenshot or a particular rectangle (x, y, w, h) screenshot. type: string nullable: true example: page comparedToScreenshotId: description: >- If screenshot was taken in a monitoring check, this is the ID of the screenshot it was compared to. type: string nullable: true example: 29d742c2-6f45-4f29-9d48-ba6fe66e6e3d diffImageSrc: description: >- A transparent PNG highlighting changes compared to previous screenshot in red type: string nullable: true example: >- https://prod-browseai-captured-data.s3.amazonaws.com/1fae674a-2788-46a8-83c8-95c4664c6d25/6326b3c1-7b16-4256-a323-7d8d8954bd4e/1061671f-7f71-42ac-bb9a-207d126d1f3a/00001-user-1620230947-6f113cf2-90ef-4c66-a448-9d5c6bd64873.png changePercentage: description: How much screenshot changed compared to previous screenshot type: number example: 20 minimum: 0 diffThreshold: description: >- The change percentage threshold above which the user would be notified of the change, based on monitor settings. type: integer example: 5 minimum: 0 fileRemovedAt: description: > After your account's data retention period, screenshots get removed and this field will be screenshot removal date and time in the form of a Unix timestamp. type: integer nullable: true example: 1678795867879 CapturedLists: description: All lists captured in this task. type: object example: companies: - description: Book accommodations around the world. Position: '1' name: Airbnb location: San Francisco, CA, USA - description: Buy, sell, and manage crypto currencies. Position: '2' name: Coin base location: San Francisco, CA, USA - description: Restaurant delivery. Position: '3' name: DoorDash location: San Francisco, CA, USA additionalProperties: type: array items: $ref: '#/components/schemas/CapturedTexts' RobotTask: type: object required: - id - inputParameters - robotId - createdAt - runByAPI - triedRecordingVideo - capturedTexts - capturedScreenshots - capturedLists properties: id: description: Unique task ID type: string example: f6fb62b6-f06a-4bf7-a623-c6a35c2e70b0 inputParameters: $ref: '#/components/schemas/InputParameters' robotId: description: Unique robot ID type: string example: 4f5cd7ff-6c98-4cac-8cf0-d7d0cb050b06 status: description: task status type: string enum: - failed - successful - in-progress example: successful runByUserId: description: User ID who ran the robot on the dashboard type: string nullable: true example: null robotBulkRunId: description: Robot bulk run ID associated with this task type: string nullable: true example: null runByTaskMonitorId: description: Monitor ID that ran this check type: string nullable: true example: null runByAPI: description: Whether the robot was ran through the API type: boolean example: true createdAt: description: Task creation date and time in the form of a Unix timestamp type: integer example: 1678795867879 startedAt: description: Task start date and time in the form of a Unix timestamp type: integer nullable: true example: 1678795867879 finishedAt: description: > Task finish date and time in the form of a Unix timestamp. If `null`, it means robot is still running and capturing data. Tasks time out with an error if they are not finished within 15 minutes (or the maximum duration allowed on your plan). type: integer nullable: true example: 1678795867879 userFriendlyError: description: If task fails, a user-friendly error will be provided here. type: string nullable: true example: null triedRecordingVideo: description: > Whether the robot tried to record a video while performing this task. You can change a robot's video recording setting on its Settings page. Robots try to record a video when a task is failed and auto-retried as well. type: boolean example: true videoUrl: description: >- If a video was recorded for this task, this is the link to the video. type: string nullable: true example: >- https://prod-browseai-captured-data.s3.amazonaws.com/1fae674a-2788-46a8-83c8-95c4664c6d25/6326b3c1-7b16-4256-a323-7d8d8954bd4e/1061671f-7f71-42ac-bb9a-207d126d1f3a/system-1620230966-b1a9688b-05d3-4682-beeb-9ce035e482b1.mp4 videoRemovedAt: description: > After your account's data retention period, task videos get removed and this field will be video removal date and time in the form of a Unix timestamp. type: integer nullable: true example: 1678795867879 retriedOriginalTaskId: description: >- The ID of the original failed task this task was retrying. For example, if task A failed and was retried by task B, and task B was retried by task C, `retriedOriginalTaskId` will point to task A in both task B and C. type: string nullable: true example: 673da019-bf0c-476e-9c4f-d35252a151dc retriedByTaskId: description: > The ID of the task that retried this task, if this task failed with an error and was retried. Failed tasks get retried if "Double Check" option is enabled on robot Settings page. "Double Check" is enabled by default. type: string nullable: true example: null capturedDataTemporaryUrl: description: >- If your task's captured data exceeds 100KB, the data will be only accessible through this link. There's a 24 hours expiration time for this link (you need to call this API again to get a new link if it expires). type: string nullable: true example: >- https://prod-browseai-captured-data.s3.amazonaws.com/1fae674a-2788-46a8-83c8-95c4664c6d25/6326b3c1-7b16-4256-a323-7d8d8954bd4e/1061671f-7f71-42ac-bb9a-207d126d1f3a/system-1620230966-b1a9688b-05d3-4682-beeb-9ce035e482b1.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQVG3TPBVXHSCAX63%2F20221031%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221031T185642Z&X-Amz-Expires=1800&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEJP%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJIMEYCIQDfX8VNAl5kBgttrCU85U5wc1ZtSOmshO6%2FPilXOv8nvgIhAIveFfsk%2B2CnEkrMZWriodEPsj0osO5a5zV6eVu%2FXfuZKp8DCHwQAhoMMDQ1NTU3NzA4OTA3IgyrbhVK0MP1WMFBXh0q%2FAJulP5qfaV5mn3NRbINqZN4hy4Dg3IujNrZjw8ef32sWE1Gj2D%2Fc0YTJUzvx%2Fnm7LxyNO6AR35mrVy%2FBm9Q80UIspkcLMl45EK%2FoUDO0fAvoUF8g6iZ905qS3MvnOTxXkObhM1PVmpFeJFMw3jksnOPfKE4X7Ut%2FJXNwD%2F5QzdkQCXkGem%2BlrYSSSf8jB8lihTAjT%2FNXmOKMv3jktmZ13T8J1R8F8zeuLPMQf7QphUzlKn5joPb28cConluQC97y%2BjwxqIYjvIFKXY9cZEoaHGh4c6FbXsia714zG3CQp8NSGLbqCCu93oJI1Z61E%2BZ6PhB3vZGdBvXi61AlJcxZ7sti6i0h4VAbWspiJIgWwoZzrsTtneBNNpUW9tvtacGgEZIwAKV%2F3AhVEZu3WC1eQ9HtfjT9%2FjW99SEB8VVGXwkM%2FA9mtT%2FuiL0cAfQZRMhtbQJXXDRdkYEw%2FWuhjJ3zxEtEB2m3uH%2B%2BUEzOzGTd5Knm%2Bero%2BhMfN8X%2Botm3DDbtICbBjqcAf5Riii0XE1w2TZvpm%2FPNHTchCu7FnNz5hfvflv8scpgO5M4bGpy%2FadI4%2F7AUQqCQXFw4scF0FCCdb8AKJZsFGG18W1jjDHyR0YuxZFQ%2FJQRt0JP3yr%2BkVxjAH7qTtc0AzF%2FnGTgy3MOF%2Bm6Y7EkyCWyV2r6o1JTBQMftlf7MI8Uvw4cSZE6JoZviaFtmKVLGGgR4F3cDiyU56augA%3D%3D&X-Amz-Signature=a7bb4d7597ad37cdf1f260890c3c474f7f49334db58c9650d75302a34126f7bc&X-Amz-SignedHeaders=host capturedTexts: $ref: '#/components/schemas/CapturedTexts' capturedScreenshots: $ref: '#/components/schemas/CapturedScreenshots' capturedLists: $ref: '#/components/schemas/CapturedLists' getRobotTasks-200: type: object required: - statusCode - messageCode - result properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success result: type: object required: - robotTasks properties: robotTasks: type: object required: - totalCount - pageNumber - hasMore - items properties: totalCount: description: Total number of tasks this robot has. type: integer example: 20 pageNumber: description: Current page number. type: integer example: 1 hasMore: description: Whether there are more tasks on the next page. type: boolean example: true items: type: array items: $ref: '#/components/schemas/RobotTask' getRobotTasks-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - invalid_robot_id - bad_request - invalid_from_date - invalid_to_date example: invalid_robot_id NewRobotTaskBodyParams: type: object properties: recordVideo: description: >- Try to record a video while running the task. This is not guaranteed to work as the robot might skip video recording if the site is too heavy. type: boolean example: false minLength: 1 maxLength: 200 required: false inputParameters: $ref: '#/components/schemas/InputParameters' newRobotTask-200: type: object required: - statusCode - messageCode - result properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success result: $ref: '#/components/schemas/RobotTask' newRobotTask-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - bad_request - body_parse_error - invalid_robot_id - invalid_input_parameters example: bad_request CreditsLimitReachedResponse: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 403 messageCode: type: string enum: - credits_limit_reached RobotUnderMaintenanceResponse: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 503 messageCode: type: string enum: - robot_under_maintenance getRobotTask-200: type: object required: - statusCode - messageCode - result properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success result: $ref: '#/components/schemas/RobotTask' getRobotTask-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - bad_request - invalid_robot_id - invalid_task_id example: bad_request Schedules: description: | Array of schedules. type: array deprecated: true items: title: Fixed interval schedule type: object required: - type - everyMinutes properties: type: description: Schedule type type: string enum: - FIXED_INTERVAL example: FIXED_INTERVAL everyMinutes: description: Schedule interval in minutes type: number example: 60 example: - type: FIXED_INTERVAL everyMinutes: 60 Schedule: description: | recurring schedule. type: string example: FREQ=HOURLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR Monitor: type: object required: - id - name - status - pausedReason - inputParameters - notifyOnCapturedScreenshotChange - notifyOnCapturedTextChange - capturedScreenshotNotificationThreshold - createdAt properties: id: description: Unique robot monitor ID type: string example: f6fb62b6-f06a-4bf7-a623-c6a35c2e70b0 name: description: Monitor name type: string example: Monitor Products status: description: >- 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. type: string enum: - active - paused example: active pausedReason: description: Specifies the reason why the monitor is in a paused state. type: string nullable: true enum: - lowCredits - tooManyFailures - userRequested - userInactivity example: null inputParameters: $ref: '#/components/schemas/InputParameters' schedules: $ref: '#/components/schemas/Schedules' schedule: $ref: '#/components/schemas/Schedule' notifyOnCapturedScreenshotChange: description: >- If set to `true`, an email notification will be sent to you when a change is detected in captured screenshots. type: boolean example: true notifyOnCapturedTextChange: description: >- If set to `true`, an email notification will be sent to you when a change is detected in captured texts. type: boolean example: true capturedScreenshotNotificationThreshold: description: >- The "screenshot changed" email notification will be sent to you if the change is greater than this threshold (in percent). type: number example: 15 createdAt: description: Monitor creation date and time in the form of a Unix timestamp. type: integer example: 1678795867879 pausedAt: description: Monitor pause date and time in the form of a Unix timestamp. type: integer nullable: true example: 1678795867879 updatedAt: description: Monitor last update date and time in the form of a Unix timestamp. type: integer nullable: true example: 1678795867879 getMonitors-200: type: object required: - statusCode - messageCode - monitors properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success monitors: type: object required: - totalCount - items properties: totalCount: description: Total number of monitors this robot has type: number example: 10 items: description: Array of all monitors type: array items: $ref: '#/components/schemas/Monitor' getMonitors-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - invalid_robot_id - bad_request example: bad_request CreateNewMonitorRequestBody: type: object required: - name - inputParameters - notifyOnCapturedScreenshotChange - notifyOnCapturedTextChange - capturedScreenshotNotificationThreshold properties: name: description: Monitor name type: string example: Monitor Products minLength: 1 maxLength: 200 inputParameters: description: An object of input parameters to override default input parameters. $ref: '#/components/schemas/InputParameters' schedules: $ref: '#/components/schemas/Schedules' schedule: $ref: '#/components/schemas/Schedule' notifyOnCapturedScreenshotChange: description: >- If set to `true`, an email notification will be sent to you when a change is detected in captured screenshots. type: boolean example: true notifyOnCapturedTextChange: description: >- If set to `true`, an email notification will be sent to you when a change is detected in captured texts. type: boolean example: true capturedScreenshotNotificationThreshold: description: >- The "screenshot changed" email notification will be sent to you if the change is greater than this threshold (in percent). type: number example: 15 createNewMonitor-200: type: object required: - statusCode - messageCode - monitor properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success monitor: $ref: '#/components/schemas/Monitor' CreateOrUpdateMonitorBadRequestResponse: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - invalid_robot_id - bad_request - body_parse_error - invalid_name - invalid_status - invalid_input_parameters - invalid_notifyOnCapturedScreenshotChange - invalid_notifyOnCapturedTextChange - invalid_capturedScreenshotNotificationThreshold - invalid_schedules - invalid_schedule - invalid_monitor_id example: bad_request CreateOrUpdateMonitorForbiddenResponse: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 403 messageCode: type: string enum: - schedule_interval_below_minimum example: schedule_interval_below_minimum getMonitor-200: type: object required: - statusCode - messageCode - monitor properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success monitor: $ref: '#/components/schemas/Monitor' getMonitor-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - invalid_robot_id - bad_request - invalid_monitor_id example: bad_request deleteMonitor-200: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success deleteMonitor-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - invalid_robot_id - invalid_monitor_id example: invalid_robot_id MonitorUpdateBodyParams: type: object properties: name: description: Monitor name type: string example: Monitor Products nullable: true status: description: >- If set to `paused`, the monitor will stop working until an `active` status is sent. type: string enum: - active - paused example: active nullable: true inputParameters: $ref: '#/components/schemas/InputParameters' nullable: true schedules: $ref: '#/components/schemas/Schedules' schedule: $ref: '#/components/schemas/Schedule' notifyOnCapturedScreenshotChange: description: >- If set to `true`, an email notification will be sent to you when a change is detected in captured screenshots. type: boolean example: true nullable: true notifyOnCapturedTextChange: description: >- If set to `true`, an email notification will be sent to you when a change is detected in captured texts. type: boolean example: true nullable: true capturedScreenshotNotificationThreshold: description: >- The "screenshot changed" email notification will be sent to you if the change is greater than this threshold (in percent). type: number example: 15 nullable: true updateMonitor-200: type: object required: - statusCode - messageCode - monitor properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success monitor: $ref: '#/components/schemas/Monitor' BulkRun: type: object required: - id - tasksCount - robotId - createdAt properties: title: description: An optional string that describes the bulk run. type: string nullable: true example: Bulk Run Title minLength: 1 maxLength: 200 id: description: Unique bulk run ID type: string example: f6fb62b6-f06a-4bf7-a623-c6a35c2e70b0 tasksCount: description: Number of tasks under this bulk run. type: integer example: 10 robotId: description: Unique robot ID type: string example: 4f5cd7ff-6c98-4cac-8cf0-d7d0cb050b06 createdAt: description: Bulk run creation date and time in the form of a Unix timestamp. type: integer example: 1678795867879 BulkRuns: type: object required: - totalCount - pageNumber - hasMore - items properties: totalCount: description: Total number of bulk runs a robot has had. type: integer example: 20 pageNumber: description: Current page number. type: integer example: 1 hasMore: description: Whether there are more bulk runs on the next page. type: boolean example: true items: type: array items: $ref: '#/components/schemas/BulkRun' getBulkRuns-200: type: object required: - statusCode - messageCode - result properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success result: $ref: '#/components/schemas/BulkRuns' getBulkRuns-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - bad_request - invalid_robot_id example: bad_request ArrayOfUserInputParameters: description: >- An array of input parameters to override the task's default input parameters. type: array example: - originUrl: https://www.ycombinator.com/companies/airbnb companies_skip: 0 companies_limit: 10 - originUrl: https://www.ycombinator.com/companies/coinbase companies_skip: 0 companies_limit: 20 items: $ref: '#/components/schemas/InputParameters' BulkRunBodyParams: type: object required: - inputParameters properties: title: description: A string that describes the bulk run. type: string example: Bulk Run Title minLength: 1 maxLength: 200 required: false inputParameters: $ref: '#/components/schemas/ArrayOfUserInputParameters' newBulkRun-200: type: object required: - statusCode - messageCode - result properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success result: type: object properties: bulkRun: $ref: '#/components/schemas/BulkRun' newBulkRun-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - bad_request - body_parse_error - invalid_robot_id - invalid_input_parameters - zero_length_parameters example: bad_request newBulkRun-403: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 403 messageCode: type: string enum: - credits_limit_reached - exceeded_bulk_run_threshold example: exceeded_bulk_run_threshold RobotTasks: description: A paginated list of tasks. type: object required: - totalCount - pageNumber - hasMore - items properties: totalCount: description: Total number of tasks. type: integer example: 20 pageNumber: description: Current page number. type: integer example: 1 hasMore: description: Whether there are more tasks on the next page. type: boolean example: true items: type: array items: $ref: '#/components/schemas/RobotTask' getBulkRun-200: type: object required: - statusCode - messageCode - result properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success result: type: object required: - bulkRun - robotTasks properties: bulkRun: $ref: '#/components/schemas/BulkRun' robotTasks: $ref: '#/components/schemas/RobotTasks' getBulkRun-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - bad_request - invalid_robot_id example: bad_request Webhook: type: object required: - id - url - webhookEvent - createdAt properties: id: description: Unique webhook ID type: string example: 6d7f1218-43fb-4735-ac71-21e81b1ab23e url: description: Webhook URL type: string example: https://example.com/v2/webhooks/callback/events webhookEvent: type: string enum: - taskCapturedDataChanged - taskFinished - taskFinishedSuccessfully - taskFinishedWithError - tableExportFinishedSuccessfully example: taskFinished createdAt: description: Monitor creation date and time in the form of a Unix timestamp. type: integer example: 1678795867879 getWebhooks-200: type: object required: - statusCode - messageCode - webhooks properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success webhooks: type: object required: - totalCount - items properties: totalCount: description: Total number of webhooks this robot has type: number example: 10 items: description: Array of all webhooks type: array items: $ref: '#/components/schemas/Webhook' getWebhooks-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - invalid_robot_id - bad_request example: bad_request CreateNewWebhookBodyParams: type: object required: - hookUrl - eventType properties: hookUrl: description: Webhook URL type: string example: https://example.com/v2/webhooks/callback/events eventType: type: string enum: - taskCapturedDataChanged - taskFinished - taskFinishedSuccessfully - taskFinishedWithError - tableExportFinishedSuccessfully example: taskFinished createNewWebhook-200: type: object required: - statusCode - messageCode - webhook properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success webhook: $ref: '#/components/schemas/Webhook' createNewWebhook-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - invalid_robot_id - bad_request - body_parse_error - invalid_hookUrl - invalid_eventType example: bad_request deleteWebhook-200: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 200 messageCode: type: string enum: - success deleteWebhook-400: type: object required: - statusCode - messageCode properties: statusCode: type: number enum: - 400 messageCode: type: string enum: - invalid_robot_id - invalid_webhook_id - bad_request example: invalid_robot_id RobotTaskWebhook: type: object required: - id - inputParameters - robotId - createdAt - runByAPI - triedRecordingVideo - capturedTexts - capturedScreenshots - capturedLists properties: id: description: Unique task ID type: string example: f6fb62b6-f06a-4bf7-a623-c6a35c2e70b0 inputParameters: $ref: '#/components/schemas/InputParameters' robotId: description: Unique robot ID type: string example: 4f5cd7ff-6c98-4cac-8cf0-d7d0cb050b06 status: description: task status type: string enum: - failed - successful - in-progress example: successful runByUserId: description: User ID who ran the robot on the dashboard type: string nullable: true example: null robotBulkRunId: description: Robot bulk run ID associated with this task type: string nullable: true example: null runByTaskMonitorId: description: Monitor ID that ran this check type: string nullable: true example: null runByAPI: description: Whether the robot was ran through the API type: boolean example: true createdAt: description: Task creation date and time in the form of a Unix timestamp type: integer example: 1678795867879 startedAt: description: Task start date and time in the form of a Unix timestamp type: integer nullable: true example: 1678795867879 finishedAt: description: > Task finish date and time in the form of a Unix timestamp. If `null`, it means robot is still running and capturing data. Tasks time out with an error if they are not finished within 15 minutes (or the maximum duration allowed on your plan). type: integer nullable: true example: 1678795867879 userFriendlyError: description: If task fails, a user-friendly error will be provided here. type: string nullable: true example: null triedRecordingVideo: description: > Whether the robot tried to record a video while performing this task. You can change a robot's video recording setting on its Settings page. Robots try to record a video when a task is failed and auto-retried as well. type: boolean example: true videoUrl: description: >- If a video was recorded for this task, this is the link to the video. type: string nullable: true example: >- https://prod-browseai-captured-data.s3.amazonaws.com/1fae674a-2788-46a8-83c8-95c4664c6d25/6326b3c1-7b16-4256-a323-7d8d8954bd4e/1061671f-7f71-42ac-bb9a-207d126d1f3a/system-1620230966-b1a9688b-05d3-4682-beeb-9ce035e482b1.mp4 videoRemovedAt: description: > After your account's data retention period, task videos get removed and this field will be video removal date and time in the form of a Unix timestamp. type: integer nullable: true example: 1678795867879 retriedOriginalTaskId: description: >- The ID of the original failed task this task was retrying. For example, if task A failed and was retried by task B, and task B was retried by task C, `retriedOriginalTaskId` will point to task A in both task B and C. type: string nullable: true example: 673da019-bf0c-476e-9c4f-d35252a151dc retriedByTaskId: description: > The ID of the task that retried this task, if this task failed with an error and was retried. Failed tasks get retried if "Double Check" option is enabled on robot Settings page. "Double Check" is enabled by default. type: string nullable: true example: null capturedTexts: $ref: '#/components/schemas/CapturedTexts' capturedScreenshots: $ref: '#/components/schemas/CapturedScreenshots' capturedLists: $ref: '#/components/schemas/CapturedLists' RobotsUpdateCookiesRequest: type: array items: $ref: '#/components/schemas/RobotCookie' x-tagGroups: - tags: - system - robots - tasks - monitors - webhooks - bulk runs name: Core Resources webhooks: taskWebhook: post: tags: - webhooks summary: Task Finished requestBody: content: application/json: schema: type: object required: - event - task properties: event: description: The event type that triggered the webhook type: string enum: - task.finishedSuccessfully - task.finishedWithError - task.capturedDataChanged example: task.finishedSuccessfully task: $ref: '#/components/schemas/RobotTaskWebhook' responses: '200': description: >- Your webhook URL is called only once – regardless of the response status. This behavior may change in the future and we may introduce automatic retries in cases where the response status is not 200 and your software is having a downtime. At this time, however, you need to make sure that the webhook URL is always available and set the response status code to 200. content: application/json: example: status: success tableExportWebhook: post: tags: - webhooks - Beta summary: Table Export Finished (Beta) description: > This webhook is called when a table export is finished. The exported file can be a CSV, JSON, or zip file. Your webhook URL is called only once regardless of the response status. requestBody: content: application/json: schema: type: object required: - exportId - exportFile - robotName - robotId - exportFinishedAt - exportCreatedAt properties: exportId: description: The unique ID of the export type: string example: f6fb62b6-f06a-4bf7-a623-c6a35c2e70b0 robotId: description: The unique ID of the robot type: string example: c3689adb-50aa-44af-b265-a7e0d4e5846e fileTemporaryUrl: description: The URL of the exported file type: string example: https://s3.amazonaws.com/some-bucket/your-export.csv fileTemporaryUrlExpiresAt: description: >- The unix timestamp of when the file URL expires in milliseconds type: number format: timestamp example: 1678795867879 exportFinishedAt: description: >- The unix timestamp of when the export was finished in milliseconds type: number format: timestamp example: 1678795867879 exportCreatedAt: description: >- The unix timestamp of when the export was created in milliseconds type: number format: timestamp example: 1678795867879 responses: '200': content: application/json: example: status: success