Introduction

IBM Open Data for Industries provides a toolset that supports an industry-standard methodology for collecting and describing Oil & Gas data and serving that data to various applications and services that consume it.

The Open Data for Industries API enables you to enrich, index, search, and manage your data.

The following IBM Open Data for Industries methods can be leveraged to build data agnostic applications:

  • Delivery methods

    Delivery methods provide a general-purpose delivery mechanism which supports work product components beyond files. In the case of files, it wrappers the File service.

  • Entitlements methods

    Entitlements methods enable authorization.

  • File methods

    File methods provide a mechanism to fetch records and file locations.

  • Indexer methods

    Indexer methods provide a mechanism to re-index records for efficient search.

  • Legal methods

    Legal methods govern the data compliance through the Records in the storage API.

  • Schema methods

    Schema methods provide a mechanism for publishing and managing data structure definitions.

  • Search methods

    Search methods provide a mechanism for indexing documents that contain structured data.

  • Storage methods

    Storage methods provide a set of APIs to manage the entire metadata lifecycle.

  • Workflow methods

    Workflow methods provide a mechanism to manage process executions.

  • Wellbore methods

    Manage Well data lifecycle to support Well domain management.

  • Seismic methods

    Manage Seismic data lifecycle to support Seismic domain management.

For more information, see the Open Data for Industries documentation.

Authentication

To authenticate to the API, you use the /preauth/signin method to specify your Open Data for Industries service credentials.

JWT authentication

You can configure Open Data for Industries to accept JSON Web Tokens (JWT) as an authentication mechanism for the service.

A JWT is a set of JSON claims that are signed, encrypted, or both, and are encoded into a web safe form.

The Open Data for Industries REST API uses the authorization: Bearer ${JWT_ACCESS_TOKEN} as a header parameter for authentication. This parameter is provided automatically by the service proxy. You must not specify any value.

JWT access token

You can fetch the JWT access token (JWT_ACCESS_TOKEN) by running the following curl command:

curl --silent --insecure --request POST --url {$tokenEndPointBase}/auth/realms/OSDU/protocol/openid-connect/token --header 'content-type: application/x-www-form-urlencoded' --data grant_type=password --data client_id={$clientID} --data client_secret={$clientSecret} --data username={$uName} --data password={$pass} --data scope=openid | jq -r '.access_token'

Replace the following values:

Name Replace with
{tokenEndPointBase} Keycloak route from the Red Hat OpenShift cluster.
{clientID} The default value is osdu-login
{clientSecret} Value that you can find on the OpenShift cluster secrets Admin page. Otherwise, ask your cluster administrator.
{uName} Value that you can find on the OpenShift cluster secrets Admin page. Otherwise, ask your cluster administrator.
{pass} Value that you can find on the OpenShift cluster secrets Admin page. Otherwise, ask your cluster administrator.

Endpoint URL

The Open Data for Industries API endpoint URL is based on your IBM Cloud Pak deployment URL.

https://{cpd_cluster_host}{:port}/{proxy-prefix}/api/{method-name}/{version}/

Additionally, replace the following values based on the method that you want to use:

Name Valid values
{proxy-prefix} osdu-delivery, osdu-entitlements, osdu-legal, osdu-storage, osdu-schema, osdu-search, osdu-file, osdu-indexer, osdu-workflow, osdu-wellbore, osdu-seismic
{method-name} delivery, entitlements, legal, storage, schema, search, file, indexer, worflow, os-wellbore-ddms
{version} v1 or v2 or v3

When you call the API, add the path for each method to form the complete API endpoint for your request. For example, if your instance is deployed at https://www.example.com:31843, you can access the APIs at https://www.example.com:31843/{proxy-prefix}/api/{method-name}/{version}/.

Example

curl -H "cache-control: no-cache" -X {request_method} "https://{cpd_cluster_host}{:port}/{proxy-prefix}/api/{method-name}/{version}/"

Error handling

Open Data for Industries uses standard HTTP response codes to indicate whether a method completed successfully. HTTP response codes in the 2xx range indicate success. A response in the 4xx range is some sort of failure, and a response in the 5xx range usually indicates an internal system error that cannot be resolved by the user. Response codes are listed with the method.

ErrorResponse

Name Description
code
string
An identifier of the response.
message
string
An explanation of the problem.

Methods

Get file signed

POST /GetFileSignedUrl

Request

Custom Headers

  • Tenant identifier

  • The file type/format of the request body

Signing request

  • curl -k -X POST -H "data-partition-id: {partition_id}" -d "{\"srns\":\"string\"}" "https://{cpd_cluster_host}{:port}/osdu-delivery/api/delivery/v1/GetFileSignedUrl"

Response

Status Code

  • OK

  • Created

  • Unauthorized Access

  • Forbidden Access

  • Endpoint Not Found

Example responses
  • {
      "processed": [
        {
          "additionalProp1": {
            "connectionString": "srn:file/segy:mysegy1",
            "kind": "common:welldb:wellbore:1.0.0",
            "signedUrl": "signed-url",
            "unsignedUrl": "unsigned-url"
          }
        },
        {
          "additionalProp2": {
            "connectionString": "srn:file/segy:mysegy1",
            "kind": "common:welldb:wellbore:1.0.0",
            "signedUrl": "signed-url",
            "unsignedUrl": "unsigned-url"
          }
        },
        {
          "additionalProp3": {
            "connectionString": "srn:file/segy:mysegy1",
            "kind": "common:welldb:wellbore:1.0.0",
            "signedUrl": "signed-url",
            "unsignedUrl": "unsigned-url"
          }
        }
      ],
      "unprocessed": [
        "[srn:file/segy:mysegy1,srn:file/segy:mysegy2,srn:file/segy:mysegy3]"
      ]
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Initiate the process to bootstrap entitlements

POST /tenant-provisioning

Request

Custom Headers

  • tenant

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

List groups

GET /groups

Request

Custom Headers

  • Tenant identifier

  • curl -k -X GET -H "data-partition-id: {partition_id}"  "https://{cpd_cluster_host}{:port}/osdu-entitlements/api/entitlements/v2/groups"

Response

Status Code

  • OK

  • Unauthorized Access

  • Forbidden Access

  • Not Found

Example responses
  • {
      "desId": "abc@x.ibm.com",
      "groups": [
        {
          "description": "This is the groupinfo description",
          "email": "abc@x.ibm.com",
          "name": "Admin"
        }
      ],
      "memberEmail": "abc@x.ibm.com"
    }

Create group

POST /groups

Request

Custom Headers

  • Tenant identifier

  • Allowable values: [*/*,application/json]

groupInfoDto

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -d '{
    "description": "string",
    "name": "string"
    }'
     "https://{cpd_cluster_host}{:port}/osdu-entitlements/api/entitlements/v2/groups"

Response

Status Code

  • OK

  • Created

  • Unauthorized Access

  • Forbidden Access

  • Not Found

Example responses
  • {
      "description": "This is the groupinfo description",
      "email": "abc@x.ibm.com",
      "group_email": "group-name@x.ibm.com",
      "name": "Admin"
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Delete Group

DELETE /groups/{group_email}

Request

Custom Headers

  • tenant

Path Parameters

Response

Status Code

  • OK

  • No Content

  • Unauthorized

  • Forbidden

No Sample Response

This method does not specify any sample responses.

Update Group

PATCH /groups/{group_email}

Request

Custom Headers

  • tenant

Path Parameters

  • group_email

updateGroupRequest

Response

Status Code

  • OK

  • No Content

  • Unauthorized

  • Forbidden

No Sample Response

This method does not specify any sample responses.

List members of group

GET /groups/{group_email}/members

Request

Custom Headers

  • Tenant identifier

Path Parameters

  • Group email mnemonic

Query Parameters

  • role

    Allowable values: [MEMBER,OWNER]

  • includeType

  • curl -k -X GET -H "data-partition-id: {partition_id}"  "https://{cpd_cluster_host}{:port}/osdu-entitlements/api/entitlements/v2/groups/{group_email}/members"

Response

Status Code

  • OK

  • Unauthorized Access

  • Forbidden Access

  • Not Found

Example responses
  • {
      "value": {
        "cursor": "abc",
        "members": [
          {
            "email": "abc@x.ibm.com"
          }
        ]
      }
    }

Add members to group

POST /groups/{group_email}/members

Request

Custom Headers

  • Tenant identifier

  • Allowable values: [*/*,application/json]

Path Parameters

AddMemberDto

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -d '{
    "email": "string"
    }'
    "https://{cpd_cluster_host}{:port}/osdu-entitlements/api/entitlements/v2/groups/{group_email}/members"

