Api >

Service Portal REST API

GET System Integrator
Given I am authenticated as operator C0002
and there is System Integrator S0123 defined for Operator C0002
When I send /api/system-integrators/S0123
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/system-integrators/S0123",
  "links": [{
    "rel": "operator",
    "href": "/api/operators/C0002"
  }, {
    "rel": "defaultRatingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile"
  }, {
    "rel": "account",
    "href": "/api/accounts/123S0123"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }],
  "data": [{
    "name": "externalIdentifier",
    "value": "S0123"
  }, {
    "name": "name",
    "value": "System"
  }, {
    "name": "contactName",
    "value": "name"
  }, {
    "name": "contactEmail",
    "value": "email@email.com"
  }, {
    "name": "contactPhoneNumber",
    "value": null
  }, {
    "name": "nscAccess",
    "value": false
  }, {
    "name": "cdrAccess",
    "value": false
  }, {
    "name": "notes",
    "value": null
  }, {
    "name": "password",
    "value": "***"
  }, {
    "name": "securityQuestion",
    "value": "question"
  }, {
    "name": "securityAnswer",
    "value": "answer"
  }]
}
GET System Integrator that does not have an account
Given I am authenticated as Operator C0002
and there is a SystemIntegrator without Account with ID S1245 for Operator C0002
When I send /api/system-integrators/S1245
Then I should receive HTTP/1.1 200 OK with following body:
{
  "href": "/api/system-integrators/S1245",
  "links": []
}
System Integrator cannot read his data
Given I am authenticated as S0002
When I send /api/system-integrators/S0002
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Customer cannot read System Integrator data
Given I am authenticated as K0002
When I send /api/system-integrators/S0002
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "title": "Access forbidden",
  "detail": "Access denied to [SystemIntegrator] with id [S0002]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
System Integrator cannot read other System Integrator's data
Given I am authenticated as S0002
When I send /api/system-integrators/S0003
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "title": "Access forbidden",
  "detail": "Access denied to [SystemIntegrator] with id [S0003]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Operator can read data of System Integrator that belongs to him
Given I am authenticated as C0002
When I send /api/system-integrators/S0002
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/system-integrators/S0002"
}
Operator cannot read data of System Integrator that does not belong to him
Given I am authenticated as C0002
When I send /api/system-integrators/S0003
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "title": "Access forbidden",
  "detail": "Access denied to [SystemIntegrator] with id [S0003]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Missing System Integrator
Given I am authenticated as admin
When I send /api/system-integrators/S0404
Then I should receive HTTP/1.1 404 Not Found with following body:
{
  "described_by": "http://api.nfon.net/probs/systemIntegrator-not-found",
  "title": "SystemIntegrator not found",
  "detail": "SystemIntegrator with identifier S0404 has not been found"
}