MobiusFlow Docs
Main WebsiteRaise a Support Ticket
  • Welcome
  • What is MobiusFlow®?
  • 📖User Guides
    • MobiusFlow Manager
    • MobiusFlow Toolbox
    • Getting Started
      • Administration
      • Service and Object Configuration
      • Diagnostics and Service Control
      • Running MobiusFlow via Docker
    • Deploying MobiusFlow in MobiusFlow Cloud
    • Deploying MobiusFlow On-Prem
      • Deploying MobiusFlow to approved Hardware (Using BalenaCloud)
        • Creating a Fleet
        • Adding Your First Device
        • Deploy MobiusFlow to Your Fleet
        • Adding Your Licence
        • Installed Services
        • Device Variables
        • Configure Networks
      • Deploying MobiusFlow on Customer Servers / Cloud
    • MobiusFlow Connectors
      • Configuring MobiusFlow for use with Connectors
      • MobiusFlow Official Connector
        • Connection Details and LED Indicators
        • Configuring a Connector
          • Home Page
          • Configure Network Page
          • Manage Certificates Page
          • Configure MQTT Page
          • Set Config Mode Password Page
          • About Page
        • Factory Resetting a Connector
      • MobiusFlow Raspberry Pi Connector
        • Converting Raspberry Pi to a MobiusFlow Connector
        • Configuring Raspberry Pi Connector
    • Technical Training Guides
      • Technical Training 1
  • ⚙️Technical Docs
    • MobiusFlow Cloud Hosted Environment
    • MobiusFlow Basics
      • MobiusFlow Overview
      • MobiusFlow Architecture
      • MobiusFlow Uniform Resource Identifiers (URIs)
      • Security
        • MobiusFlow Internal Security
      • Backup and Restore
      • Ports and Endpoints
    • MobiusFlow Engine API
      • Authorization
      • Discover
      • Node
      • Service
      • Object
      • Profiles
      • Command
      • Flows
      • Subscription
      • Licence
    • MobiusFlow Services
      • DALI Lighting
        • DALI via AFDWeb MQTT
      • LoRaWAN Local Network Server
      • MobiusFlow Connectors
      • INGY Lighting
      • Object Store
      • EnOcean Devices
        • EnOcean Equipment Profiles (EEPs)
    • Flows
      • Connecting the Flows to MobiusFlow Engine
      • Data Transfer between Flows and MobiusFlow Engine
      • Further Data Transfer between Flows and MobiusFlow Engine
      • Receiving and Sending Raw EnOcean Telegrams
    • Licencing
      • Licensing (v1.19.1 and later)
  • Glossary
Powered by GitBook
On this page
Export as PDF
  1. Technical Docs
  2. MobiusFlow Engine API

Service

API Service Calls

PreviousNodeNextObject

Last updated 1 year ago

The service calls are used to read, add, remove and manipulate MobiusFlow services.

⚙️

Get service configuration

get
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
sidstringRequired

MobiusFlow Service ID

Example: {"value":"020"}Pattern: ^[0-9A-Fa-f]{3}$
Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
get
GET /api/v1/mobius/service/config/{hid}/{sid} HTTP/1.1
Host: 
Accept: */*
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "sid": "020",
    "spid": "0021",
    "name": "enocean devices",
    "enabled": true,
    "runAtStart": true,
    "settings": {
      "mqtt": {
        "host": "mqtt://localhost",
        "port": 2016
      },
      "timeouts": {
        "local": 500,
        "remote": 5000
      }
    },
    "custom": {},
    "objects": [
      {
        "pid": "000D",
        "objects": [
          {
            "pid": "000D",
            "ins": "0002",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "11223344"
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0006",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0001",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "000A",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "11223344"
                }
              }
            ]
          }
        ]
      },
      {
        "pid": "0010",
        "objects": [
          {
            "pid": "0010",
            "ins": "0001",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-02-02 Temperature Sensor (-30C to 10C)"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "12121212"
                }
              }
            ]
          }
        ]
      },
      {
        "pid": "0201",
        "objects": [
          {
            "pid": "0201",
            "ins": "0001",
            "rids": []
          }
        ]
      }
    ]
  }
}

Start service

post
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
sidstringRequired

MobiusFlow Service ID

Example: {"value":"020"}Pattern: ^[0-9A-Fa-f]{3}$
Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
post
POST /api/v1/mobius/service/start/{hid}/{sid} HTTP/1.1
Host: 
Accept: */*
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "result": "OK"
  }
}

