Api >

Service Portal REST API

GET Available Rating Profiles
Given I am authenticated as Admin
and there are Rating Profiles:
  • assigned Rating Profile with name 8 and description Rating Profile 8
  • not assigned Rating Profile with name 113 and description Rating Profile 13
When I send /api/operators/C0002/rating-profiles/available
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/operators/C0002/rating-profiles/available?_offset=0&_pagesize=16",
  "offset": 0,
  "total": 2,
  "size": 2,
  "links": [],
  "items": [{
    "href": null,
    "links": [],
    "data": [{
      "name": "name",
      "value": "13"
    }, {
      "name": "description",
      "value": "Rating Profile 13"
    }]
  }, {
    "href": null,
    "links": [],
    "data": [{
      "name": "name",
      "value": "Rating Profile 2"
    }, {
      "name": "description",
      "value": "Rating Profile 2 Description"
    }]
  }]
}
GET filtered Available Rating Profiles
Given I am authenticated as Admin
and there are Rating Profiles:
  • assigned Rating Profile with name 8 and description Rating Profile 8
  • not assigned Rating Profile with name 113 and description Rating Profile 13
When I send /api/operators/C0002/rating-profiles/available?_q=13
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/operators/C0002/rating-profiles/available?_offset=0&_pagesize=16&_q=13",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": null,
    "links": [],
    "data": [{
      "name": "name",
      "value": "13"
    }, {
      "name": "description",
      "value": "Rating Profile 13"
    }]
  }]
}
Customer cannot GET available rating profiles
Given I am authenticated as customer K0002
When I ask for rating profiles /api/operators/C0002/rating-profiles/available
Then I should receive HTTP/1.1 403 Forbidden
And Content-Type header should be application/api-problem+json
with following body:
{
  "detail": "Access denied to [Operator] with id [C0002]",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
System Integrator cannot GET available rating profiles
Given I am authenticated as System Integrator S0002
When I ask for rating profiles /api/operators/C0002/rating-profiles/available
Then I should receive HTTP/1.1 403 Forbidden
And Content-Type header should be application/api-problem+json
with following body:
{
  "detail": "Access denied to [Operator] with id [C0002]",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Operator cannot GET available rating profiles
Given I am authenticated as Operator C0002
When I ask for rating profiles /api/operators/C0002/rating-profiles/available
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"
}