Api >

Service Portal REST API

POST resets device authentication for base device which supports 2 factor authentication
Given I am authenticated as K0002
and there is an Standard Device Type with ID 123456789abc of type type01
and with externalRingtone set to 2
and with internalRingtone set to 3
and with groupQueueSkillRingtone set to 3
and with useSiteOptionsFromSite set to false
and with authorisation PIN set to 375215
and with supportsAuthentication set to true
which has been created at 2015-10-12 04:25 When I send /api/customers/K0002/devices/123456789abc/reset-authentication as application/json; charset=UTF-8
with following body:
{}
Then I should receive HTTP/1.1 204 No Content
POST resets device authentication for standard device which supports 2 factor authentication
Given I am authenticated as K0002
and there is an Base Device Type with ID 123456789abc of type type01
and with externalRingtone set to 2
and with internalRingtone set to 3
and with groupQueueSkillRingtone set to 3
and with useSiteOptionsFromSite set to false
and with authorisation PIN set to 375215
and with supportsAuthentication set to true
which has been created at 2015-10-12 04:25 When I send /api/customers/K0002/devices/123456789abc/reset-authentication as application/json; charset=UTF-8
with following body:
{}
Then I should receive HTTP/1.1 204 No Content
POST does not reset authentication when device type doesn't support 2 factor authentication
Given I am authenticated as K0002
and there is an Base Device Type with ID 123456789abc of type type01
and with externalRingtone set to 2
and with internalRingtone set to 3
and with groupQueueSkillRingtone set to 3
and with useSiteOptionsFromSite set to false
and with authorisation PIN set to 375215
and with supportsAuthentication set to false
which has been created at 2015-10-12 04:25 When I send /api/customers/K0002/devices/123456789abc/reset-authentication as application/json; charset=UTF-8
with following body:
{}
Then I should receive HTTP/1.1 400 Bad Request with following body:
{
  "detail": "Device does not support 2 factor authentication: type01",
  "title": "Device not supported",
  "described_by": "http://api.nfon.net/probs/device-authentication-invalid"
}
Cannot activate reset authentication for missing Customer
Given I am authenticated as Admin
When I send /api/customers/K0404/devices/00123/reset-authentication as application/json; charset=UTF-8
with following body:
{}
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
  "described_by": "http://api.nfon.net/probs/customer-not-found",
  "title": "Customer not found",
  "detail": "Customer with identifier K0404 has not been found"
}
Cannot activate reset authentication for missing Device
Given I am authenticated as customer K0002
And there is no Standard device with id ABCDEF012345
When I send /api/customers/K0002/devices/ABCDEF012345/reset-authentication as application/json; charset=UTF-8
with following body:
{}
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
  "title": "Device not found",
  "detail": "Device with unique identifier ABCDEF012345 has not been found",
  "described_by": "http://api.nfon.net/probs/device-not-found"
}
Customer activate reset authentication of another Customer device
Given I am authenticated as customer K0003
When I send /api/customers/K0002/devices/00123/reset-authentication as application/json; charset=UTF-8
with following body:
{}
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 activate reset authentication of Customer that does not belong to him
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0003/devices/123456789abc/reset-authentication as application/json; charset=UTF-8
with following body:
{}
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 activate reset authentication of Customer that does not belong to him
Given I am authenticated as Operator C0002
When I send /api/customers/K0003/devices/123456789abc/reset-authentication as application/json; charset=UTF-8
with following body:
{}
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"
}