Api >

Service Portal REST API

GET group service member by extension number
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 Betty (ext. 15) as its member
When I send /api/customers/K0002/targets/group-services/123/members/15
Then I should get HTTP/1.1 200 OK and the response should look like
{
  "href": "/api/customers/K0002/targets/group-services/123/members/15",
  "links": [{
    "rel": "phoneExtension",
    "href": "/api/customers/K0002/targets/phone-extensions/15"
  }],
  "data": [{
    "name": "displayName",
    "value": "Betty"
  }]
}
Cannot get missing group service member
Given I am authenticated as Customer K0002
And there is a Group Service with service number 123 and it has no members When I send /api/customers/K0002/targets/group-services/123/members/404
Then I should get HTTP/1.1 404 Not Found and the response should look like
{
  "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 get group service member of missing group service
Given I am authenticated as Customer K0002
When I send /api/customers/K0002/targets/group-services/404/members/15
Then I should get HTTP/1.1 404 Not Found and the response should look like
{
  "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 get Group Service Member of another Customer
Given 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 access 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 access 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"
}