# Workflow Backend API - 1.0
Available at: http://localhost:8080/v2/api-docs (when the backend server is running).
This API provides basic operations that can be done on a workflow
### **POST**
*/api/v1/approve*
Completes the current active user task for the given process.
**Parameters**
| Name | Type | Description |
|--------|----------------|:-----------:|
| procId* | String (query) | Process id |
**Responses**
| Code | Description |
|------|:------------:|
| 200 | OK |
| 201 | Created |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### **POST**
*/api/v1/cancel*
Cancels the given active process.
**Parameters**
| Name | Type | Description |
|--------|----------------|:-----------:|
| procId* | String (query) | Process id |
**Responses**
| Code | Description |
|------|:------------:|
| 200 | OK |
| 201 | Created |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### **GET**
*/api/v1/details*
Returns the list of process states details (moderator) for the given a process.
**Parameters**
| Name | Type | Description |
|--------|----------------|:-----------:|
| pid* | String (query) | Process id |
| userAuth | String (query) | user autheticated |
**Responses**
- Response content type: application/json
| Code | Description |
|------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| 200 | OK. Example Value Model: ```[ { "comment": "string", "isCheckpoint": true, "isCompleted": true, "name": "string", "timeStamp": "2020-06-01T19:31:27.161Z" } ]``` |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found
### **GET**
*/api/v1/processes*
Return all submissions initialized, unfinished and finished.
**Parameters**
No parameters
**Responses**
- Response content type: application/json
| Code | Description |
|------|:--------------------------------------------------------------------------------------------------------------------------------:|
| 200 | OK. Example Value Model: ```[ { "description": "string", "id": "string", "isFinished": true, "name": "string" } ]``` |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### **GET**
*/api/v1/processes-specific*
Return specific submissions, unfinished and finished
**Parameters**
| Name | Type | Description |
|--------|----------------|:-----------:|
| numberProcesses * | integer($int32) (query) | numberProcesses |
| searchValue |string (query) | searchValue |
| startingProcessOrder * | integer($int32) (query) | startingProcessOrder |
|userAuth * | string (query) | userAuth|
**Responses**
- Response content type: application/json
| Code | Description |
|------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| 200 | OK. Example Value Model: ```[ { "appName": "string", "companyName": "string", "currentState": "string", "id": "string", "lastCheckpoint": "string", "stateHistory": [ { "comment": "string", "isCheckpoint": true, "isCompleted": true, "name": "string", "timeStamp": "2020-06-01T19:31:27.165Z" } ] } ]``` |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### **GET**
*/api/v1/processes/{pid}*
Return all submitted details of a certain process
**Parameters**
| Name | Type | Description |
|--------|----------------|:-----------:|
| pid* | String (path) | Process id |
**Responses**
- Response content type: application/json
| Code | Description |
|------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| 200 | OK. Example Value Model: ```{ "accountRead": true, "appDescription": "string", "appName": "string", "appSummary": "string", "callbackWrite": true, "companyName": "string", "email": "string", "eventsUrl": "string", "features": [ { "description": "string", "name": "string", "summary": "string" } ], "keybase": "string", "license": "string", "plans": [ { "description": "string", "price": "string", "summary": "string", "title": "string" } ], "precedent": "string", "recordingsRead": true, "redirectUrl": "string", "reportsRead": true, "reportsWrite": true, "standaloneUrl": "string", "submitter": "string", "trialDescription": "string", "trialSummary": "string", "trialTitle": "string", "visualAssets": [ "string" ] }``` |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### **GET**
*/api/v1/processes/{pid}/image*
Get the image of the process definition related to a given process
**Parameters**
| Name | Type | Description |
|--------|----------------|:-----------:|
| pid* | String (path) | Process id |
**Responses**
- Response content type: image/jpeg
**Responses**
| Code | Description |
|------|:----------------------------------:|
| 200 | OK. Example Value Model: “string” |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### **POST**
*/api/v1/processes/create*
Start a process instance with the submitted details.
**Parameters**
| Name | Type | Description |
|----------------|--------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| submissionData | (body) | submissionData. Example Value Model: ```{ "accountRead": true, "appDescription": "string", "appName": "string", "appSummary": "string", "callbackWrite": true, "companyName": "string", "email": "string", "eventsUrl": "string", "features": [ { "description": "string", "name": "string", "summary": "string" } ], "keybase": "string", "license": "string", "plans": [ { "description": "string", "price": "string", "summary": "string", "title": "string" } ], "precedent": "string", "recordingsRead": true, "redirectUrl": "string", "reportsRead": true, "reportsWrite": true, "standaloneUrl": "string", "submitter": "string", "trialDescription": "string", "trialSummary": "string", "trialTitle": "string", "visualAssets": [ "string" ] }``` |
- Parameter content type: application/json
**Responses**
| Code | Description |
|------|:------------:|
| 200 | OK |
| 201 | Created |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### **POST**
*/api/v1/rejected*
Rejects the given process.
**Parameters**
| Name | Type | Description |
|--------|----------------|:-----------:|
| procId* | String (query) | Process id |
**Responses**
| Code | Description |
|------|:------------:|
| 200 | OK |
| 201 | Created |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### **GET**
*/api/v1/tasks*
Return all tasks assign to a user assignee.
**Parameters**
| Name | Type | Description |
|--------|----------------|:-----------:|
| assignee* | String (query) | assignee |
**Responses**
- Response content type: application/json
| Code | Description |
|------|:-----------------------------------------------------------------------------------------------------:|
| 200 | OK. Example Value Model: ```[ { "assignee": "string", "id": "string", "name": "string" } ]``` |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### **GET**
*/api/v1/users/{id}/processes*
Return all process instances that have been submitted by a specific submitter.
**Parameters**
| Name | Type | Description |
|--------|----------------|:-----------:|
| id* | String (path) | id |
**Responses**
- Response content type: application/json
| Code | Description |
|------|:--------------------------------------------------------------------------------------------------------------------------------:|
| 200 | OK. Example Value Model: ```[ { "description": "string", "id": "string", "isFinished": true, "name": "string" } ]``` |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
### Models
#### FeatureItem
```{
description * : string
name * : string
summary * : string
}
```
#### PlanItem
```{
description * : string
price * : string
summary * : string
title * : string
}
```
#### ProcessHistory
```{
comment : string
isCheckpoint * : boolean
isCompleted * : boolean
name * : string
timeStamp : string($date-time)
}
```
#### ProcessMonitoring
```{
appName * : string
companyName * : string
currentState * : string
id * : string
lastCheckpoint * : string
stateHistory * : [ StateHistory
{
comment : string
isCheckpoint * : boolean
isCompleted * : boolean
name * : string
timeStamp : string($date-time)
}
]
}
```
#### ProcessRepresentation
```{
description * : string
id * : string
isFinished * : boolean
name * : string
}
```
#### StateHistory
```{
comment : string
isCheckpoint * : boolean
isCompleted * : boolean
name * : string
timeStamp : string($date-time)
}
```
#### SubmissionInfo
```{
accountRead * : boolean
appDescription * : string
appName * : string
appSummary * : string
callbackWrite * : boolean
companyName * : string
email * : string
eventsUrl * : string
features * : [FeatureItem
{
description * : string
name * : string
summary * : string
}
]
keybase * : string
license * : string
plans * : [PlanItem
{
description * : string
price * : string
summary * : string
title * : string
}
]
precedent : string
recordingsRead * : boolean
redirectUrl * : string
reportsRead * : boolean
reportsWrite * : boolean
standaloneUrl * : string
submitter * : string
trialDescription * : string
trialSummary * : string
trialTitle * : string
visualAssets * : [string]
}
```
#### TaskRepresentation
```{
assignee * : string
id * : string
name * : string
}
```