|
| 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 | +# Tutorial: Use Reservoir DDMS websocket API endpoints |
| 15 | + |
| 16 | +Use Reservoir Domain Data Management Services (DDMS) APIs in PowerShell to work with reservoir data in an Azure Data Manager for Energy resource. |
| 17 | + |
| 18 | +In this tutorial, you learn how to use a Reservoir DDMS websocket endpoint to: |
| 19 | + |
| 20 | +> [!div class="checklist"] |
| 21 | +> * Create the data space. |
| 22 | +> * Get the data space. |
| 23 | +> * Ingest an EPC file. |
| 24 | +> * Access the ingested data. |
| 25 | +> * Delete the dataspace. |
| 26 | +
|
| 27 | + |
| 28 | +For more information about DDMS, see [DDMS concepts](concepts-ddms.md). |
| 29 | + |
| 30 | +## Prerequisites |
| 31 | + |
| 32 | +* [Azure Data Manager for Energy](quickstart-create-microsoft-energy-data-services-instance.md) resource created in your Azure subscription |
| 33 | +* Docker desktop client should be running on your system |
| 34 | + |
| 35 | +## Configuration |
| 36 | +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. |
| 37 | + |
| 38 | + ```bash |
| 39 | + export SSLCLIENT_IMAGE=community.opengroup.org:5555/osdu/platform/domain-data-mgmt-services/reservoir/open-etp-server/open-etp-sslclient-main |
| 40 | + docker pull ${SSLCLIENT_IMAGE} |
| 41 | + docker tag ${SSLCLIENT_IMAGE} open-etp:ssl-client |
| 42 | + ``` |
| 43 | + |
| 44 | +1. Follow [How to generate auth token](how-to-generate-auth-token.md) to create a valid auth token. This token is used to authenticate the calls to server. |
| 45 | + |
| 46 | +1. Set the following variables: |
| 47 | + ```bash |
| 48 | + $RDDMS_URL='<adme_dns>/api/reservoir-ddms-etp/v2/' |
| 49 | + $PARTITION='<data_partition_name>' |
| 50 | + $TOKEN='<access_token>' |
| 51 | + ``` |
| 52 | + |
| 53 | +## Using the websocket endpoints |
| 54 | +1. Create the data space: |
| 55 | + |
| 56 | + ```bash |
| 57 | + 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} |
| 58 | + ``` |
| 59 | +1. Get the data space: |
| 60 | + |
| 61 | + ```bash |
| 62 | + docker run -it --rm open-etp:ssl-client openETPServer space -S wss://${RDDMS_URL} -l --data-partition-id ${PARTITION} --auth bearer --jwt-token ${TOKEN} |
| 63 | + ``` |
| 64 | + |
| 65 | +1. Ingest an EPC file: |
| 66 | + ```bash |
| 67 | + 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} |
| 68 | + ``` |
| 69 | + |
| 70 | +1. Access the ingested data: |
| 71 | + ```bash |
| 72 | + 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} |
| 73 | + ``` |
| 74 | +1. Delete the dataspace: |
| 75 | + ```bash |
| 76 | + 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} |
| 77 | + ``` |
| 78 | + |
| 79 | +## Related content |
| 80 | +* [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) |
| 81 | +* [Use Reservoir DDMS APIs](tutorial-reservoir-ddms-apis.md) |
0 commit comments