Versions Compared
Version | Old Version 2 | New Version 3 |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Introduction
This section describes BSS communication with AminoTV Management Device API
Authentication and
authorisationauthorization
All BSS endpoints support API key authorization. The header named 'Authorization' with content "Apikey PUT_YOUR_KEY_HERE" must be passed with request.
In addition to API key authorization some clients can have IP white listing feature enabled, which will allow access only from exact specific IP's.
Both API key and IP addresses allowed list are customer specific data and you should contact support person to obtain those.
Endpoints overview
Endpoint | HTTP method | Purpose |
---|---|---|
/api/device/management/v4/devices | GET | Get an index of devices. |
/api/device/management/v4/devices | POST | Create new device |
/api/device/management/v4/{device_id} | GET | Get device by id |
/api/device/management/v4/{device_id} | DELETE | Delete device by id |
/api/device/management/v4/{device_id} | PATCH | Update device |
Entities
Device Resource
Up-to-date resource schema could be found on API documentation page Management Device API under schemas section.
Code Block | ||
---|---|---|
| ||
{ "data": [ { "type": "Device", "attributes": { "serial_number": "84-6593603", "player_id": "62768247017" }, "relationships": { "user": { "data": { "id": "41", "type": "User" } } } } ] } |
Attributes
serial_number
is a unique per device and nullable.
player_id
is nullable
Relationships
Each of device should belongs to one user
Use
casescases
Fetch devices
Get all devices
By calling Get index devices endpoint client could get paginated list of all existing devices. The default pagination limit is 100 items per page.
Get one device
By calling Get device by id endpoint client could obtain concrete device data.
Create device
By calling Create device endpoint client could create new device.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "data": [ { "id": "41", "type": "Device", "attributes": { "serial_number": "84-6593603", "player_id": "62768247017" }, "relationships": { "user": { "data": { "id": "41", "type": "User" } } } } ] } RESPONSE 201 Created { "data": [ { "id": "41", "type": "Device", "attributes": { "serial_number": "84-6593603", "player_id": "62768247017" }, "relationships": { "user": { "data": { "id": "41", "type": "User" } } } } ] } |
Device can be created with null values in both fields serial_number
and player_id
.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "data": [ { "id": "41", "type": "Device", "attributes": { "serial_number": null, "player_id": null }, "relationships": { "user": { "data": { "id": "41", "type": "User" } } } } ] } RESPONSE 201 Created { "data": [ { "id": "41", "type": "Device", "attributes": { "serial_number": null, "player_id": null }, "relationships": { "user": { "data": { "id": "41", "type": "User" } } } } ] } |
Update device
Use Update Device API endpoint.
If the request body contains user relationship, the device will be updated to new user. Otherwise, if we does not want to update the device to new user, we do not need to contain user relationships in the request body.
Delete device
Use Delete Device API endpoint.
Postman collection
Table of Contents
Table of Contents |
---|
Child Pages
Child pages (Children Display) |
---|