Api >

Service Portal REST API

GET Phone Book's visibility
Given I am authenticated as customer K0002
and there is a Phone Book with
  • id: 100
  • number: +49 (66) 1234-555
  • name: Phone Book
And it is visible for:
  • a Phone Extension with extension number 555 and display name Extension1
When I send /api/customers/K0002/phone-books/100/visibilities/555
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/phone-books/100/visibilities/555",
  "links": [{
    "rel": "phoneExtension",
    "href": "/api/customers/K0002/targets/phone-extensions/555"
  }],
  "data": [{
    "name": "displayName",
    "value": "Extension1"
  }, {
    "name": "extensionNumber",
    "value": "555"
  }]
}
Missing Phone Book
Given I am authenticated as customer K0002
And there is no Phone Book with ID 404
When I send /api/customers/K0002/phone-books/404/visibilities/555
Then I should receive HTTP/1.1 404 Not Found
{
  "detail": "Phone Book with ID 404 has not been found",
  "title": "Phone Book not found",
  "described_by": "http://api.nfon.net/probs/phone-book-not-found"
}
Missing Phone Book's visibility
Given I am authenticated as customer K0002
and there is a Phone Book with
  • id: 100
  • number: +49 (66) 1234-555
  • name: Phone Book
And there is no Phone Book's visibility with extension 404
When I send /api/customers/K0002/phone-books/100/visibilities/404
Then I should receive HTTP/1.1 404 Not Found
{
  "detail": "Phone Book's visibility member with extension 404 has not been found",
  "title": "Phone Book's visibility member not found",
  "described_by": "http://api.nfon.net/probs/phone-book-visibility-member-not-found"
}