Devices
List all devices GET /devices/
Description
List all devices.
Properties
Title
List all devices
URL
/devices/
Method
GET
Header
Name | Value | Required | Description |
---|---|---|---|
Authorization | Token <xxx> | yes | Authorization token required to communicate with the API. |
Accept | application/json; version=1 | no | If a specific medialoopster Web API version is required, this header needs to be set. |
URL Params
Name | Type | Required | Description |
---|---|---|---|
limit | integer | no | Limit the number of objects to return. |
offset | integer | no | Do not return the first x objects, where x is the amount specified by offset. |
path | string | no | Filter parameter to only list devices with the given path . Value MUST end with slash and SHOULD be URL encoded. |
Success Response
200 - OK
[ { "id": 1, "name": "Audio", "display_name": "Audio", "path": "/mnt/medialoopster/Highres/Audio/", "is_internal": true, "is_archive": false, "autoshot_detection": true, "allow_direct_writing": true, "recieve_xml_meta": false, "protocol": "copy", "anonymous": false, "server": null, "username": null, "password": null, "transcoding_profile": null, "archive_connector": null, "passthrough_profiles": [], "write_permission_groups": [] }, ... ]
Sample Call
curl -X GET http://medialoopster-url/api/devices/
Show device detail GET /devices/{id}/
Description
Request a single device.
Properties
Title
Get single device
URL
/devices/{id}/
Method
GET
Header
Name | Value | Required | Description |
---|---|---|---|
Authorization | Token <xxx> | yes | Authorization token required to communicate with the API. |
Accept | application/json; version=1 | no | If a specific medialoopster Web API version is required, this header needs to be set. |
Success Response
200 - OK
{ "id": 1, "name": "Audio", "display_name": "Audio", "path": "/mnt/medialoopster/Highres/Audio/", "is_internal": true, "is_archive": false, "autoshot_detection": true, "allow_direct_writing": true, "recieve_xml_meta": false, "protocol": "copy", "anonymous": false, "server": null, "username": null, "password": null, "transcoding_profile": null, "archive_connector": null, "passthrough_profiles": [], "write_permission_groups": [] }
Error Response
403 - Not Found
{ "errors": [ { "status": "404", "code": "not_found", "detail": "Device object with pk=u'{id}' does not exist.", "title": "Not Found" } ] }
Sample Call
curl -X GET http://medialoopster-url/api/devices/1/
Create devicePOST /devices/
Description
Create a new device.
Properties
Title
Create device
URL
/devices/
Method
POST
Header
Name | Value | Required | Description |
---|---|---|---|
Authorization | Token xxxxx | yes | Authorization token required to communicate with the API. |
Accept | application/json; version=1 | no | If a specific medialoopster Web API version is required, this header needs to be set. |
Content-Type | application/json application/x-www-form-urlencoded | yes | Depending on how the data is provided, the corresponding Content-Type must be set. |
Data Params
Name | Type | Required | Description |
---|---|---|---|
name | String | yes | Internal name of the device |
display_name | String | no | Name to present to the user. Defaults to the same as 'name'. |
path | String | yes | Path of this device as seen by medialoopster |
Success Response
201 - Created
{ "id": 2, "name": "New Device", "display_name": "New Device Display Name", "path": "/mnt/path/to/new/device/", "is_internal": false, "is_archive": false, "autoshot_detection": true, "allow_direct_writing": true, "recieve_xml_meta": false, "protocol": "copy", "anonymous": false, "server": null, "username": null, "password": null, "transcoding_profile": null, "archive_connector": null, "passthrough_profiles": [], "write_permission_groups": [] }
Error Response
400 - Bad Request
{ "errors": [ { "status": "400", "source": { "pointer": "/name" }, "code": "required", "detail": "This field is required.", "title": "Validation Error" } ] }
Sample Call
curl -X POST http://medialoopster-url/api/devices/ \ -H "Content-Type: application/json" \ -d '{ "name": "New Device", "display_name": "New Device Display Name", "path": "/mnt/path/to/new/device" }'