Api >

Service Portal REST API

GET returns Pbx Group
Given I am authenticated as Admin
and there is a Pbx Group with name Pbx1
When I send /api/pbx-groups/Pbx1
Then I should receive HTTP/1.1 200 OK with following body:
{
  "href": "/api/pbx-groups/Pbx1",
  "links": [],
  "data": [{
    "name": "name",
    "value": "Pbx1"
  }]
}
GET returns 404 if PbxGroup is missing
Given I am authenticated as Admin
and there is no Pbx Group with name Pbx1
When I send /api/pbx-groups/Pbx1
Then I should receive HTTP/1.1 404 Not Found with following body:
{
  "detail": "Pbx Group with name Pbx1 has not been found",
  "title": "Pbx Group not found",
  "described_by": "http://api.nfon.net/probs/pbx-group-not-found"
}
Customer cannot access GET Pbx Group
Given I am authenticated as Customer C0003
When I send /api/pbx-groups/Pbx1
Then I should receive HTTP/1.1 403 Forbidden
And Content-Type header should be application/api-problem+json
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
System Integrator cannot access Pbx Group
Given I am authenticated as System Integrator S0002
When I send /api/pbx-groups/Pbx1
Then I should receive HTTP/1.1 403 Forbidden
with following body
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Operator cannot access Pbx Group
Given I am authenticated as Operator C0002
When I send /api/pbx-groups/Pbx1
Then I should receive HTTP/1.1 403 Forbidden
with following body
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}