# Best Practices

Petro.ai's API is constantly evolving with new collections and endpoints for users to pull from. With that in mind, we try to keep the information as up-to-date as possible.

# Postman

Debugging API requests in scripts is tedious and error prone. The Postman application reduces this friction by constructing of requests adhoc. You can create and save calls and send requests with the following body types (referenced from site):

  • URL-encoded – The default content type for sending simple text data
  • multipart/form-data – For sending large quantities of binary data or text containing non-ASCII characters
  • Raw body editing – For sending data without any encoding
  • Binary data – For sending image, audio, video, or text files

Download Postman here

# Known issues

  • Data type entwining (DB Normalization): Data type endpoints do not account for normalized data across multiple data types. This is especially relevant to Wells and Well Identifiers.
  • Be aware that some data types are missing some HTTP methods—don’t assume availability and use the API documentation.
  • HTTP Response codes are always 200 :’(

# Warnings

WARNING

API Doc Models do not reflect default values (e.g. isDeleted ≠ true)

WARNING

Missing fields in POSTs and PUTs will get default values and default values are not shown in the API Docs

WARNING

A new document will be created if the ID/PWI provided cannot be found.

WARNING

GET currently has no parameter for finding values that are soft deleted.