# Evaluation

The Evaluation API is responsible for evaluation workflows in FDPlan. The
key features of the API include:

* The ability to create custom evaluation workflows.
* The ability to drive custom evaluation workflows and computations.


The key API concepts include:

* **workflow-specs**: A workflow-spec is a workflow specification defining
all the computation specifications which form the workflow. A workflow
specification also defines the edges which connect computations together
in a graph. These edges connect an output from one computation
specification to the input of another.
A number of default 'system' workflow specifications are provided to the
user. Details of these 'system' workflow specifications can be discovered
by using the API to get all workflow specifications.
* **computation-specs**: A computation-spec is a computation specification
which defines all the input and output data-types for the computation.
A number of default 'system' computation specifications are provided to
the user.  Details of these 'system' computation specifications can be
discovered by using the API to get all computation specifications.
* **data-types**: A data-type is a specification for a data representation
which is required as one of a computation-spec's inputs or produced as
one of a computation-spec's outputs.
A number of default 'system' data-types are provided to the user. Details
of these 'system' data-types can be discovered by using the API to get all
data-types.
* **computation**: A computation is an instance of a computation-spec for a
running workflow. It encapsulates the state of the computation
(i.e. running, succeeded), input/output data containers which have been
associated with the computation and any errors which have occurred during
the running of the computation. The input and output data containers
associated with the computation can be accessed through the containers API
operations.
* **container**: A container is a resource which holds all the data for a
given data-type definition.
* **schema**: A schema is a formal description of a data-type. It defines
the structure of the data-type against which data can be validated.
A number of default schemas for 'system' data-types are provided for the
user.
Currently only JSON schemas are supported, for more information see
https://json-schema.org/.
Schemas defined in the OSDU schema service may be used to describe
evaluation data-types by using their unique identifiers in schema
references, e.g. osdu:wks:wellbore:1.0.0.


# Table of contents

