Commit 58c2c98a authored by Luc Yriarte's avatar Luc Yriarte
Browse files

os-wellbore-ddms http script on behalf of @clallement

parent f356cb4a
# -------HTTP REST CLIENT -------
# https://marketplace.visualstudio.com/items?itemName=humao.rest-client
## This script provides a few samples for calling os-wellbore-ddms service.
# -----------------------
# OAUTH (Variables)
# -----------------------
###
@login_base = login.microsoftonline.com/{{TENANT_ID}}
@oauth_token_host = {{login_base}}/oauth2/v2.0/token
@scopes = {{CLIENT_ID}}/.default openid profile offline_access
# -----------------------
# OAUTH refresh_token
# -----------------------
###
# @name refresh
POST https://{{oauth_token_host}} HTTP/1.1
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token
&client_id={{CLIENT_ID}}
&client_secret={{CLIENT_SECRET}}
&refresh_token={{INITIAL_TOKEN}}
&scope={{scopes}}
# -----------------------
# API (Variables)
# -----------------------
###
@access_token = {{refresh.response.body.access_token}}
@ENDPOINT = https://{{OSDU_HOST}}
@HOST = {{ENDPOINT}}/api/os-wellbore-ddms
@data_partition_id = opendes
@kind = opendes:qa-test:well-master:0.2.0
@id = <a_valid_well_id>
# -----------------------
# API: os-wellbore-ddms
# -----------------------
###
# @name about
GET {{HOST}}/ddms/v2/about
Authorization: Bearer {{access_token}}
Accept: application/json
###
# @name get well
GET {{HOST}}/ddms/v2/wells/{{id}}
Authorization: Bearer {{access_token}}
Accept: application/json
data-partition-id: {{data_partition_id}}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment