{
    "swagger": "2.0",
    "info": {
        "title": "IBM Business Automation Workflow Process REST Interface",
        "version": "8.6.1.18002",
        "description": "IBM Business Automation Workflow REST resources representing definitions and instances of processes, user tasks, and related objects."
    },
    "basePath": "/bpm",
    "schemes": [
        "https"
    ],
    "consumes": [
        "application/json"
    ],
    "produces": [
        "application/json"
    ],
    "securityDefinitions": {
        "basic_auth": {
            "type": "basic"
        }
    },
    "security": [
        {
            "basic_auth": [
            ]
        }
    ],
    "tags": [
        {
            "name": "System"
        },
        {
            "name": "Process"
        },
        {
            "name": "User Task"
        }
    ],
    "paths": {
        "/system/login": {
            "post": {
                "summary": "Obtain IBM Business Automation Workflow CSRF prevention token",
                "description": "Obtain a CSRF prevention token and optionally refresh the user's group membership information.",
                "operationId": "createBPMCSRFToken",
                "tags": [
                    "System"
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "login_request",
                        "in": "body",
                        "description": "Mandatory parameter that allows you to specify whether the caller's group membership data is refreshed",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/login_request"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "The request was processed successfully and returned a new CSRF token",
                        "schema": {
                            "$ref": "#/definitions/csrf_token"
                        }
                    },
                    "400": {
                        "description": "Invalid input.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            }
        },
        "/processes/{process_id}": {
            "get": {
                "summary": "Retrieve a process instance.",
                "description": "Retrieves detailed information about a process instance. 

Only users with the following roles or statuses are authorized to perform this call: Business Automation Workflow administrator, process application administrator, instance owner, follower of the instance, tagged in the instance, or members of teams assigned to the Expose Performance Metrics option for the process.",
                "operationId": "getProcess",
                "tags": [
                    "Process"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "BPMCSRFToken",
                        "in": "header",
                        "description": "Cross-site request forgery prevention token for IBM Business Automation Workflow REST APIs",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "process_id",
                        "in": "path",
                        "description": "The ID of the process instance.",
                        "required": true,
                        "type": "string"
                    },
                    {
                      
                      
                        "name": "optional_parts",
                        "in": "query",
                        "description": "A comma-separated list of optional parts to be returned in the response object. Valid values are: 'data', 'actions'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "data",
                                "actions"
                            ]
                        },
                        "collectionFormat": "csv"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The request was processed successfully and returned the requested process instance object.",
                        "schema": {
                            "$ref": "#/definitions/process"
                        }
                    },
                    "400": {
                        "description": "The request contains invalid parameters, or they are missing.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "403": {
                        "description": "The caller is not authorized to perform the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "404": {
                        "description": "The requested resource does not exist.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a process instance.",
                "description": "Deletes a process instance. 

Only users with the following roles are authorized to perform this call: Business Automation Workflow administrator, process application administrator, or instance owner.",
                "operationId": "deleteProcess",
                "tags": [
                    "Process"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "BPMCSRFToken",
                        "in": "header",
                        "description": "Cross-site request forgery prevention token for IBM Business Automation Workflow REST APIs",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "process_id",
                        "in": "path",
                        "description": "The ID of the process instance to delete.",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "The specified process instance was deleted."
                    },
                    "400": {
                        "description": "The request contains invalid parameters, or they are missing.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "403": {
                        "description": "The caller is not authorized to perform the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "404": {
                        "description": "The requested resource does not exist.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "409": {
                        "description": "The request cannot be processed because of one or more conflicts in the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            }
        },
        "/processes": {
            "get": {
                "summary": "Retrieve a list of process instances.",
                "description": "Lists the process instances that the user may see. 

Only users with the following roles are authorized to perform this call: Business Automation Workflow administrator or process application administrator.",
                "operationId": "getProcessesList",
                "tags": [
                    "Process"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "BPMCSRFToken",
                        "in": "header",
                        "description": "Cross-site request forgery prevention token for IBM Business Automation Workflow REST APIs",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "model",
                        "in": "query",
                        "description": "The name of the process model. Restricts the results to instances of the specified process model.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "containers",
                        "in": "query",
                        "description": "A comma-separated list of containers acronyms. Restricts the results to instances that belong to the specified process application acronyms.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv"
                    },
                    {
                        "name": "versions",
                        "in": "query",
                        "description": "A comma-separated list of snapshot acronyms. Restricts the results to instances that belong to the specified snapshots.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv"
                    },
                    {
                      
                      
                      
                      
                      
                      
                        "name": "states",
                        "in": "query",
                        "description": "A comma-separated list of states. Restricts the results to instances in the specified states. Valid values are: 'running', 'finished', 'terminated', 'suspended', 'stopped', 'did_not_start'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "running",
                                "finished",
                                "terminated",
                                "suspended",
                                "stopped",
                                "did_not_start"
                            ]
                        },
                        "collectionFormat": "csv"
                    },
                    {
                        "name": "search_term",
                        "in": "query",
                        "description": "A string that filters the process instances returned by the given term. The search term is compared against the process model name and process instance name and handled as if wildcard characters are at the beginning and end.",
                        "required": false,
                        "type": "string"
                    },
                    {
                      
                      
                      
                      
                      
                      
                      
                      
                        "name": "sort",
                        "in": "query",
                        "description": "A comma-separated list of sort criteria. The order of the items determines the sorting sequence. The list entries must have the following format: property:sort_direction. Valid values are: 'creation_time:asc', 'creation_time:desc', 'model:asc', 'model:desc', 'state:asc', 'state:desc', 'due_date:asc', 'due_date:desc'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "creation_time:asc",
                                "creation_time:desc",
                                "model:asc",
                                "model:desc",
                                "state:asc",
                                "state:desc",
                                "due_date:asc",
                                "due_date:desc"
                            ]
                        },
                        "collectionFormat": "csv"
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "In a list of entries the offset specifies the position of the first process instance to return from the query result set.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "size",
                        "in": "query",
                        "description": "Maximum number of process instances to return.",
                        "required": false,
                        "type": "integer",
                        "minimum": 1
                    },
                    {
                      
                      
                        "name": "optional_parts",
                        "in": "query",
                        "description": "A comma-separated list of optional parts to be returned in the response object. Valid values are: 'data', 'actions'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "data",
                                "actions"
                            ]
                        },
                        "collectionFormat": "csv"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The request was processed successfully and returned a list of process instance objects that match the specified query parameters.",
                        "schema": {
                            "$ref": "#/definitions/processes"
                        }
                    },
                    "400": {
                        "description": "The request contains invalid parameters, or they are missing.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            },
            "post": {
                "summary": "Start a new process instance.",
                "description": "Starts a new process instance of the specified process model. 

Only members of teams assigned to the 'Expose to start' option for the process are authorized to perform this call.",
                "operationId": "startProcess",
                "tags": [
                    "Process"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "BPMCSRFToken",
                        "in": "header",
                        "description": "Cross-site request forgery prevention token for IBM Business Automation Workflow REST APIs",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "model",
                        "in": "query",
                        "description": "The name of the process model for which a new instance is started.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "container",
                        "in": "query",
                        "description": "The acronym of the process application that contains the process model.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "version",
                        "in": "query",
                        "description": "The acronym of the process application snapshot that contains the process model. If a version is not specified, the instance is started from the default snapshot in a Workflow Server environment and from the latest snapshot in a Workflow Center environment.",
                        "required": false,
                        "type": "string"
                    },
                    {
                      
                      
                        "name": "optional_parts",
                        "in": "query",
                        "description": "A comma-separated list of optional parts to be returned in the response object. Valid values are: 'data', 'actions'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "data",
                                "actions"
                            ]
                        },
                        "collectionFormat": "csv"
                    },
                    {
                        "name": "input",
                        "in": "body",
                        "description": "Values for process variables.",
                        "required": false,
                        "schema": {
                            "$ref": "#/definitions/input"
                        }
                    },
                    {
                        "name": "branch_name",
                        "in": "query",
                        "description": "The name of the branch of the process application that contains the process model.",
                        "required": false,
                        "type": "string"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "The request was processed successfully and returned the newly created process instance.",
                        "schema": {
                            "$ref": "#/definitions/process"
                        }
                    },
                    "400": {
                        "description": "The request contains invalid parameters, or they are missing.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "403": {
                        "description": "The caller is not authorized to perform the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "409": {
                        "description": "The request cannot be processed because of one or more conflicts in the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            }
        },
        "/user-tasks": {
            "get": {
                "summary": "Retrieve a list of user task instances.",
                "description": "Lists user task instances that the user may see. 

Only users with the following roles are authorized to perform this call: Business Automation Workflow administrator, task owner, or a potential task owner for unclaimed tasks.",
                "operationId": "getUserTasksList",
                "tags": [
                    "User Task"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "BPMCSRFToken",
                        "in": "header",
                        "description": "Cross-site request forgery prevention token for IBM Business Automation Workflow REST APIs",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "model",
                        "in": "query",
                        "description": "The name of the process model for which user task instances are returned.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "process_id",
                        "in": "query",
                        "description": "The ID of the process instance for which user task instances are returned.",
                        "required": false,
                        "type": "string"
                    },
                    {
                      
                      
                      
                      
                      
                        "name": "states",
                        "in": "query",
                        "description": "A comma-separated list of user task states. Valid values are: 'claimed', 'ready', 'completed', 'terminated', 'suspended'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "claimed",
                                "ready",
                                "completed",
                                "terminated",
                                "suspended"
                            ]
                        },
                        "collectionFormat": "csv"
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "In a list of entries offset specifies the position of the first user task instance to return from the query result set.",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "size",
                        "in": "query",
                        "description": "The maximum number of user task instances to be returned.",
                        "required": false,
                        "type": "integer",
                        "minimum": 1
                    },
                    {
                      
                      
                      
                      
                        "name": "optional_parts",
                        "in": "query",
                        "description": "A comma-separated list of optional parts to be returned in the response object. Valid values are: 'data', 'actions', 'team_details', 'container_data'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "data",
                                "actions",
                                "team_details",
                                "container_data"
                            ]
                        },
                        "collectionFormat": "csv"
                    },
                    {
                      
                      
                      
                      
                      
                      
                        "name": "sort",
                        "in": "query",
                        "description": "A comma-separated list of sort criteria. The order of the items determines the sorting sequence. The list entries must have the following format: property:sort_direction. Valid values are: 'creation_time:asc', 'creation_time:desc', 'completion_time:asc', 'completion_time:desc', 'due_date:asc', 'due_date:desc'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "creation_time:asc",
                                "creation_time:desc",
                                "completion_time:asc",
                                "completion_time:desc",
                                "due_date:asc",
                                "due_date:desc"
                            ]
                        },
                        "collectionFormat": "csv"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The request was processed successfully and returned a list of user task instance objects that match the specified query parameters.",
                        "schema": {
                            "$ref": "#/definitions/user_tasks"
                        }
                    },
                    "400": {
                        "description": "The request contains invalid parameters, or they are missing.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            }
        },
        "/user-tasks/{task_id}": {
            "get": {
                "summary": "Retrieve a user task instance.",
                "description": "Retrieves details of a specific user task instance. 

Only users with the following roles are authorized to perform this call: Business Automation Workflow administrator, process application administrator, instance owner, task team manager, task owner, or a potential task owner, collaborator.",
                "operationId": "getUserTask",
                "tags": [
                    "User Task"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "BPMCSRFToken",
                        "in": "header",
                        "description": "Cross-site request forgery prevention token for IBM Business Automation Workflow REST APIs",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "task_id",
                        "in": "path",
                        "description": "User task instance ID.",
                        "required": true,
                        "type": "string"
                    },
                    {
                      
                      
                      
                      
                        "name": "optional_parts",
                        "in": "query",
                        "description": "A comma-separated list of optional parts to be returned in the response object. Valid values are: 'data', 'actions', 'team_details', 'container_data'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "data",
                                "actions",
                                "team_details",
                                "container_data"
                            ]
                        },
                        "collectionFormat": "csv"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The request was processed successfully and returned a user task instance object with details of the specified user task instance.",
                        "schema": {
                            "$ref": "#/definitions/user_task"
                        }
                    },
                    "400": {
                        "description": "The request contains invalid parameters, or they are missing.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "403": {
                        "description": "The caller is not authorized to perform the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "404": {
                        "description": "The requested resource does not exist.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            }
        },
        "/user-tasks/{task_id}/claim": {
            "post": {
                "summary": "Claim a user task instance.",
                "description": "Claims a user task instance. 

Only users with the following roles are authorized to perform this call: Business Automation Workflow administrator, process application administrator, or a potential task owner if an owner is not assigned.",
                "operationId": "claimUserTask",
                "tags": [
                    "User Task"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "BPMCSRFToken",
                        "in": "header",
                        "description": "Cross-site request forgery prevention token for IBM Business Automation Workflow REST APIs",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "task_id",
                        "in": "path",
                        "description": "User task instance ID.",
                        "required": true,
                        "type": "string"
                    },
                    {
                      
                      
                      
                      
                        "name": "optional_parts",
                        "in": "query",
                        "description": "A comma-separated list of optional parts to be returned in the response object. Valid values are: 'data', 'actions', 'team_details', 'container_data'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "data",
                                "actions",
                                "team_details",
                                "container_data"
                            ]
                        },
                        "collectionFormat": "csv"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The request was processed successfully.",
                        "schema": {
                            "$ref": "#/definitions/user_task"
                        }
                    },
                    "400": {
                        "description": "The request contains invalid parameters, or they are missing.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "403": {
                        "description": "The caller is not authorized to perform the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "404": {
                        "description": "The requested resource does not exist.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "409": {
                        "description": "The request cannot be processed because of one or more conflicts in the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            }
        },
        "/user-tasks/{task_id}/complete": {
            "post": {
                "summary": "Complete a user task instance.",
                "description": "Completes a user task instance. 

Only users with the following roles are authorized to perform this call: Business Automation Workflow administrator, process application administrator, instance owner, or task owner.",
                "operationId": "completeUserTask",
                "tags": [
                    "User Task"
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "BPMCSRFToken",
                        "in": "header",
                        "description": "Cross-site request forgery prevention token for IBM Business Automation Workflow REST APIs",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "task_id",
                        "in": "path",
                        "description": "User task instance ID.",
                        "required": true,
                        "type": "string"
                    },
                    {
                      
                      
                      
                      
                        "name": "optional_parts",
                        "in": "query",
                        "description": "A comma-separated list of optional parts to be returned in the response object. Valid values are: 'data', 'actions', 'team_details', 'container_data'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "data",
                                "actions",
                                "team_details",
                                "container_data"
                            ]
                        },
                        "collectionFormat": "csv"
                    },
                    {
                        "name": "output",
                        "in": "body",
                        "description": "The data output of the specified user task instance.",
                        "required": false,
                        "schema": {
                            "$ref": "#/definitions/output"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The request was processed successfully.",
                        "schema": {
                            "$ref": "#/definitions/user_task"
                        }
                    },
                    "400": {
                        "description": "The request contains invalid parameters, or they are missing.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "403": {
                        "description": "The caller is not authorized to perform the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "404": {
                        "description": "The requested resource does not exist.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "409": {
                        "description": "The request cannot be processed because of one or more conflicts in the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            }
        },
        "/user-tasks/{task_id}/fail": {
            "post": {
                "summary": "Completes a user task instance with an error.",
                "description": "Completes a user task instance and causes it to return an error status. 

Only users with the following roles are authorized to perform this call: Business Automation Workflow administrator, process application administrator, instance owner, or task owner.",
                "operationId": "completeUserTaskWithError",
                "tags": [
                    "User Task"
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "BPMCSRFToken",
                        "in": "header",
                        "description": "Cross-site request forgery prevention token for IBM Business Automation Workflow REST APIs.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "task_id",
                        "in": "path",
                        "description": "User task instance ID.",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "error",
                        "in": "body",
                        "description": "JSON object that contains error code and error data",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                      
                      
                      
                      
                        "name": "optional_parts",
                        "in": "query",
                        "description": "A comma-separated list of optional parts to be returned in the response object. Valid values are: 'data', 'actions', 'team_details', 'container_data'.",
                        "required": false,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "data",
                                "actions",
                                "team_details",
                                "container_data"
                            ]
                        },
                        "collectionFormat": "csv"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The request was processed successfully.",
                        "schema": {
                            "$ref": "#/definitions/user_task"
                        }
                    },
                    "400": {
                        "description": "The request contains invalid parameters, or they are missing.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "403": {
                        "description": "The caller is not authorized to perform the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "404": {
                        "description": "The requested resource does not exist.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "409": {
                        "description": "The request cannot be processed because of one or more conflicts in the request.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    },
                    "500": {
                        "description": "Internal server error.",
                        "schema": {
                            "$ref": "#/definitions/exception"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "login_request": {
            "title": "Login Request",
            "description": "Request object for creating a new CSRF token",
            "required": [
                "refresh_groups"
            ],
            "properties": {
                "refresh_groups": {
                    "description": "Flag that indicates whether the current user's group membership should be refreshed in IBM Business Automation Workflow database.",
                    "type": "boolean"
                },
                "requested_lifetime": {
                    "description": "Requested token lifetime in seconds (positive integer). Must be smaller than the maximum lifetime 7200.",
                    "type": "integer",
                    "default": 7200
                }
            }
        },
        "csrf_token": {
            "title": "Cross Site Request Forgery protection token",
            "description": "Token required by IBM Business Automation Workflow REST APIs to prevent cross-site request forgery attacks.",
            "properties": {
                "csrf_token": {
                    "type": "string"
                },
                "expiration": {
                    "type": "integer"
                }
            }
        },
        "assignments": {
            "title": "User Task Instance Assignments",
            "description": "User task instance role assignments.",
            "properties": {
                "potential_owners": {
                    "$ref": "#/definitions/potential_owners"
                }
            }
        },
        "data_object": {
            "description": "Data object",
            "required": [
                "name",
                "data"
            ],
            "properties": {
                "name": {
                    "type": "string",
                    "description": "The name of the data input object, data output object, or variable."
                },
                "data": {
                    "type": "object",
                    "description": "The value of the data object. This can be a simple type or a value that is described by a user-defined type."
                }
            }
        },
        "output": {
            "description": "List of data objects.",
            "properties": {
                "output": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/data_object"
                    }
                }
            }
        },
        "potential_owners": {
            "title": "User Task Instance Potential Owners",
            "description": "Potential owner assignments for the user task instance.",
            "required": [
                "team"
            ],
            "properties": {
                "team": {
                    "$ref": "#/definitions/team"
                },
                "manager_team": {
                    "$ref": "#/definitions/manager_team"
                }
            }
        },
        "input": {
            "description": "List of data objects.",
            "type": "object",
            "properties": {
                "input": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/data_object"
                    }
                }
            }
        },
        "process": {
            "description": "Process instance object.",
            "required": [
                "id",
                "model",
                "container",
                "container_name",
                "state",
                "creation_time",
                "due_date"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "description": "ID of the process instance."
                },
                "model": {
                    "type": "string",
                    "description": "The name of the process model."
                },
                "container": {
                    "type": "string",
                    "description": "The acronym of the process application that contains the process model of the process instance."
                },
                "container_name": {
                    "type": "string",
                    "description": "The name of the process application that contains the process model of the process instance."
                },
                "version": {
                    "type": "string",
                    "description": "The acronym of the process application snapshot that contains the process model of the process instance."
                },
                "version_name": {
                    "type": "string",
                    "description": "The name of the process application snapshot that contains the process model of the process instance."
                },
                "state": {
                    "$ref": "#/definitions/process_state"
                },
                "creation_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Creation time of the process instance."
                },
                "due_date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Due date of the process instance."
                },
                "input": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/data_object"
                    },
                    "description": "The input variables of the process instance."
                },
                "output": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/data_object"
                    },
                    "description": "The output variables of the process instance."
                },
                "internal": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/data_object"
                    },
                    "description": "The internal variables of the process instance."
                },
                "modification_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Modification time of the process instance."
                },
                "name": {
                    "type": "string",
                    "description": "The name of the process instance."
                },
                "branch_name": {
                    "type": "string",
                    "description": "The name of the branch of the process application that contains the process model."
                },
                "actions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/process_action"
                    },
                    "description": "Actions available to the current user for the process instance."
                }
            }
        },
        "process_state": {
            "type": "string",
            "description": "State of the process instance.",
            "enum": [
                "running",
                "finished",
                "terminated",
                "suspended",
                "stopped",
                "did_not_start"
            ]
        },
        "process_action": {
            "type": "string",
            "description": "The action that can be performed on the process instance.",
            "enum": [
                "terminate",
                "suspend",
                "resume",
                "comment",
                "update_due_date",
                "delete",
                "add_document",
                "update_document",
                "delete_document",
                "retry_steps",
                "view",
                "set_data"
            ]
        },
        "processes": {
            "description": "List of process instance objects.",
            "required": [
                "processes"
            ],
            "properties": {
                "processes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/process"
                    }
                },
                "previous": {
                    "type": "string",
                    "description": "A URL that returns the previous page of process instances.",
                    "maxItems": 1
                },
                "next": {
                    "type": "string",
                    "description": "A URL that returns the next page of process instances.",
                    "maxItems": 1
                }
            }
        },
        "team": {
            "title": "Team",
            "description": "Team instance.",
            "required": [
                "model_id",
                "name"
            ],
            "properties": {
                "model_id": {
                    "type": "string",
                    "description": "The ID of the team model."
                },
                "id": {
                    "type": "string",
                    "description": "The ID of the team instance."
                },
                "name": {
                    "type": "string",
                    "description": "The name of the team."
                },
                "members": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "The members of the team instance."
                }
            }
        },
        "manager_team": {
            "title": "Manager Team",
            "description": "Manager Team instance.",
            "required": [
                "name"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "description": "The ID of the manager team instance."
                },
                "name": {
                    "type": "string",
                    "description": "The name of the manager team."
                },
                "members": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "The members of the manager team instance."
                }
            }
        },
        "user_task": {
            "title": "User Task Instance",
            "description": "User task instance object.",
            "required": [
                "id",
                "name",
                "process_id",
                "model",
                "state",
                "creation_time",
                "due_date",
                "owner",
                "assignments"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "description": "The ID of the user task instance."
                },
                "name": {
                    "type": "string",
                    "description": "The name of the user task instance."
                },
                "display_name": {
                    "type": "string",
                    "description": "The display name of the task instance."
                },
                "model": {
                    "type": "string",
                    "description": "The name of the process model element that contains the user task."
                },
                "process_id": {
                    "type": "string",
                    "description": "The identifier of the process instance."
                },
                "process_name": {
                    "type": "string",
                    "description": "The name of the process instance."
                },
                "state": {
                    "$ref": "#/definitions/user_task_state"
                },
                "creation_time": {
                    "type": "string",
                    "description": "The activation time."
                },
                "completion_time": {
                    "type": "string",
                    "description": "The completion time of the task instance."
                },
                "due_date": {
                    "type": "string",
                    "description": "The due date of the task instance."
                },
                "start_time": {
                    "type": "string",
                    "description": "The start time of the task instance."
                },
                "at_risk_time": {
                    "type": "string",
                    "description": "The at-risk time of the task instance."
                },
                "owner": {
                    "type": "string",
                    "description": "The owner of the user task."
                },
                "assignments": {
                    "$ref": "#/definitions/assignments"
                },
                "input": {
                    "type": "array",
                    "description": "The input variables of the user task.",
                    "items": {
                        "$ref": "#/definitions/data_object"
                    }
                },
                "output": {
                    "type": "array",
                    "description": "The output variables of the user task.",
                    "items": {
                        "$ref": "#/definitions/data_object"
                    }
                },
                "internal": {
                    "type": "array",
                    "description": "The internal variables of the user task.",
                    "items": {
                        "$ref": "#/definitions/data_object"
                    }
                },
                "priority": {
                    "type": "string",
                    "description": "The priority of the task instance. The lower the value, the higher the priority."
                },
                "actions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/user_task_action"
                    },
                    "description": "Actions available to the current user for the user task instance."
                },
                "container": {
                    "type": "string",
                    "description": "The acronym of the process application that contains the user task instance."
                },
                "container_name": {
                    "type": "string",
                    "description": "The name of the process application that contains the user task instance."
                },
                "version": {
                    "type": "string",
                    "description": "The acronym of the process application snapshot that contains the user task instance."
                },
                "version_name": {
                    "type": "string",
                    "description": "The name of the process application snapshot that contains the user task instance."
                },
                "branch_name": {
                    "type": "string",
                    "description": "The name of the branch of the process application that contains the user task instance."
                },
                "version_id": {
                    "type": "string",
                    "description": "The ID of the process application snapshot that contains the user task instance."
                }
            }
        },
        "user_task_state": {
            "type": "string",
            "description": "State of the user task instance.",
            "enum": [
                "claimed",
                "ready",
                "completed",
                "terminated",
                "suspended"
            ]
        },
        "user_task_action": {
            "type": "string",
            "description": "Action available to be performed on the user task instance.",
            "enum": [
                "assign",
                "update_due_date",
                "update_priority",
                "claim",
                "cancel_claim",
                "complete",
                "view",
                "set_data",
                "fail"
            ]
        },
        "user_tasks": {
            "title": "User Task Instances",
            "description": "List of user task instance objects.",
            "required": [
                "user_task_instances",
                "previous",
                "next"
            ],
            "properties": {
                "user_task_instances": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/user_task"
                    }
                },
                "previous": {
                    "type": "string",
                    "description": "A URL that returns the previous page of process instances."
                },
                "next": {
                    "type": "string",
                    "description": "A URL that returns the next page of process instances."
                }
            }
        },
        "exception": {
            "title": "Exception",
            "description": "Exception object describing REST API error details.",
            "required": [
                "error_number",
                "error_message"
            ],
            "properties": {
                "error_number": {
                    "type": "string",
                    "description": "Message ID of the exception."
                },
                "error_message": {
                    "type": "string",
                    "description": "Message text of the exception."
                },
                "error_message_parameters": {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "description": "An array of parameter strings that were inserted into the error message."
                    },
                    "description": "Message text parameters of the exception."
                },
                "error_cause": {
                    "$ref": "#/definitions/exception"
                }
            }
        }
    }
}