* [Get all workflow specifications](#get-all-workflow-specifications)
* [Create workflow specification](#create-workflow-specification)
* [Get a workflow specification](#get-a-workflow-specification)
* [Create or update workflow specification](#create-or-update-workflow-specification)
* [Update a workflow specification](#update-a-workflow-specification)
* [Create or update configuration for a computation](#create-or-update-configuration-for-a-computation)
* [Get all computation specifications](#get-all-computation-specifications)
* [Create a computation specification](#create-a-computation-specification)
* [Get computation specification](#get-computation-specification)
* [Create or update a computation specification](#create-or-update-a-computation-specification)
* [Update computation specification](#update-computation-specification)
* [Get all data-types](#get-all-data-types)
* [Create data-type](#create-data-type)
* [Get a data-type](#get-a-data-type)
* [Create or update data-type](#create-or-update-data-type)
* [Update a data-type](#update-a-data-type)
* [Get a computation](#get-a-computation)
* [Set status of computation](#set-status-of-computation)
* [Get container](#get-container)
* [Upload file associated with a container](#upload-file-associated-with-a-container)
* [Get a file associated with a container](#get-a-file-associated-with-a-container)
* [Get a signed url which can be used to download a file.](#get-a-signed-url-which-can-be-used-to-download-a-file)
* [Get a signed url which can be used to upload a file.](#get-a-signed-url-which-can-be-used-to-upload-a-file)
* [Get schema](#get-schema)


# Get all workflow specifications 

Get all workflow specifications. The parameter 'IncludePreviousVersions' may be used to return either the most recent versions of the workflow specifications or all possible versions of each workflow specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **includePreviousVersions** Unless includePreviousVersions is true the response will return only the latest version of each specification.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/workflow-specs' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200
[
{
"id": "id",
"createdBy": "system",
"name": "Well driven",
"description": "Well driven",
"latest": true,
"version": 1,
"computationSpecs": [
{
"id": "ix",
"latest": true,
"name": "ix",
"createdBy": "system",
"version": 1,
"address": [
{
"computationIndex": 0,
"type": "Computation"
}
],
"inputDataTypeIds": [
{
"id": "decline-curves",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "drilling-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "facility-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 0,
"dataTypeIndex": 0
}
}
]
},
{
"id": "peep",
"latest": true,
"name": "peep",
"createdBy": "system",
"version": 1,
"address": [
{
"computationIndex": 1,
"type": "Computation"
}
],
"inputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "well-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "general-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
},
{
"id": "general-opex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 3,
"type": "DataTypeInput"
}
]
},
{
"id": "economic-framework",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 4,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "peep-output",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 0,
"type": "DataTypeOutput"
}
]
}
]
}
],
"edges": [
{
"fromAddressType": "DataTypeOutput",
"fromComputationIndex": 0,
"fromDataTypeIndex": 0,
"toComputationIndex": 1,
"toDataTypeIndex": 0
}
]
}
]

[Back to table of contents](#toc)

# Create workflow specification 

Create workflow specification. The create request must contain all the computation specifications which are to make up the workflow specification. These computation specifications must have previously been created. The request must also contain all the edges which connect the computation specifications together. The edges describe the flow of data from one computation specifications output data-type to another computation specifications input data-type. As an example, a workflow specification could consist of two computation specifications connected together. The connection between the two computation specifications could consist of the first output data-type from the first computation specification being connected to the first input data-type of the second computation specification. If the two computation specifications being connected together were the 'ix' and 'peep' computation specifications, the output data-type 'production-forecast' of the 'ix' computation specification would be connected to the input data-type 'production-forecast' of the 'peep' computation specification. As the 'production-forecast' data-type is the first output data-type (zeroth index) in the 'ix' computation specification and the first input data-type (zeroth index) in the 'peep' computation specification, the workflow edge would be defined as going from the index zero output data-type of the computation specification with index zero (the 'ix' computation specification) to  the index zero output data-type of the computation index with index one (the 'peep' computation index). The order of the computation specifications provided in the creation of the workflow specification is maintained in the created workflow specification and may only be changed through performing PATCH operations on the workflow specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **workflowSpec** The workflow specification to be created.


details
summary
b
Example
curl -request POST 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/workflow-specs' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '{
"id": "slb:workflow-specs:custom-workflow-spec",
"name": "custom-workflow-spec",
"description": "Description",
"computationSpecIds": [
"ix",
"peep"
],
"edges": [
{
"fromAddressType": "DataTypeOutput",
"fromComputationIndex": 0,
"fromDataTypeIndex": 0,
"toComputationIndex": 1,
"toDataTypeIndex": 0
}
]
}'

Response: 201
{
"id": "01DV2RPKYS5NYBAR6TNMJ8TNT8",
"name": "custom-workflow-spec",
"version": 1,
"latest": true,
"archived": false,
"description": "Description",
"createdBy": "user@slb.com",
"createdAt": "2020-01-01T00:00:00.000Z",
"computationSpecs": [
{
"id": "ix",
"name": "ix",
"version": 1,
"latest": true,
"archived": false,
"description": "A specification.",
"createdBy": "system",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"type": "Computation",
"computationIndex": 0,
"dataTypeIndex": 0
},
"inputDataTypeIds": [
{
"id": "decline-curves",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "drilling-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "facility-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 0,
"dataTypeIndex": 0
}
}
]
},
{
"id": "peep",
"name": "peep",
"version": 1,
"latest": true,
"archived": false,
"description": "A specification.",
"createdBy": "system",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"type": "Computation",
"computationIndex": 0,
"dataTypeIndex": 0
},
"inputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "well-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "general-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
},
{
"id": "general-opex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 3,
"type": "DataTypeInput"
}
]
},
{
"id": "economic-framework",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 4,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "peep-output",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 1,
"dataTypeIndex": 0
}
}
]
}
],
"edges": [
{
"fromAddressType": "DataTypeOutput",
"fromComputationIndex": 0,
"fromDataTypeIndex": 0,
"toComputationIndex": 1,
"toDataTypeIndex": 0
}
]
}

[Back to table of contents](#toc)

# Get a workflow specification 

Get a workflow specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **workflowSpecId** The workflow specification ID.
* **version** The id of the data-type to get. If not specified, the latest version will be returned.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/workflow-specs/{workflowSpecId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200
{
"id": "01DV2RPKYS5NYBAR6TNMJ8TNT8",
"name": "custom-workflow-spec",
"version": 1,
"latest": true,
"archived": false,
"description": "Description",
"createdBy": "user@slb.com",
"createdAt": "2020-01-01T00:00:00.000Z",
"computationSpecs": [
{
"id": "ix",
"name": "ix",
"version": 1,
"latest": true,
"archived": false,
"description": "A specification.",
"createdBy": "system",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"type": "Computation",
"computationIndex": 0,
"dataTypeIndex": 0
},
"inputDataTypeIds": [
{
"id": "decline-curves",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "drilling-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "facility-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 0,
"dataTypeIndex": 0
}
}
]
},
{
"id": "peep",
"name": "peep",
"version": 1,
"latest": true,
"archived": false,
"description": "A specification.",
"createdBy": "system",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"type": "Computation",
"computationIndex": 0,
"dataTypeIndex": 0
},
"inputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "well-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "general-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
},
{
"id": "general-opex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 3,
"type": "DataTypeInput"
}
]
},
{
"id": "economic-framework",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 4,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "peep-output",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 1,
"dataTypeIndex": 0
}
}
]
}
],
"edges": [
{
"fromAddressType": "DataTypeOutput",
"fromComputationIndex": 0,
"fromDataTypeIndex": 0,
"toComputationIndex": 1,
"toDataTypeIndex": 0
}
]
}

[Back to table of contents](#toc)

# Create or update workflow specification 

Create or update workflow specification. The request must contain all the computation specifications which are to make up the workflow specification. These computation specifications must have previously been created. The request must also contain all the edges which connect the computation specifications together. The edges describe the flow of data from one computation specifications output data-type to another computation specifications input data-type. As an example, a workflow specification could consist of two computation specifications connected together. The connection between the two computation specifications could consist of the first output data-type from the first computation specification being connected to the first input data-type of the second computation specification. If the two computation specifications being connected together were the 'ix' and 'peep' computation specifications, the output data-type 'production-forecast' of the 'ix' computation specification would be connected to the input data-type 'production-forecast' of the 'peep' computation specification. As the 'production-forecast' data-type is the first output data-type (zeroth index) in the 'ix' computation specification and the first input data-type (zeroth index) in the 'peep' computation specification, the workflow edge would be defined as going from the index zero output data-type of the computation specification with index zero (the 'ix' computation specification) to  the index zero output data-type of the computation index with index one (the 'peep' computation index). The order of the computation specifications provided in the creation of the workflow specification is maintained in the created workflow specification and may be changed through performing PATCH or PUT operations on the workflow specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **workflowSpecId** The workflow specification ID.
* **workflowSpec** The workflow specification to be created.


details
summary
b
Example
curl -request PUT 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/workflow-specs/{workflowSpecId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '{
"id": "slb:workflow-specs:custom-workflow-spec",
"name": "custom-workflow-spec",
"description": "Description",
"computationSpecIds": [
"ix",
"peep"
],
"edges": [
{
"fromAddressType": "DataTypeOutput",
"fromComputationIndex": 0,
"fromDataTypeIndex": 0,
"toComputationIndex": 1,
"toDataTypeIndex": 0
}
]
}'

Response: 200
{
"id": "01DV2RPKYS5NYBAR6TNMJ8TNT8",
"name": "custom-workflow-spec",
"version": 1,
"latest": true,
"archived": false,
"description": "Description",
"createdBy": "user@slb.com",
"createdAt": "2020-01-01T00:00:00.000Z",
"computationSpecs": [
{
"id": "ix",
"name": "ix",
"version": 1,
"latest": true,
"archived": false,
"description": "A specification.",
"createdBy": "system",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"type": "Computation",
"computationIndex": 0,
"dataTypeIndex": 0
},
"inputDataTypeIds": [
{
"id": "decline-curves",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "drilling-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "facility-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 0,
"dataTypeIndex": 0
}
}
]
},
{
"id": "peep",
"name": "peep",
"version": 1,
"latest": true,
"archived": false,
"description": "A specification.",
"createdBy": "system",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"type": "Computation",
"computationIndex": 0,
"dataTypeIndex": 0
},
"inputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "well-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "general-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
},
{
"id": "general-opex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 3,
"type": "DataTypeInput"
}
]
},
{
"id": "economic-framework",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 4,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "peep-output",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 1,
"dataTypeIndex": 0
}
}
]
}
],
"edges": [
{
"fromAddressType": "DataTypeOutput",
"fromComputationIndex": 0,
"fromDataTypeIndex": 0,
"toComputationIndex": 1,
"toDataTypeIndex": 0
}
]
}

