API pour agents

Tokens, first calls, and the OpenAPI playground for agent builders

PetroBench API

Versioned REST endpoints for agents and integrations, with the same permissions as your users.

What it is

A versioned REST API at app.petrobench.com/api/v1, with the same sign-in and scopes as MCP.

What it does

Lets agents and scripts work with wells, simulations and account data. Off by default and enabled at your organization's request.

  • Tokens and OAuth

    Personal API tokens, service tokens or OAuth clients

  • Versioned REST

    Stable endpoints for agents, scripts and pipelines

  • OpenAPI playground

    Try endpoints with your own token

URL de base

API base
https://app.petrobench.com/api/v1

Créer un jeton

Agents should prefer service tokens for long-lived automation and PATs for personal experimentation.

1

Create a token

In the platform: Settings → API Keys (or division Service Tokens). Grant only the abilities you need.

2

Smoke-test

curl -sS -H "Authorization: Bearer $PB_TOKEN" \
  https://app.petrobench.com/api/v1/me
3

Open the playground

Browse generated endpoints and paste the same Bearer token into the auth banner.

Bonnes pratiques pour agents

  • Send Authorization: Bearer <token> on every call.
  • Multi-org users: set X-Organization-Id when required (see Authentication).
  • Respect rate limits and surface Retry-After to your agent loop.
  • Prefer idempotent reads first; gate writes behind human approval in the agent policy.

Liens profonds

Suivant

Sur cette page