Response

Status Code

  • OK

  • Created

  • Unauthorized Access

  • Forbidden Access

  • Not Found

Example responses
  • {
      "email": "abc@x.ibm.com"
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Delete members from group

DELETE /groups/{group_email}/members/{member_email}

Request

Custom Headers

  • Tenant identifier

Path Parameters

  • Group email mnemonic

  • Member email mnemonic

  • curl -k -X DELETE -H "data-partition-id: {partition_id}"  "https://{cpd_cluster_host}{:port}/osdu-entitlements/api/entitlements/v2/groups/{group_email}/members/{member_email}"

Response

Status Code

  • OK

  • No Content Found

  • Unauthorized Access

  • Forbidden Access

Example responses
  • {
      "_messageCode_": "200",
      "message": "OK"
    }
  • {
      "_messageCode_": "204",
      "message": "No Content Found"
    }

Delete Member

DELETE /members/{member_email}

Request

Custom Headers

  • tenant

Path Parameters

  • Member email mnemonic

Response

Status Code

  • OK

  • No Content

  • Unauthorized

  • Forbidden

No Sample Response

This method does not specify any sample responses.

List Groups For Member

GET /members/{member_email}/groups

Request

Custom Headers

  • tenant

Path Parameters

  • Member email mnemonic

Query Parameters

  • type

  • appid

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Get a signed URL for a file

POST /delivery/GetFileSignedUrl

Request

Custom Headers

  • Tenant identifier

  • Frame for unit measurement

Request to get signed URL

  • curl -k -X POST -H "data-partition-id: {partition_id}" -d "{\"srns\":\"string\"}" "https://{cpd_cluster_host}{:port}/osdu-file/api/file/v2/delivery/GetFileSignedUrl"

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "processed": {
        "additionalProp1": {
          "connectionString": "srn:file/segy:mysegy1",
          "kind": "common:welldb:wellbore:1.0.0",
          "signedUrl": "signed-url",
          "unsignedUrl": "unsigned-url"
        }
      },
      "unprocessed": [
        "[srn:file/segy:mysegy2,srn:file/segy:mysegy3]"
      ]
    }

Create metadata for a file

POST /files/metadata

Request

Custom Headers

  • Tenant identifier

  • Frame for unit measurement

Metadata of file

  • curl -k -X POST https://{HOSTNAME}:{PORT_NUMBER}/osdu-file/api/file/v2/files/metadata -H 'content-type: application/json' -H "data-partition-id: {partition_id}" -d '{
    "data": {
    "Endian": "BIG",
    "Description": "As originally delivered by ACME.com.",
    "DatasetProperties": {
    "FileSourceInfo": {
    "FileSource": "",
    "Name": "1234",
    "PreLoadFilePath": "gs://osdu-cicd-epam-persistent-area/c3af38c1-654d-47a0-a3e6-9e94c32add84/b62b104f843142f49ee6d747e6bdd49d",
    "PreloadFileCreateUser": "user1",
    "PreloadFileModifyDate": "mar 11",
    "PreloadFileModifyUser": "mar 11"
    }
    },
    "TotalSize": "13245217273",
    "Source": "Example Data Source",
    "Name": "Dataset X221/15"
    },
    "kind": "osdu:wks:dataset--File.Generic:1.0.0",
    "acl": {
    "viewers": [
    "data.default.viewers@opendes.osdu-gcp.go3-nrg.projects.epam.com"
    ],
    "owners": [
    "data.default.owners@opendes.osdu-gcp.go3-nrg.projects.epam.com"
    ]
    },
    "legal": {
    "legaltags": [
    "opendes-demo-legaltag"
    ],
    "otherRelevantDataCountries": [
    "US"
    ],
    "status": "compliant"
    },
    "createUser": "osdu-community-sa-airflow@nice-etching-277309.iam.gserviceaccount.com",
    "createTime": "2021-02-22T18:50:47.498Z",
    "modifyUser": "osdu-community-sa-airflow@nice-etching-277309.iam.gserviceaccount.com",
    "modifyTime": "2021-02-22T21:13:10.587Z"
    }'
    

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Get location information for a file

GET /files/uploadURL

Request

Custom Headers

  • Tenant identifier

  • Frame for unit measurement

  • curl -k -X GET https://{HOSTNAME}:{PORT_NUMBER}/osdu-file/api/file/v2/files/uploadURL -H "data-partition-id: {partition_id}"
    

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Get a signed URL for a specific file

GET /files/{id}/downloadURL

Request

Custom Headers

  • Tenant identifier

  • Frame for unit measurement

Path Parameters

  • Identifier for file to download

  • curl -k -X GET https://{HOSTNAME}:{PORT_NUMBER}/osdu-file/api/file/v2/files/{{record_id}}/downloadURL' -H "data-partition-id: {partition_id}"
    

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Get metadata for a specific file

GET /files/{id}/metadata

Request

Custom Headers

  • Tenant identifier

  • Frame for unit measurement

Path Parameters

  • Identifier for file to get metadata from

  • curl -k -X GET https://{HOSTNAME}:{PORT_NUMBER}/osdu-file/api/file/v2/files/{{record_id}}/metadata -H "data-partition-id: {partition_id}"
    

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Reindex searchable objects

POST /reindex

Request

