/api/customers/K0002/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway A"
}, {
"name": "gatewayIp",
"value": "one.nfon.net"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/lync/gateways/200 should return:
{
"href": "/api/customers/K0002/lync/gateways/200",
"links": [],
"data": [{
"name": "description",
"value": "Lync Gateway A"
}, {
"name": "gatewayIp",
"value": "one.nfon.net"
}]
}
/api/customers/K0002/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway A"
}, {
"name": "gatewayIp",
"value": "one.nfon.net"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway B"
}, {
"name": "gatewayIp",
"value": "one.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": "one.nfon.net"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway"
}, {
"name": "gatewayIp",
"value": "one.nfon.net"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0003/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway"
}, {
"name": "gatewayIp",
"value": "one.nfon.net"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "gatewayIp",
"value": "one.nfon.net"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "gatewayIp",
"value": "one.nfon.net"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "gatewayIp",
"value": "two.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": "Description is not unique",
"path": "description",
"value": null
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway A"
}, {
"name": "gatewayIp",
"value": "one.nfon.net"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway A"
}, {
"name": "gatewayIp",
"value": "two.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": "Description is not unique",
"path": "description"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0404/lync/gateways as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway A"
}, {
"name": "gatewayIp",
"value": "one.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 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway A"
}, {
"name": "gatewayIp",
"value": "one.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 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway A"
}, {
"name": "gatewayIp",
"value": "one.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 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "description",
"value": "Lync Gateway A"
}, {
"name": "gatewayIp",
"value": "one.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"
}