Skip to content

Commit 9d823c9

Browse files
author
Bharathi Selvaraj
committed
Add reservoir ddms websocket tutorial
1 parent 05900a0 commit 9d823c9

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: "Tutorial: Use Reservoir DDMS websocket endpoints to work with reservoir data"
3+
titleSuffix: Microsoft Azure Data Manager for Energy
4+
description: "Learn to use OSDU Reservoir DDMS websocket APIs."
5+
author: bharathim
6+
ms.author: bselvaraj
7+
ms.service: azure-data-manager-energy
8+
ms.topic: tutorial #Don't change.
9+
ms.date: 02/12/2025
10+
11+
#customer intent: As a Data Manager, I want to learn how to use OSDU Reservoir DDMS websocket APIs to read reservoir data.
12+
13+
---
14+
15+
Use Reservoir Domain Data Management Services (DDMS) APIs in PowerShell to work with reservoir data in an Azure Data Manager for Energy resource.
16+
17+
In this tutorial, you learn how to use a Reservoir DDMS websocket endpoint to:
18+
19+
> [!div class="checklist"]
20+
> * Create the data space.
21+
> * Get the data space.
22+
> * Ingest an EPC file.
23+
> * Access the ingested data.
24+
> * Delete the dataspace.
25+
26+
27+
For more information about DDMS, see [DDMS concepts](concepts-ddms.md).
28+
29+
## Prerequisites
30+
31+
* [Azure Data Manager for Energy](quickstart-create-microsoft-energy-data-services-instance.md) resource created in your Azure subscription
32+
* Docker desktop client should be running on your system
33+
34+
## Configuration
35+
1. To connect to a remote server via WSS, you need an ETP SSL enabled client. Download a prebuild SSL client from the OSDU GitLab docker container registry.
36+
37+
```bash
38+
export SSLCLIENT_IMAGE=community.opengroup.org:5555/osdu/platform/domain-data-mgmt-services/reservoir/open-etp-server/open-etp-sslclient-main
39+
docker pull ${SSLCLIENT_IMAGE}
40+
docker tag ${SSLCLIENT_IMAGE} open-etp:ssl-client
41+
```
42+
43+
1. Follow [How to generate auth token](./how-to-generate-auth-token) to create a valid auth token. This token is used to authenticate the calls to server.
44+
45+
1. Set the following variables:
46+
```bash
47+
$RDDMS_URL='<adme_dns>/api/reservoir-ddms-etp/v2/'
48+
$PARTITION='<data_partition_name>'
49+
$TOKEN='<access_token>'
50+
```
51+
52+
## Using the websocket endpoints
53+
1. Create the data space:
54+
55+
```bash
56+
docker run -it --rm open-etp:ssl-client openETPServer space -S wss://${RDDMS_URL} --new -s <data_space_name> --data-partition-id ${PARTITION} --auth bearer --jwt-token ${TOKEN}
57+
```
58+
1. Get the data space:
59+
60+
```bash
61+
docker run -it --rm open-etp:ssl-client openETPServer space -S wss://${RDDMS_URL} -l --data-partition-id ${PARTITION} --auth bearer --jwt-token ${TOKEN}
62+
```
63+
64+
1. Ingest an EPC file:
65+
```bash
66+
docker run -it --rm -v <path_to_directory_containing_epc_file>:/data open-etp:ssl-client openETPServer space -S wss://${RDDMS_URL} -s <dataspace_name> --import-epc ./data/<epc_file_name> --data-partition-id ${PARTITION} --auth bearer --jwt-token ${TOKEN}
67+
```
68+
69+
1. Access the ingested data:
70+
```bash
71+
docker run -it --rm open-etp:ssl-client openETPServer space -S wss://${RDDMS_URL} -s <dataspace_name> --stats --data-partition-id ${PARTITION} --auth bearer --jwt-token ${TOKEN}
72+
```
73+
1. Delete the dataspace:
74+
```bash
75+
docker run -it --rm open-etp:ssl-client openETPServer space --delete -S wss://${RDDMS_URL} -s <dataspace_name> --data-partition-id ${PARTITION} --auth bearer --jwt-token ${TOKEN}
76+
```
77+
78+
## Related content
79+
* [How to use RDDMS web socket endpoints](https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/reservoir/open-etp-server/-/blob/main/docs/testing.md?ref_type=heads)

0 commit comments

Comments
 (0)