Custom Headers

  • Tenant identifier

    Default: common

  • Authentication key for API access

    Default: this_123_is_456_dev_789_key

  • Allowable values: [*/*,application/json]

Query Parameters

  • Flag to control indexing of partial or full records for particular kind.[ True : All records reindexed , False : Only delta records indexed]

    Default: false

recordReindexRequest

  • curl -k -X POST https://{HOSTNAME}:{PORT_NUMBER}/osdu-workflow/api/indexer/v2/reindex?force_clean=true -H 'content-type: application/json' -H "data-partition-id: {partition_id}" -d '{
        "kind": "opendes:osdu:well-master:0.2.1"
        }'
        
        
    

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Get legal tag status

GET /jobs/updateLegalTagStatus

Request

Custom Headers

  • Tenant identifier

  • curl -k -X GET -H "data-partition-id: {partition_id}"  "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/jobs/updateLegalTagStatus"

Response

Status Code

  • OK

  • Unauthorized Access

  • Forbidden Access

  • Endpoint Not Found

Example responses
  • {
      "100": "CONTINUE",
      "_messageCode_": "200",
      "message": "OK"
    }

Get legal tags

GET /legaltags

Request

Custom Headers

  • Tenant identifier

Query Parameters

  • valid

    Default: true

  • curl -k -X GET -H "data-partition-id: {partition_id}"  "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/legaltags"

Response

Status Code

  • OK

  • Unauthorized Access

  • Forbidden Access

  • Endpoint Not Found

Example responses
  • {
      "100": "CONTINUE",
      "_messageCode_": "200",
      "message": "OK"
    }

Update legal tag

PUT /legaltags

Request

Custom Headers

  • Tenant identifier

  • Allowable values: [*/*,application/json]

legalTag

  • curl -k -X PUT -H "data-partition-id: {partition_id}"  -d '{
    "contractId": "string",
    "description": "string",
    "expirationDate": "2020-10-13",
    "name": "string"
    }'
    "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/legaltags"

Response

Status Code

  • OK

  • Created

  • Unauthorized Access

  • Forbidden Access

  • Endpoint Not Found

Example responses
  • {
      "contractId": "AE12345",
      "description": "Legal tag description",
      "expirationDate": "2022-12-22",
      "name": "common-demo-legaltag"
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Create legal tag

POST /legaltags

Request

Custom Headers

  • Tenant identifier

  • Allowable values: [*/*,application/json]

legalTag

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -d '{
    "description": "string",
    "name": "string",
    "properties": {
    "contractId": "string",
    "countryOfOrigin": [
    "string"
    ],
    "dataType": "string",
    "expirationDate": "yyyy-MM-dd",
    "exportClassification": "string",
    "originator": "string",
    "personalData": "string",
    "securityClassification": "string"
    }
    }'
    "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/legaltags"

Response

Status Code

  • OK

  • Created

  • Unauthorized Access

  • Forbidden Access

  • Endpoint Not Found

Example responses
  • {
      "description": "This is the description of legal tag",
      "name": "legal-tag-name",
      "properties": {
        "contractId": "legal-contract-id",
        "countryOfOrigin": [
          "[USA,CANADA,UK]"
        ],
        "dataType": "Public Domain Data",
        "expirationDate": "yyyy-MM-dd",
        "exportClassification": "EAR99",
        "originator": "ODI",
        "personalData": "Personal Data",
        "securityClassification": "Public"
      }
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Get legal tag by name

GET /legaltags/{name}

Request

Custom Headers

  • Tenant identifier

Path Parameters

  • Legal tag name

  • curl -k -X GET -H "data-partition-id: {partition_id}"  "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/legaltags/{name}"

Response

Status Code

  • OK

  • Unauthorized Access

  • Forbidden Access

  • Endpoint Not Found

Example responses
  • {
      "body": {
        "name": "common-demo-legaltag",
        "contractId": "AE12345",
        "expirationDate": "2022-12-21"
      },
      "statusCode": "{'100':'CONTINUE'}",
      "statusCodeValue": 504
    }

Delete legal tag by name

DELETE /legaltags/{name}

Request

Custom Headers

  • Tenant identifier

  • Allowable values: [*/*,application/json]

Path Parameters

  • Legal tag name

  • curl -k -X DELETE -H "data-partition-id: {partition_id}"  "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/legaltags/{name}"

Response

Status Code

  • OK

  • No Content

  • Unauthorized Access

  • Forbidden Access

Example responses
  • 100 CONTINUE
  • {
      "_messageCode_": "204",
      "message": "No content"
    }

Batch retrieve legal tags

POST /legaltags:batchRetrieve

Request

Custom Headers

  • Tenant identifier

  • Allowable values: [*/*,application/json]

Requested tags

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -d '{
    "names": [
    "string"
    ]
    }'
    "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/legaltags:batchRetrieve"

Response

Status Code

  • OK

  • Created

  • Unauthorized Access

  • Forbidden Access

  • Endpoint Not Found

Example responses
  • {
      "legalTags": [
        {
          "description": "This is the description of legal tag",
          "name": "legal-tag-name",
          "properties": {
            "contractId": "legal-contract-id",
            "countryOfOrigin": [
              "[USA,CANADA,UK]"
            ],
            "dataType": "Public Domain Data",
            "expirationDate": "yyyy-MM-dd",
            "exportClassification": "EAR99",
            "originator": "ODI",
            "personalData": "Personal Data",
            "securityClassification": "Public"
          }
        }
      ]
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Get legal tag properties

GET /legaltags:properties

Request

Custom Headers

  • Tenant identifier

  • curl -k -X GET -H "data-partition-id: {partition_id}"  "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/legaltags:properties"

Response

Status Code

  • OK

  • Unauthorized Access

  • Forbidden Access

  • Endpoint Not Found

Example responses
  • {
      "countriesOfOrigin": {
        "additionalProp1": "{'PT':'Portugal','PW':'Palau','QA':'Qatar'}",
        "additionalProp2": "other-properties",
        "additionalProp3": "other-properties"
      },
      "dataTypes": [
        "[Personally identifiable,Public data]"
      ],
      "exportClassificationControlNumbers": [
        "[No License Required,Not - Technical Data,EAR99]"
      ],
      "otherRelevantDataCountries": {
        "additionalProp1": "{'PT':'Portugal','PW':'Palau','QA':'Qatar'}"
      },
      "personalDataTypes": [
        "[Personally identifiable,Public data]"
      ],
      "securityClassifications": [
        "[Private,Public,Confedential]"
      ]
    }

Validate legal

POST /legaltags:validate

Request

Custom Headers

  • Tenant identifier

  • Allowable values: [*/*,application/json]

Requested tags

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -d '{
    "names": [
    "string"
    ]
    }'
    "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/legaltags:validate"

Response

Status Code

  • OK

  • Created

  • Unauthorized Access

  • Forbidden Access

  • Endpoint Not Found

