Tutorial: Work with well data records by using Well Delivery DDMS APIs
Use Well Delivery Domain Data Management Services (Well Delivery DDMS) APIs in Postman to work with well data in your instance of Microsoft Energy Data Services Preview.
In this tutorial, you'll learn how to:
- Set up Postman to use a Well Delivery DDMS collection.
- Set up Postman to use a Well Delivery DDMS environment.
- Send requests via Postman.
- Generate an authorization token.
- Use Well Delivery DDMS APIs to work with well data records.
Important
Microsoft Energy Data Services is currently in preview. For legal terms that apply to features that are in beta, in preview, or otherwise not yet released into general availability, see the Supplemental Terms of Use for Microsoft Azure Previews.
Microsoft Energy Data Services requires registration and is available to only approved customers and partners during the preview period. To request access to Microsoft Energy Data Services during the preview period, use this form.
For more information about DDMS, see DDMS concepts.
Prerequisites
- An Azure subscription
- An instance of Microsoft Energy Data Services Preview created in your Azure subscription
Get your Microsoft Energy Data Services instance details
The first step is to get the following information from your Microsoft Energy Data Services Preview instance in the Azure portal:
Parameter | Value | Example |
---|---|---|
CLIENT_ID | Application (client) ID | 3dbbbcc2-f28f-44b6-a5ab-xxxxxxxxxxxx |
CLIENT_SECRET | Client secrets | _fl****************** |
TENANT_ID | Directory (tenant) ID | 72f988bf-86f1-41af-91ab-xxxxxxxxxxxx |
SCOPE | Application (client) ID | 3dbbbcc2-f28f-44b6-a5ab-xxxxxxxxxxxx |
base_uri | URI | <instance>.energy.azure.com |
data-partition-id | Data Partition(s) | <instance>-<data-partition-name> |
You'll use this information later in the tutorial.
Set up Postman
Next, set up Postman:
Download and install the Postman desktop app.
Import the following files in Postman:
To import the files:
In the Postman environment, update CURRENT VALUE with the information from your Microsoft Energy Data Services instance:
In Postman, in the left menu, select Environments, and then select WellDelivery Environment.
In the CURRENT VALUE column, enter the information that's described in the table in Get your Microsoft Energy Data Services instance details. Scroll to see all relevant variables.
Send a Postman request
The Postman collection for Well Delivery DDMS contains requests you can use to interact with data about wells, wellbores, well logs, and well trajectory data in your Microsoft Energy Data Services instance.
For an example of how to send a Postman request, see the Wellbore DDMS tutorial.
In the next sections, generate a token, and then use it to work with Well Delivery DDMS APIs.
Generate a token to use in APIs
To generate a token:
Import the following cURL command in Postman to generate a bearer token. Use the values from your Microsoft Energy Data Services instance.
curl --location --request POST 'https://login.microsoftonline.com/{{TENANT_ID}}/oauth2/v2.0/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'client_id={{CLIENT_ID}}' \ --data-urlencode 'client_secret={{CLIENT_SECRET}}' \ --data-urlencode 'scope={{SCOPE}}'
Use the token output to update
access_token
in your Well Delivery DDMS environment. Then, you can use the bearer token as an authorization type in other API calls.
Use Well Delivery DDMS APIs to work with well data records
Successfully completing the Postman requests that are described in the following Well Delivery DDMS APIs indicates successful ingestion and retrieval of well records in your Microsoft Energy Data Services instance.
Create a well
Create a well record.
API: UC1 > entity_create well
Method: PUT
Create a wellbore
Create a wellbore record.
API: UC1 > entity_create wellbore
Method: PUT
Get a well version
Get a well record based on a specific well ID.
API: UC1 > entity_create well Copy
Method: GET
Create an activity plan
Create an activity plan.
API: UC1 > entity_create activityplan
Method: PUT
Get activity plan by well ID
Get the activity plan object for a specific well ID.
API: UC2 > activity_plans_by_well
Method: GET
Delete a wellbore record
You can delete a wellbore record in your Microsoft Energy Data Services instance by using Well Delivery DDMS APIs. For example:
Delete a well record
You can delete a well record in your Microsoft Energy Data Services instance by using Well Delivery DDMS APIs. For example:
Next steps
Go to the next tutorial to learn how to use work with well data by using Wellbore DDMS APIs:
Feedback
Submit and view feedback for