This postman collection includes all REST API calls available for Azure Data Manager for Energy (ADME) M18 core services. It is based on the native OSDU APIs, so it could also be used for anyone running a self-managed version of the OSDU M18 release.
The services mentioned below are covered, and the API calls are imported from the official ADME documentation.
- CRS Catalog
- CRS Converter
- Dataset
- EDS DMS
- Entitlements
- File
- Indexer
- Legal
- Notification
- Petrel DMS
- Register
- Schema
- Search
- Seismic DMS
- Seismic File Metadata
- Storage
- Unit
- Well Delivery DDMS
- Wellbore DDMS
- Workflow
- Copy the link to the Postman Collection JSON file.
- In Postman select Import.
- Select Link.
- Paste the link copied above.
- Repeat the same for the Environment JSON file.
- Download the Bruno Collection JSON file.
- Download the Environment JSON file.
- In Bruno click
...
in the navigation pane and thenImport Collection
. - Choose
Bruno Collection
and browse to the Bruno Collection JSON file. - Once imported, right-click the imported collection and select
Settings
. - In the top right, click the
Environment
dropdown, and thenconfigure
. - Click
Import
in the bottom left corner and thenPostman Environment
. - Browse to the Environment JSON file and import it.
Variable | Format | Description |
---|---|---|
accessToken |
Value will be automatically populated by running the manual authentication API calls | |
refreshToken |
Value will be automatically populated by running the manual authentication API calls | |
clientId |
00000000-0000-0000-0000-000000000000 |
The App Registration client ID used to provision ADME |
dataPartitionId |
opendes |
The Data Partition ID from ADME (i.e. eirik-opendes) |
clientSecret |
secret |
A valid App Registration secret for the above client_id |
tenantId |
00000000-0000-0000-0000-000000000000 |
Azure AD tenant ID |
scope |
00000000-0000-0000-0000-000000000000/.default openid profile offline_access |
The scope to use when authenticating. The ID represents an App Registration ID (client_id) |
baseUrl |
https://contoso.energy.azure.com |
API endpoint of your OSDU instance |
authorizationEndpoint |
https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/authorize |
Oauth2 authorization endpoint |
tokenEndpoint |
https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token |
Oauth2 token endpoint |
Interactive login is the default authentication method. This will use open an interactive browser window and automatically authenticate and refresh access tokens.
-
Configure the following callback URL (Web) on the App Registration
https://oauth.pstmn.io/v1/callback
-
Go to the top folder of the ADME API collection you have imported
-
A new tab will open in your browser, complete the sign-in. Note that you may have to allow pop-ups in your browser the first time.
-
You should now have obtained an Access Token to consume the APIs
Follow the procedure for User Token, but change the Grant Type
to Client Credentials
.
Manual authentication requires some additional manual steps to generate the authorization code.
- Go to the ADME API collection you have imported.
- Select the top folder and choose the Authorization tab.
- Change Type to
Bearer Token
and add {{access_token}} as the Token value. - Generate an
authentication code
by navigating to the following URL (replace {values} with your information):
https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/authorize?client_id={client_id}&response_type=code&redirect_uri=http%3a%2f%2flocalhost%3a8080&response_mode=query&scope={client_id}%2f.default&state=12345&sso_reload=true
- In the
Authenticate
folder, navigate into User folder and in thegetRefreshToken
API call body, add the authorization code to theBody
. - Run the
getRefreshToken
call. - Make sure the Refresh Token is returned, and that it is now populated in the refresh_token environment variable.
- Run the getAccessToken call.
- Make sure the Access Token is returned, and that it is now populated in the access_token environment variable.
Note that the access_token is added automatically as a Bearer token to all requests (given that the user have authorization to use the APIs), and you do not need to explicitly define the authorization header.
The authorization code is generated by browsing to
https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/authorize?client_id={client_id}&response_type=code&redirect_uri=http%3a%2f%2flocalhost%3a8080&response_mode=query&scope={client_id}%2f.default&state=12345&sso_reload=true
. Please note that the App Registration needs to have a web redirect URL set tohttp://localhost:8080
. Please see the official documentation for more information.
- Go to the ADME API collection you have imported.
- In the Authenticate folder, navigate into App Registration folder and run the
getAccessToken appRegistration
call. - Make sure the Access Token is returned, and that it is now populated in the access_token environment variable.
That's it! You should now be able to run all the API calls included.
13/04-2024
Updated to M18 APIs
Added Oath2 variables to environment for multi-CSP support
Added EDS
Added Petrel DMS
Added Seismic File Metadata service
25/04-2023
Corrected URI for Wellbore DDMS APIs
18/04-2023
ADME M14 release compliant
Added Seismic DDMS API
Added Well Delivery DDMS API
Added Wellbore DDMS API
Added Oauth2 authentication as default authentication mechanism
08/02-2023
Added Service Principal (App Registration) authentication mechanism.
06/02-2023
Added missing core services (Indexer, Notification, Register)
03/02-2023
Initial publication of OSDU Collection