Example responses
  • {
      "invalidLegalTags": [
        {
          "name": "legal-tag-invalid",
          "reason": "Invalid tag reason"
        }
      ]
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Legal tag changed

POST /push-handlers/legaltag-changed

Request

Custom Headers

  • Tenant identifier

  • reference

  • Allowable values: [*/*,application/json]

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" "https://{cpd_cluster_host}{:port}/osdu-legal/api/legal/v1/push-handlers/legaltag-changed"

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "body": {
        "name": "common-demo-legaltag",
        "contractId": "AE12345",
        "expirationDate": "2022-12-21"
      },
      "statusCode": "{'100':'CONTINUE'}",
      "statusCodeValue": 504
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Create schema

Adds a schema to the schema repository.

POST /schema

Request

Custom Headers

  • Tenant identifier

    Example: osdu

Schema description and schema to add

Examples:
View
  • curl -k -X POST https://{HOSTNAME}:{PORT_NUMBER}/osdu-schema/api/schema/v1/schema
    -H 'content-type: application/json'
    -H 'data-partition-id: {partition_id}'
    -d '{
    "schema-Info": {
    "schemaIdentity": {
    "authority": "osdu",
    "source": "wks",
    "entityType": "wellbore",
    "schemaVersionMajor": 1,
    "schemaVersionMinor": 0,
    "schemaVersionPatch": 0
    },
    "status": "PUBLISHED"
    },
    "schema": {}
    }'
    

Response

Schema info, including status, creation, and Schema-Identity

Status Code

  • Schema created

  • Input error. Mandatory fields missing or invalid value passed to API

  • Unknown or invalid user

  • User not authorised to access the API

Example responses
  • {
      "createdBy": "user@opendes.com",
      "dateCreated": {},
      "schemaIdentity": {
        "authority": "osdu",
        "entityType": "wellbore",
        "id": "osdu:wks:wellbore:1.0.0",
        "schemaVersionMajor": 1,
        "schemaVersionMinor": 1,
        "schemaVersionPatch": 0,
        "source": "wks"
      },
      "scope": "INTERNAL",
      "status": "PUBLISHED",
      "supersededBy": {
        "authority": "osdu",
        "entityType": "wellbore",
        "id": "osdu:wks:wellbore:1.0.0",
        "schemaVersionMajor": 1,
        "schemaVersionMinor": 1,
        "schemaVersionPatch": 0,
        "source": "wks"
      }
    }

Update schema

Update or create a schema in development status.

PUT /schema

Request

Custom Headers

  • Tenant identifier

    Example: osdu

Schema description and schema to update or add

Examples:
View
  • curl -k -X PUT https://{HOSTNAME}:{PORT_NUMBER}/osdu-schema/api/schema-service/v1/api/schema-service/v1/schema -H 'Content-Type: application/json' -H 'data-partition-id: opendes' -d '{
    "schemaInfo": {
    "schemaIdentity": {
    "authority": "SchemaSanityTest",
    "source": "testSource",
    "entityType": "testEntity_279688",
    "schemaVersionMajor": 2,
    "schemaVersionMinor": 2,
    "schemaVersionPatch": 0,
    "id": "SchemaSanityTest:testSource:testEntity_279688:1.1.0"
    },
    "status": "DEVELOPMENT"
    },
    "schema": {
    "$schema":"http://json-schema.org/draft-07/schema#",
    "x-slb-lifecycle-state":"published",
    "description":"Theentitywell.",
    "title":"Well",
    "type":"object",
    "definitions":{
    
    },
    "properties":{
    "locationOriginalCRS":{
    "description":"Thewell'\''soriginallocationasAnyCrsFeatureCollection -astructuresimilartobutdistinctfromGeoJSON.",
    "title":"OriginalCRSLocation",
    "$ref":"#/definition/anyCrsFeatureCollection.1.0"
    },
    "allOf":{
     "$ref":"#/definition/slb..wks..well.1.0"
    },
    "locationWGS84":{
     "description":"Thewell'\''slocationasGeoJSONFeatureCollection.",
     "title":"WGS84Location",
     "$ref":"https://geojson.org/schema/FeatureCollection.json",
     "example":{
      "features":[
         {
            "geometry":{
               "coordinates":[
                  -92.11569999999999,
                  29.8823,
                  153.4779442519685
               ],
               "type":"Point"
            },
            "type":"Feature",
            "properties":{
               "name":"Newton2-31"
            }
         }
      ],
      "type":"FeatureCollection"
          }
        }
      }
    }
    }'
    

Response

Schema info, including status, creation, and Schema-Identity

Status Code

  • Schema updated

  • Schema created

  • Input error. Mandatory fields missing or invalid value passed to API

  • Unknown or invalid user

  • User not authorised to access the API

Example responses
  • {
      "createdBy": "user@opendes.com",
      "dateCreated": {},
      "schemaIdentity": {
        "authority": "osdu",
        "entityType": "wellbore",
        "id": "osdu:wks:wellbore:1.0.0",
        "schemaVersionMajor": 1,
        "schemaVersionMinor": 1,
        "schemaVersionPatch": 0,
        "source": "wks"
      },
      "scope": "INTERNAL",
      "status": "PUBLISHED",
      "supersededBy": {
        "authority": "osdu",
        "entityType": "wellbore",
        "id": "osdu:wks:wellbore:1.0.0",
        "schemaVersionMajor": 1,
        "schemaVersionMinor": 1,
        "schemaVersionPatch": 0,
        "source": "wks"
      }
    }
  • {
      "createdBy": "user@opendes.com",
      "dateCreated": {},
      "schemaIdentity": {
        "authority": "osdu",
        "entityType": "wellbore",
        "id": "osdu:wks:wellbore:1.0.0",
        "schemaVersionMajor": 1,
        "schemaVersionMinor": 1,
        "schemaVersionPatch": 0,
        "source": "wks"
      },
      "scope": "INTERNAL",
      "status": "PUBLISHED",
      "supersededBy": {
        "authority": "osdu",
        "entityType": "wellbore",
        "id": "osdu:wks:wellbore:1.0.0",
        "schemaVersionMajor": 1,
        "schemaVersionMinor": 1,
        "schemaVersionPatch": 0,
        "source": "wks"
      }
    }

Get all schemas

Get all schemas from the repository.

GET /schema

Request

Custom Headers

  • Tenant identifier

    Example: osdu

Query Parameters

  • Pass an optional string to search for a specific authority

    Default: *

    Example: osdu

  • Pass an optional string to search for a specific source

    Default: *

    Example: wks

  • Pass an optional string to search for a specific entityType

    Default: *

    Example: wellbore

  • Pass an optional string to search for a specific schemaVersionMajor

    Default: *

    Example: 1

  • Pass an optional string to search for a specific schemaVersionMinor

    Default: *

    Example: 1

  • The schema status specification

    Allowable values: [PUBLISHED,DEVELOPMENT,OBSOLETE]

    Default: PUBLISHED

    Example: PUBLISHED

  • The scope or schema visibility specification

    Allowable values: [SHARED,INTERNAL]

    Default: INTERNAL

    Example: INTERNAL

  • If true, only return the latest version

    Default: false

    Example: true

  • Maximum number of schema records to return

    Possible values: 0 ≤ value ≤ 100

    Example: 10

  • Number of records to skip for pagination

    Possible values: value ≥ 0

Response

The response for a GET schema request

Status Code

  • Successful response

  • Input error. Mandatory fields missing or invalid value passed to API

  • Unknown or invalid user

  • User not authorised to access the API

Example responses
  • {
      "schemaInfos": [
        {
          "createdBy": "user@opendes.com",
          "dateCreated": {},
          "schemaIdentity": {
            "authority": "osdu",
            "entityType": "wellbore",
            "id": "osdu:wks:wellbore:1.0.0",
            "schemaVersionMajor": 1,
            "schemaVersionMinor": 1,
            "schemaVersionPatch": 0,
            "source": "wks"
          },
          "scope": "INTERNAL",
          "status": "PUBLISHED",
          "supersededBy": {
            "authority": "osdu",
            "entityType": "wellbore",
            "id": "osdu:wks:wellbore:1.0.0",
            "schemaVersionMajor": 1,
            "schemaVersionMinor": 1,
            "schemaVersionPatch": 0,
            "source": "wks"
          }
        }
      ],
      "offset": 0,
      "count": 0,
      "totalCount": 0
    }

Get specific schema

Get a schema from the schema repository by providing an identifier.

GET /schema/{id}

Request

Custom Headers

  • Tenant identifier

    Example: osdu

Path Parameters

  • The system ID of the schema

    Example: osdu:wks:wellbore:1.0.0

  • curl -k -X GET 'https://{HOSTNAME}:{PORT_NUMBER}/osdu-schema/api/schema-service/v1/api/schema-service/v1/schema/SchemaSanityTest:testSource:testEntity_279688:1.1.0' -H 'Content-Type: application/json' -H 'data-partition-id: opendes'
    

Response

Status Code

  • search results matching criteria

  • Input error. Mandatory fields missing or invalid value passed to API

  • Unknown or invalid user

  • User not authorised to access the API

  • Requested Schema not found in repository

Example responses
  • {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "description": "The entity shapefile.",
      "title": "ShapeFile",
      "type": "object",
      "definitions": {},
      "properties": {}
    }

Queries using the criteria for cross cluster search

The API supports cross cluster searches when given the list of partitions.

POST /ccs/query

Request

Custom Headers

  • Tenant identifier. This should be same value as first field in kind field

  • Allowable values: [*/*,application/json]

Query request

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -d '{
    "kind": "common:ihs:well:1.0.0",
    "limit": 30,
    "offset": 0,
    "query": "string",
    "queryAsOwner": false
    }'
    "https://{cpd_cluster_host}{:port}/osdu-search/api/search/v2/ccs/query"

