Tutorial: Work with well data records by using Wellbore DDMS APIs

Use Wellbore Domain Data Management Services (Wellbore 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 Wellbore DDMS collection.
  • Set up Postman to use a Wellbore DDMS environment.
  • Send requests via Postman.
  • Generate an authorization token.
  • Use Wellbore 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

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:

  1. Download and install the Postman desktop app.

  2. Import the following files in Postman:

    To import the files:

    1. Create two JSON files on your computer by copying the data that's in the collection and environment files.

    2. In Postman, select Import > Files > Choose Files, and then select the two JSON files on your computer.

    3. In Import Entities in Postman, select Import.

      Screenshot that shows importing collection and environment files in Postman.

  3. In the Postman environment, update CURRENT VALUE with the information from your Microsoft Energy Data Services instance:

    1. In Postman, in the left menu, select Environments, and then select Wellbore DDMS Environment.

    2. In the CURRENT VALUE column, enter the information that's described in the table in Get your Microsoft Energy Data Services instance details.

    Screenshot that shows where to enter current values in the Wellbore DDMS environment.

Send an example Postman request

The Postman collection for Wellbore 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.

  1. In Postman, in the left menu, select Collections, and then select Wellbore DDMS. Under Setup, select Get an SPN Token.

  2. In the environment dropdown in the upper-right corner, select Wellbore DDMS Environment.

    Screenshot that shows the Get an SPN Token setup and selecting the environment.

  3. To send the request, select Send.

    Screenshot that shows the Send button for a request in Postman.

  4. The request validates the actual API response code against the expected response code. Select the Test Results tab to see whether the request succeeded or failed.

    Example of a successful Postman call:

    Screenshot that shows success for a Postman call.

    Example of a failed Postman call:

    Screenshot that shows failure for a Postman call.

Generate a token to use in APIs

To generate a token:

  1. 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}}'  
    

    Screenshot of the Wellbore DDMs generate token cURL code.

  2. Use the token output to update access_token in your Wellbore DDMS environment. Then, you can use the bearer token as an authorization type in other API calls.

Use Wellbore DDMS APIs to work with well data records

Successfully completing the Postman requests that are described in the following Wellbore DDMS APIs indicates successful ingestion and retrieval of well records in your Microsoft Energy Data Services instance.

Create a legal tag that's automatically added to your Wellbore DDMS environment for data compliance.

API: Setup > Create Legal Tag for WDMS

Method: POST

Screenshot that shows the API that creates a legal tag.

For more information, see Manage legal tags.

Create a well

Create a well record in your Microsoft Energy Data Services instance.

API: Well > Create Well.

Method: POST

Screenshot that shows the API that creates a well.

Get a well record

Get the well record data for your Microsoft Energy Data Services instance.

API: Well > Well

Method: GET

Screenshot that shows the API that gets all wells.

Get well versions

Get the versions of each ingested well record in your Microsoft Energy Data Services instance.

API: Well > Well versions

Method: GET

Screenshot that shows the API that gets all well versions.

Get a specific well version

Get the details of a specific version for a specific well record in your Microsoft Energy Data Services instance.

API: Well > Well Specific version

Method: GET

Screenshot that shows the API that gets a specific well version.

Delete a well record

Delete a specific well record from your Microsoft Energy Data Services instance.

API: Clean up > Well Record

Method: DELETE

Screenshot that shows the API that deletes a well record.

Next steps

Go to the Seismic Store DDMS sdutil tutorial to learn how to use sdutil to load seismic data into Seismic Store: