Api >

Service Portal REST API

GET returns all Operator's Softswitches
Given I am authenticated as Operator C0002
and there is a Softswitch with id: 100 and:
  • name: SoftswitchName1
  • cidType: ENUM_164_00
  • dialType: ENUM_164_PLUS
  • no failoverSoftswitch
and there is another Softswitch with id: 200 and:
  • name: SoftswitchName2
  • cidType: ENUM_164_00
  • dialType: ENUM_164_MINUS
  • failoverSoftswitch with id 100
When I send /api/operators/C0002/softswitches
Then I should receive HTTP/1.1 200 OK with following body:
{
  "href": "/api/operators/C0002/softswitches?_offset=0&_pagesize=16&_orderBy=name&_order=ASC",
  "offset": 0,
  "total": 2,
  "size": 2,
  "links": [{
    "rel": "availableFailoverSoftswitches",
    "href": "/api/operators/C0002/softswitches"
  }],
  "items": [{
    "href": "/api/operators/C0002/softswitches/100",
    "links": [],
    "data": [{
      "name": "name",
      "value": "SoftswitchName1"
    }, {
      "name": "identifier",
      "value": "softswitch100"
    }, {
      "name": "cidType",
      "value": "ENUM_164_00"
    }, {
      "name": "dialType",
      "value": "ENUM_164_PLUS"
    }, {
      "name": "failoverSoftswitch",
      "value": null
    }, {
      "name": "selectableByOperator",
      "value": false
    }]
  }, {
    "href": "/api/operators/C0002/softswitches/200",
    "links": [],
    "data": [{
      "name": "name",
      "value": "SoftswitchName2"
    }, {
      "name": "identifier",
      "value": "softswitch200"
    }, {
      "name": "cidType",
      "value": "ENUM_164_00"
    }, {
      "name": "dialType",
      "value": "ENUM_164_MINUS"
    }, {
      "name": "failoverSoftswitch",
      "value": "SoftswitchName1"
    }, {
      "name": "selectableByOperator",
      "value": false
    }]
  }]
}
GET returns filtered Operator's Softswitches
Filtering is done on fields:
  • name
  • failoverSoftswitch
Given I am authenticated as Operator C0002
and there is a Softswitch with id: 100 and:
  • name: SoftswitchName1
  • cidType: ENUM_164_00
  • dialType: ENUM_164_PLUS
  • no failoverSoftswitch
and there is another Softswitch with id: 200 and:
  • name: SoftswitchName2
  • cidType: ENUM_164_00
  • dialType: ENUM_164_MINUS
  • failoverSoftswitch with id 100
When I send /api/operators/C0002/softswitches?_q=2
Then I should receive HTTP/1.1 200 OK with following body:
{
  "href": "/api/operators/C0002/softswitches?_offset=0&_pagesize=16&_q=2&_orderBy=name&_order=ASC",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [{
    "rel": "availableFailoverSoftswitches",
    "href": "/api/operators/C0002/softswitches"
  }],
  "items": [{
    "href": "/api/operators/C0002/softswitches/200",
    "links": [],
    "data": [{
      "name": "name",
      "value": "SoftswitchName2"
    }, {
      "name": "identifier",
      "value": "softswitch200"
    }, {
      "name": "cidType",
      "value": "ENUM_164_00"
    }, {
      "name": "dialType",
      "value": "ENUM_164_MINUS"
    }, {
      "name": "failoverSoftswitch",
      "value": "SoftswitchName1"
    }, {
      "name": "selectableByOperator",
      "value": false
    }]
  }]
}
GET returns 404 if Operator is missing
Given I am authenticated as Admin
and there is no Operator with id C0404 When I send /api/operators/C0404/softswitches
Then I should receive HTTP/1.1 404 Not Found with following body:
{
  "detail": "Operator C0404 has not been found",
  "title": "Operator not found",
  "described_by": "http://api.nfon.net/probs/operator-not-found"
}
Customer cannot access Operator's Softswitches
Given I am authenticated as Customer C0003
When I send /api/operators/C0002/softswitches
Then I should receive HTTP/1.1 403 Forbidden
And Content-Type header should be application/api-problem+json
with following body:
{
  "title": "Access forbidden",
  "detail": "Access denied to [Operator] with id [C0002]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
System Integrator cannot access Operator's Softswitches
Given I am authenticated as System Integrator S0002
When I send /api/operators/C0002/softswitches
Then I should receive HTTP/1.1 403 Forbidden
with following body
{
  "title": "Access forbidden",
  "detail": "Access denied to [Operator] with id [C0002]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}