[Back to table of contents](#toc)

# Update a workflow specification 

Update a workflow specification. It is only possible to update the "name", "description", "archived", "computationSpecs", "edges" and "annotations" fields of the workflow specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **workflowSpecId** The workflow specification ID.
* **patches** The patches to apply to the workflow specification. Only "replace" operations are supported with the exception of "add" and "remove" for "annotations" path. It is only possible to update the "name", "description", "archived", "computationSpecs", "edges" and "annotations" fields of the workflow specification.


details
summary
b
Example
curl -request PATCH 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/workflow-specs/{workflowSpecId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '[
{
"op": "replace",
"path": "description",
"value": "Description"
},
{
"op": "replace",
"path": "archived",
"value": false
}
]'

Response: 200
{
"id": "01DV2RPKYS5NYBAR6TNMJ8TNT8",
"name": "custom-workflow-spec",
"version": 1,
"latest": true,
"archived": false,
"description": "Description",
"createdBy": "user@slb.com",
"createdAt": "2020-01-01T00:00:00.000Z",
"computationSpecs": [
{
"id": "ix",
"name": "ix",
"version": 1,
"latest": true,
"archived": false,
"description": "A specification.",
"createdBy": "system",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"type": "Computation",
"computationIndex": 0,
"dataTypeIndex": 0
},
"inputDataTypeIds": [
{
"id": "decline-curves",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "drilling-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "facility-constraints",
"version": 1,
"address": [
{
"computationIndex": 0,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 0,
"dataTypeIndex": 0
}
}
]
},
{
"id": "peep",
"name": "peep",
"version": 1,
"latest": true,
"archived": false,
"description": "A specification.",
"createdBy": "system",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"type": "Computation",
"computationIndex": 0,
"dataTypeIndex": 0
},
"inputDataTypeIds": [
{
"id": "production-forecast",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 0,
"type": "DataTypeInput"
}
]
},
{
"id": "well-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 1,
"type": "DataTypeInput"
}
]
},
{
"id": "general-capex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 2,
"type": "DataTypeInput"
}
]
},
{
"id": "general-opex",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 3,
"type": "DataTypeInput"
}
]
},
{
"id": "economic-framework",
"version": 1,
"address": [
{
"computationIndex": 1,
"dataTypeIndex": 4,
"type": "DataTypeInput"
}
]
}
],
"outputDataTypeIds": [
{
"id": "peep-output",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 1,
"dataTypeIndex": 0
}
}
]
}
],
"edges": [
{
"fromAddressType": "DataTypeOutput",
"fromComputationIndex": 0,
"fromDataTypeIndex": 0,
"toComputationIndex": 1,
"toDataTypeIndex": 0
}
]
}

