# 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.

Endpoint: GET /workflow-specs
Version: 1.0.0
Security: bearer, appkey

## Security:

  - `bearer` (unknown)
    apiKey in header Authorization

  - `appkey` (unknown)
    apiKey in header appkey

## Query parameters:

  - `includePreviousVersions` (boolean)
    Unless includePreviousVersions is true the response will return only the latest version of each specification.

## Header parameters:

  - `slb-partition-id` (string, required)
    Data partition id.

## Response 200:

  - `200` (unknown)
    Retrieved workflow specifications successfully.

## Response 200 fields (application/json):

  - `id` (string, required)
    The ID of the specification.
    Example: 01DV2RPKYS5NYBAR6TNMJ8TNT8

  - `name` (string, required)
    The name of the specification.
    Example: A custom data-type

  - `version` (integer, required)
    The version of the specification definition.
    Example: 1

  - `latest` (boolean, required)
    Whether this is the latest version of the given specification.
    Example: true

  - `archived` (boolean, required)
    Whether this specification has been marked as archived.
    Example: false

  - `description` (string, required)
    The description of the specification.
    Example: A specification

  - `createdBy` (string, required)
    The ID of the user who created the specification.
    Example: user@slb.com

  - `createdAt` (string, required)
    The date the specification was created.
    Example: 2020-01-01T00:00:00.000Z

  - `computationSpecs` (array, required)
    The computation specifications which make up the workflow specification.
    Example: [{"id":"01DV2RPKYS5NYBAR6TNMJ8TNT8","name":"spec-type","version":1,"latest":true,"archived":false,"description":"A specification.","createdBy":"user@slb.com","createdAt":"2020-01-01T00:00:00.000Z","ad…

  - `computationSpecs.address` (object)
    An address used to describe the location of a Spec within a WorkflowSpec. Used to enrich the spec model with additional attributes such as specifying the location of a data container or providing annotations.
    Example: {"type":"DataTypeInput","computationIndex":0,"dataTypeIndex":0}

  - `computationSpecs.address.type` (string, required)
    Whether the address refers to a data-type input, a data-type output or a computation specification.
    Enum: "Invalid", "Computation", "DataTypeInput", "DataTypeOutput", "Workflow"

  - `computationSpecs.address.computationIndex` (integer)
    The zero based index of the Computation Spec.
    Example: 0

  - `computationSpecs.address.dataTypeIndex` (integer)
    The zero based index of a data-type with respect to a computation specification. Inputs and outputs are treated as separate ordered lists.
    Example: 1

  - `computationSpecs.inputDataTypeIds` (array, required)
    The input data-types for the computation.
    Example: [{"id":"decline-curves","version":1,"address":{"type":"DataTypeInput","computationIndex":0,"dataTypeIndex":0}},{"id":"facility-constraints","version":1,"address":{"type":"DataTypeInput","computationIn…

  - `computationSpecs.inputDataTypeIds.id` (string, required)
    The specification ID.
    Example: 01DV2RPKYS5NYBAR6TNMJ8TNT8

  - `computationSpecs.inputDataTypeIds.version` (integer, required)
    The version of the specification of the given ID.
    Example: 1

  - `computationSpecs.outputDataTypeIds` (array, required)
    The output data-types for the computation.
    Example: [{"id":"production-forecast","version":1,"address":{"type":"DataTypeOutput","computationIndex":0,"dataTypeIndex":0}}]

  - `edges` (array)
    A list of graph edges which describe the data flow from one computation specifications output data-type to the next computation specifications input data-type.
    Example: [{"fromAddressType":"DataTypeOutput","fromComputationIndex":0,"fromDataTypeIndex":0,"toComputationIndex":1,"toDataTypeIndex":0}]

  - `edges.fromAddressType` (string)
    Whether the address refers to a data-type input or data-type output  (defaults to output).
    Enum: "DataTypeInput", "DataTypeOutput"

  - `edges.fromComputationIndex` (integer)
    The zero based index of the computation specification which generates the data-type in the workflow specification.
    Example: 1

  - `edges.fromDataTypeIndex` (integer)
    The zero based index of the data-type as listed as an output data-type in computation specification referred to in the 'fromComputationIndex' above.
    Example: 0

  - `edges.toComputationIndex` (integer)
    The zero based index of the computation specification which consumes the data-type in the workflow specification.
    Example: 1

  - `edges.toDataTypeIndex` (integer)
    The zero based index of the data-type as listed as an input data-type in the computation specification referred to in the 'toComputationIndex' above.
    Example: 0

  - `annotations` (array)
    Example: [{"address":{"type":"DataTypeInput","computationIndex":0,"dataTypeIndex":0},"key":"name","value":"Decline Curves","createdBy":"user@slb.com"}]

  - `annotations.key` (string)
    Free form content with relevant information for the given address.
    Example: name

  - `annotations.value` (string)
    Free form content with relevant information for the given address.
    Example: Decline Curves

  - `annotations.createdBy` (string)
    The user who created this annotation.
    Example: user@slb.com

## Response 204:

  - `204` (unknown)
    No workflow specifications were found.

## Response 401:

  - `401` (unknown)
    Unauthorized.

## Response 401 fields (application/json):

  - `data` (object, required)

  - `data.code` (integer, required)
    The HTTP status code.
    Example: 500

  - `data.message` (string)
    The error message.
    Example: internal server error

## Response default:

  - `default` (unknown)
    Unexpected error.

## Response default fields (application/json):

  - `data` (object, required)

  - `data.code` (integer, required)
    The HTTP status code.
    Example: 500

  - `data.message` (string)
    The error message.
    Example: internal server error

