Permission - bridges
Possible values for the status field:
activated - device added and activated by user
{ "name": "bridge_1", "mac": "08:13:c0:00:00:82", "serial_number": "serial_number" }
POST /api/v1/bridges
string name, Device name
string
string mac, Mac address of the device.
string serial_number, Device serial number.
200 OK
OK
Returns the bridge object
{ "id": 1, "name": "name", "uuid": "uuid", "mac": "mac", "serial_number": "serial_number", "status": "activated", "is_online": true, "version": "1.1.1.1", "last_updated_at": "2020-01-01T00:00:00.000000Z", "created_at": "2023-02-03T10:51:53.000000Z", "updated_at": "2023-02-03T10:51:53.000000Z", "storages": [ { "id": 2, "path": "/storage", "usage": 15.5, "capacity": 100000.5 } ] }
401 Unauthorized
Unauthorized
Authorization token not sent or not valid
422 Unprocessable Entity
Unprocessable Entity
Returns a JSON object with an error.
{ "message": "There will be no informative message here", "errors": { "any_key": [ "The cause of the error will be described here" ] } }
curl -k --request POST \ --url 'https://your-domain/api/v1/bridges' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "name": "string", "mac": "string", "serial_number": "string" }'
$data = array ( 'name' => 'string', 'mac' => 'string', 'serial_number' => 'string', ); $context = stream_context_create([ 'ssl'=>['verify_peer' => false], 'http' => [ 'method' => 'POST', 'header' => "Content-Type: application/json\r Accept: application/json", 'content'=>json_encode($data) ] ]); $result = file_get_contents('https://your-domain/api/v1/bridges', false, $context);
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.