Api >

Service Portal REST API

GET Rating Profiles
Given I am authenticated as C0002
and there is rating profile with name 8 description description 8 which is assigned to operator C0002
When I send /api/operators/C0002/rating-profiles/8
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/operators/C0002/rating-profiles/8",
  "links": [],
  "data": [{
    "name": "name",
    "value": "8"
  }, {
    "name": "description",
    "value": "description 8"
  }]
}
Fail meaningfully when getting rating profile for not existing Operator
Given I am authenticated as Admin
When I ask for rating profiles for not existing Operator /api/operators/C404/rating-profiles/8
Then I should receive HTTP/1.1 404 Not Found
And Content-Type header should be application/api-problem+json
with following body:
{
  "detail": "Operator C404 has not been found",
  "title": "Operator not found",
  "described_by": "http://api.nfon.net/probs/operator-not-found"
}
Fail meaningfully when getting not existing rating profile
Given I am authenticated as C0002
When I ask for rating profiles for not existing Operator /api/operators/C0002/rating-profiles/NOT_EXISTING
Then I should receive HTTP/1.1 404 Not Found
And Content-Type header should be application/api-problem+json
with following body:
{
  "detail": "Rating Profile with identifier 'NOT_EXISTING' has not been found for Operator C0002",
  "title": "Rating profile not found",
  "described_by": "http://api.nfon.net/probs/operator-rating-profile-not-found"
}
Customer cannot GET rating profile
Given I am authenticated as customer K0002
When I ask for rating profiles /api/operators/C0002/rating-profiles/8
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 rating profile
Given I am authenticated as System Integrator S0002
When I ask for rating profiles /api/operators/C0002/rating-profiles/8
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"
}