Stop service

post
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
sidstringRequired

MobiusFlow Service ID

Example: {"value":"020"}Pattern: ^[0-9A-Fa-f]{3}$
Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
post
POST /api/v1/mobius/service/stop/{hid}/{sid} HTTP/1.1
Host: 
Accept: */*
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "result": "OK"
  }
}

Reload service

post
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
sidstringRequired

MobiusFlow Service ID

Example: {"value":"020"}Pattern: ^[0-9A-Fa-f]{3}$
Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
post
POST /api/v1/mobius/service/reload/{hid}/{sid} HTTP/1.1
Host: 
Accept: */*
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001/020",
  "data": {
    "result": "OK"
  }
}

Delete service

delete
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
sidstringRequired

MobiusFlow Service ID

Example: {"value":"020"}Pattern: ^[0-9A-Fa-f]{3}$
Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
delete
DELETE /api/v1/mobius/service/{hid}/{sid} HTTP/1.1
Host: 
Accept: */*
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "sid": "020",
    "spid": "0021",
    "name": "enocean devices",
    "enabled": true,
    "runAtStart": true,
    "settings": {
      "mqtt": {
        "host": "mqtt://localhost",
        "port": 2016
      },
      "timeouts": {
        "local": 500,
        "remote": 5000
      }
    },
    "custom": {},
    "objects": [
      {
        "pid": "000D",
        "objects": [
          {
            "pid": "000D",
            "ins": "0002",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "11223344"
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0006",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0001",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          }
        ]
      },
      {
        "pid": "0010",
        "objects": [
          {
            "pid": "0010",
            "ins": "0001",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-02-02 Temperature Sensor (-30C to 10C)"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "12121212"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
  • GETGet service configuration
  • POSTStart service
  • POSTStop service
  • POSTReload service
  • POSTAdd service
  • POSTClone service
  • PATCHUpdate service ID of a service
  • PATCHUpdate service configuration
  • PUTReplace all objects within a service
  • DELETEDelete service

Add service

post
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
Body

New service information

sidstringOptional

Service ID

Pattern: ^[0-9A-F]{3}$
spidstringRequired

Service profile ID

Pattern: ^[0-9A-F]{4}$
namestringRequired

Service name

enabledbooleanRequired

Service enabled flag

runAtStartbooleanRequired

Service run at start flag

Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
post
POST /api/v1/mobius/service/{hid} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 91

{
  "spid": "000E",
  "name": "New example nr-connector service",
  "enabled": false,
  "runAtStart": true
}
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": [
    {
      "id": "0004/002",
      "name": "mobius-engine-api",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "0012/012",
      "name": "mobius-ui-restapi",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "0021/020",
      "name": "enocean devices",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "000E/021",
      "name": "Test",
      "enabled": false,
      "runAtStart": true
    },
    {
      "id": "000E/022",
      "name": "New example nr-connector service",
      "enabled": false,
      "runAtStart": true
    }
  ]
}

Clone service

post
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
sidstringRequired

MobiusFlow Service ID

Example: {"value":"020"}Pattern: ^[0-9A-Fa-f]{3}$
Body

Clone service information

copiesnumberRequired

Number of copies

startstringRequired

Starting service ID for 1st copy, subsequent copies will be incremented

Pattern: ^[0-9A-F]{3}$
Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
post
POST /api/v1/mobius/service/clone/{hid}/{sid} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "copies": 1,
  "start": "030"
}
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": [
    {
      "id": "0004/002",
      "name": "mobius-engine-api",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "0012/012",
      "name": "mobius-ui-restapi",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "0021/020",
      "name": "enocean devices",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "000E/021",
      "name": "Test",
      "enabled": false,
      "runAtStart": true
    },
    {
      "id": "0021/030",
      "name": "Clone of 020 0",
      "enabled": true,
      "runAtStart": true
    }
  ]
}

Update service ID of a service

patch
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
sidstringRequired

MobiusFlow Service ID

Example: {"value":"020"}Pattern: ^[0-9A-Fa-f]{3}$
Body

New service ID information

newSIDstringRequired

New service ID

Pattern: ^[0-9A-F]{3}$
Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
patch
PATCH /api/v1/mobius/service/config/sid/{hid}/{sid} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "newSID": "02A"
}
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": [
    {
      "id": "0004/002",
      "name": "mobius-engine-api",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "0012/012",
      "name": "mobius-ui-restapi",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "0021/020",
      "name": "enocean devices",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "000E/02A",
      "name": "nr-connector",
      "enabled": true,
      "runAtStart": true
    }
  ]
}

Update service configuration

patch
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
sidstringRequired

MobiusFlow Service ID

Example: {"value":"020"}Pattern: ^[0-9A-Fa-f]{3}$
Body

New service configuration

namestringOptional

Service name

enabledbooleanOptional

Service enabled flag

runAtStartbooleanOptional

Service run at start flag

Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
patch
PATCH /api/v1/mobius/service/config/{hid}/{sid} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "name": "nr-connector",
  "runAtStart": true,
  "enabled": true
}
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "sid": "021",
    "spid": "000E",
    "name": "nr-connector",
    "enabled": true,
    "runAtStart": true,
    "settings": {
      "mqtt": {
        "host": "mqtt://localhost",
        "port": 2016
      },
      "timeouts": {
        "local": 500,
        "remote": 5000
      }
    },
    "custom": {
      "host": "localhost",
      "port": 1890,
      "psk": "node-red"
    },
    "objects": []
  }
}

Replace all objects within a service

put
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
sidstringRequired

MobiusFlow Service ID

Example: {"value":"020"}Pattern: ^[0-9A-Fa-f]{3}$
Body

Array of configured objects on service

pidstringOptional

Object PID

Responses
200
Ok response
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
408
Request Timeout
application/json
500
Internal Server Error
application/json
put
PUT /api/v1/mobius/service/config/replaceAllObjects/{hid}/{sid} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 538

[
  {
    "pid": "000D",
    "objects": [
      {
        "pid": "000D",
        "ins": "0002",
        "rids": [
          {
            "rid": "01",
            "settings": {
              "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
            }
          },
          {
            "rid": "0B",
            "settings": {
              "pv": "11223344"
            }
          }
        ]
      },
      {
        "pid": "000D",
        "ins": "0006",
        "rids": [
          {
            "rid": "40",
            "settings": {
              "min": 30
            }
          }
        ]
      },
      {
        "pid": "000D",
        "ins": "0001",
        "rids": [
          {
            "rid": "40",
            "settings": {
              "min": 30
            }
          }
        ]
      }
    ]
  },
  {
    "pid": "0010",
    "objects": [
      {
        "pid": "0010",
        "ins": "0001",
        "rids": [
          {
            "rid": "01",
            "settings": {
              "pv": "EnOcean EEP A5-02-02 Temperature Sensor (-30C to 10C)"
            }
          },
          {
            "rid": "0B",
            "settings": {
              "pv": "12121212"
            }
          }
        ]
      }
    ]
  }
]
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "sid": "020",
    "spid": "0021",
    "name": "enocean devices",
    "enabled": true,
    "runAtStart": true,
    "settings": {
      "mqtt": {
        "host": "mqtt://localhost",
        "port": 2016
      },
      "timeouts": {
        "local": 500,
        "remote": 5000
      }
    },
    "custom": {},
    "objects": [
      {
        "pid": "000D",
        "objects": [
          {
            "pid": "000D",
            "ins": "0002",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "11223344"
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0006",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0001",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          }
        ]
      },
      {
        "pid": "0010",
        "objects": [
          {
            "pid": "0010",
            "ins": "0001",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-02-02 Temperature Sensor (-30C to 10C)"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "12121212"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}