Api >

Service Portal REST API

GET a list of Phone Book's Phone Extension visibilities
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
  • another Phone Extension with extension number 777 and display name Extension2
When I send /api/customers/K0002/phone-books/100/visibilities
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/phone-books/100/visibilities?_offset=0&_pagesize=16",
  "offset": 0,
  "total": 2,
  "size": 2,
  "links": [{
    "rel": "availablePhoneExtensions",
    "href": "/api/customers/K0002/phone-books/100/visibilities/available-phone-extensions"
  }],
  "items": [{
    "href": "/api/customers/K0002/phone-books/100/visibilities/555",
    "data": [{
      "name": "displayName",
      "value": "Extension1"
    }, {
      "name": "extensionNumber",
      "value": "555"
    }]
  }, {
    "href": "/api/customers/K0002/phone-books/100/visibilities/777",
    "data": [{
      "name": "displayName",
      "value": "Extension2"
    }, {
      "name": "extensionNumber",
      "value": "777"
    }]
  }]
}
GET a list of Phone Book's Phone Extension visibilities
Filtering is done on fields :
  • displayName
  • extensionNumber
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
  • another Phone Extension with extension number 777 and display name Extension2
When I send /api/customers/K0002/phone-books/100/visibilities?_q=777
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/phone-books/100/visibilities?_offset=0&_pagesize=16&_q=777",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": "/api/customers/K0002/phone-books/100/visibilities/777",
    "data": [{
      "name": "displayName",
      "value": "Extension2"
    }, {
      "name": "extensionNumber",
      "value": "777"
    }]
  }]
}
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
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"
}