Difference between revisions of "Category: API"
(→Support) |
(→REST APIs for Petroleum Engineering) |
||
| Line 5: | Line 5: | ||
The pengtools [[:Category:pengtools | API]] gives programmatic access to the engineering calculators that power [https://www.pengtools.com www.pengtools.com]. | The pengtools [[:Category:pengtools | API]] gives programmatic access to the engineering calculators that power [https://www.pengtools.com www.pengtools.com]. | ||
| − | [[File: | + | [[File:pengtools_REST_API.png|thumb|right|300px| pengtools RESt API|right]] |
==Available APIs== | ==Available APIs== | ||
Revision as of 13:54, 16 July 2026
Contents
REST APIs for Petroleum Engineering
The pengtools API gives programmatic access to the engineering calculators that power www.pengtools.com.
Available APIs
- PVT API - Fluid properties calculator
Base URL
https://api.pengtools.com/Endpoints are addressed as <base>/<resource>/<action>, e.g.
https://api.pengtools.com/pvt-calculator/calc. All examples below use this base URL.
Authentication
Every request must include an API key as a Bearer token:
Authorization: Bearer <api_key>
A key is a single opaque token. It is stored only as a salted hash on the server, so the plaintext is shown once, at creation time, and cannot be recovered afterwards.
Getting a key
Manage your keys in the accounts portal:
- Sign in at accounts.pengtools.com.
- Open the API keys section of your profile.
- Click Create to issue a new key, optionally giving it a name.
The new token is displayed once, right after creation. Copy it immediately and store it as a secret (environment variable, secrets manager). If you lose it, revoke the key on the same page and create a new one. The page also lists your existing keys (without the plaintext) and lets you revoke any of them.
A request with no key, or an invalid/revoked key, returns HTTP 401.
Response envelope
Every JSON response is wrapped in a uniform envelope:
{ "success": true, "data": { "...": "..." } }
{ "success": false, "data": { "errors": { "...": "..." } } }
success mirrors the HTTP status (2xx → true). Validation problems return 422, rate-limit rejections return 429.
Quickstart
Support
For questions or issues contact us at contact page.
Pages in category "API"
The following 2 pages are in this category, out of 2 total.
