Skip to content

Create a computation specification

Request

Create a computation specification. The create request must contain all the input and output data-type IDs which are used to define the computation specification. These data-types must have previously been created. As an example, a computation specification could be defined as a specification for a compute which takes two pieces of input data and calculates a single piece of output data. The specification for this compute would take two input data-types and output a single output data-type. The order of the input and output data-type IDs provided in the creation of the computation specification is maintained in the created computation specification and may only be changed through performing PATCH operations on the computation specification.

Security
bearer and appkey
Headers
slb-partition-idstringrequired

Data partition id.

Bodyapplication/jsonrequired

The computation specification to be created.

idstring^[a-z]([a-z0-9]|-)*[a-z0-9]:(data-types|compu...

The optional id of the specification. The id should be of the form '{authority}:{spec-type}:{id}', where '{authority}' is the owning authority of the specification, '{spec-type}' is one of 'data-types', 'computation-specs' or 'workflow-specs'.

Example:"slb:data-types:custom-specification"
namestringrequired

The name of the specification.

Example:"custom-specification"
descriptionstringrequired

The description of the specification.

Example:"Custom specification."
inputDataTypeIdsArray of stringsrequired

The input data-type IDs for the computation specification. These data-types must have already been previously created. The order of the input data-type IDs is maintained in the created computation specification. Note that specific versions of a data-type can be specified by using the format 'id:version'.

Example:
[ "decline-curves", "drilling-constraints", "facility-constraints\"" ]
outputDataTypeIdsArray of stringsrequired

The output data-type IDs for the computation specification. These data-types must have already been previously created. The order of the output data-type IDs is maintained in the created computation specification. Note that specific versions of a data-type can be specified by using the format 'id:version'.

Example:
[ "production-forecast" ]
annotationsArray of objects(Annotation)

The annotations for the computation specification.

Example:
[ { "address": { … }, "key": "name", "value": "Decline Curves", "createdBy": "user@slb.com" }, { "address": { … }, "key": "name", "value": "Drilling Constraints", "createdBy": "user@slb.com" }, { "address": { … }, "key": "name", "value": "Facility Constraints", "createdBy": "user@slb.com" }, { "address": { … }, "key": "name", "value": "Production Forecast", "createdBy": "user@slb.com" } ]
curl -i -X POST \
  https://api.delfi.slb.com/fdplan/evaluation/v1/computation-specs \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'appkey: YOUR_API_KEY_HERE' \
  -H 'slb-partition-id: string' \
  -d '{
    "id": "slb:computation-specs:custom-computation-spec",
    "name": "custom-computation-spec",
    "description": "Description",
    "inputDataTypeIds": [
      "decline-curves",
      "drilling-constraints",
      "facility-constraints"
    ],
    "outputDataTypeIds": [
      "production-forecast"
    ],
    "annotations": [
      {
        "address": {
          "type": "DataTypeInput",
          "computationIndex": 0,
          "dataTypeIndex": 0
        },
        "key": "name",
        "value": "Decline Curves",
        "createdBy": "user@slb.com"
      },
      {
        "address": {
          "type": "DataTypeInput",
          "computationIndex": 0,
          "dataTypeIndex": 1
        },
        "key": "name",
        "value": "Drilling Constraints",
        "createdBy": "user@slb.com"
      },
      {
        "address": {
          "type": "DataTypeInput",
          "computationIndex": 0,
          "dataTypeIndex": 2
        },
        "key": "name",
        "value": "Facility Constraints",
        "createdBy": "user@slb.com"
      },
      {
        "address": {
          "type": "DataTypeOutput",
          "computationIndex": 0,
          "dataTypeIndex": 0
        },
        "key": "name",
        "value": "Production Forecast",
        "createdBy": "user@slb.com"
      }
    ]
  }'

Responses

Computation specification created successfully.

Bodyapplication/json
idstringrequired

The ID of the specification.

Example:"01DV2RPKYS5NYBAR6TNMJ8TNT8"
namestringrequired

The name of the specification.

Example:"A custom data-type"
versionintegerrequired

The version of the specification definition.

Example:1
latestbooleanrequired

Whether this is the latest version of the given specification.

Example:true
archivedbooleanrequired

Whether this specification has been marked as archived.

Example:false
descriptionstringrequired

The description of the specification.

Example:"A specification"
createdBystringrequired

The ID of the user who created the specification.

Example:"user@slb.com"
createdAtstring, (date-time)required

The date the specification was created.

Example:"2020-01-01T00:00:00.000Z"
inputDataTypeIdsArray of objects(VersionId)required

The input data-type IDs for the computation specification.

Example:
[ { "id": "decline-curves", "version": 1 }, { "id": "drilling-constraints", "version": 1 }, { "id": "facility-constraints", "version": 1 } ]
outputDataTypeIdsArray of objects(VersionId)required

The output data-type IDs for the computation specification.

Example:
[ { "id": "production-forecast", "version": 1 } ]
annotationsArray of objects(Annotation)

The annotations for the computation specification. These annotations can be used to annotate the computation specification with useful information such as a 'name'.

Example:
[ { "address": { … }, "key": "name", "value": "Decline Curves", "createdBy": "user@slb.com" }, { "address": { … }, "key": "name", "value": "Drilling Constraints", "createdBy": "user@slb.com" }, { "address": { … }, "key": "name", "value": "Facility Constraints", "createdBy": "user@slb.com" }, { "address": { … }, "key": "name", "value": "Production Forecast", "createdBy": "user@slb.com" } ]
Response
{ "id": "01DV2RPKYS5NYBAR6TNMJ8TNT8", "name": "custom-computation-spec", "version": 1, "latest": true, "archived": false, "description": "Description", "createdBy": "user@slb.com", "createdAt": "2020-01-01T00:00:00.000Z", "inputDataTypeIds": [ { … }, { … }, { … } ], "outputDataTypeIds": [ { … } ], "annotations": [ { … }, { … }, { … }, { … } ] }