Workflow External Interface Specification API's

Workflow Data model Attribution

Workflow Metadata

#

Field Name

Description

Data Type 

Editable

Validations 

#

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

  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.

3

description

Description of Workflow.

string 

Y



4

category

Categories of the workflow.

string[] 

Y

Configurable valid values

e.g.,

Service

  • SD-WAN

  • VoIP

  • Considerupto10

Resource

  • VNF

  • PNF

  • Network

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 

#

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 

#

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:

  1. DRAFT

  2. CERTIFIED

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 

#

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

  1. string

  2. integer

  3. float

  4. boolean

  5. timestamp

3

mandatory 

Indicates if the Parameter is mandatory or optional 

boolean 

true - mandatory

false - optional



output

#

Field

Description

Data Type 

Validations 

#

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

  1. string

  2. integer

  3. float

  4. boolean

  5. timestamp

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

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

Code

Error

Message

200

OK

OK

(GET) Get Workflow by ID

Description

Get specific workflow by ID

Request Header

Header Name

Mandatory?

Description

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

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

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

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

Header Name

Mandatory?

Description

Content-Type

Y

Valid value is : application/json

Authorization

Y

TBD

URI

Response Body

Response Error

Code

Error

Message

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

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

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

Code

Error

Message

200

OK

-

404

Not Found

Workflow does not exist.

404

Not Found

Version does not exist.