/api/customers/K0002/lync/sites/500 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "domain",
"value": "new.nfon.net"
}, {
"name": "description",
"value": "Changed Lync Site"
}]
}
Then I should receive HTTP/1.1 204 No Content
/api/customers/K0002/lync/sites/500 should return:
{
"href": "/api/customers/K0002/lync/sites/500",
"links": [{
"rel": "gateway",
"href": "/api/customers/K0002/lync/gateways/200"
}],
"data": [{
"name": "serverName",
"value": "Lync Gateway"
}, {
"name": "domain",
"value": "new.nfon.net"
}, {
"name": "description",
"value": "Changed Lync Site"
}]
}
/api/customers/K0002/lync/sites/500 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "domain",
"value": "another.nfon.net"
}, {
"name": "description",
"value": "Changed Lync Site"
}]
}
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": "LyncSite with given domain already exists",
"path": "domain",
"value": "another.nfon.net"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/lync/sites/500 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "domain",
"value": "new.nfon.net"
}, {
"name": "description",
"value": "Changed Lync Site"
}]
}
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/sites/404 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "domain",
"value": "another.nfon.net"
}, {
"name": "description",
"value": "Changed Lync Site"
}]
}
Then I should receive HTTP/1.1 404 Not Found application/api-problem+json {
"title": "Lync Site not found",
"detail": "Lync Site with id 404 not found",
"described_by": "http://api.nfon.net/probs/lync-site-not-found"
}
/api/customers/K0404/lync/sites/500 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "domain",
"value": "another.nfon.net"
}, {
"name": "description",
"value": "Changed Lync Site"
}]
}
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/sites/500 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "domain",
"value": "new.nfon.net"
}, {
"name": "description",
"value": "Changed Lync Site"
}]
}
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/sites/500 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "domain",
"value": "new.nfon.net"
}, {
"name": "description",
"value": "Changed Lync Site"
}]
}
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"
}