Skip to content

Commit 2462dfe

Browse files
author
Preeti Singh
committed
fixing pds
1 parent c86c3e8 commit 2462dfe

File tree

1 file changed

+58
-89
lines changed

1 file changed

+58
-89
lines changed

articles/energy-data-services/tutorial-petrel-ddms.md

Lines changed: 58 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,54 @@
11
---
22
title: "Tutorial: Work with Petrel data records by using Petrel DDMS APIs"
33
titleSuffix: Microsoft Azure Data Manager for Energy
4-
description: Learn how to work with Petrel data records in your Azure Data Manager for Energy instance by using Petrel Domain Data Management Services (DDMS) APIs in Postman.
4+
description: Learn how to work with Petrel data records in your Azure Data Manager for Energy instance by using Petrel Domain Data Management Services (DDMS) APIs.
55
author: nikarsky
66
ms.author: nikarsky
77
ms.service: azure-data-manager-energy
88
ms.topic: tutorial
9-
ms.date: 2/07/2023
9+
ms.date: 22/07/2025
1010
ms.custom: template-tutorial
1111

1212
#Customer intent: As a developer, I want to learn how to use the Petrel DDMS APIs so that I can store and retrieve similar kinds of data records.
1313
---
1414

1515
# Tutorial: Work with Petrel data records by using Petrel DDMS APIs
1616

17-
Use Petrel Domain Data Management Services (DDMS) APIs in Postman to work with Petrel data in your instance of Azure Data Manager for Energy.
17+
Use Petrel Domain Data Management Services (DDMS) APIs to work with Petrel data in your instance of Azure Data Manager for Energy.
1818

19-
In this tutorial, you learn how to:
19+
In this tutorial, you learn to :
2020

2121
> [!div class="checklist"]
22-
>
23-
> - Set up Postman to use a Petrel DDMS collection.
24-
> - Set up Postman to use a Petrel DDMS environment.
25-
> - Send requests via Postman.
2622
> - Generate an authorization token.
2723
> - Use Petrel DDMS APIs to work with Petrel data records and projects.
2824
2925
For more information about DDMS, see [DDMS concepts](concepts-ddms.md).
3026

3127
## Prerequisites
28+
* An Azure subscription
29+
* An instance of [Azure Data Manager for Energy](quickstart-create-microsoft-energy-data-services-instance.md) created in your Azure subscription
30+
* cURL command-line tool installed on your machine
31+
* Generate the service principal access token to call the Seismic APIs. See [How to generate auth token](how-to-generate-auth-token.md).
3232

33-
- An Azure subscription
34-
- An instance of [Azure Data Manager for Energy](quickstart-create-microsoft-energy-data-services-instance.md) created in your Azure subscription
33+
### Get details for the Azure Data Manager for Energy instance
3534

36-
## Get your Azure Data Manager for Energy instance details
35+
* For this tutorial, you need the following parameters:
3736

