Workflow External Interface Specification API's
- 2 API's Specification
- 2.1 (GET) List all Workflows
- 2.1.1 Description
- 2.1.2 Request Header
- 2.1.3 URI
- 2.1.4 Request Filter Example
- 2.1.5 Response Body
- 2.1.6 Response Error
- 2.2 (GET) Get Workflow by ID
- 2.2.1 Description
- 2.2.2 Request Header
- 2.2.3 URI
- 2.2.4 Request Example
- 2.2.5 Response Body
- 2.2.6 Response Error
- 2.2.7 Request Filter Example
- 2.2.8 expand
- 2.3 (GET) List of Workflow Versions
- 2.3.1 Description
- 2.3.2 Request Header
- 2.3.3 URI
- 2.3.4 Request Example
- 2.3.5 Response Body
- 2.3.6 Response Error
- 2.4 (GET) Workflow Version
- 2.4.1 Description
- 2.4.2 Request Header
- 2.4.3 URI
- 2.4.4 Response Body
- 2.4.5 Response Error
- 2.5 (PUT) Creare or Update Workflow Version Artifact (Exposed by SDC)
- 2.5.1 Description
- 2.5.2 URI
- 2.5.3 Request Body
- 2.5.4 Response Body
- 2.5.5 Response Error
- 2.6 (GET) Download Workflow Artifact (Deprecated)
- 2.6.1 Description
- 2.6.2 Request Header
- 2.6.3 URI
- 2.6.4 Request Body
- 2.6.5 Response Body
- 2.6.6 Response Error
- 2.1 (GET) List all Workflows
Workflow Data model Attribution
Workflow Metadata
# | Field Name | Description | Data Type | Editable | Validations |
---|---|---|---|---|---|
1 | id | Identifier generated by SDC per each Workflow. Remains same across various versions of Workflow. | string | N | |
2 | name | Name of the Workflow. | string | Y |
|
3 | description | Description of Workflow. | string | Y | |
4 | category | Categories of the workflow. | string[] | Y | Configurable valid values e.g., Service
Resource
|
5 | states | List of states of the workflow, derived from the states of its versions | string[] | Y | valid values: 1.DRAFT 2.CERTIFIED |
State
# | Field Name | Description | Data Type | Validations |
---|---|---|---|---|
1 | name | Name of The State | string | valid values: 1.DRAFT 2.CERTIFIED |
Version
# | Field Name | Description | Data Type | Editable | Validations |
---|---|---|---|---|---|
1 | version | Automatically assigned semantic version | string | N | The workflow version. Two dots (“.”) separated digit blocks. |
2 | versionId | string | N | Workflow Version ID. Version Identifier: UUID generated per each version of the workflow model | |
3 | description | description of the current workflow version | string | Y/N | The description of a version is editable until the version becomes certified |
3 | state | State of the version | state | N | The lifecycle state of the workflow. Values are:
|
4 | inputs | input[] | Y | ||
5 | outputs | output[] | Y | ||
6 | artifact | path to the workflow artifact | string | Y | The data of the artifact after Base64 encoding |
input
# | Field | Description | Data Type | Validations |
---|---|---|---|---|
1 | name | Name of Parameter | string | [A-Z], [a-z], [0-9] and underscore[_]. |
2 | type | Data-type of Parameter | string | Enumeration with valid values
|
3 | mandatory | Indicates if the Parameter is mandatory or optional | boolean | true - mandatory false - optional |
output
# | Field | Description | Data Type | Validations |
---|---|---|---|---|
1 | name | Name of Parameter | string | [A-Z], [a-z], [0-9] and underscore[_]. |
2 | type | Data-type of Parameter | string | Enumeration with valid values
|
3 | mandatory | Indicates if the Parameter is mandatory or optional | boolean | true - mandatory false - optional |
API's Summary
# | Operation | URI | Request | Response Status | Response Body | Description |
1 | GET | /workflows/ | ?state=CERTIFIED ?state=DRAFT ?state=DRAFT,CERTIFIED ?limit=50&offset=0 | 200 (OK) | {id, name, description, category, states[{name,…}], limit, offset, count} | get all workflows, optionally filtered by state (comma separated) |
2 | GET | /workflows/{id} | ?expand=versions | 200 (OK) / 404 (Not Found) If does not exist | {id, name, description, category, states[{name,…}] }. If expanded (i.e. ?expand=versions), will include the list of versions with their metadata (semantic, ID) only [version{…}] | getspecificworkflow |
3 | GET | /workflows/{id}/versions/ | ?state=CERTIFIED ?state=DRAFT ?state=DRAFT,CERTIFIED ?limit=50&offset=0 | 200 (OK) / 404 (Not Found) if the workflow does not exist, with an appropriate message | {version, versionId, state, inputs[{name, type}], outputs[{name, type}]} | return all versions of a workflow, optionally filtered by state (comma separated) |
4 | GET | /workflows/{id}/versions/{versionId} | ?fields=inputs,outputs | 200 (OK) / 404 (Not Found) if the workflow or version does not exist, with an appropriate message | {inputs[{name, type}], outputs[{name, type}], state} | get specific workflow version |
5 | PUT | /workflows/{id}/versions/{versionId}/artifact (Exposed by SDC) | file | 201 (Created) if did not exist / 200 (OK) if replaced / 422 (Unprocessable Entity) if the state does not allow modifications (e.g. certified), must include a detailed message / 404 (Not Found) if the workflow or version does not exist, with an appropriate message | Save/Update artifact of a version i SDC | |
6 | GET Depricated | file | 200 (OK) / 404 (Not Found) if the workflow, version, or artifact does not exist, with an appropriate message | binary | Download artifact | |
7 | GET (OOS) | /workflows/{id}/versions/{versionId}/state | none | 200 (OK) / 404 (Not Found) if the workflow or version does not exist, with an appropriate message | {name, description, time, nextStates: [a,b,…]} | Get current state of the workflow. Time in ISO-8061 |
API's Specification
(GET) List all Workflows
Description
Get all workflows, optionally filtered by state(s)
Request Header
Header Name | Mandatory? | Description |
---|---|---|
Content-Type | Y | Valid value is : application/json |
Authorization | Y | TBD |
URI
GET http://ip:port/wf/workflows/
The list can also be filtered with one or more criteria using query params (when specifying several criteria, a logical ‘AND’ will be added between them)
GET http://ip:port/wf/workflows/?{filterKey}={filterValue}&limit={limit}&offset={offset}
Request Filter Example
//**get all workflows**//
GET http://ip:port/wf/workflows/
//**get specific state within the list**//
GET http://ip:port/wf/workflows/?state=DRAFT
Response Body
Response Error
Code | Error | Message |
---|---|---|
200 | OK | OK |
(GET) Get Workflow by ID
Description
Get specific workflow by ID
Request Header
Header Name | Mandatory? | Description |
---|---|---|
Content-Type | Y | Valid value is : application/json |
Authorization | Y | TBD |
URI
Request Example
Response Body
Response Error
Code | Error | Message |
---|---|---|
200 | OK | OK |
404 | Not Found | workflow does not exist |
Request Filter Example
expand
?expand=versions
The expand
query parameter increases the set of fields that appear in the response in addition to the default fields.
(GET) List of Workflow Versions
Description
Return all versions of a workflow, optionally filtered by state
Request Header
Header Name | Mandatory? | Description |
---|---|---|
Content-Type | Y | Valid value is : application/json |
Authorization | Y | TBD |
URI
The list can also be filtered with one or more criteria using query params(when specifying several criteria, a logical ‘AND’ will be added between them)
Request Example
Response Body
Response Error
Code | Error | Message |
---|---|---|
200 | OK | - |
404 | Not Found | Workflow %id does not exist. |
404 | Not Found | Version %id does not exist. |
(GET) Workflow Version
Description
Get specific workflow version
Request Header
Header Name | Mandatory? | Description |
---|---|---|
Content-Type | Y | Valid value is : application/json |
Authorization | Y | TBD |
URI
Response Body
Response Error
Code | Error | Message |
---|---|---|
200 | OK | - |
404 | Not Found | Workflow does not exist. |
404 | Not Found | Version does not exist |
(PUT) Creare or Update Workflow Version Artifact (Exposed by SDC)
Description
Save/Update artifact of a version in SDC
URI
Request Body
Response Body
none
Response Error
Code | Error | Message | notes |
---|---|---|---|
200 | OK | - | if the artifact got replaced |
201 | Created | - | if the artifact did not exist |
404 | Not Found | Workflow does not exist. | |
404 | Not Found | Version does not exist. | |
422 | Unprocessable Entity | The state of the workflow version does not allow modification. "CERTIFIED" |
(GET) Download Workflow Artifact (Deprecated)
Description
Download Workflow Artifact
Request Header
Header Name | Mandatory? | Description |
---|---|---|
Content-Type | Y | Valid value is : application/json |
Authorization | Y | TBD |
URI
Request Body
none
Response Body
Response Error
Code | Error | Message |
---|---|---|
200 | OK | - |
404 | Not Found | Workflow does not exist. |
404 | Not Found | Version does not exist. |