Response

Status Code

  • Success

  • Created

  • Invalid parameters were given on request

  • Unauthorized

  • User not authorized to perform the action

  • Endpoint Not Found

  • Search service scale-up is taking longer than expected. Wait 10 seconds and retry.

Example responses
  • {
      "results": [
        {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        }
      ],
      "totalCount": 0
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Queries using the input criteria

The API supports full text search on string fields, range queries on date, numeric or string fields, along with geo-spatial search. Required roles: ''users.datalake.viewers'' or ''users.datalake.editors'' or ''users.datalake.admins'' or ''users.datalake.ops''. In addition, users must be a member of data groups to access the data.

POST /query

Request

Custom Headers

  • Tenant identifier. This should be same value as first field in kind field

  • Allowable values: [*/*,application/json]

Query request

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -d '{
    "kind": "common:ihs:well:1.0.0",
    "limit": 30,
    "offset": 0,
    "query": "string",
    "queryAsOwner": false,
    "returnedFields": [
    "string"
    ],
    "sort": {
    "field": [
    "string"
    ],
    "order": [
    "ASC"
    ]
    },
    "spatialFilter": {
    "byBoundingBox": {
    "bottomRight": {
    "latitude": 37.450727,
    "longitude": -122.174762
    },
    "topLeft": {
    "latitude": 37.450727,
    "longitude": -122.174762
    }
    },
    "byDistance": {
    "distance": 1500,
    "point": {
    "latitude": 37.450727,
    "longitude": -122.174762
    }
    },
    "byGeoPolygon": {
    "points": [
    {
    "latitude": 37.450727,
    "longitude": -122.174762
    }
    ]
    },
    "field": "string"
    }
    }'
    "https://{cpd_cluster_host}{:port}/osdu-search/api/search/v2/query"

Response

Status Code

  • Success

  • Created

  • Invalid parameters were given on request

  • Unauthorized Access

  • User not authorized to perform the action

  • Endpoint Not Found

  • Search service scale-up is taking longer than expected. Wait 10 seconds and retry.

Example responses
  • {
      "aggregations": [
        {
          "count": 12,
          "key": "key-id"
        }
      ],
      "results": [
        {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        }
      ],
      "totalCount": 10
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Queries using the input criteria with cursor

The API supports full text search on string fields, range queries on date, numeric or string fields, along with geo-spatial search. Required roles: ''users.datalake.viewers'' or ''users.datalake.editors'' or ''users.datalake.admins'' or ''users.datalake.ops''. In addition, users must be a member of data groups to access the data. It can be used to retrieve large numbers of results (or even all results) from a single search request, in much the same way as you would use a cursor on a traditional database.

POST /query_with_cursor

Request

Custom Headers

  • Tenant identifier. This should be same value as first field in kind field

  • Allowable values: [*/*,application/json]

Query request

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -d '{
    "kind": "common:ihs:well:1.0.0",
    "limit": 30,
    "query": "string",
    "queryAsOwner": false,
    "returnedFields": [
    "string"
    ],
    "sort": {
    "field": [
    "string"
    ],
    "order": [
    "ASC"
    ]
    },
    "spatialFilter": {
    "byBoundingBox": {
    "bottomRight": {
    "latitude": 37.450727,
    "longitude": -122.174762
    },
    "topLeft": {
    "latitude": 37.450727,
    "longitude": -122.174762
    }
    },
    "byDistance": {
    "distance": 1500,
    "point": {
    "latitude": 37.450727,
    "longitude": -122.174762
    }
    },
    "byGeoPolygon": {
    "points": [
    {
    "latitude": 37.450727,
    "longitude": -122.174762
    }
    ]
    },
    "field": "string"
    }
    }'
    "https://{cpd_cluster_host}{:port}/osdu-search/api/search/v2/query_with_cursor"

Response

Status Code

  • Success

  • Created

  • Invalid parameters were given on request

  • Unauthorized Access

  • User not authorized to perform the action

  • Endpoint Not Found

  • Search service scale-up is taking longer than expected. Wait 10 seconds and retry.

Example responses
  • {
      "cursor": "string",
      "results": [
        {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        }
      ],
      "totalCount": 10
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Get kinds of storage

GET /query/kinds

Request

Custom Headers

  • Tenant identifier

  • reference

Query Parameters

  • cursor

  • limit

  • curl -k -X GET -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/query/kinds?cursor={string}&limit={integer}"

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "cursor": "des",
      "results": [
        [
          ""
        ]
      ]
    }

Get all records

GET /query/records

Request

Custom Headers

  • Tenant identifier

  • reference

Query Parameters

  • kind

  • cursor

  • limit

  • curl -k -X GET -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/query/records?kind={string}&cursor={string}&limit={integer}"

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "cursor": "des",
      "results": [
        [
          ""
        ]
      ]
    }

Get Records

POST /query/records

Request

