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/ https //www postman com/downloads/ 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 click on the 'certificates' tab and then 'add certificate' 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 docid\ hro4lnngi79gn1ww2y ma 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 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 https //github com/xectadigitallabs/platform data client/blob/main/production openapiaspecification json once you download the oas file, import the project into postman to do this click on the apis tab click 'create an api' click the import button select the file which you had downloaded from the github repo listed above click the import button to finalize the import now you should see the project imported into postman and you can begin looking at the endpoints 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 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 next, click the authorization tab and select basic auth here you will input your client id for the username, and client secret as the password these were provided to you via sendsafely 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 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 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 https //data onxecta com/ navigate to the authorization tab, and select the bearer token type from the drop down paste your previously generated access token into the token field here 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" 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 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 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 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 api delete request delete requests allow you to remove data previously imported into the system 1 delete single well 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