Service
API Service Calls
The service calls are used to read, add, remove and manipulate MobiusFlow services.
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
MobiusFlow Service ID
{"value":"020"}
Pattern: ^[0-9A-Fa-f]{3}$
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": []
}
]
}
]
}
}
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
MobiusFlow Service ID
{"value":"020"}
Pattern: ^[0-9A-Fa-f]{3}$
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"
}
}
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
MobiusFlow Service ID
{"value":"020"}
Pattern: ^[0-9A-Fa-f]{3}$
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"
}
}
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
MobiusFlow Service ID
{"value":"020"}
Pattern: ^[0-9A-Fa-f]{3}$
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"
}
}
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
New service information
Service ID
^[0-9A-F]{3}$
Service profile ID
^[0-9A-F]{4}$
Service name
Service enabled flag
Service run at start flag
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
}
]
}
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
MobiusFlow Service ID
{"value":"020"}
Pattern: ^[0-9A-Fa-f]{3}$
Clone service information
Number of copies
Starting service ID for 1st copy, subsequent copies will be incremented
^[0-9A-F]{3}$
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
}
]
}
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
MobiusFlow Service ID
{"value":"020"}
Pattern: ^[0-9A-Fa-f]{3}$
New service ID information
New service ID
^[0-9A-F]{3}$
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
}
]
}
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
MobiusFlow Service ID
{"value":"020"}
Pattern: ^[0-9A-Fa-f]{3}$
New service configuration
Service name
Service enabled flag
Service run at start flag
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": []
}
}
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
MobiusFlow Service ID
{"value":"020"}
Pattern: ^[0-9A-Fa-f]{3}$
Array of configured objects on service
Object PID
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"
}
}
]
}
]
}
]
}
}
MobiusFlow Hub ID
{"value":"000001"}
Pattern: ^[0-9A-Fa-f]{6}$
MobiusFlow Service ID
{"value":"020"}
Pattern: ^[0-9A-Fa-f]{3}$
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"
}
}
]
}
]
}
]
}
}
Last updated