API para agentes
Tokens, first calls, and the OpenAPI playground for agent builders
PetroBench API
Versioned REST for agents and integrations. Same permissions as your users.
What it is
A versioned REST surface at app.petrobench.com/api/v1. Same auth and abilities as MCP - raw HTTP when you need full control.
What it does
Lets agents and scripts call wells, simulations, and account endpoints with the same scopes as your users. Admin enables the feature flag.
- Tokens & OAuth
PATs, service tokens, or OAuth clients
- Exact HTTP
Versioned REST for agents and scripts
- OpenAPI playground
Try endpoints with your Bearer token
URL base
https://app.petrobench.com/api/v1Crear un token
Agents should prefer service tokens for long-lived automation and PATs for personal experimentation.
Create a token
In the platform: Settings → API Keys (or division Service Tokens). Grant only the abilities you need.
Smoke-test
curl -sS -H "Authorization: Bearer $PB_TOKEN" \
https://app.petrobench.com/api/v1/me
Open the playground
Browse generated endpoints and paste the same Bearer token into the auth banner.
Hábitos para agentes
- Send
Authorization: Bearer <token>on every call. - Multi-org users: set
X-Organization-Idwhen required (see Authentication). - Respect rate limits and surface
Retry-Afterto your agent loop. - Prefer idempotent reads first; gate writes behind human approval in the agent policy.
Enlaces profundos
| Topic | Link |
|---|---|
| Getting started | /enterprise/api/getting-started |
| Authentication & scopes | /enterprise/api/authentication |
| Errors | /enterprise/api/errors |
| Pagination | /enterprise/api/pagination |
| Full MCP catalog | /enterprise/api/mcp |