Developer Docs
API Quick Start Tutorials

Postman Tutorial

This tutorial will guide you through the installation of Postman API analyzer and how to test your Signed mTLS Certificate files and your API Keys.

We recommend that developers use our sandbox environment for IT tests, integration tests and initial data push/pull tests.

Configure Postman

1: Install Postman

To get started, download the Postman app: https://www.postman.com/downloads/

Document image


Click the download button to install the Postman App, then follow the instructions to configure Postman on your machine

Once it is installed, continue to the next tutorial to configure mTLS

Please Note:

The download button will show the required version you need for your specific operating system.



2: Configure mTLS Certificate in Postman

Go to the Gear Icon and click 'Settings' in Postman

Document image


Click on the 'Certificates' tab and then 'Add Certificate'

Document image


Enter the following information:

  • Host - Enter the host for the environment you would like to access
  • CRT File - This is your xecta-data-api.pem
  • KEY File - This is your xecta-data-api.key

Your signed certificate (PEM and KEY) is generated as part of the mTLS & API Key Creation tutorial

For the tutorial screens below, use the following REST URLs for the host baseURL:

Stage Environment: data-stage.onxecta.com

Production Environment: data.onxecta.com



Document image


Last step is to click the 'Add' button

3: Import Project in Postman

Download the OAS file to import into Postman here: Production OAS File

Once you download the OAS file, import the project into Postman. To do this:

  1. Click on the APIs Tab
  2. Click 'Create an API'
Document image

  1. Click the Import Button
  2. Select the file which you had downloaded from the GitHub repo listed above
  3. Click the Import Button to finalize the import
Document image

Document image


Now you should see the project imported into Postman and you can begin looking at the endpoints

Document image



Testing API Credentials

1: Setup Basic Auth

To begin, start a new empty POST request with the URL: https://prod.authenticate.onxecta.com/oauth2/token?grant_type=client_credentials

Verify in the Params tab that there is a KEY entry for grant_type with a value of client_credentials

Document image


Next, click the Authorization tab and select Basic Auth

Document image


Here you will input your Client ID for the Username, and Client Secret as the password. These were provided to you via SendSafely

Document image


The above Username is a fake generated Username for instruction purposes only. It does not tie to any App Client in AWS Cognito

2: Setup Headers

Next, navigate to the Headers tab. You will need to add a Content-Type Header with the value application/x-www-form-urlencoded as shown below

Document image


3: Get the Access Token

Now you are all set up! Click the Send button and you will get an access token returned if everything was set up correctly. It will look similar to this below

Document image


4: Test the Xecta API

The final step is to run a query against the Xecta API.

Copy the Access token from the step above and open an API endpoint from the left side, which was imported into Postman previously

Set the URL to point to the Production Environment: https://data.onxecta.com

Document image


Navigate to the Authorization tab, and select the Bearer Token Type from the drop down

Document image


Paste your previously generated Access token into the Token field here

Document image


Click Send, you should get a 200 OK response

You are now fully connected to the Xecta API!



Testing API Requests

The following sections provide specific examples to accomplish various tasks with the API endpoints.

API GET Request

GET requests retrieve data already imported into the system

1: Fetch Multiple Wells

Uncheck Query Params of "offset" and "limit"

Document image


2: Fetch Single Well

Insert value for Path Variable - uwi

  • Example: uwi: enim
  • Empty results with 200 OK response will be returned if queried uwi doesn't exist in database
Document image


3. Fetch Daily Production Records

Insert value for Path Variable - uwi

  • Example: uwi: enim
  • Empty results with 200 OK response will be returned if queried uwi doesn't exist in database
Document image


API POST Request

POST requests allow you to submit data for import

1: Bulk Add/ Update Well Data

In Body, specify data to be added to the Well

Document image

Document image


200 OK response returned when data has been successfully added/ updated to Well

2: Bulk Add / Update Daily Production Data

In Body, specify data to be added to the Daily Production

  • uwi of new data has to exist in Well, otherwise 400 Bad Request response will be returned
Document image


API DELETE Request

Delete requests allow you to remove data previously imported into the system

1: Delete Single Well

Document image


Insert value for uwi. 200 OK returned if data has been deleted successfully; 400 Bad Request returned if uwi doesn't exist in database.

2: Delete Daily Production Record

Insert value for xid. 200 OK returned if data has been deleted successfully; 400 Bad Request returned if xid doesn't exist in database.

Updated 06 Jun 2024
Doc contributor
Did this page help you?