Api >

Service Portal REST API

DELETE unassigns Rating Profile from Operator
Given I am authenticated as Admin
and there is rating profile with name 8 which is assigned to operator C0002
When I send /api/operators/C0002/rating-profiles/8
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as Admin
When I send /api/operators/C0002/rating-profiles/8
Then I should receive HTTP/1.1 404 Not Found
DELETE does not unassign Rating Profile not assigned to the Operator
Given I am authenticated as Admin
and there is rating profile with name 8 which is not assigned to C0002
When I send /api/operators/C0002/rating-profiles/8
Then I should receive HTTP/1.1 404 Not Found
DELETE does not unassign Operator's default Rating Profile
Given I am authenticated as Admin
and there is a Rating Profile 8 which is default for C0002 When I send /api/operators/C0002/rating-profiles/8
Then I should receive HTTP/1.1 400 Bad Request with body
{
  "errors": [{
    "message": "Cannot unassign default Rating Profile 8 from Operator C0002"
  }]
}
Customer cannot unassign rating profile from Operator
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 unassign rating profile from Operator
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"
}
Operator cannot unassign rating profile from Operator
Given I am authenticated as Operator C0002
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": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}