/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"links": [{
"rel": "announcement",
"href": "/api/customers/K0002/announcements/13"
}],
"data": [{
"name": "displayName",
"value": "new display name"
}, {
"name": "extensionNumber",
"value": "666"
}, {
"name": "interpretUnknownAsExtension",
"value": true
}, {
"name": "maxNumberOfDigits",
"value": 5
}]
}
Then the response code should be equal
HTTP/1.1 204 No Content
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"links": [{
"rel": "announcement",
"href": "/api/customers/K0002/announcements/13"
}],
"data": [{
"name": "displayName",
"value": "new display name"
}, {
"name": "extensionNumber",
"value": "666"
}, {
"name": "interpretUnknownAsExtension",
"value": true
}, {
"name": "maxNumberOfDigits",
"value": 5
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"data": [{
"name": "displayName",
"value": "invalid display=name"
}]
}
Then the response code should be equal
HTTP/1.1 400 Bad Request
And the response should look like:
{
"errors": [{
"message": "Display name should not contain these characters: & $ ! ? = | \" { }",
"path": "displayName",
"value": "invalid display=name"
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"data": [{
"name": "displayName",
"value": "this is a way, way, way, way, way, way, way, way, way to long displayName"
}]
}
Then the response code should be equal
HTTP/1.1 400 Bad Request
And the response should look like:
{
"errors": [{
"message": "Display name should have a length between 1 and 50 characters",
"path": "displayName",
"value": "this is a way, way, way, way, way, way, way, way, way to long displayName"
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"data": [{
"name": "extensionNumber",
"value": "0123"
}]
}
Then the response code should be equal
HTTP/1.1 400 Bad Request{
"errors": [{
"message": "Invalid extension number format. Must not start with the dial-out-prefix (default 0)",
"path": "extensionNumber",
"value": "0123"
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"data": [{
"name": "extensionNumber",
"value": "12345678901234567890123456789"
}]
}
Then the response code should be equal
HTTP/1.1 400 Bad Request{
"errors": [{
"message": "Extension number length should not exceed 20 characters",
"path": "extensionNumber",
"value": "12345678901234567890123456789"
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"data": [{
"name": "extensionNumber",
"value": "1234"
}]
}
Then the response code should be equal
HTTP/1.1 400 Bad Request{
"errors": [{
"message": "Extension number is not unique.",
"path": "extensionNumber",
"value": "1234"
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"links": [{
"rel": "announcement",
"href": null
}]
}
Then the response code should be equal
HTTP/1.1 204 No Content
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"links": [{
"rel": "announcement",
"href": null
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"data": [{
"name": "maxNumberOfDigits",
"value": 11
}]
}
Then the response code should be
HTTP/1.1 400 Bad Request{
"errors": [{
"message": "maxNumberOfDigits value should be between 1 and 10",
"path": "maxNumberOfDigits",
"value": 11
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"data": [{
"name": "maxNumberOfDigits",
"value": 3
}]
}
Then the response code should be
HTTP/1.1 400 Bad Request{
"errors": [{
"message": "There is assigned number longer than provided value",
"path": "maxNumberOfDigits",
"value": 3
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"data": [{
"name": "maxNumberOfDigits",
"value": 1
}]
}
Then the response code should be
HTTP/1.1 400 Bad Request
And the response should look like:
{
"errors": [{
"message": "There is assigned number longer than provided value",
"path": "maxNumberOfDigits",
"value": 1
}]
}
/api/customers/K0002/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{
"data": [{
"name": "maxNumberOfDigits",
"value": 1
}]
}
Then the response code should be
HTTP/1.1 204 No Content
/api/customers/K0002/targets/ivr-services/29/key-assignments/1HTTP/1.1 200 OK
/api/customers/K404/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{}
Then the response code should be
HTTP/1.1 404 Not Found
with following body:
{
"title": "Customer not found",
"detail": "Customer with identifier K404 has not been found",
"described_by": "http://api.nfon.net/probs/customer-not-found"
}
/api/customers/K0003/targets/ivr-services/29
as
application/json; charset=UTF-8
:
{}
Then the response code should be
HTTP/1.1 403 Forbidden
with following body:
{
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0003/targets/ivr-services/29 as 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/targets/ivr-services/29 as 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"
}