Api >

Service Portal REST API

DELETE removes group service member
Given I am authenticated as Customer K0002
And there is a Group Service with service number 123 and has a Phone Extension with extension number 17 as its member
When I send /api/customers/K0002/targets/group-services/123/members/17
Then I should get HTTP/1.1 204 No Content
And Group Service does not have 17 as its member
Cannot remove missing group service member
Given I am authenticated as Customer K0002
And there is a Group Service with service number 123 and has no Phone Extension with extension number 404 as its member
When I send /api/customers/K0002/targets/group-services/123/members/404
Then I should get HTTP/1.1 404 Not Found
with following body
{
  "title": "Group member not found",
  "detail": "Group member with extension number 404 not found",
  "described_by": "http://api.nfon.net/probs/group-member-not-found"
}
Cannot remove group service member fo missing group service
Given I am authenticated as Customer K0002
When I send /api/customers/K0002/targets/group-services/404/members/17
Then I should get HTTP/1.1 404 Not Found
with following body
{
  "title": "Group not found",
  "detail": "Group with serviceNumber 404 not found",
  "described_by": "http://api.nfon.net/probs/group-not-found"
}
Admin cannot remove Group Service Member of missing Customer
Given I am authenticated as Admin
And there is a Group Service with service number 123 and has a Phone Extension with extension number 17 as its member
When I send /api/customers/K0404/targets/group-services/123/members/17
Then I should receive HTTP/1.1 404 Not Found
with following body
{
  "title": "Customer not found",
  "detail": "Customer with identifier K0404 has not been found",
  "described_by": "http://api.nfon.net/probs/customer-not-found"
}
Customer cannot remove Group Service Member of another Customer
And there is a Group Service with service number 123 and has a Phone Extension with extension number 17 as its member
and I am authenticated as Customer K0003
When I send /api/customers/K0002/targets/group-services/123/members/17
Then I should receive HTTP/1.1 403 Forbidden
with following body
{
  "title": "Access forbidden",
  "detail": "Access denied to [Customer] with id [K0002]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
System Integrator cannot remove Group Service Member of Customer that does not belong to him
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0003/targets/group-services/123/members/17
Then I should receive 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"
}
Operator cannot remove Group Service Member of Customer that does not belong to him
Given I am authenticated as Operator C0002
When I send /api/customers/K0003/targets/group-services/123/members/17
Then I should receive 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"
}