Skip to content

Latest commit

 

History

History
978 lines (783 loc) · 19.3 KB

File metadata and controls

978 lines (783 loc) · 19.3 KB

Matroos API v1.0

Table of content

[TOC]

Bots

GET /bots

Example responses

200 Response

{
  "count": 0,
  "items": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "description": "string",
      "key": "string",
      "prefix": "string",
      "userCommands": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "description": "string",
          "type": 0,
          "trigger": "string",
          "mode": 0,
          "parameters": {
            "property1": null,
            "property2": null
          },
          "createdAt": "2019-08-24T14:15:22Z",
          "updatedAt": "2019-08-24T14:15:22Z"
        }
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success ItemsResponse
This operation does not require authentication

POST /bots

Body parameter

{
  "name": "string",
  "description": "string",
  "key": "string",
  "prefix": "string",
  "userCommands": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "description": "string",
      "type": 0,
      "trigger": "string",
      "mode": 0,
      "parameters": {
        "property1": null,
        "property2": null
      },
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ]
}

Parameters

Name In Type Required Description
body body Bot false none

Example responses

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
404 Not Found Failure
This operation does not require authentication

PUT /bots

Body parameter

{
  "name": "string",
  "description": "string",
  "key": "string",
  "prefix": "string",
  "userCommands": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "description": "string",
      "type": 0,
      "trigger": "string",
      "mode": 0,
      "parameters": {
        "property1": null,
        "property2": null
      },
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ]
}

Parameters

Name In Type Required Description
body body Bot true none

Example responses

200 Response

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
400 Bad Request Failure MessageResponse
This operation does not require authentication

GET /bots/{botId}

Parameters

Name In Type Required Description
botId path string(uuid) true none

Example responses

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "description": "string",
  "key": "string",
  "prefix": "string",
  "userCommands": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "description": "string",
      "type": 0,
      "trigger": "string",
      "mode": 0,
      "parameters": {
        "property1": null,
        "property2": null
      },
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK Success Bot
404 Not Found Failure
This operation does not require authentication

DELETE /bots/{botId}

Parameters

Name In Type Required Description
botId path string(uuid) true none

Example responses

200 Response

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
400 Bad Request Failure MessageResponse
This operation does not require authentication

UserCommands

GET /commands/signatures

Example responses

{
  "count": 0,
  "items": [
    {
      "type": 0,
      "signature": [
        {
          "name": "string",
          "displayName": "string",
          "required": true,
          "type": 0,
          "default": null
        }
      ],
      "allowedModes": [
        0
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success ItemsResponse
This operation does not require authentication

GET /commands

Example responses

{
  "count": 0,
  "items": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "description": "string",
      "type": 0,
      "trigger": "string",
      "mode": 0,
      "parameters": {
        "property1": null,
        "property2": null
      },
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success ItemsResponse
This operation does not require authentication

POST /commands

Body parameter

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "description": "string",
  "type": 0,
  "trigger": "string",
  "mode": 0,
  "parameters": {
    "property1": null,
    "property2": null
  },
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Parameters

Name In Type Required Description
body body UserCommand true none

Example responses

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
400 Bad Request Failure MessageResponse
This operation does not require authentication

PUT /commands

Body parameter

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "description": "string",
  "type": 0,
  "trigger": "string",
  "mode": 0,
  "parameters": {
    "property1": null,
    "property2": null
  },
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Parameters

Name In Type Required Description
body body UserCommand true none

Example responses

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
400 Bad Request Failure MessageResponse
This operation does not require authentication

GET /commands/{userCommandId}

Parameters

Name In Type Required Description
userCommandId path string(uuid) true none

Example responses

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "description": "string",
  "type": 0,
  "trigger": "string",
  "mode": 0,
  "parameters": {
    "property1": null,
    "property2": null
  },
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK Success UserCommand
404 Not Found Failure
This operation does not require authentication

DELETE /commands/{userCommandId}

Parameters

Name In Type Required Description
userCommandId path string(uuid) true none

Example responses

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
400 Bad Request Failure MessageResponse
This operation does not require authentication

Workers

GET /workers/{workerId}/start/{botId}

Parameters

Name In Type Required Description
workerId path string(uuid) true none
botId path string(uuid) true none

Example responses

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
400 Bad Request Failure MessageResponse
This operation does not require authentication

GET /workers/{workerId}/stop/{botId}

Parameters

Name In Type Required Description
workerId path string(uuid) true none
botId path string(uuid) true none

Example responses

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
400 Bad Request Failure MessageResponse
This operation does not require authentication

GET /workers

Example responses

{
  "count": 0,
  "items": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "remoteUrl": "string",
      "bots": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "description": "string",
          "key": "string",
          "prefix": "string",
          "userCommands": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "string",
              "description": "string",
              "type": 0,
              "trigger": "string",
              "mode": 0,
              "parameters": {
                "property1": null,
                "property2": null
              },
              "createdAt": "2019-08-24T14:15:22Z",
              "updatedAt": "2019-08-24T14:15:22Z"
            }
          ],
          "createdAt": "2019-08-24T14:15:22Z",
          "updatedAt": "2019-08-24T14:15:22Z"
        }
      ],
      "lastUpdate": "2019-08-24T14:15:22Z",
      "isUp": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success ItemsResponse
This operation does not require authentication

GET /workers/{workerId}

Parameters

Name In Type Required Description
workerId path string(uuid) true none

Example responses

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "remoteUrl": "string",
  "bots": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "description": "string",
      "key": "string",
      "prefix": "string",
      "userCommands": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "description": "string",
          "type": 0,
          "trigger": "string",
          "mode": 0,
          "parameters": {
            "property1": null,
            "property2": null
          },
          "createdAt": "2019-08-24T14:15:22Z",
          "updatedAt": "2019-08-24T14:15:22Z"
        }
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "lastUpdate": "2019-08-24T14:15:22Z",
  "isUp": true
}

