Difference between revisions of "Category: API"

From wiki.pengtools.com
Jump to: navigation, search
(Getting a key)
(Support)
 
(10 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
==REST APIs for Petroleum Engineering==
 
==REST APIs for Petroleum Engineering==
  
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:pengtools_REST_API.png|center|right|600px| pengtools REST API|right]]
 
 
[[File:EPPortal.png|thumb|right|300px|link=https://ep.pengtools.com/| E&P Portal|right]]
 
  
 
==Available APIs==
 
==Available APIs==
Line 32: Line 30:
 
# Open the API keys section of your profile.
 
# Open the API keys section of your profile.
 
# 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.
 +
  
 
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 46: Line 46:
 
</pre>
 
</pre>
  
success mirrors the HTTP status (2xx → true). Validation problems return 422, rate-limit rejections return 429. See the error reference for details.
+
success mirrors the HTTP status (2xx → true). Validation problems return 422, rate-limit rejections return 429.
 
 
==Getting Started==
 
  
1. [[Authentication]] - API key setup
+
==Quickstart==
2. [[API Reference]] - Endpoint documentation
 
3. [[Rate Limits]] - Usage policies
 
  
 
==Support==
 
==Support==
  
For questions or issues, contact [[Support]] or visit our [https://www.pengtools.com/contact contact page].
+
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

REST APIs for Petroleum Engineering

The pengtools API gives programmatic access to the engineering calculators that power www.pengtools.com.
pengtools REST API

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:

  1. Sign in at accounts.pengtools.com.
  2. Open the API keys section of your profile.
  3. Click Create to issue a new key, optionally giving it a name.
  4. 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.