Api >

Service Portal REST API

Delete the Queue Service
Given I am authenticated as customer K0002
And there is a queue service
  • with name queue name
  • with service number 345
  • and asterisk extension number 576
When I send /api/customers/K0002/targets/queue-services/345
Then I should receive HTTP/1.1 204 No Content
Then given I am authenticated as customer K0002
When I send /api/customers/K0002/targets/queue-services/345
Then I should receive HTTP/1.1 404 Not Found
Cannot Delete the Queue Service referenced by Frontdesk Service
Given I am authenticated as customer K0002
And there is a queue service
  • with name queue name
  • with service number 345
  • and asterisk extension number 576
And also there is a frontdesk service with a fallback target to this Queue Service
When I send /api/customers/K0002/targets/queue-services/345
Then I should receive HTTP/1.1 400 Bad Request
and following body:
{
  "detail": "QUEUE Service[345] is still referenced as a Fallback target on Frontdesk Service: displayName[123]",
  "title": "Deletion of service/phone extension failed",
  "described_by": "http://api.nfon.net/probs/method-not-allowed"
}
Missing Queue
Given I am authenticated as customer K0002
and there is no skill service with 404 identifier When I send /api/customers/K0002/targets/queue-services/404
Then I should receive HTTP/1.1 404 Not Found
{
  "title": "Queue not found",
  "detail": "Queue with serviceNumber 404 not found",
  "described_by": "http://api.nfon.net/probs/queue-not-found"
}
Missing Customer
Given I am authenticated as Admin
When I send /api/customers/K404/targets/queue-services/345
Then I should receive HTTP/1.1 404 Not Found
{
  "title": "Customer not found",
  "detail": "Customer with identifier K404 has not been found",
  "described_by": "http://api.nfon.net/probs/customer-not-found"
}
Customer should not be able to DELETE another Customer's queue
Given there is a queue service
  • with name queue name
  • with service number 345
  • and asterisk extension number 576
and I am authenticated as Customer K0003
When I send /api/customers/K0002/targets/queue-services/345
Then I should receive HTTP/1.1 403 Forbidden
{
  "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 remove data of a Customer that he cannot manage
Given there is a queue service
  • with name queue name
  • with service number 345
  • and asterisk extension number 576
and I am authenticated as System Integrator S0002
When I send /api/customers/K0003/targets/queue-services/345
Then I should receive HTTP/1.1 403 Forbidden
{
  "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 remove data of a Customer that he cannot manage
Given there is a queue service
  • with name queue name
  • with service number 345
  • and asterisk extension number 576
and I am authenticated as Operator C0002
When I send /api/customers/K0003/targets/queue-services/345
Then I should receive HTTP/1.1 403 Forbidden
{
  "title": "Access forbidden",
  "detail": "Access denied to [Customer] with id [K0003]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}