Table of Contents |
---|
Workflow Data model Attribution
Workflow
...
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 Summery
# | 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 |
Depricated |
|
|
|
| |
7 |
|
|
|
|
|
|
API's Specification
(GET) List all Workflows
...
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
Code Block | ||
---|---|---|
| ||
GET http://ip:port/wf/workflows/ |
...
Code Block | ||
---|---|---|
| ||
200 { "total": 1, "limit" 100, "offset": 0, "workflows": [ { "id": "b9075cc2-f33e-4c17-a6fb-4a3fe13b7fa2", "name": "a name string ...", "description": "a description string ...", "category":"VNF" "states": [ "DRAFT" ] } ] } |
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
Code Block | ||
---|---|---|
| ||
GET http://ip:port/wf/workflows/{id} |
...
Code Block | ||||
---|---|---|---|---|
| ||||
200 GET http://ip:port/wf/workflows/10ac539f-0c10-4065-b1c0-eac9bbd3b308 { "id": "0ac539f-0c10-4065-b1c0-eac9bbd3b308", "name": "a name string ...", "description": "a description string ...", "category": "VNF", "states": [ "DRAFT", "CERTIFIED" ] } |
Response Error
Code | Error | Message |
---|---|---|
200 | OK | OK |
404 | Not Found | workflow does not exist |
Request Filter Example
Code Block | ||
---|---|---|
| ||
//**espsific version within the list**// GET http://ip:port/wf/workflows/10ac539f-0c10-4065-b1c0-eac9bbd3b308?expand=versions 200 { "id": "0ac539f-0c10-4065-b1c0-eac9bbd3b308", "name": "a name string ...", "description": "a description string ...", "category": "VNF", "states": [ "DRAFT", "CERTIFIED" ], "versions": [ { "version": "1.1", "versionId": "10ac539f-0c10-4065-b1c0-eac9bbd3b308", "description": "workflow version desc.", "state": "CERTIFIED" }, { "version": "0.2", "versionId": "11bc5f0a-1b33-416a-2ac0-5ac3abd3c4af", "description": "workflow version desc.", "state": "DRAFT" } ] } |
...
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
Code Block | ||
---|---|---|
| ||
GET http://ip:port/wf/workflows/{id}/versions/ |
...
Code Block | ||
---|---|---|
| ||
200 { "total": 2, "versions": [ { "version": "1.1", "versionId": "10ac539f-0c10-4065-b1c0-eac9bbd3b308", "description": "workflow version desc.", "inputs": [ { "name": "timeout", "type": "integer", "mandatory": True } }, "outputs": [ { "name": "timeout", "type": "integer", "mandatory": True } ], "artifact": "/storage/myArtifact.bpmn", "state": "DRAFT" }, { "version": "2.0", "versionId": "234c52a0-fcf0-4a64-bac5-bde6a9362786", "description": "workflow version desc.", "inputs": [ { "name": "timeout", "type": "integer", "mandatory": True } ], "outputs": [ { "name": "timeout", "type": "integer", "mandatory": True } ], "artifact": "/storage/myArtifact.bpmn", "state": "CERTIFIED" } ] } |
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
Code Block | ||
---|---|---|
| ||
GET http://ip:port/wf/workflows/{id}/versions/{versionId} |
...
Code Block | ||
---|---|---|
| ||
200 { "version": "2.0", "versionId": "234c52a0-fcf0-4a64-bac5-bde6a9362786", "description": "workflow version desc.", "inputs": [ { "name": "timeout", "type": "integer", "mandatory": True } ], "outputs": [ { "name": "timeout", "type": "integer", "mandatory": True } ], "artifact": "/storage/myArtifact.bpmn", "state": "CERTIFIED" } |
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)
...
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)
...
Download Workflow Artifact
Request Header
Header Name | Mandatory? | Description |
---|---|---|
Content-Type | Y | Valid value is : application/json |
Authorization | Y | TBD |
URI
Code Block | ||
---|---|---|
| ||
GET http://ip:port/wf/workflows/{id}/versions/{versionId}/artifact |
...
Code Block | ||
---|---|---|
| ||
200 { "artifact":"ew0KICAiYXJ0aWZhY3RzIjogImRmc2FmIiwNCiAgIm5vcm1hbGl6ZWROYW1lIjogImNpc2VydmljZTBiYzY5ODk2OTQ4ZiIsDQogICJzeXN0ZW1OYW1lIjogIkNpc2VydmljZTBiYzY5ODk2OTQ4ZiIsDQogICJpbnZhcmlhbnRV...." } |
Response Error
Code | Error | Message |
---|---|---|
200 | OK | - |
404 | Not Found | Workflow does not exist. |
404 | Not Found | Version does not exist. |