[Back to table of contents](#toc)

# Create or update configuration for a computation 

Create or update configuration properties for a computation. The paramaters workflowSpecId
and computationIndex will be used to uniquely identify the configuration to be created or updated.

**Note**: It is advised not to change the computation configurations while an evaluation is running. This might lead to unexpected evaluation results.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **workflowSpecId** The workflow specification ID.
* **computationIndex** The computation index in the workflow spec.
* **config** The configuration properties for a computation


details
summary
b
Example
curl -request PUT 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/workflow-specs/{workflowSpecId}/computation-config?computationIndex=value' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data ''

Response: 400
{
"data": {
"code": 500,
"message": "internal server error"
}
}

[Back to table of contents](#toc)

# Get all computation specifications 

Get all computation specifications. The parameter 'IncludePreviousVersions' may be used to return either the most recent versions of the computation specifications or all possible versions of each computation specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **includePreviousVersions** Unless includePreviousVersions is true the response will return only the latest version of each specification.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/computation-specs' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200
[
{
"id": "ix",
"latest": true,
"name": "ix",
"createdBy": "system",
"version": 1,
"inputDataTypeIds": [
{
"id": "decline-curves",
"version": 1
},
{
"id": "drilling-constraints",
"version": 1
},
{
"id": "facility-constraints",
"version": 1
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1
}
]
},
{
"id": "peep",
"latest": true,
"name": "peep",
"createdBy": "system",
"version": 1,
"inputDataTypeIds": [
{
"id": "production-forecast",
"version": 1
},
{
"id": "well-capex",
"version": 1
},
{
"id": "general-capex",
"version": 1
},
{
"id": "general-opex",
"version": 1
},
{
"id": "economic-framework",
"version": 1
}
],
"outputDataTypeIds": [
{
"id": "peep-output",
"version": 1
}
]
}
]

[Back to table of contents](#toc)

# Create a computation specification 

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.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **computationSpec** The computation specification to be created.


details
summary
b
Example
curl -request POST 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/computation-specs' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '{
"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"
}
]
}'

Response: 201
{
"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": [
{
"id": "decline-curves",
"version": 1
},
{
"id": "drilling-constraints",
"version": 1
},
{
"id": "facility-constraints",
"version": 1
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1
}
],
"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"
}
]
}

