Difference between revisions of "Category: API"
(→Getting a key) |
(→Support) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 31: | Line 31: | ||
# Click Create to issue a new key, optionally giving it a name. | # Click Create to issue a new key, optionally giving it a name. | ||
# Contact us at [mailto:support@pengtools.com support@pengtools.com] to activate your API trial license. | # Contact us at [mailto:support@pengtools.com support@pengtools.com] to activate your API trial license. | ||
| + | |||
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. | 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. | ||
| Line 51: | Line 52: | ||
==Support== | ==Support== | ||
| − | For questions or issues contact us at [ | + | For questions or issues contact us at [mailto:support@pengtools.com support@pengtools.com]. |
[[Category:APT]] | [[Category:APT]] | ||
Latest revision as of 16:01, 22 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.
- Contact us at support@pengtools.com to activate your API trial license.
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 support@pengtools.com.
Pages in category "API"
The following 2 pages are in this category, out of 2 total.
