curl --request POST \
--url https://api.infrawatch.com/api/v1/projects/PROJECT_UUID/sessions \
--header 'X-API-Key: <your-api-key>' \
--header 'Idempotency-Key: customer-job-123' \
--header 'Content-Type: application/json' \
--data '{"start_url":"https://example.com","browser_profile":"windows","egress_country":"GB","viewport":{"width":1440,"height":900}}'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions"
payload = {
"browser_profile": "windows",
"egress_country": "GB",
"start_url": "https://example.com/",
"viewport": {
"height": 900,
"width": 1440
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
browser_profile: 'windows',
egress_country: 'GB',
start_url: 'https://example.com/',
viewport: {height: 900, width: 1440}
})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions"
payload := strings.NewReader("{\n \"browser_profile\": \"windows\",\n \"egress_country\": \"GB\",\n \"start_url\": \"https://example.com/\",\n \"viewport\": {\n \"height\": 900,\n \"width\": 1440\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"session": {
"created_at": "2023-11-07T05:31:56Z",
"creator": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"egress_country": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"project_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"viewport": {
"height": 1040,
"width": 1600
},
"close_requested_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"replayed_from_session_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"terminal_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Queue a browser session.
Validates the request and atomically admits it against caller and organisation concurrency limits before returning. Platform Core does not contact browser infrastructure in this request; a durable dispatcher provisions valid queued sessions asynchronously.
Reusing an Idempotency-Key with the same normalized request returns the existing resource. Reusing it with a different request returns 409.
curl --request POST \
--url https://api.infrawatch.com/api/v1/projects/PROJECT_UUID/sessions \
--header 'X-API-Key: <your-api-key>' \
--header 'Idempotency-Key: customer-job-123' \
--header 'Content-Type: application/json' \
--data '{"start_url":"https://example.com","browser_profile":"windows","egress_country":"GB","viewport":{"width":1440,"height":900}}'import requests
url = "https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions"
payload = {
"browser_profile": "windows",
"egress_country": "GB",
"start_url": "https://example.com/",
"viewport": {
"height": 900,
"width": 1440
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
browser_profile: 'windows',
egress_country: 'GB',
start_url: 'https://example.com/',
viewport: {height: 900, width: 1440}
})
};
fetch('https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/projects/{project_uuid}/sessions"
payload := strings.NewReader("{\n \"browser_profile\": \"windows\",\n \"egress_country\": \"GB\",\n \"start_url\": \"https://example.com/\",\n \"viewport\": {\n \"height\": 900,\n \"width\": 1440\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"session": {
"created_at": "2023-11-07T05:31:56Z",
"creator": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"egress_country": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"project_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"viewport": {
"height": 1040,
"width": 1600
},
"close_requested_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"replayed_from_session_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"terminal_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Authorizations
Infrawatch API key. Supply the complete key directly as the header value.
Headers
1 - 200Path Parameters
Body
ISO 3166-1 alpha-2 country returned by capabilities.
^[A-Z]{2}$Public HTTP or HTTPS URL. Credentials and private, loopback, link-local, metadata, localhost, and local-network targets are rejected.
2048Browser identity profile; not the private worker operating system.
windows, macos, linux Show child attributes
Show child attributes
Response
Session accepted or an identical idempotent resource returned.
Show child attributes
Show child attributes