Skip to content

Latest commit

 

History

History
58 lines (48 loc) · 2.98 KB

File metadata and controls

58 lines (48 loc) · 2.98 KB

Description

This postman collection includes all REST API calls available for Azure Data Manager for Energy (ADME) M12 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 M12 release.

Domain Data Management Services are not included.

Services Covered

The services mentioned below are covered, and the API calls are imported from the official ADME documentation.

  • CRS Catalog
  • CRS Converter
  • Dataset
  • Entitlements
  • File
  • Indexer
  • Legal
  • Notification
  • Partition*
  • Register
  • Schema
  • Search
  • Storage
  • Unit
  • Workflow

* The Partition service is locked down on ADME, as data partitions are handled by Azure Resource Manager (ARM) through CLI, PowerShell or Azure Portal.

Usage

  1. Copy the link to the Postman Collection JSON file.
  2. In Postman select Import.
  3. Select Link.
  4. Paste the link copied above.
  5. Repeat the same for the Postman Environment JSON file.

Environment variables

Variable Description
access_token Value will be automatically populated by running the authenticate API calls
refresh_token Value will be automatically populated by running the authenticate API calls
instance Hostname of your ADME instance (i.e. eirik.energy.azure.com)
client_id The App Registration client ID used to provision ADME
data_partition The Data Partition ID from ADME (i.e. eirik-opendes)
client_secret A valid App Registration secret for the above client_id
tenant_id Azure AD tenant ID
baseUrl Do not change

Authenticating

  1. Go to the ADME API collection you have imported.
  2. In the Authenticate folder, run the getRefreshToken call.*
  3. Make sure the Refresh Token is returned, and that it is now populated in the refresh_token environment variable.
  4. Run the getAccessToken call.
  5. 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.
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 to http://localhost:8080. Please see the official documentation for more information.