Custom Headers

  • Tenant identifier

  • reference

  • Allowable values: [*/*,application/json]

ids

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" -d '{
    "attributes": [
    "string"
    ],
    "records": [
    "string"
    ]
    }'
    "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/query/records"

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "invalidRecords": [
        "[opendes:doc:6d29c781d5484e1dbc34d392f58cd055,opendes:doc:6d29c781d5484e1dbc34d392f58cd034,opendes:doc:6d29c781d5484e1dbc34d392f58cd067,opendes:doc:6d29c781d5484e1dbc34d392f58cd078]"
      ],
      "records": [
        {
          "data": {
            "ResourceID": "srn:master-data/Well:2492:",
            "ResourceTypeID": "srn:type:master-data/Well:",
            "ResourceSecurityClassification": "srn:reference-data/ResourceSecurityClassification:PUBLIC:",
            "Data": {
              "IndividualTypeProperties": {
                "FacilityOperator": [
                  {
                    "FacilityOperatorOrganisationID": "srn:master-data/Organisation:nam:"
                  }
                ],
                "DataSourceOrganisationID": "srn:master-data/Organisation:tno:",
                "SpatialLocation": [
                  {
                    "Coordinates": [
                      {
                        "x": 6.91700948,
                        "y": 52.65622264
                      }
                    ],
                    "SpatialGeometryTypeID": "srn:reference-data/SpatialGeometryType:point:",
                    "VerticalCRSID": "srn:reference-data/VerticalCRS:nap:",
                    "HorizontalCRSID": "srn:reference-data/HorizontalCRS:WGS84:",
                    "HeightAboveGroundLevelUOMID": "srn:reference-data/UnitOfMeasure:m:"
                  }
                ],
                "FacilityName": "SCH-586",
                "FacilityNameAlias": [
                  {
                    "AliasName": "SCH-586",
                    "AliasNameTypeID": "srn:reference-data/AliasNameType:name:"
                  },
                  {
                    "AliasName": "2492",
                    "AliasNameTypeID": "srn:reference-data/AliasNameType:UWI:"
                  }
                ],
                "FacilityState": [
                  {
                    "FacilityStateTypeID": "srn:reference-data/FacilityStateType:Abandoned:"
                  }
                ],
                "FacilityEvent": [
                  {
                    "FacilityEventTypeID": "srn:reference-data/FacilityEventType:spud:",
                    "EffectiveDateTime": "1984-09-16T00:00:00"
                  },
                  {
                    "FacilityEventTypeID": "srn:reference-data/FacilityEventType:DRILLING FINISH:",
                    "EffectiveDateTime": "1984-10-03T00:00:00"
                  }
                ],
                "DefaultVerticalMeasurementID": "Rotary Table",
                "VerticalMeasurements": [
                  {
                    "VerticalMeasurementID": "Rotary Table",
                    "VerticalMeasurementTypeID": "srn:reference-data/VerticalMeasurementType:Rotary Table:",
                    "VerticalMeasurement": 20,
                    "VerticalMeasurementPathID": "srn:reference-data/VerticalMeasurementPath:Elevation:",
                    "VerticalMeasurementUnitOfMeasureID": "srn:reference-data/UnitOfMeasure:m:",
                    "VerticalCRSID": "srn:reference-data/VerticalCRS:nap:"
                  }
                ],
                "OperatingEnvironmentID": "srn:reference-data/WellOperatingEnvironment:on:",
                "CountryID": "srn:master-data/GeopoliticalEntity:Netherlands:",
                "StateProvinceID": "srn:master-data/GeopoliticalEntity:Drenthe:",
                "QuadrantID": "srn:master-data/GeopoliticalEntity:d:"
              }
            },
            "meta": null,
            "id": "opendes:doc:0f23276e96274461872adcb222f1ef1d",
            "version": 1599141178852896,
            "kind": "opendes:osdu-r2-core:test:1.0.0",
            "acl": {
              "viewers": [
                "data.default.viewers@opendes.ibm.com"
              ],
              "owners": [
                "data.default.owners@opendes.ibm.com"
              ]
            },
            "legal": {
              "legaltags": [
                "opendes-public-usa-dataset-1"
              ],
              "otherRelevantDataCountries": [
                "US"
              ],
              "status": "compliant"
            },
            "createUser": "osdu-dev@odi.ibm.com",
            "createTime": "2020-09-03T13:53:00.719Z"
          }
        }
      ],
      "retryRecords": [
        "[opendes:doc:6d29c781d5484e1dbc34d392f58cd055,opendes:doc:6d29c781d5484e1dbc34d392f58cd034,opendes:doc:6d29c781d5484e1dbc34d392f58cd067,opendes:doc:6d29c781d5484e1dbc34d392f58cd078]"
      ]
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Fetch records

POST /query/records:batch

Request

Custom Headers

  • Tenant identifier

  • reference

  • Allowable values: [*/*,application/json]

ids

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" -d '{
    "records": [
    "string"
    ]
    }'
    "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/query/records:batch"

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "conversionStatuses": [
        {
          "errors": [
            "[value invalid,value not present]"
          ],
          "id": "AE12345",
          "status": "Invalid"
        }
      ],
      "notFound": [
        "[opendes:doc:6d29c781d5484e1dbc34d392f58cd055,opendes:doc:6d29c781d5484e1dbc34d392f58cd034,opendes:doc:6d29c781d5484e1dbc34d392f58cd067,opendes:doc:6d29c781d5484e1dbc34d392f58cd078]"
      ],
      "records": [
        {
          "data": {
            "ResourceID": "srn:master-data/Well:2492:",
            "ResourceTypeID": "srn:type:master-data/Well:",
            "ResourceSecurityClassification": "srn:reference-data/ResourceSecurityClassification:PUBLIC:",
            "Data": {
              "IndividualTypeProperties": {
                "FacilityOperator": [
                  {
                    "FacilityOperatorOrganisationID": "srn:master-data/Organisation:nam:"
                  }
                ],
                "DataSourceOrganisationID": "srn:master-data/Organisation:tno:",
                "SpatialLocation": [
                  {
                    "Coordinates": [
                      {
                        "x": 6.91700948,
                        "y": 52.65622264
                      }
                    ],
                    "SpatialGeometryTypeID": "srn:reference-data/SpatialGeometryType:point:",
                    "VerticalCRSID": "srn:reference-data/VerticalCRS:nap:",
                    "HorizontalCRSID": "srn:reference-data/HorizontalCRS:WGS84:",
                    "HeightAboveGroundLevelUOMID": "srn:reference-data/UnitOfMeasure:m:"
                  }
                ],
                "FacilityName": "SCH-586",
                "FacilityNameAlias": [
                  {
                    "AliasName": "SCH-586",
                    "AliasNameTypeID": "srn:reference-data/AliasNameType:name:"
                  },
                  {
                    "AliasName": "2492",
                    "AliasNameTypeID": "srn:reference-data/AliasNameType:UWI:"
                  }
                ],
                "FacilityState": [
                  {
                    "FacilityStateTypeID": "srn:reference-data/FacilityStateType:Abandoned:"
                  }
                ],
                "FacilityEvent": [
                  {
                    "FacilityEventTypeID": "srn:reference-data/FacilityEventType:spud:",
                    "EffectiveDateTime": "1984-09-16T00:00:00"
                  },
                  {
                    "FacilityEventTypeID": "srn:reference-data/FacilityEventType:DRILLING FINISH:",
                    "EffectiveDateTime": "1984-10-03T00:00:00"
                  }
                ],
                "DefaultVerticalMeasurementID": "Rotary Table",
                "VerticalMeasurements": [
                  {
                    "VerticalMeasurementID": "Rotary Table",
                    "VerticalMeasurementTypeID": "srn:reference-data/VerticalMeasurementType:Rotary Table:",
                    "VerticalMeasurement": 20,
                    "VerticalMeasurementPathID": "srn:reference-data/VerticalMeasurementPath:Elevation:",
                    "VerticalMeasurementUnitOfMeasureID": "srn:reference-data/UnitOfMeasure:m:",
                    "VerticalCRSID": "srn:reference-data/VerticalCRS:nap:"
                  }
                ],
                "OperatingEnvironmentID": "srn:reference-data/WellOperatingEnvironment:on:",
                "CountryID": "srn:master-data/GeopoliticalEntity:Netherlands:",
                "StateProvinceID": "srn:master-data/GeopoliticalEntity:Drenthe:",
                "QuadrantID": "srn:master-data/GeopoliticalEntity:d:"
              }
            },
            "meta": null,
            "id": "opendes:doc:0f23276e96274461872adcb222f1ef1d",
            "version": 1599141178852896,
            "kind": "opendes:osdu-r2-core:test:1.0.0",
            "acl": {
              "viewers": [
                "data.default.viewers@opendes.ibm.com"
              ],
              "owners": [
                "data.default.owners@opendes.ibm.com"
              ]
            },
            "legal": {
              "legaltags": [
                "opendes-public-usa-dataset-1"
              ],
              "otherRelevantDataCountries": [
                "US"
              ],
              "status": "compliant"
            },
            "createUser": "osdu-dev@odi.ibm.com",
            "createTime": "2020-09-03T13:53:00.719Z"
          }
        }
      ],
      "retryRecords": [
        "[opendes:doc:6d29c781d5484e1dbc34d392f58cd056,opendes:doc:6d29c781d5484e1dbc34d392f58cd014,opendes:doc:6d29c781d5484e1dbc34d392f58cd097,opendes:doc:6d29c781d5484e1dbc34d392f58cd058]"
      ]
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Create or update records

