/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}, {
"rel": "timezone",
"href": "/api/time-zones/Africa.Juba"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "extensionNumber",
"value": "345"
}, {
"name": "evaluationStrategy",
"value": "ALLOW"
}, {
"name": "fromDay",
"value": "TUESDAY"
}, {
"name": "fromTimeOfDay",
"value": "02:34 AM"
}, {
"name": "toDay",
"value": "SUNDAY"
}, {
"name": "toTimeOfDay",
"value": "06:06 AM"
}, {
"name": "referralAllowed",
"value": ["Apr 30, 2011", "Feb 26, 2012", "Jun 01, 2013"]
}, {
"name": "referralDenied",
"value": ["Jan 31, 2012", "Feb 29, 2016"]
}]
}
Then I should receive HTTP/1.1 201 Createdhttp://localhost:9998/api/customers/K0002/targets/time-control-services/0
and body:
{
"href": "/api/customers/K0002/targets/time-control-services/0"
}
/api/customers/K0002/targets/time-control-services/0 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/targets/time-control-services/0",
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}, {
"rel": "inboundTrunkNumbers",
"href": "/api/customers/K0002/targets/time-control-services/0/inbound-trunk-numbers"
}, {
"rel": "availableDestinations",
"href": "/api/customers/K0002/targets/time-control-services/available-destinations"
}, {
"rel": "timezone",
"href": "/api/time-zones/Africa.Juba"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "extensionNumber",
"value": "345"
}, {
"name": "evaluationStrategy",
"value": "ALLOW"
}, {
"name": "fromDay",
"value": "TUESDAY"
}, {
"name": "fromTimeOfDay",
"value": "02:34 AM"
}, {
"name": "toDay",
"value": "SUNDAY"
}, {
"name": "toTimeOfDay",
"value": "06:06 AM"
}, {
"name": "referralAllowed",
"value": ["Apr 30, 2011", "Feb 26, 2012", "Jun 01, 2013"]
}, {
"name": "referralDenied",
"value": ["Jan 31, 2012", "Feb 29, 2016"]
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": []
}
Then I should receive HTTP/1.1 400 Bad Request{
"errors": [{
"message": "Display name is missing",
"path": "displayName"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": []
}
Then I should receive HTTP/1.1 400 Bad Request{
"errors": [{
"message": "Display name is missing",
"path": "displayName"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request{
"errors": [{
"message": "destinationIfAllowed is required",
"path": "destinationIfAllowed",
"value": ""
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request{
"errors": [{
"message": "destinationIfAllowed is required",
"path": "destinationIfAllowed",
"value": ""
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request{
"errors": [{
"message": "destinationIfDenied is required",
"path": "destinationIfDenied",
"value": ""
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request{
"errors": [{
"message": "destinationIfDenied is required",
"path": "destinationIfDenied",
"value": ""
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "is this new name?"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"errors": [{
"message": "Display name should not contain these characters: & $ ! ? = | \" { }",
"path": "displayName",
"value": "is this new name?"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "is this new name?"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"errors": [{
"message": "Display name should not contain these characters: & $ ! ? = | \" { }",
"path": "displayName",
"value": "is this new name?"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "this is a way, way, way, way, way, way, way, way, way to long displayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Display name should have a length between 1 and 50 characters",
"path": "displayName",
"value": "this is a way, way, way, way, way, way, way, way, way to long displayName"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 201 Created/api/customers/K0002/targets/time-control-services/0 HTTP/1.1 200 OK {
"data": []
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "extensionNumber",
"value": "0123"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Invalid extension number format. Must not start with the dial-out-prefix (default 0)",
"path": "extensionNumber",
"value": "0123"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "extensionNumber",
"value": "12345678901234567890123456789"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Extension number length should not exceed 20 characters",
"path": "extensionNumber",
"value": "12345678901234567890123456789"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "extensionNumber",
"value": "12345"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Extension number is not unique.",
"path": "extensionNumber",
"value": "12345"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "evaluationStrategy",
"value": "INVALID"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Unknown enum value. Allowed values: [AUTO, ALLOW, DENY]",
"path": "evaluationStrategy",
"value": "INVALID"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}, {
"rel": "timezone",
"href": "/api/time-zones/invalid"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "timezone must be given in an 'area/location' format",
"path": "timezone",
"value": "invalid"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}, {
"rel": "timezone",
"href": "/api/time-zones/abc.def"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"detail": "Could not create or update resource due to constraint violations",
"title": "Validation error",
"errors": [{
"message": "timezone '/api/time-zones/abc.def' not found",
"path": "timezone",
"value": "abc.def"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "fromDay",
"value": "invalid"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Unknown enum value. Allowed values: [MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY]",
"path": "fromDay",
"value": "invalid"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "fromTimeOfDay",
"value": "11:35 AMxyz"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "fromTimeOfDay must be in the format 'hh:mm AM/PM'",
"path": "fromTimeOfDay",
"value": "11:35 AMxyz"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "referralAllowed",
"value": ["not a date"]
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "referral date must be in the format 'MMM dd, yyyy'",
"path": "referralAllowed",
"value": "not a date"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "referralDenied",
"value": ["Oct 21, 2015", "Oct 21, 2015"]
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "duplicate referral date",
"path": "referralDenied",
"value": "Oct 21, 2015"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}, {
"name": "referralDenied",
"value": ["Oct 21, 2015"]
}, {
"name": "referralAllowed",
"value": ["Oct 21, 2015"]
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Cannot specify the same date for allowed and denied referral at the same time",
"path": "referralAllowed",
"value": "Oct 21, 2015"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": null
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "destinationIfAllowed cannot be null",
"path": "destinationIfAllowed",
"value": null
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": null
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "destinationIfDenied cannot be null",
"path": "destinationIfDenied",
"value": null
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/NO_ACTION"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "destinationIfAllowed cannot point to source and should be one of: [BUSY, CONFERENCE, EFAX, FRONTDESK, GROUP, HANG_UP, IVR, PHONEEXTENSION, QUEUE, ROUTINGPREFIX, SKILL, TIMECONTROL, VOICEMAIL]",
"path": "destinationIfAllowed",
"value": "NOOP"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/REPEAT"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "destinationIfAllowed cannot point to source and should be one of: [BUSY, CONFERENCE, EFAX, FRONTDESK, GROUP, HANG_UP, IVR, PHONEEXTENSION, QUEUE, ROUTINGPREFIX, SKILL, TIMECONTROL, VOICEMAIL]",
"path": "destinationIfAllowed",
"value": "REPEAT"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/phone-books/1000"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "destinationIfAllowed cannot point to source and should be one of: [BUSY, CONFERENCE, EFAX, FRONTDESK, GROUP, HANG_UP, IVR, PHONEEXTENSION, QUEUE, ROUTINGPREFIX, SKILL, TIMECONTROL, VOICEMAIL]",
"path": "destinationIfAllowed",
"value": "PHONEBOOK"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/direct-dial/0048101234"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "destinationIfAllowed cannot point to source and should be one of: [BUSY, CONFERENCE, EFAX, FRONTDESK, GROUP, HANG_UP, IVR, PHONEEXTENSION, QUEUE, ROUTINGPREFIX, SKILL, TIMECONTROL, VOICEMAIL]",
"path": "destinationIfAllowed",
"value": "DIRECTDIAL"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/virtual-fax-extensions/123"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 201 Created /api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/phone-extensions/777"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 201 Created /api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/ivr-services/555"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 201 Created /api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/group-services/555"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 201 Created /api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/queue-services/555"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 201 Created /api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/conference-services/555"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 201 Created /api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/skill-services/555"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 201 Created /api/customers/K0002/targets/time-control-services as application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "displayName"
}, {
"name": "toDay",
"value": null
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "toDay cannot be null",
"path": "toDay",
"value": null
}]
}
/api/customers/K0002/targets/time-control-services as application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "displayName"
}, {
"name": "toTimeOfDay",
"value": null
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "toTimeOfDay cannot be null",
"path": "toTimeOfDay",
"value": null
}]
}
/api/customers/K0002/targets/time-control-services as application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "displayName"
}, {
"name": "referralAllowed",
"value": [null]
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "referral date cannot be null",
"path": "referralAllowed",
"value": null
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/phone-extensions/404"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 404 Not Found {
"detail": "Extension with extension number 404 has not been found",
"title": "Extension not found",
"described_by": "http://api.nfon.net/probs/extension-not-found"
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0003/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
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"
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0003/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Destination must belong to the owner of Time Control Service",
"path": "destinationIfAllowed"
}]
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/phone-extensions/404"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 404 Not Found {
"detail": "Extension with extension number 404 has not been found",
"title": "Extension not found",
"described_by": "http://api.nfon.net/probs/extension-not-found"
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfDenied",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0003/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
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"
}
/api/customers/K0002/targets/time-control-services application/json; charset=UTF-8{
"links": [{
"rel": "destinationIfAllowed",
"href": "/api/customers/K0002/targets/BUSY"
}, {
"rel": "destinationIfDenied",
"href": "/api/customers/K0003/targets/HANGUP"
}],
"data": [{
"name": "displayName",
"value": "someDisplayName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Destination must belong to the owner of Time Control Service",
"path": "destinationIfDenied"
}]
}
/api/customers/K0404/targets/time-control-services application/json; charset=UTF-8{
"data": []
}
Then I should receive HTTP/1.1 404 Not Found {
"title": "Customer not found",
"detail": "Customer with identifier K0404 has not been found",
"described_by": "http://api.nfon.net/probs/customer-not-found"
}
/api/customers/K0003/targets/time-control-services application/json; charset=UTF-8{
"data": []
}
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"
}
/api/customers/K0003/targets/time-control-services application/json; charset=UTF-8{
"data": []
}
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"
}
/api/customers/K0003/targets/time-control-services application/json; charset=UTF-8{
"data": []
}
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"
}