[Back to table of contents](#toc)

# Get computation specification 

Get computation specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **computationSpecId** The computation specification ID.
* **version** The id of the data-type to get. If not specified, the latest version will be returned.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/computation-specs/{computationSpecId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200
{
"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": [
{
"id": "decline-curves",
"version": 1
},
{
"id": "drilling-constraints",
"version": 1
},
{
"id": "facility-constraints",
"version": 1
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1
}
],
"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"
}
]
}

[Back to table of contents](#toc)

# Create or update a computation specification 

Create or update a computation specification. The 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.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **computationSpecId** The computation specification ID.
* **computationSpec** The computation specification to be created or updated.


details
summary
b
Example
curl -request PUT 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/computation-specs/{computationSpecId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '{
"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"
}
]
}'

Response: 200
{
"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": [
{
"id": "decline-curves",
"version": 1
},
{
"id": "drilling-constraints",
"version": 1
},
{
"id": "facility-constraints",
"version": 1
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1
}
],
"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"
}
]
}

[Back to table of contents](#toc)

# Update computation specification 

Update computation specification. It is only possible to update the "name", "description", "archived", "inputDataTypeIds", "outputDataTypeIds" and "annotations" fields of the computation specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **computationSpecId** The computation specification ID.
* **patches** The patches to apply to the computation specification. Only "replace" operations are supported with the exception of "add" and "remove" for "annotations" path. It is only possible to update the "name", "description", "archived", "inputDataTypeIds", "outputDataTypeIds" and "annotations" fields of the computation specification.


details
summary
b
Example
curl -request PATCH 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/computation-specs/{computationSpecId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '[
{
"op": "replace",
"path": "description",
"value": "Description"
},
{
"op": "replace",
"path": "archived",
"value": false
}
]'

Response: 200
{
"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": [
{
"id": "decline-curves",
"version": 1
},
{
"id": "drilling-constraints",
"version": 1
},
{
"id": "facility-constraints",
"version": 1
}
],
"outputDataTypeIds": [
{
"id": "production-forecast",
"version": 1
}
],
"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"
}
]
}

