Api >

Service Portal REST API

DELETE disables timeout on target
Given I am authenticated as Customer K0002
And there is a IVR Service with Service Number 345
with destination BUSY and timeout 5 When I send /api/customers/K0002/targets/ivr-services/345/timeout Then I should receive HTTP/1.1 204 No Content
When I send request /api/customers/K0002/targets/ivr-services/345/timeout
{
  "links": [{
    "rel": "destinationOnTimeout",
    "href": "/api/customers/K0002/targets/NO_ACTION"
  }],
  "data": [{
    "name": "timeoutDelay",
    "value": 0
  }]
}
Cannot remove Destination On Timeout for missing IVR Service
Given I am authenticated as Customer K0002
When I send /api/customers/K0002/targets/ivr-services/404/timeout
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
  "title": "IVR Service not found",
  "detail": "IVR Service with service number 404 not found",
  "described_by": "http://api.nfon.net/probs/ivr-service-not-found"
}
Missing Customer
Given I am authenticated as Admin
When I send /api/customers/K0404/targets/ivr-services/345/timeout
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
  "title": "Customer not found",
  "detail": "Customer with identifier K0404 has not been found",
  "described_by": "http://api.nfon.net/probs/customer-not-found"
}
Customer should not be able to delete another Customer's IVR's Destination On Timeout
Given I am authenticated as Customer K0003
When I send /api/customers/K0002/targets/ivr-services/345/timeout
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "title": "Access forbidden",
  "detail": "Access denied to [Customer] with id [K0002]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
System Integrator should not be able to delete IVR Timeout for Customer, that does not belong to him
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0003/targets/ivr-services/345/timeout
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "title": "Access forbidden",
  "detail": "Access denied to [Customer] with id [K0003]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Operator should not be able to delete IVR Timeout for Customer, that does not belong to him
Given I am authenticated as Operator C0002
When I send /api/customers/K0003/targets/ivr-services/345/timeout
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "title": "Access forbidden",
  "detail": "Access denied to [Customer] with id [K0003]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}