GebSecure Docs v0.1.0

Reference · Gateway API

Browser sessions — Gateway API

6 operations of the GebSecure Gateway API (0.1.0), generated from docs/openapi/gateway.json.

Base URL: https://gateway.gebsecure.com · OpenAPI 3.1.0 · contract version 0.1.0 · generated from docs/openapi/gateway.json.

GET /v1/browser/sessions#

  • Endpoint: GET https://gateway.gebsecure.com/v1/browser/sessions
  • Authentication: bearer access token (JWT) or API key (gsk_…) — see authentication

Parameters

Name In Type Required Notes
status query "active" | "closed" | "expired" | "failed"
principalId query string
limit query integer default 50; range 1–200

Responses

  • 200 — Default Response

Errors are application/problem+json (error model).

bash
curl -X GET "$GEBSECURE_GATEWAY_URL/v1/browser/sessions" \
  -H "Authorization: Bearer $GEBSECURE_TOKEN"

POST /v1/browser/sessions#

Start an isolated browser session (authorized as browser:session.create)

  • Endpoint: POST https://gateway.gebsecure.com/v1/browser/sessions
  • Authentication: bearer access token (JWT) or API key (gsk_…) — see authentication

Request body (application/json, required)

Field Type Required Notes
profile string length 0–128
environmentId string
startUrl string length 0–2048
allowedDomains array default []; items 0–200
blockedDomains array default []; items 0–200
viewport object default {"width":1280,"height":800}
viewport.width integer yes range 320–1920
viewport.height integer yes range 240–1440
approvalId string

Responses

  • 200 — Default Response

Errors are application/problem+json (error model).

bash
curl -X POST "$GEBSECURE_GATEWAY_URL/v1/browser/sessions" \
  -H "Authorization: Bearer $GEBSECURE_TOKEN" \
  -H 'content-type: application/json' \
  -d '{}'

GET /v1/browser/sessions/{id}#

  • Endpoint: GET https://gateway.gebsecure.com/v1/browser/sessions/{id}
  • Authentication: bearer access token (JWT) or API key (gsk_…) — see authentication

Parameters

Name In Type Required Notes
id path string yes length 0–64

Responses

  • 200 — Default Response

Errors are application/problem+json (error model).

bash
curl -X GET "$GEBSECURE_GATEWAY_URL/v1/browser/sessions/{id}" \
  -H "Authorization: Bearer $GEBSECURE_TOKEN"

DELETE /v1/browser/sessions/{id}#

Close the session (context, storage and downloads are destroyed)

  • Endpoint: DELETE https://gateway.gebsecure.com/v1/browser/sessions/{id}
  • Authentication: bearer access token (JWT) or API key (gsk_…) — see authentication

Parameters

Name In Type Required Notes
id path string yes length 0–64

Responses

  • 200 — Default Response

Errors are application/problem+json (error model).

bash
curl -X DELETE "$GEBSECURE_GATEWAY_URL/v1/browser/sessions/{id}" \
  -H "Authorization: Bearer $GEBSECURE_TOKEN"

POST /v1/browser/sessions/{id}/actions#

Perform a typed browser action (navigate, click, type, select, upload, download, submit, scroll, screenshot, extract, close)

Every action is authorized (intent-escalated: browser:purchase, browser:message.send, browser:account.change, browser:type.sensitive …), inspected and audited. 202 = approval required: retry the identical action with approvalId.

  • Endpoint: POST https://gateway.gebsecure.com/v1/browser/sessions/{id}/actions
  • Authentication: bearer access token (JWT) or API key (gsk_…) — see authentication

Parameters

Name In Type Required Notes
id path string yes length 0–64

Request body (application/json, required)

One of — when type is "navigate":

Field Type Required Notes
type "navigate" yes
url string yes length 1–2048
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "click":

Field Type Required Notes
type "click" yes
target object yes
target.selector string length 1–1000
target.role string length 1–64
target.name string length 0–500
target.exact boolean default false
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "type":

Field Type Required Notes
type "type" yes
target object yes
target.selector string length 1–1000
target.role string length 1–64
target.name string length 0–500
target.exact boolean default false
text string length 0–10000
secretRef object
secretRef.secret string yes length 1–160
secretRef.field string length 1–64
clear boolean default true
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "select":

Field Type Required Notes
type "select" yes
target object yes
target.selector string length 1–1000
target.role string length 1–64
target.name string length 0–500
target.exact boolean default false
values array yes items 1–50
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "upload":

Field Type Required Notes
type "upload" yes
target object yes
target.selector string length 1–1000
target.role string length 1–64
target.name string length 0–500
target.exact boolean default false
file object yes
file.name string yes length 1–255; pattern ^[^\\/\0]+$
file.mimeType string length 0–128
file.contentBase64 string yes length 0–1500000
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "download":

Field Type Required Notes
type "download" yes
target object yes
target.selector string length 1–1000
target.role string length 1–64
target.name string length 0–500
target.exact boolean default false
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "submit":

Field Type Required Notes
type "submit" yes
target object yes
target.selector string length 1–1000
target.role string length 1–64
target.name string length 0–500
target.exact boolean default false
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "scroll":

Field Type Required Notes
type "scroll" yes
target object
target.selector string length 1–1000
target.role string length 1–64
target.name string length 0–500
target.exact boolean default false
direction "up" | "down" default "down"
amount integer default 600; range 1–20000
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "screenshot":

Field Type Required Notes
type "screenshot" yes
fullPage boolean default false
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "extract":

Field Type Required Notes
type "extract" yes
mode "text" | "outline" | "aria" default "text"
target object
target.selector string length 1–1000
target.role string length 1–64
target.name string length 0–500
target.exact boolean default false
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

One of — when type is "close":

Field Type Required Notes
type "close" yes
approvalId string
dryRun boolean default false
timeoutMs integer range 500–60000

Responses

  • 200 — Default Response

Errors are application/problem+json (error model).

bash
curl -X POST "$GEBSECURE_GATEWAY_URL/v1/browser/sessions/{id}/actions" \
  -H "Authorization: Bearer $GEBSECURE_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"type":"navigate","url":"<string>"}'

GET /v1/browser/sessions/{id}/replay#

Ordered action log of the session

  • Endpoint: GET https://gateway.gebsecure.com/v1/browser/sessions/{id}/replay
  • Authentication: bearer access token (JWT) or API key (gsk_…) — see authentication

Parameters

Name In Type Required Notes
id path string yes length 0–64

Responses

  • 200 — Default Response

Errors are application/problem+json (error model).

bash
curl -X GET "$GEBSECURE_GATEWAY_URL/v1/browser/sessions/{id}/replay" \
  -H "Authorization: Bearer $GEBSECURE_TOKEN"