/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/a062000000HbAsd"
}, {
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49"
}],
"data": [{
"name": "ringtoneInternal",
"value": 3
}, {
"name": "ringtoneExternal",
"value": 2
}, {
"name": "groupQueueSkillRingtone",
"value": 2
}, {
"name": "useSiteOptionsFromSite",
"value": true
}, {
"name": "webguiHttpsonly",
"value": true
}, {
"name": "suppressLineno",
"value": "DEFAULT"
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
HTTP/1.1 200 OK
{
"href": "/api/customers/K0002/devices/standard/123456789abc",
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/a062000000HbAsd"
}, {
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49"
}],
"data": [{
"name": "ringtoneInternal",
"value": 3
}, {
"name": "ringtoneExternal",
"value": 2
}, {
"name": "groupQueueSkillRingtone",
"value": 2
}, {
"name": "suppressLineno",
"value": "DEFAULT"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "note",
"value": "my personal note for this device"
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
HTTP/1.1 200 OK
{
"href": "/api/customers/K0002/devices/standard/123456789abc",
"data": [{
"name": "note",
"value": "my personal note for this device"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "note",
"value": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis,."
}]
}
Then I should receive
HTTP/1.1 400 Bad Request
with following body:
{
"detail": "Could not create or update resource due to constraint violations",
"title": "Validation error",
"errors": [{
"message": "Phone note value length is limited to: 255 characters.",
"path": "note",
"value": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis,."
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "note",
"value": ""
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
HTTP/1.1 200 OK
{
"href": "/api/customers/K0002/devices/standard/123456789abc",
"data": [{
"name": "note",
"value": null
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "note",
"value": null
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
HTTP/1.1 200 OK
{
"href": "/api/customers/K0002/devices/standard/123456789abc",
"data": [{
"name": "note",
"value": null
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "note",
"value": "my personal note for this device"
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
HTTP/1.1 200 OK
{
"href": "/api/customers/K0002/devices/standard/123456789abc",
"data": [{
"name": "note",
"value": "my personal note for this device"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "note",
"value": ""
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
HTTP/1.1 200 OK
{
"href": "/api/customers/K0002/devices/standard/123456789abc",
"data": [{
"name": "note",
"value": null
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "useSiteOptionsFromSite",
"value": false
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
HTTP/1.1 200 OK
{
"href": "/api/customers/K0002/devices/standard/123456789abc",
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/1"
}],
"data": [{
"name": "useSiteOptionsFromSite",
"value": false
}]
}
/api/customers/K0002/sites/1/site-options
HTTP/1.1 200 OK
{
"data": [{
"name": "dialPrefix",
"value": "0"
}]
}
/api/customers/K0002/devices/standard/123456789abc/site-options
HTTP/1.1 200 OK
{
"data": [{
"name": "dialPrefix",
"value": "0"
}]
}
/api/customers/K0002/devices/standard/123456789abc/site-options
with
application/json; charset=UTF-8
{
"data": [{
"name": "dialPrefix",
"value": "9"
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc/site-options
HTTP/1.1 200 OK
{
"data": [{
"name": "dialPrefix",
"value": "9"
}]
}
/api/customers/K0002/sites/1/site-options
HTTP/1.1 200 OK
{
"data": [{
"name": "dialPrefix",
"value": "0"
}]
}
/api/customers/K0002/devices/standard/ABCDEF012345
with
application/json; charset=UTF-8
{}
Then I should receive
HTTP/1.1 404 Not Found
with following body:
{
"title": "Device not found",
"detail": "Device with unique identifier ABCDEF012345 has not been found",
"described_by": "http://api.nfon.net/probs/device-not-found"
}
/api/customers/K0404/devices/standard/device123
with
application/json; charset=UTF-8
{}
Then I should receive
HTTP/1.1 404 Not Found
with following body:
{
"described_by": "http://api.nfon.net/probs/customer-not-found",
"title": "Customer not found",
"detail": "Customer with identifier K0404 has not been found"
}
/api/customers/K0003/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/a062000000HbAsd"
}]
}
Then I should receive
HTTP/1.1 400 Bad Request
{
"errors": [{
"message": "Site not allowed",
"detailMessage": "Site [a062000000HbAsd] is not reachable for customer [K0003]",
"path": "site"
}]
}
/api/customers/K0003/devices/standard/123456789abc
HTTP/1.1 200 OK
{
"links": [{
"rel": "site",
"href": "/api/customers/K0003/sites/1"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/not_existing"
}]
}
Then I should receive
HTTP/1.1 404 Not Found
with following body:
{
"detail": "Site [not_existing] not found for Customer [K0002]",
"described_by": "http://api.nfon.net/probs/site-not-found"
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
HTTP/1.1 200 OK
{
"href": "/api/customers/K0002/devices/standard/123456789abc",
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/a062000000HbAsd"
}],
"data": [{
"name": "uniqueIdentifier",
"value": "123456789abc"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/a062000000HbAsd"
}]
}
Then I should receive
HTTP/1.1 404 Not Found
with following body:
{
"title": "Device not found",
"detail": "Device with unique identifier 123456789abc has not been found",
"described_by": "http://api.nfon.net/probs/device-not-found"
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49-beta"
}]
}
Then I should receive
HTTP/1.1 403 Forbidden
{
"title": "Access forbidden",
"detail": "Access denied to [Firmware] with id [01.49-beta]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49-beta"
}]
}
Then I should receive
HTTP/1.1 403 Forbidden
{
"title": "Access forbidden",
"detail": "Access denied to [Firmware] with id [01.49-beta]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49-beta"
}]
}
Then I should receive
HTTP/1.1 403 Forbidden
{
"title": "Access forbidden",
"detail": "Access denied to [Firmware] with id [01.49-beta]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49-beta"
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49"
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49"
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49"
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "firmware",
"href": "/api/customers/K0002/device-types/standard/firmwares/01.49"
}]
}
Then I should receive
HTTP/1.1 204 No Content
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "ringtoneExternal",
"value": 2
}]
}
Then I should receive
HTTP/1.1 400 Bad Request
{
"errors": [{
"message": "Field not allowed for device type or selected firmware",
"path": "ringtoneExternal"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "ringtoneInternal",
"value": 0
}]
}
Then I should receive
HTTP/1.1 400 Bad Request
{
"errors": [{
"message": "Field not allowed for device type or selected firmware",
"path": "ringtoneInternal"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "groupQueueSkillRingtone",
"value": 0
}]
}
Then I should receive
HTTP/1.1 400 Bad Request
{
"errors": [{
"message": "Field not allowed for device type or selected firmware",
"path": "groupQueueSkillRingtone"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "ringtoneInternal",
"value": 77
}]
}
Then I should receive
HTTP/1.1 400 Bad Request
{
"errors": [{
"message": "Invalid value for Ringtone. Allowed values are 0-5",
"path": "ringtoneInternal"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "ringtoneExternal",
"value": 77
}]
}
Then I should receive
HTTP/1.1 400 Bad Request
{
"errors": [{
"message": "Invalid value for Ringtone. Allowed values are 0-5",
"path": "ringtoneExternal"
}]
}
/api/customers/K0002/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"data": [{
"name": "groupQueueSkillRingtone",
"value": 77
}]
}
Then I should receive
HTTP/1.1 400 Bad Request
{
"errors": [{
"message": "Invalid value for Ringtone. Allowed values are 0-5",
"path": "groupQueueSkillRingtone"
}]
}
/api/customers/K0003/devices/standard/123456789abc
with
application/json; charset=UTF-8
{
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/a062000000HbAsd"
}]
}
Then I should receive
HTTP/1.1 403 Forbidden
{
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0003/devices/standard/123456789abc
with
application/json; charset=UTF-8
{}
Then I should receive
HTTP/1.1 403 Forbidden
{
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0003/devices/standard/123456789abc
with
application/json; charset=UTF-8
{}
Then I should receive
HTTP/1.1 403 Forbidden
{
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}