/api/customers/K0002/lync/gateways/200 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "New Description"
}, {
"name": "gatewayIp",
"value": "new.nfon.net"
}]
}
Then I should receive HTTP/1.1 204 No Content
/api/customers/K0002/lync/gateways/200 should return:
{
"href": "/api/customers/K0002/lync/gateways/200",
"links": [],
"data": [{
"name": "description",
"value": "New Description"
}, {
"name": "gatewayIp",
"value": "new.nfon.net"
}]
}
/api/customers/K0002/lync/gateways/200 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Other Lync Gateway"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"title": "Validation error",
"detail": "Could not create or update resource due to constraint violations",
"errors": [{
"message": "Description is not unique",
"path": "description"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/lync/gateways/200 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "gatewayIp",
"value": "other.nfon.net"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"title": "Validation error",
"detail": "Could not create or update resource due to constraint violations",
"errors": [{
"message": "GatewayIp is not unique",
"path": "gatewayIp",
"value": "other.nfon.net"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/lync/gateways/404 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "New Description"
}, {
"name": "gatewayIp",
"value": "new.nfon.net"
}]
}
Then I should receive HTTP/1.1 404 Not Found application/api-problem+json {
"title": "Lync Gateway not found",
"detail": "Lync Gateway with id 404 not found",
"described_by": "http://api.nfon.net/probs/lync-gateway-not-found"
}
/api/customers/K0404/lync/gateways/200 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "New Description"
}, {
"name": "gatewayIp",
"value": "new.nfon.net"
}]
}
Then I should receive HTTP/1.1 404 Not Found application/api-problem+json {
"title": "Customer not found",
"detail": "Customer with identifier K0404 has not been found",
"described_by": "http://api.nfon.net/probs/customer-not-found"
}
/api/customers/K0002/lync/gateways/200 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "New Description"
}, {
"name": "gatewayIp",
"value": "new.nfon.net"
}]
}
Then I should receive HTTP/1.1 403 Forbidden application/api-problem+json {
"title": "Access forbidden",
"detail": "Required role is missing",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0002/lync/gateways/200 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "New Description"
}, {
"name": "gatewayIp",
"value": "new.nfon.net"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Required role is missing",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0002/lync/gateways/200 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "New Description"
}, {
"name": "gatewayIp",
"value": "new.nfon.net"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Required role is missing",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}