Workflow Data model Attribution

Workflow Metadata

#Field NameDescriptionData Type EditableValidations 
1id

Identifier generated by SDC per each Workflow.

Remains same across various versions of Workflow.

stringN
2name

Name of the Workflow. 


stringY
  1. Allow only capital Alphabets [A-Z] and underscore[_].
  2. The name should be Unique (case insensitive) across workflows that are in Draft or Certified state.
  3. Minimum length of 6 characters.
  4. Maximum-length of 30 characters.
3descriptionDescription of Workflow.string Y
4category

Categories of the workflow.

string[] Y

Configurable valid values

e.g.,

Service

  • SD-WAN
  • VoIP
  • Considerupto10

Resource

  • VNF
  • PNF
  • Network
5statesList of states of the workflow, derived from the states of its versionsstring[]Y

valid values:

1.DRAFT

2.CERTIFIED


State

#Field NameDescriptionData Type Validations 
1nameName of The Statestring

valid values:

1.DRAFT

2.CERTIFIED

Version

#Field NameDescriptionData Type EditableValidations 
1versionAutomatically assigned semantic versionstringN

The workflow version.

Two dots (“.”) separated digit blocks.

2versionId
stringN

Workflow Version ID.

Version Identifier: UUID generated per each version of the workflow model

3descriptiondescription of the current workflow versionstringY/NThe description of a version is editable until the version becomes certified
3stateState of the versionstateN

The lifecycle state of the workflow.

Values are:

  1. DRAFT
  2. CERTIFIED
4inputs
input[]Y
5outputs
output[]Y
6artifactpath to the workflow artifactstringYThe data of the artifact after Base64 encoding

input

#FieldDescriptionData Type Validations 
1nameName of Parameterstring [A-Z], [a-z], [0-9] and underscore[_].
2typeData-type of Parameterstring 

Enumeration with valid values

  1. string
  2. integer
  3. float
  4. boolean
  5. timestamp
3mandatory Indicates if the Parameter is mandatory or optional boolean 

true - mandatory

false - optional


output

#FieldDescriptionData Type Validations 
1nameName of Parameterstring [A-Z], [a-z], [0-9] and underscore[_].
2typeData-type of Parameterstring 

Enumeration with valid values

  1. string
  2. integer
  3. float
  4. boolean
  5. timestamp
3mandatory 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

5PUT

/workflows/{id}/versions/{versionId}/artifact

(Exposed by SDC)

file201 (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

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

CodeErrorMessage
200OKOK

(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

GET http://ip:port/wf/workflows/{id}

Request Example

GET http://ip:port/wf/workflows/62a09622-2199-4ab1-a73c-daf1caab0092

Response Body

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

CodeErrorMessage
200OKOK
404Not Foundworkflow does not exist

Request Filter Example

//**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"
        }

    ]
}

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

GET http://ip:port/wf/workflows/{id}/versions/

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/{id}/versions/?{filterKey}={filterValue}

Request Example

GET http://ip:port/wf/workflows/62a09622-2199-4ab1-a73c-daf1caab0092/versions/?state=DRAFT,CERTIFIED

Response Body

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

CodeErrorMessage
200OK-
404Not FoundWorkflow %id does not exist.
404Not FoundVersion %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

GET http://ip:port/wf/workflows/{id}/versions/{versionId}

Response Body

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

CodeErrorMessage
200OK-
404Not FoundWorkflow does not exist.
404Not FoundVersion does not exist

(PUT) Creare or Update Workflow Version Artifact (Exposed by SDC)

Description

Save/Update artifact of a version in SDC

URI

PUT http://ip:port/wf/workflows/{id}/versions/{versionId}/artifact

Request Body

PUT http://ip:port/wf/workflows/62a09622-2199-4ab1-a73c-daf1caab0092/versions/7a7a23b0-a952-427e-b856-b550eaaa8b23/artifact
{
"artifact":"ew0KICAiYXJ0aWZhY3RzIjogImRmc2FmIiwNCiAgIm5vcm1hbGl6ZWROYW1lIjogImNpc2VydmljZTBiYzY5ODk2OTQ4ZiIsDQogICJzeXN0ZW1OYW1lIjogIkNpc2VydmljZTBiYzY5ODk2OTQ4ZiIsDQogICJpbnZhcmlhbnRV...."
}

"artifact": The data of the artifact after Base64 encoding

Response Body

none

Response Error

CodeErrorMessagenotes
200OK-if the artifact got replaced
201Created-if the artifact did not exist
404Not FoundWorkflow does not exist.
404Not FoundVersion does not exist.
422Unprocessable 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

GET http://ip:port/wf/workflows/{id}/versions/{versionId}/artifact

Request Body

none

Response Body

200
{
"artifact":"ew0KICAiYXJ0aWZhY3RzIjogImRmc2FmIiwNCiAgIm5vcm1hbGl6ZWROYW1lIjogImNpc2VydmljZTBiYzY5ODk2OTQ4ZiIsDQogICJzeXN0ZW1OYW1lIjogIkNpc2VydmljZTBiYzY5ODk2OTQ4ZiIsDQogICJpbnZhcmlhbnRV...."
}

Response Error

CodeErrorMessage
200OK-
404Not FoundWorkflow does not exist.
404Not FoundVersion does not exist.
  • No labels