Processes

List of processes

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes

workplace - workplace name

Method: GET

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:

title=newprocess&skip=0&limit=10

Body:


Response:

Success

{ "result": [ { "id": "58ecd15827218c56b6e2714c", "title": "newprocess" } ] }

Error

{ error_code: int, error_message: string, more_info: "" }

Creating a process

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes

workplace - workplace name

Method: POST

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:

{
    "title": "newprocess"
}

Response:

Success

{ "result": { "connectors": [ { "author": "", "code": { "after": "", "before": "" }, "description": "", "id": "58ecd15827218c56b6e2714a", "name": "Start", "nextConnectors": [], "params": {}, "parentId": "", "previousConnectors": [], "type": "start" }, { "author": "", "code": { "after": "", "before": "" }, "description": "", "id": "58ecd15827218c56b6e2714b", "name": "Stop", "nextConnectors": [], "params": {}, "parentId": "", "previousConnectors": [], "type": "stop" } ], "id": "58ecd15827218c56b6e2714c", "script": "", "title": "newprocess" } }

Error

{ error_code: int, error_message: string, more_info: "" }

Getting a process

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process

workplace - workplace name

process - process identifier

Method: GET

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:


Response:

Success

{ "result": { "connectors": [ { "author": "", "code": { "after": "", "before": "" }, "description": "", "id": "58ecd15827218c56b6e2714a", "name": "Start", "nextConnectors": [], "params": {}, "parentId": "", "previousConnectors": [], "type": "start" }, { "author": "", "code": { "after": "", "before": "" }, "description": "", "id": "58ecd15827218c56b6e2714b", "name": "Stop", "nextConnectors": [], "params": {}, "parentId": "", "previousConnectors": [], "type": "stop" } ], "id": "58ecd15827218c56b6e2714c", "script": "", "title": "First process" } }

Error

{ error_code: int, error_message: string, more_info: "" }

Updating a process

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process

workplace - workplace name

process - process identifier

Method: POST

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:

{
    "title": "New title"
}

Response:

Success

{ "result": { "connectors": [ { "author": "", "code": { "after": "", "before": "" }, "description": "", "id": "58ecd15827218c56b6e2714a", "name": "Start", "nextConnectors": [], "params": {}, "parentId": "", "previousConnectors": [], "type": "start" }, { "author": "", "code": { "after": "", "before": "" }, "description": "", "id": "58ecd15827218c56b6e2714b", "name": "Stop", "nextConnectors": [], "params": {}, "parentId": "", "previousConnectors": [], "type": "stop" } ], "id": "58ecd15827218c56b6e2714c", "script": "", "title": "New title" } }

Error

{ error_code: int, error_message: string, more_info: "" }

Cloning a process

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/clone

workplace - workplace name

process - process identifier

Method: POST

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:

{
    "title": "New title"
}

Response:

Success

{ "result": true }

Error

{ error_code: int, error_message: string, more_info: "" }

Deleting a process

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process

workplace - workplace name

process - process identifier

Method: DELETE

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:


Response:

Success

{ "result": true }

Error

{ error_code: int, error_message: string, more_info: "" }

Starting a process

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/start

workplace - workplace name

process - process identifier

Method: POST

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:

{}

Response:

Success

{ "result": true }

Error

{ error_code: int, error_message: string, more_info: "" }

Stopping a process

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/stop

workplace - workplace name

process - process identifier

Method: POST

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:

{}

Response:

Success

{ "result": true }

Error

{ error_code: int, error_message: string, more_info: "" }

Logs

List of logs

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/logs

workplace - workplace name

process - process identifier

Method: Get

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:

skip=0&limit=10

Body:


Response:

Success

{ "items": [ { id: '5993eefd27dbd42aee872c18', date: '2017-08-16T10:06:37.714+03:00', type: 'log', processId: '5993475435b382744c81d0da', message: 'log message' } ], "total": 1 }

Error

{ error_code: int, error_message: string, more_info: "" }

Flush logs

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/logs

workplace - workplace name

process - process identifier

Method: DELETE

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:


Response:

Success

{ result:true }

Error

{ error_code: int, error_message: string, more_info: "" }

Connectors

Creating a connector

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/connectors

workplace - workplace name

process - process identifier

Method: POST

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:

{
    "parentId": "58ecbfbb27218c3c9fa8b2af",
    "params": {
        "code": "return 1 == 1",
        "results": {
            "true": [],
            "false": []
        }
    }
}

parentId - connector identifier

Response:

Success

{ "result": { "author": "", "code": { "after": "", "before": "" }, "description": "", "id": "58ecdeb427218c6a55dfe59f", "name": "Case", "nextConnectors": [], "params": { "code": "return 1 == 1", "results": { "false": [], "true": [] } }, "parentId": "58ecbfbb27218c3c9fa8b2af", "previousConnectors": [], "type": "case" } }

Error

{ error_code: int, error_message: string, more_info: "" }

Updating a connector

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/connectors/:connector

workplace - workplace name

process - process identifier

connector - connector identifier

Method: POST

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:

{
    "parentId": "58ecbfbb27218c3c9fa8b2af",
        "params": {
        "code": "return 12 == 12",
        "results": {
            "true": [],
            "false": []
        }
    }
}

parentId - connector identifier

Response:

Success

{ "result": { "author": "", "code": { "after": "", "before": "" }, "description": "", "id": "58ecdeb427218c6a55dfe59f", "name": "Case", "nextConnectors": [], "params": { "code": "return 12 == 12", "results": { "false": [], "true": [] } }, "parentId": "58ecbfbb27218c3c9fa8b2af", "previousConnectors": [], "type": "case" } }

Error

{ error_code: int, error_message: string, more_info: "" }

Deleting a connector

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/connectors/:connector

workplace - workplace name

process - process identifier

connector - connector identifier

Method: DELETE

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:


Response:

Success

{ "result": true }

Error

{ error_code: int, error_message: string, more_info: "" }

Creating a connection

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/connectors/:connector/relation/:target

workplace - workplace name

process - process identifier

connector - connector identifier

target - child connector identifier

Method: POST

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:

{}

parentId - connector identifier

Response:

Success

{ "result": true }

Error

{ error_code: int, error_message: string, more_info: "" }

Establishing the name of the connection

This method is used to group child connectors

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/connectors/:connector/relation/:target/:name

workplace - workplace name

process - process identifier

connector - connector identifier

target - child connector identifier

name - name of the connection (result)

Method: POST

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:

{}

parentId - connector identifier

Response:

Success

{ "result": true }

Error

{ error_code: int, error_message: string, more_info: "" }

Removing a connection

HOST: https://api.mixapp.io

Path: /v1/workplaces/:workplace/processes/:process/connectors/:connector/relation/:target

workplace - workplace name

process - process identifier

connector - connector identifier

target - child connector identifier

Method: DELETE

Headers:

Content-Type: application/json
X-Auth-Token: <Token>

Query:


Body:


parentId - connector identifier

Response:

Success

{ "result": true }

Error

{ error_code: int, error_message: string, more_info: "" }