[Back to table of contents](#toc)

# Get all data-types 

Get all data-types. The parameter 'IncludePreviousVersions' may be used to return either the most recent versions of the data-types or all possible versions of each data-type.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **includePreviousVersions** Unless includePreviousVersions is true the response will return only the latest version of each specification.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/data-types' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200
[
{
"id": "decline-curves",
"name": "decline-curves",
"description": "Decline Curves",
"version": 1,
"fileSpecs": [
{
"extension": "json"
}
]
},
{
"id": "facility-constraints",
"name": "facility-constraints",
"description": "Facility Constraints",
"version": 1,
"fileSpecs": [
{
"extension": "json"
}
]
}
]

[Back to table of contents](#toc)

# Create data-type 

Create data-type. The create request must contain all the file types which are to be associated with the data-type. For example, if the data-type was to allow the use of JSON documents then the request would list it as a file specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **dataType** The data-type to be created.


details
summary
b
Example
curl -request POST 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/data-types' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '{
"id": "slb:data-types:custom-data-type",
"name": "custom-data-type",
"description": "Description",
"fileSpecs": [
{
"extension": "json",
"schemaRef": {
"id": "planning:fdplan:result-set:0.0.1",
"type": "JSON"
},
"defaultFilename": "filename.json"
},
{
"extension": "xlsx"
}
]
}'

Response: 201
{
"id": "01DV2RPKYS5NYBAR6TNMJ8TNT8",
"name": "custom-data-type",
"version": 1,
"latest": true,
"archived": false,
"description": "Description",
"createdBy": "user@slb.com",
"createdAt": "2020-01-01T00:00:00.000Z",
"fileSpecs": [
{
"extension": "json",
"schemaRef": {
"id": "planning:fdplan:result-set:0.0.1",
"type": "JSON"
},
"defaultFilename": "filename.json"
},
{
"extension": "xlsx"
}
]
}

[Back to table of contents](#toc)

# Get a data-type 

Get a data-type.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **dataTypeId** The data-type ID.
* **version** The id of the data-type to get. If not specified, the latest version will be returned.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/data-types/{dataTypeId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200
{
"id": "01DV2RPKYS5NYBAR6TNMJ8TNT8",
"name": "custom-data-type",
"version": 1,
"latest": true,
"archived": false,
"description": "Description",
"createdBy": "user@slb.com",
"createdAt": "2020-01-01T00:00:00.000Z",
"fileSpecs": [
{
"extension": "json",
"schemaRef": {
"id": "planning:fdplan:result-set:0.0.1",
"type": "JSON"
},
"defaultFilename": "filename.json"
},
{
"extension": "xlsx"
}
]
}

[Back to table of contents](#toc)

# Create or update data-type 

Create or update data-type. The request must contain all the file types
which are to be associated with the data-type. For example, if
the data-type was to allow the use of JSON documents then the request
would list it as a file specification.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **dataTypeId** The data-type ID.
* **dataType** The data-type to be updated or created.


details
summary
b
Example
curl -request PUT 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/data-types/{dataTypeId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '{
"id": "slb:data-types:custom-data-type",
"version": 1,
"name": "custom-data-type",
"description": "Description",
"archived": false,
"fileSpecs": [
{
"extension": "json",
"schemaRef": {
"id": "planning:fdplan:result-set:0.0.1",
"type": "JSON"
},
"defaultFilename": "filename.json"
},
{
"extension": "xlsx"
}
]
}'

Response: 200
{
"id": "01DV2RPKYS5NYBAR6TNMJ8TNT8",
"name": "custom-data-type",
"version": 1,
"latest": true,
"archived": false,
"description": "Description",
"createdBy": "user@slb.com",
"createdAt": "2020-01-01T00:00:00.000Z",
"fileSpecs": [
{
"extension": "json",
"schemaRef": {
"id": "planning:fdplan:result-set:0.0.1",
"type": "JSON"
},
"defaultFilename": "filename.json"
},
{
"extension": "xlsx"
}
]
}

[Back to table of contents](#toc)

# Update a data-type 

Update a data-type. It is only possible to update the "name", "description", "archived", and "fileSpecs" fields of the data-type.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **dataTypeId** The data-type ID.
* **patches** The patches to apply to the data-type. Only "replace" operations are supported. It is only possible to update the "name", "description", "archived" and "fileSpecs" fields of the data-type.


details
summary
b
Example
curl -request PATCH 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/data-types/{dataTypeId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '[
{
"op": "replace",
"path": "description",
"value": "Description"
},
{
"op": "replace",
"path": "archived",
"value": false
}
]'

Response: 200
{
"id": "01DV2RPKYS5NYBAR6TNMJ8TNT8",
"name": "custom-data-type",
"version": 1,
"latest": true,
"archived": false,
"description": "Description",
"createdBy": "user@slb.com",
"createdAt": "2020-01-01T00:00:00.000Z",
"fileSpecs": [
{
"extension": "json",
"schemaRef": {
"id": "planning:fdplan:result-set:0.0.1",
"type": "JSON"
},
"defaultFilename": "filename.json"
},
{
"extension": "xlsx"
}
]
}

[Back to table of contents](#toc)

# Get a computation 

Get a computation given the computation ID. The computation contains the state of the computation (i.e. running, succeeded), input/output data containers which has been associated with the computation and any errors which have occurred during the running of the computation. The input and output data containers associated with the computation can be accessed through the containers API operations.
Computations external to FDPlan can discover when computations are required to be performed by querying the FDPlan Events API for events with the type 'com.slb.cloud.fdplan.evaluation.computation_required_{computation_spec_id}_v{computation_spec_version}.v1', for instance 'com.slb.cloud.fdplan.evaluation.computation_required_ix_v1.v1'. The data for this event type contains information on the computation which is required.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **computationId** The ID of the computation.
* **includeDataLinkContent** Flag will include data-link.json content encoded as base64.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/computations/{computationId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200
{
"id": "0006803dc06c9bab3f82d4018287b8ccae575bd68eaa47f3c1797242e78daf03",
"status": "CompletedWithErrors",
"computationSpec": {
"id": "ix",
"version": 1
},
"inputContainers": [
{
"id": "01C7VGQWGZVPSBV9NJMEAJSBGM/containers/decline-curves/01CH0K76B5ANMW149TZZEGPZFV",
"dataType": {
"id": "decline-curves",
"version": 1,
"address": {
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 0
}
},
"fileNames": [
"decline_curves.json"
],
"files": [
{
"name": "decline_curves.json"
}
]
},
{
"id": "01C7VGQWGZVPSBV9NJMEAJSBGM/containers/drilling-constraints/01CH0K76B5ANMW149TZZEGPZFV",
"dataType": {
"id": "drilling-constraints",
"version": 1,
"address": {
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 1
}
},
"fileNames": [
"drilling-constraints.json"
],
"files": [
{
"name": "drilling-constraints.json"
}
]
}
],
"outputContainers": [
{
"id": "01C7VGQWGZVPSBV9NJMEAJSBGM/containers/production-forecast/01CH0K76B5ANMW149TZZEGPZFV",
"dataType": {
"id": "production-forecast",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 0,
"dataTypeIndex": 0
}
},
"fileNames": [
"production-forecast.json"
],
"files": [
{
"name": "production-forecast.json"
}
]
}
],
"computationErrors": [
{
"addresses": [
{
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 0
},
{
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 1
}
],
"message": "Something went wrong."
}
],
"computationConfiguration": {
"schemaRef": {
"ID": "planning:fdplan:dataiku:0.0.1",
"Type": "JSON"
}
}
}

[Back to table of contents](#toc)

# Set status of computation 

Set status of computation given the computation ID.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **computationId** The ID of the computation.
* **status** The details of the computation status to be set.


details
summary
b
Example
curl -request POST 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/computations/{computationId}/status' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header' 
--data '{
"status": "CompletedWithErrors",
"computationErrors": [
{
"addresses": [
{
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 0
},
{
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 1
}
],
"message": "Something went wrong."
}
]
}'

Response: 201
{
"id": "0006803dc06c9bab3f82d4018287b8ccae575bd68eaa47f3c1797242e78daf03",
"status": "CompletedWithErrors",
"computationSpec": {
"id": "ix",
"version": 1
},
"inputContainers": [
{
"id": "01C7VGQWGZVPSBV9NJMEAJSBGM/containers/decline-curves/01CH0K76B5ANMW149TZZEGPZFV",
"dataType": {
"id": "decline-curves",
"version": 1,
"address": {
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 0
}
},
"fileNames": [
"decline_curves.json"
],
"files": [
{
"name": "decline_curves.json"
}
]
},
{
"id": "01C7VGQWGZVPSBV9NJMEAJSBGM/containers/drilling-constraints/01CH0K76B5ANMW149TZZEGPZFV",
"dataType": {
"id": "drilling-constraints",
"version": 1,
"address": {
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 1
}
},
"fileNames": [
"drilling-constraints.json"
],
"files": [
{
"name": "drilling-constraints.json"
}
]
}
],
"outputContainers": [
{
"id": "01C7VGQWGZVPSBV9NJMEAJSBGM/containers/production-forecast/01CH0K76B5ANMW149TZZEGPZFV",
"dataType": {
"id": "production-forecast",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 0,
"dataTypeIndex": 0
}
},
"fileNames": [
"production-forecast.json"
],
"files": [
{
"name": "production-forecast.json"
}
]
}
],
"computationErrors": [
{
"addresses": [
{
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 0
},
{
"type": "DataTypeInput",
"computationIndex": 0,
"dataTypeIndex": 1
}
],
"message": "Something went wrong."
}
],
"computationConfiguration": {
"schemaRef": {
"ID": "planning:fdplan:dataiku:0.0.1",
"Type": "JSON"
}
}
}

[Back to table of contents](#toc)

# Get container 

Get container given the container ID. The container ID associated with a given computation can be accessed through the computations API operations.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **containerId** The ID of the container.
* **includeDataLinkContent** Flag will include data-link.json content encoded as base64.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/containers/{containerId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200
{
"id": "01C7VGQWGZVPSBV9NJMEAJSBGM/containers/production-forecast/01CH0K76B5ANMW149TZZEGPZFV",
"dataType": {
"id": "production-forecast",
"version": 1,
"address": {
"type": "DataTypeOutput",
"computationIndex": 0,
"dataTypeIndex": 0
}
},
"fileNames": [
"production-forecast.json"
],
"files": [
{
"name": "production-forecast.json"
}
],
"labels": {
"name": "p10"
}
}

[Back to table of contents](#toc)

# Upload file associated with a container 

Upload file associated with a container.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **containerId** The ID of the container
* **uploadFile** The file to upload.


details
summary
b
Example
curl -request POST 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/containers/{containerId}/files' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: multipart/form-data' 
--header 'slb-data-partition-id: header' 
--form 'filename'

Response: 201
{
"fileURI": "01C7VGQWGZVPSBV9NJMEAJSBGM/containers/production-forecast/01CH0K76B5ANMW149TZZEGPZFV/production-forecast.json"
}

[Back to table of contents](#toc)

# Get a file associated with a container 

Get a file associated with a container. The MIME type will be set according to the data-type.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **fileName** The name of the file.
* **containerId** The ID of the container.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/containers/{containerId}/files/{fileName}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200

[Back to table of contents](#toc)

# Get a signed url which can be used to download a file. 

Generate a signed url which can be used for downloading a specified file.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **fileName** The name of the file.
* **containerId** The ID of the container.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/containers/{containerId}/files/{fileName}/download-url' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200

[Back to table of contents](#toc)

# Get a signed url which can be used to upload a file. 

Generate a signed url which can be used for uploading a specified file.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **fileName** The name of the file.
* **containerId** The ID of the container


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/containers/{containerId}/files/{fileName}/upload-url' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200

[Back to table of contents](#toc)

# Get schema 

Get a schema given its schema ID.

**Parameters**

* **slb-data-partition-id** Data partition id.
* **schemaId** The ID of the schema.


details
summary
b
Example
curl -request GET 
--url 'https://api.delfi.slb.com/fdplan/evaluation/v1/schemas/{schemaId}' 
--header 'Authorization: value' 
--header 'appkey: value' 
--header 'content-type: application/json' 
--header 'slb-data-partition-id: header'

Response: 200
{
"id": "planning:fdplan:result-set:0.0.1",
"type": "JSON",
"definition": {
}
}

[Back to table of contents](#toc)