The Custom Parameter API enables administration of the Custom Parameter definition found in DrillPlan's Corporate Settings. Further details can be found in the DrillPlan section of DELFI Help under the Custom Parameters Definition topic.
For authentication and general guidance using DrillPlan's APIs, please visit the API Consumption Guide page.
The Custom Parameters API allows the full range of standard C.R.U.D. actions.
The API can be accessed via different authentication grant types (e.g. Authorization Code Flow (ACF) or Client Credentials etc.). Please find some considerations of each type below.
Where possible, we recommend using ACF for interacting with DrillPlan, to ensure that no data entitlements or permissions are breached via a service account.
All users have read access to the corporate settings and therefore can query the following endpoints:
- GET /v1/parameter-definitions
- GET /v1/parameter-definitions/{id}
However create, update and delete actions:
- POST /v1/parameter-definitions
- PUT /v1/parameter-definitions/{id}
- DELETE /v1/parameter-definitions/{id}
require the additional Corporate Admin permission, granted in the Permission Management page (see help documentation for more information)
Service accounts have unrestricted access and admin rights to DrillPlan's data and settings. They should therefore be used and issued with caution. Service accounts can be used to perform the full range of C.R.U.D. actions on the Custom Parameter API.
The list of all custom parameters can be read as follows:
curl -X GET '<baseURL>/drillplan/custom-parameters/v1/parameter-definitions' \
-H 'slb-data-partition-id: <slbPartitionId>' \
-H 'appkey: <appKey>' \
-H 'Authorization: Bearer <jwtoken>'For the data schema and API details please visit the Custom Parameter API swagger documentation.
A single custom parameter can be read as follows:
curl -X GET '<baseURL>/drillplan/custom-parameters/v1/parameter-definitions/{id}' \
-H 'slb-data-partition-id: <slbPartitionId>' \
-H 'appkey: <appKey>' \
-H 'Authorization: Bearer <jwtoken>'For the data schema and API details please visit the Custom Parameter API swagger documentation.
A new example custom parameter can be created as follows:
curl -L -X POST '<baseURL>/drillplan/custom-parameters/v1/parameter-definitions' \
-H 'slb-data-partition-id: <slbPartitionId>' \
-H 'appkey: <appKey>' \
-H 'Authorization: Bearer <jwtoken>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Max Expected H2S %",
"type": "Number",
"level": "Section",
"description": "The maximum H2S % should be entered for each section",
"is_available_as_ddi": true,
"tags": [
"H2S", "Engine Parameters"
]
}'For the data schema and API details please visit the Custom Parameter API swagger documentation.
An example custom parameter can be updated as follows:
curl -L -X PUT '<baseURL>/drillplan/custom-parameters/v1/parameter-definitions/{id}' \
-H 'slb-data-partition-id: <slbPartitionId>' \
-H 'appkey: <appKey>' \
-H 'Authorization: Bearer <jwtoken>' \
-H 'Content-Type: application/json' \
-d '{
"id": "{id}",
"unique_id": "{id}",
"name": "Max Expected H2S %",
"type": "Number",
"level": "Section",
"description": "The maximum H2S % should be entered for each section",
"is_available_as_ddi": true,
"tags": [
"H2S", "Engine Parameters", "Extra Tag"
]
}'For the data schema and API details please visit the Custom Parameter API swagger documentation.
An example custom parameter can be deleted as follows:
curl -L -X DELETE '<baseURL>/drillplan/custom-parameters/v1/parameter-definitions/{id}' \
-H 'slb-data-partition-id: <slbPartitionId>' \
-H 'appkey: <appKey>' \
-H 'Authorization: Bearer <jwtoken>' \For the data schema and API details please visit the Custom Parameter API swagger documentation.