/api/customers/K0002/targets/group-services/123/members
with header application/json; charset=UTF-8
and with body
{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/15"
}]
}
Then I should get HTTP/1.1 201 Created
with http://localhost:9998/api/customers/K0002/targets/group-services/123/members/15 /api/customers/K0002/targets/group-services/123/members
with header application/json; charset=UTF-8 {
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/15"
}]
}
Then I should get HTTP/1.1 400 Bad Request with following body:
{
"errors": [{
"message": "Phone Extension 15 is already member of Group Service 123!"
}]
}
/api/customers/K0002/targets/group-services/123/members
with header application/json; charset=UTF-8 {}
Then I should get HTTP/1.1 400 Bad Request with following body:
{
"errors": [{
"message": "Value must be provided",
"path": "phoneExtension"
}]
}
/api/customers/K0002/targets/group-services/123/members
with header application/json; charset=UTF-8 {
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/404"
}]
}
Then I should get HTTP/1.1 404 Not Found with following body:
{
"title": "Extension not found",
"detail": "Extension with extension number 404 has not been found",
"described_by": "http://api.nfon.net/probs/extension-not-found"
}
/api/customers/K0002/targets/group-services/404/members
with header application/json; charset=UTF-8 {
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/15"
}]
}
Then I should receive HTTP/1.1 404 Not Found with body including
{
"title": "Group not found",
"detail": "Group with serviceNumber 404 not found",
"described_by": "http://api.nfon.net/probs/group-not-found"
}
/api/customers/K0002/targets/group-services/123/members
with header application/json; charset=UTF-8 {
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0003/targets/phone-extensions/15"
}]
}
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/K0002/targets/group-services/123/members
with header application/json; charset=UTF-8 {
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0003/targets/phone-extensions/15"
}]
}
Then I should receive HTTP/1.1 400 Bad Request{
"errors": [{
"message": "Phone Extension 15 does not belong to Customer K0002!"
}]
}
/api/customers/K0404/targets/group-services/123/members
with header application/json; charset=UTF-8 {
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/15"
}]
}
Then I should receive HTTP/1.1 404 Not Found{
"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/targets/group-services/123/members
with header application/json; charset=UTF-8 {
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/15"
}]
}
Then I should receive HTTP/1.1 403 Forbidden{
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0002]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0003/targets/group-services/123/members
with header application/json; charset=UTF-8 {
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0003/targets/phone-extensions/15"
}]
}
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/group-services/123/members
with header application/json; charset=UTF-8 {
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0003/targets/phone-extensions/15"
}]
}
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"
}