PUT /records

Request

Custom Headers

  • Tenant identifier

  • reference

  • Allowable values: [*/*,application/json]

Query Parameters

  • skipdupes

records

  • curl -k -X PUT -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id} -d '[
    {
    "acl": {
    "owners": [
    "string"
    ],
    "viewers": [
     "string"
    ]
    },
    "ancestry": {
    "parents": [
    "string"
    ]
    },
    "data": {},
    "id": "common:welldb:123456",
    "kind": "common:welldb:wellbore:1.0.0",
    "legal": {
    "legaltags": [
    "string"
    ],
    "otherRelevantDataCountries": [
    "string"
    ],
    "status": "compliant"
    },
    "meta": [
    {
    "additionalProp1": {},
    "additionalProp2": {},
    "additionalProp3": {}
    }
    ],
    "version": 0
    }
    ]'
    "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/records"

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "recordCount": 12,
      "recordIds": [
        "[opendes:doc:6d29c781d5484e1dbc34d392f58cd055,opendes:doc:6d29c781d5484e1dbc34d392f58cd034,opendes:doc:6d29c781d5484e1dbc34d392f58cd067,opendes:doc:6d29c781d5484e1dbc34d392f58cd078]"
      ],
      "skippedRecordIds": [
        "[opendes:doc:6d29c781d5484e1dbc34d392f58cd058,opendes:doc:6d29c781d5484e1dbc34d392f58cd036,opendes:doc:6d29c781d5484e1dbc34d392f58cd017]"
      ]
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Update records metadata

PATCH /records

Request

Custom Headers

  • Tenant identifier

  • reference

  • Allowable values: [*/*,application/json]

Record bulk update param

  • curl -k -X PATCH -H "data-partition-id: {partition_id}" -H "frame-of-reference: {reference_id} -d '{
    "ops": [
    {
    "op": "replace",
    "path": "/acl/owners",
    "value": [
    "string"
    ]
    }
    ],
    "query": {
    "ids": "common:welldb:123456"
    }
    }'
    "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/query/records"

Response

Status Code

  • OK

  • No Content

  • Unauthorized

  • Forbidden

Example responses
  • {
      "lockedRecordIds": [
        "[A12345,X45678,Y45678]"
      ],
      "notFoundRecordIds": [
        "[A12349,X45671,Y45673]"
      ],
      "recordCount": 121,
      "recordIds": [
        "[A12345,X45678,Y45678]"
      ],
      "unAuthorizedRecordIds": [
        "[A12346,X45688,Y45768]"
      ]
    }
  • {
      "_messageCode_": "204",
      "message": "No Content"
    }

Get record versions

GET /records/versions/{id}

Request

Custom Headers

  • Tenant identifier

  • reference

Path Parameters

  • id

  • curl -k -X GET -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/records/versions/{id}"

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "recordId": "opendes:doc:6d29c781d5484e1dbc34d392f58cd067",
      "versions": [
        1
      ]
    }

Get latest record version

GET /records/{id}

Request

Custom Headers

  • Tenant identifier

  • reference

Path Parameters

  • identifier

Query Parameters

  • attribute

  • curl -k -X GET -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/records/{id}"

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "_messageCode_": "200",
      "message": "OK"
    }

Purge record

DELETE /records/{id}

Request

Custom Headers

  • Tenant identifier

  • reference

Path Parameters

  • identifier

  • curl -k -X DELETE -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/records/{id}"

Response

Status Code

  • OK

  • No Content

  • Unauthorized

  • Forbidden

Example responses
  • {
      "_messageCode_": "200",
      "message": "OK"
    }
  • {
      "_messageCode_": "204",
      "message": "No Content"
    }

Get specific record version

GET /records/{id}/{version}

Request

Custom Headers

  • Tenant identifier

  • reference

Path Parameters

  • identifier

  • version

Query Parameters

  • attribute

  • curl -k -X GET -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/records/{id}/{version}"

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "_messageCode_": "200",
      "message": "Success",
      "*/*": "string"
    }

Delete record

POST /records/{id}:delete

Request

Custom Headers

  • Tenant identifier

  • reference

Path Parameters

  • identifier

  • curl -k -X POST -H "data-partition-id: {partition_id}" -H "frame-of-reference: {reference_id} -d '{
    "records": [
    "string"
    ]
    }'
    "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/records/{id}:delete"

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "_messageCode_": "200",
      "message": "OK"
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Create schemas

POST /schemas

Request

Custom Headers

  • Tenant identifier

  • reference

schema

  • curl -k -X POST -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" -d '{
    "ext": {},
    "kind": "common:welldb:wellbore:1.0.0",
    "schema": [
    {
    "ext": {},
    "kind": "string",
    "path": "string"
    }
    ]
    }'
    "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/schemas"

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "_messageCode_": "200",
      "message": "OK"
    }
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Get schema for kind of resource

GET /schemas/{kind}

Request

Custom Headers

  • Tenant identifier

  • reference

Path Parameters

  • kind

  • curl -k -X GET -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/schemas/{kind}"

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "ext": "csv",
      "kind": "common:welldb:wellbore:1.0.0",
      "schema": [
        {
          "ext": "csv",
          "kind": "core:dl:geopoint",
          "path": "location"
        }
      ]
    }

Delete schema for kind of resource

DELETE /schemas/{kind}

Request

Custom Headers

  • Tenant identifier

  • reference

Path Parameters

  • kind

  • curl -k -X DELETE -H "data-partition-id: {partition_id}"  -H "frame-of-reference: {reference_id}" "https://{cpd_cluster_host}{:port}/osdu-storage/api/storage/v2/schemas/{kind}"

Response

Status Code

  • OK

  • No Content

  • Unauthorized

  • Forbidden

