Api >

Service Portal REST API

Log into skill with PUT
Given PortalUser with name A0003 exists
and flagged as internal request
and there is a Phone Extension with extension number 345
and it is logged into skill
When I send /api/customers/K0002/targets/phone-extensions/345/skills/login-status and flagged as internal request
as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "status",
    "value": true
  }]
}
Then I should receive HTTP/1.1 204 No Content
When flagged as internal request
Then when I send /api/customers/K0002/targets/phone-extensions/345/skills/login-status
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "data": [{
    "name": "status",
    "value": true
  }]
}
Log out from skill with PUT
Given PortalUser with name A0003 exists
and flagged as internal request
and there is a Phone Extension with extension number 345
and it is logged into skill
When I send /api/customers/K0002/targets/phone-extensions/345/skills/login-status as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "status",
    "value": false
  }]
}
Then I should receive HTTP/1.1 204 No Content
When flagged as internal request
Then when I send /api/customers/K0002/targets/phone-extensions/345/skills/login-status
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "data": [{
    "name": "status",
    "value": false
  }]
}
Missing Customer
Given there is Portal User with unique identifier A0003
and flagged as internal request
and there is a Phone Extension with extension number 345
When I send /api/customers/K404/targets/phone-extensions/345/skills/login-status as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "status",
    "value": false
  }]
}
Then I should receive HTTP/1.1 404 Not Found
And Content-Type header should be application/api-problem+json
with following body:
{
  "title": "Customer not found",
  "detail": "Customer with identifier K404 has not been found",
  "described_by": "http://api.nfon.net/probs/customer-not-found"
}
Missing Phone Extension
Given there is Portal User with unique identifier A0003
and flagged as internal request
When I send /api/customers/K0002/targets/phone-extensions/404/skills/login-status as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "status",
    "value": false
  }]
}
Then I should receive HTTP/1.1 404 Not Found
And Content-Type header should be application/api-problem+json
with following body:
{
  "title": "Extension not found",
  "detail": "Extension with extension number 404 has not been found",
  "described_by": "http://api.nfon.net/probs/extension-not-found"
}