Skip to content

Create data-type

Request

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.

Security
bearer and appkey
Headers
slb-partition-idstringrequired

Data partition id.

Bodyapplication/jsonrequired

The data-type 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."
fileSpecsArray of objects(FileSpec)
Example:
[ { "extension": "json", "schemaRef": { … }, "defaultFilename": "filename.json" }, { "extension": "xlsx" } ]
curl -i -X POST \
  https://api.delfi.slb.com/fdplan/evaluation/v1/data-types \
  -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: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"
      }
    ]
  }'

Responses

Data-type 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"
fileSpecsArray of objects(FileSpec)

Specification of the file types allowed to be used with this container.

Example:
[ { "extension": "xlsx" }, { "extension": "json", "schemaRef": { … }, "defaultFilename": "filename.json" } ]
Response
{ "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": [ { … }, { … } ] }