Example responses
  • {
      "_messageCode_": "200",
      "message": "OK"
    }
  • {
      "_messageCode_": "200",
      "message": "No Content"
    }

Get all workflows for a tenant

GET /workflow

Request

Custom Headers

  • The file type or format of the request body

  • Tenant identifier

Query Parameters

  • Text to search workflow by name

  • curl -k -X GET https://{HOSTNAME}:{PORT_NUMBER}/osdu-workflow/api/workflow/v1/workflow -H 'content-type: application/json' -H "data-partition-id: {partition_id}"
    

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Create a workflow

POST /workflow

Request

Custom Headers

  • The file type or format of the request body

  • Tenant identifier

  • Allowable values: [*/*,application/json]

request

  • curl -k -X POST https://{HOSTNAME}:{PORT_NUMBER}/osdu-workflow/api/workflow/v1/workflow -H 'content-type: application/json' -H "data-partition-id: {partition_id}" -d '{
        "description": "This is csv parser workflow",
        "registrationInstructions": {},
        "workflowName": "{{workflow_name}}"
        }'
    

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Get a specific workflow based on its name

GET /workflow/{workflow_name}

Request

Custom Headers

  • The file type or format of the request body

  • Tenant identifier

Path Parameters

  • Workflow name

  • curl -k -X GET https://{HOSTNAME}:{PORT_NUMBER}/osdu-workflow/api/workflow/v1/workflow/{{workflow_name}} -H 'content-type: application/json' -H "data-partition-id: {partition_id}"
    

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Delete a specific workflow based on its name

DELETE /workflow/{workflow_name}

Request

Custom Headers

  • The file type or format of the request body

  • Tenant identifier

Path Parameters

  • Workflow name

  • curl -k -X DELETE https://{HOSTNAME}:{PORT_NUMBER}/osdu-workflow/api/workflow/v1/workflow/{{workflow_name}} -H 'content-type: application/json' -H "data-partition-id: {partition_id}"
    

Response

Status Code

  • No Content

  • Unauthorized

  • Forbidden

No Sample Response

This method does not specify any sample responses.

Get all instances that were run for a given workflow

GET /workflow/{workflow_name}/workflowRun

Request

Custom Headers

  • The file type or format of the request body

  • Tenant identifier

Path Parameters

  • Workflow name

Query Parameters

  • Set of parameters that filter instances

  • curl -k -X GET https://{HOSTNAME}:{PORT_NUMBER}/osdu-workflow/api/workflow/v1/workflow/{{workflow_name}}/workflowRun -H 'content-type: application/json' -H "data-partition-id: {partition_id}"
    

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Trigger a workflow based on its name

POST /workflow/{workflow_name}/workflowRun

Request

Custom Headers

  • The file type or format of the request body

  • Tenant identifier

  • Allowable values: [*/*,application/json]

Path Parameters

  • Workflow name

Request body structure

  • curl -k -X POST https://{HOSTNAME}:{PORT_NUMBER}/osdu-workflow/api/workflow/v1/workflow/{{workflow_name}}/workflowRun -H 'content-type: application/json' -H "data-partition-id: {partition_id}" -d '{
    "executionContext": {"data-partition-id": "opendes"},
    "runId": "{{runid}}"
    }'
    

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Get workflow that was run based on the run ID

GET /workflow/{workflow_name}/workflowRun/{runId}

Request

Custom Headers

  • The file type or format of the request body

  • Tenant identifier

Path Parameters

  • Run ID

  • Workflow name

  • curl -k -X GET https://{HOSTNAME}:{PORT_NUMBER}/osdu-workflow/api/workflow/v1/workflow/{{workflow_name}}/workflowRun/{{runid}} -H 'content-type: application/json' -H "data-partition-id: {partition_id}"
    

Response

Status Code

  • OK

  • Unauthorized

  • Forbidden

  • Not Found

No Sample Response

This method does not specify any sample responses.

Update the workflow for a specific run

PUT /workflow/{workflow_name}/workflowRun/{runId}

Request

Custom Headers

  • The file type or format of the request body

  • Tenant identifier

  • Allowable values: [*/*,application/json]

Path Parameters

  • Run ID

  • Workflow name

Request body structure

  • curl -k -X PUT https://{HOSTNAME}:{PORT_NUMBER}/osdu-workflow/api/workflow/v1/workflow/{{workflow_name}}/workflowRun/{{runid}} -H 'content-type: application/json' -H "data-partition-id: {partition_id}" -d '{
        "status": "submitted"
        }'
    

Response

Status Code

  • OK

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

Example responses
  • {
      "_messageCode_": "201",
      "message": "Created"
    }

Know About Wellbore DDMS service

GET /ddms/v2/about

Request

No Request Parameters

This method does not accept any request parameters.

  • curl -k -X GET 'https://{HOSTNAME}:{PORT_NUMBER}/osdu-wellbore/api/os-wellbore-ddms/ddms/v2/about'
    

Response

Status Code

  • Successful Response

No Sample Response

This method does not specify any sample responses.

Get Wellbore DDMS service version

GET /ddms/v2/version

Request

No Request Parameters

This method does not accept any request parameters.

  • curl -k -X GET 'https://{HOSTNAME}:{PORT_NUMBER}/osdu-wellbore/api/os-wellbore-ddms/ddms/v2/version' -H 'Authorization: Bearer {{token}}'
    

Response

Status Code

  • Successful Response

No Sample Response

This method does not specify any sample responses.

Get the status of the Wellbore DDMS service

GET /ddms/v2/status

Request

Custom Headers

  • identifier of the data partition to query

    Possible values: length ≥ 1

  • curl -k -X GET 'https://{HOSTNAME}:{PORT_NUMBER}/osdu-wellbore/api/os-wellbore-ddms/ddms/v2/status' -H 'Authorization: Bearer {{token}}'
    

Response

The base model forbids fields which are not declared initially in the pydantic model

Status Code

  • Successful Response

  • Validation Error

No Sample Response

This method does not specify any sample responses.

Get the Well using wks:well:1.0.2 schema

Get the Well object using its id.

If the well kind is wks:well:1.0.2 returns the record directly

If the well kind is different wks:well:1.0.2 it will get the raw record and convert the results to match the wks:well:1.0.2. If convertion is not possible returns an error 500.

Required roles: 'users.datalake.viewers' or 'users.datalake.editors' or 'users.datalake.admins'. In addition, users must be a member of data groups to access the data.

GET /ddms/v2/wells/{wellid}

Request

Custom Headers

  • identifier of the data partition to query

    Possible values: length ≥ 1

Path Parameters

Response

The base model forbids fields which are not declared initially in the pydantic model

Status Code

  • Successful Response

  • Well not found

  • Validation Error

No Sample Response

This method does not specify any sample responses.

Delete the well. The API performs a logical deletion of the given record

Required roles: 'users.datalake.editors' or 'users.datalake.admins'.

DELETE /ddms/v2/wells/{wellid}

Request

Custom Headers

  • identifier of the data partition to query

    Possible values: length ≥ 1

Path Parameters

Query Parameters

  • Whether or not to delete records children

    Default: false

Response

Status Code

  • Record deleted successfully

  • Well not found

  • Validation Error

No Sample Response

This method does not specify any sample responses.