Api >

Service Portal REST API

DELETE removes requested Announcement
Given I am authenticated as customer K0002
and there is an Announcement with Id 15
When I send /api/customers/K0002/announcements/15
Then I should receive HTTP/1.1 204 No Content And there should be no announcement with id 15
DELETE removes requested Announcement even if it is missing metadata
Given I am authenticated as customer K0002
and there is an Announcement with Id 15 and without metadata
When I send /api/customers/K0002/announcements/15
Then I should receive HTTP/1.1 204 No Content And there should be no announcement with id 15
DELETE returns 404 if Customer is missing
Given I am authenticated as Admin
and there is no Customer K0404
When I send /api/customers/K0404/announcements/15
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"
}
DELETE returns 404 if requested Announcement is missing
Given I am authenticated as customer K0002
and there is no Announcement with Id 404
When I send /api/customers/K0002/announcements/404
Then I should receive HTTP/1.1 404 Not Found with following body:
{
  "title": "Announcement not found",
  "detail": "Announcement with id 404 has not been found",
  "described_by": "http://api.nfon.net/probs/announcement-not-found"
}
DELETE returns 403 if requested Announcement belongs to another Customer
Given I am authenticated as K0003
and there is an Announcement with Id 15
When I send /api/customers/K0002/announcements/15
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 cannot delete Announcement of Customer, that does not belong to him
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0003/announcements/15
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 cannot delete Announcement of Customer, that does not belong to him
Given I am authenticated as Operator C0002
When I send /api/customers/K0003/announcements/15
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"
}