Responses

Status Meaning Description Schema
200 OK Success Worker
404 Not Found Failure
This operation does not require authentication

POST /workers/{workerId}

Body parameter

[
  "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]

Parameters

Name In Type Required Description
workerId path string(uuid) true none
body body array[string(uuid)] true none

Example responses

200 Response

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
400 Bad Request Failure MessageResponse
This operation does not require authentication

DELETE /workers/{workerId}

Body parameter

[
  "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]

Parameters

Name In Type Required Description
workerId path string(uuid) true none
body body array[string(uuid)] true none

Example responses

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK Success SuccessResponse
400 Bad Request Failure MessageResponse
This operation does not require authentication

Schemas

Bot

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "description": "string",
  "key": "string",
  "prefix": "string",
  "userCommands": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "description": "string",
      "type": 0,
      "trigger": "string",
      "mode": 0,
      "parameters": {
        "property1": null,
        "property2": null
      },
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none none
name string true none none
description string true none none
key string true none none
prefix string true none none
userCommands [UserCommand] true none none

CommandMode

Enumerated Values

Property Value
INLINE 0
SCOPED 1
HEADLESS 2
SINGLE 3

CommandSignature

{
  "type": 0,
  "signature": [
    {
      "name": "string",
      "displayName": "string",
      "required": true,
      "type": 0,
      "default": null
    }
  ],
  "allowedModes": [
    0
  ]
}

Properties

Name Type Required Restrictions Description
type CommandType true none none
signature [ParameterSignature] true none none
allowedModes [CommandMode] true none none

CommandType

Enumerated Values

Property Value
MESSAGE 0
PING 1
STATUS 2
TIMER 3
VERSION 4

DataType

Enumerated Values

Property Value
BOOLEAN 0
DATE 1
DOUBLE 2
INTEGER 3
STRING 4
LIST 5

ItemsResponse

{
  "count": 0,
  "items": [
    {}
  ]
}

Properties

Name Type Required Restrictions Description
count integer true none none
items [object] true none none

MessageResponse

{
  "msg": "string"
}

Properties

Name Type Required Restrictions Description
msg string true none none

ParameterSignature

{
  "name": "string",
  "displayName": "string",
  "required": true,
  "type": 0,
  "default": null
}

Properties

Name Type Required Restrictions Description
name string true none none
displayName string true none none
required boolean true none none
type DataType true none none
default object true none none

SuccessResponse

{
  "success": true
}

Properties

Name Type Required Restrictions Description
success boolean true none none

UserCommand

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "description": "string",
  "type": 0,
  "trigger": "string",
  "mode": 0,
  "parameters": {
    "property1": null,
    "property2": null
  },
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none none
name string true none none
description string true none none
type CommandType true none none
trigger string true none none
mode CommandMode true none none
parameters object true none none

Worker

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "remoteUrl": "string",
  "bots": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "description": "string",
      "key": "string",
      "prefix": "string",
      "userCommands": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "description": "string",
          "type": 0,
          "trigger": "string",
          "mode": 0,
          "parameters": {
            "property1": null,
            "property2": null
          },
          "createdAt": "2019-08-24T14:15:22Z",
          "updatedAt": "2019-08-24T14:15:22Z"
        }
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "lastUpdate": "2019-08-24T14:15:22Z",
  "isUp": true
}

Properties

Name Type Required Restrictions Description
id string(uuid) true none none
remoteUrl string true none none
bots [Bot] true none none
lastUpdate date true none none
isUp boolean true none none