38-
The first step is to get the following information from your [Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md) in the [Azure portal](https://portal.azure.com/?microsoft_azure_marketplace_ItemHideKey=Microsoft_Azure_OpenEnergyPlatformHidden):
37+
| Parameter | Value to use | Example | Where to find this value |
38+
|----|----|----|----|
39+
| `DNS` | URI | `<instance>.energy.azure.com` | Find this value on the overview page of the Azure Data Manager for Energy instance. |
40+
| `data-partition-id` | Data partitions | `<data-partition-id>` | Find this value on the Data Partitions section within the Azure Data Manager for Energy instance. |
41+
| `access_token` | Access token value | `0.ATcA01-XWHdJ0ES-qDevC6r...........`| Follow [How to generate auth token](how-to-generate-auth-token.md) to create an access token and save it.|
3942

40-
| Parameter | Value | Example |
41-
| ------------------ | ------------------------ |-------------------------------------- |
42-
| `CLIENT_ID` | Application (client) ID | `3dfxxxxxxxxxxxxxxxxxxxxxx` |
43-
| `CLIENT_SECRET` | Client secrets | `_fl******************` |
44-
| `TENANT_ID` | Directory (tenant) ID | `72fxxxxxxxxxxxx` |
45-
| `SCOPE` | Application (client) ID | `3dfxxxxxxxxxxxxxxxxxxxxxxx` |
46-
| `HOSTNAME` | URI | `<instance>.energy.azure.com` |
47-
| `DATA_PARTITION_ID` | Data partitions | `<data-partition-id>` |
43+
Follow the [Manage users](how-to-manage-users.md) guide to add appropriate entitlements for the user who's running this tutorial.
4844

49-
You'll use this information later in the tutorial.
45+
### Set up your environment
5046

51-
## Set up Postman
52-
53-
1. Download and install the [Postman](https://www.postman.com/downloads/) desktop app.
54-
55-
1. Import the following file in Postman: [Petrel DDMS Postman collection](https://raw.githubusercontent.com/microsoft/meds-samples/main/postman/PetrelDSv2.postman_collection.json).
56-
57-
1. Create a Postman environment by using the values that you obtained earlier. The environment should look something like this example:
58-
59-
:::image type="content" source="media/tutorial-petrel-ddms/pdsv2-env-postman.png" alt-text="Screenshot that shows an example Postman environment." lightbox="media/tutorial-petrel-ddms/pdsv2-env-postman.png":::
47+
Ensure you have `cURL` installed on your system. You will use it to make API calls.
6048

6149
## Generate a token to use in APIs
6250

63-
The Postman collection for Petrel DDMS contains requests that you can use to interact with your Petrel projects. It also contains a request to query current Petrel projects and records in your Azure Data Manager for Energy instance.
64-
65-
1. In Postman, on the left menu, select **Collections**, and then select **Petrel DDMS**. Under **Setup**, select **Get Token**.
66-
67-
1. In the environment dropdown list in the upper-right corner, select **Petrel DDMS Environment**.
68-
69-
1. To send the request, select **Send**.
70-
71-
This request generates an access token and assigns it as the authorization method for future requests.
72-
73-
You can also generate a token by using the cURL command in Postman or a terminal to generate a bearer token. Use the values from your Azure Data Manager for Energy instance.
51+
You can also generate a token by using the cURL command to generate a bearer token. Use the values from your Azure Data Manager for Energy instance.
7452

7553
```bash
7654
curl --location --request POST 'https://login.microsoftonline.com/{{TENANT_ID}}/oauth2/v2.0/token' \
@@ -81,21 +59,44 @@ You can also generate a token by using the cURL command in Postman or a terminal
8159
--data-urlencode 'scope={{SCOPE}}'
8260
```
8361

84-
To use this cURL-generated token, you must update `access_token` in your `Collection` variables with the value after `Bearer` in the response.
85-
8662
## Use Petrel DDMS APIs to work with Petrel projects
8763

88-
Successfully completing the Postman requests that are described in the following Petrel DDMS APIs indicates successful interaction with your saved Petrel projects. Although the API provides a way to upload data, we recommend that you upload your projects via DELFI Petrel Project Explorer. All of the following API calls assume that you have a project uploaded to Petrel Project Explorer.
64+
Successfully completing the API calls that are Present in [swagger](https://microsoft.github.io/adme-samples/rest-apis/index.html?page=/adme-samples/rest-apis/M23/petrel_ddms_openapi.yaml) indicates successful interaction with your saved Petrel projects. Although the API provides a way to upload data, we recommend that you upload your projects via DELFI Petrel Project Explorer. All of the following API calls assume that you have a project uploaded to Petrel Project Explorer.
8965

9066
### Create a legal tag
9167

92-
Create a legal tag that's automatically added to your Petrel DDMS environment for data compliance.
68+
Create a legal tag that's automatically added to your Wellbore DDMS environment for data compliance.
9369

94-
API: **Setup** > **Create Legal Tag for PDS**
70+
Run the following `cURL` command to create a legal tag:
9571

96-
Method: `POST`
72+
```bash
73+
curl -X POST "https://<DNS>/api/legal/v1/legaltags" \
74+
-H "Authorization: Bearer <access_token>" \
75+
-H "Content-Type: application/json" \
76+
-H "data-partition-id: <data-partition-id>" \
77+
-d '{
78+
"name": "LegalTagName",
79+
"description": "Legal Tag added for Well",
80+
"properties": {
81+
"contractId": "123456",
82+
"countryOfOrigin": ["US", "CA"],
83+
"dataType": "Third Party Data",
84+
"exportClassification": "EAR99",
85+
"originator": "xyz",
86+
"personalData": "No Personal Data",
87+
"securityClassification": "Private",
88+
"expirationDate": "2025-12-25"
89+
}
90+
}'
91+
```
9792

98-
:::image type="content" source="media/tutorial-petrel-ddms/create-legal-tag-pdsv2.png" alt-text="Screenshot that shows the API that creates a legal tag." lightbox="media/tutorial-petrel-ddms/create-legal-tag-pdsv2.png":::
93+
**Sample Response:**
94+
```json
95+
{
96+
"name": "LegalTagName",
97+
"status": "Created"
98+
}
99+
```
99100

100101
For more information, see [Manage legal tags](how-to-manage-legal-tags.md).
101102

@@ -104,62 +105,38 @@ For more information, see [Manage legal tags](how-to-manage-legal-tags.md).
104105
For users to have the proper permissions to make Petrel DDMS API calls, they must be part of the `users.datalake.admins@{data-partition-id}.dataservices.energy` entitlement group. This call adds a user to the proper group.
105106

106107
The user in this case is the client ID or OID in the token that's used for authentication. For example, if you generate a token by using a client ID of `8cdxxxxxxxxxxxx`, you must add `8cdxxxxxxxxxxxx` to the `users.datalake.admins` group.
107-
108-
API: **Setup** > **Add User to DATALAKE Admins**
109-
110-
Method: `POST`
111-
112-
:::image type="content" source="media/tutorial-petrel-ddms/add-user-to-entitlements-pdsv2.png" alt-text="Screenshot that shows the API that adds user to entitlements." lightbox="media/tutorial-petrel-ddms/add-user-to-entitlements-pdsv2.png":::
108+
Follow the [Manage users](how-to-manage-users.md) guide to add appropriate entitlements for the user .
113109

114110
### Get a project
115111

116112
Use a project ID to return the corresponding Petrel project record in your Azure Data Manager for Energy instance.
117113

118-
API: *Project* > **Get Project**
119-
120-
Method: `GET`
114+
[API](https://microsoft.github.io/adme-samples/rest-apis/index.html?page=/adme-samples/rest-apis/M23/petrel_ddms_openapi.yaml#/Projects/get_api_petreldms_v1_projects__projectId_)
121115

122-
:::image type="content" source="media/tutorial-petrel-ddms/get-projects-pdsv2.png" alt-text="Screenshot that shows the API that gets a project." lightbox="media/tutorial-petrel-ddms/get-projects-pdsv2.png":::
123116

124117
### Delete a project
125118

126119
Use a project ID to delete a project and the associated Petrel project record data in your Azure Data Manager for Energy instance.
127120

128-
API: *Project* > **Delete Project**
129-
130-
Method: `DELETE`
131-
132-
:::image type="content" source="media/tutorial-petrel-ddms/delete-project-pdsv2.png" alt-text="Screenshot that shows the API that deletes a project." lightbox="media/tutorial-petrel-ddms/delete-project-pdsv2.png":::
121+
[API](https://microsoft.github.io/adme-samples/rest-apis/index.html?page=/adme-samples/rest-apis/M23/petrel_ddms_openapi.yaml#/Projects/post_api_petreldms_v1_projects__projectId_)
133122

134123
### Get a project version
135124

136125
Use a project ID and a version ID to get the Petrel version record that's associated with the project and version in your Azure Data Manager for Energy instance.
137126

138-
API: *Project* > **Get Project Version**
139-
140-
Method: `GET`
141-
142-
:::image type="content" source="media/tutorial-petrel-ddms/get-project-version-pdsv2.png" alt-text="Screenshot that shows the API that gets a project version." lightbox="media/tutorial-petrel-ddms/get-project-version-pdsv2.png":::
127+
[API](https://microsoft.github.io/adme-samples/rest-apis/index.html?page=/adme-samples/rest-apis/M23/petrel_ddms_openapi.yaml#/Projects/get_api_petreldms_v1_projects__projectId__versions__versionId_)
143128

144129
### Get a project download URL
145130

146131
Use a project ID to get a shared access signature (SAS) URL so you can download the data of the corresponding project from your Azure Data Manager for Energy instance.
147132

148-
API: *Project* > **Get Project Download**
149-
150-
Method: `GET`
151-
152-
:::image type="content" source="media/tutorial-petrel-ddms/get-download-url-pdsv2.png" alt-text="Screenshot that shows the API that gets a project download URL." lightbox="media/tutorial-petrel-ddms/get-download-url-pdsv2.png":::
133+
[API](https://microsoft.github.io/adme-samples/rest-apis/index.html?page=/adme-samples/rest-apis/M23/petrel_ddms_openapi.yaml#/Projects/get_api_petreldms_v1_projects__projectId__download)
153134

154135
### Get a project upload URL
155136

156137
Use a project ID to get two SAS URLs. One URL uploads data to the corresponding project in your Azure Data Manager for Energy instance. The other URL downloads data from the corresponding project in your Azure Data Manager for Energy instance.
157138

158-
API: *Project* > **Get Signed Upload URL**
159-
160-
Method: `POST`
161-
162-
:::image type="content" source="media/tutorial-petrel-ddms/get-upload-url-pdsv2.png" alt-text="Screenshot that shows the API that gets a project upload URL." lightbox="media/tutorial-petrel-ddms/get-upload-url-pdsv2.png":::
139+
[API](https://microsoft.github.io/adme-samples/rest-apis/index.html?page=/adme-samples/rest-apis/M23/petrel_ddms_openapi.yaml#/Projects/post_api_petreldms_v1_projects__projectId__upload)
163140

164141
Your SAS upload URL should look something like this example:
165142

@@ -175,25 +152,17 @@ Making a `PUT` call to this URL uploads the contents of `body` to the blob stora
175152

176153
Use a project ID and a SAS upload URL to update a Petrel project record in Azure Data Manager for Energy with the new values. You can also upload data to a project if you want.
177154

178-
API: *Project* > **Update Project**
179-
180-
Method: `PUT`
181-
182-
:::image type="content" source="media/tutorial-petrel-ddms/update-project-pdsv2.png" alt-text="Screenshot that shows the API that updates a project." lightbox="media/tutorial-petrel-ddms/update-project-pdsv2.png":::
155+
[API](https://microsoft.github.io/adme-samples/rest-apis/index.html?page=/adme-samples/rest-apis/M23/petrel_ddms_openapi.yaml#/Projects/put_api_petreldms_v1_projects__projectId__update)
183156

184157
### Search through projects
185158

186-
You can search through Petrel projects by using many fields. The call returns all matching project IDs. The API supports:
159+
You can search through Petrel projects by using many fields. The call returns all matching project IDs. The Search API supports:
187160

188161
- Full-text search on string fields.
189162
- Range queries based on date, numeric, or string fields.
190163
- Geospatial search.
191164

192-
API: *Project* > **Search Projects**
193-
194-
Method: `POST`
195-
196-
:::image type="content" source="media/tutorial-petrel-ddms/search-projects-pdsv2.png" alt-text="Screenshot that shows the API that deletes a well record." lightbox="media/tutorial-petrel-ddms/search-projects-pdsv2.png":::
165+
[API](https://microsoft.github.io/adme-samples/rest-apis/index.html?page=/adme-samples/rest-apis/M23/search_openapi.yaml#/search-api/queryRecords)
197166

198167
## Related content
199168

0 commit comments

Comments
 (0)