/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"links": [{
"rel": "memberAnnouncement",
"href": "/api/customers/K0002/announcements/1010"
}],
"data": [{
"name": "displayName",
"value": "some display name"
}, {
"name": "extensionNumber",
"value": "12345"
}, {
"name": "weight",
"value": 3
}, {
"name": "direction",
"value": "INBOUND"
}, {
"name": "ringType",
"value": "RING"
}, {
"name": "selectionStrategy",
"value": "ROUND_ROBIN"
}, {
"name": "retryTimeout",
"value": 11
}, {
"name": "memberTimeout",
"value": 22
}, {
"name": "memberWrapUpTime",
"value": 33
}, {
"name": "reportHoldTime",
"value": true
}, {
"name": "periodicAnnouncementInterval",
"value": 45
}, {
"name": "positionAnnouncementInterval",
"value": 89
}]
}
Then I should receive HTTP/1.1 201 Createdhttp://localhost:9998/api/customers/K0002/targets/skill-services/0
and body:
{
"href": "/api/customers/K0002/targets/skill-services/0"
}
/api/customers/K0002/targets/skill-services/0 HTTP/1.1 200 OK application/vnd.collection.next+json {
"href": "/api/customers/K0002/targets/skill-services/0",
"links": [{
"rel": "customer",
"href": "/api/customers/K0002"
}, {
"rel": "memberAnnouncement",
"href": "/api/customers/K0002/announcements/1010"
}, {
"rel": "members",
"href": "/api/customers/K0002/targets/skill-services/0/members"
}, {
"rel": "inboundTrunkNumbers",
"href": "/api/customers/K0002/targets/skill-services/0/inbound-trunk-numbers"
}],
"data": [{
"name": "displayName",
"value": "some display name"
}, {
"name": "extensionNumber",
"value": "12345"
}, {
"name": "direction",
"value": "INBOUND"
}, {
"name": "weight",
"value": 3
}, {
"name": "ringType",
"value": "RING"
}, {
"name": "selectionStrategy",
"value": "ROUND_ROBIN"
}, {
"name": "retryTimeout",
"value": 11
}, {
"name": "reportHoldTime",
"value": true
}, {
"name": "memberTimeout",
"value": 22
}, {
"name": "memberWrapUpTime",
"value": 33
}, {
"name": "periodicAnnouncementInterval",
"value": 45
}, {
"name": "positionAnnouncementInterval",
"value": 89
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "some display name"
}, {
"name": "extensionNumber",
"value": "12345"
}, {
"name": "weight",
"value": 3
}, {
"name": "direction",
"value": "OUTBOUND"
}, {
"name": "periodicAnnouncementInterval",
"value": 11
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"errors": [{
"message": "Option cannot be set for Outbound SkillService",
"path": "periodicAnnouncementInterval",
"value": 11
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "some display name"
}, {
"name": "extensionNumber",
"value": "12345"
}, {
"name": "weight",
"value": 3
}, {
"name": "direction",
"value": "OUTBOUND"
}, {
"name": "positionAnnouncementInterval",
"value": 11
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"errors": [{
"message": "Option cannot be set for Outbound SkillService",
"path": "positionAnnouncementInterval",
"value": 11
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "extensionNumber",
"value": "12345"
}, {
"name": "weight",
"value": 3
}, {
"name": "direction",
"value": "INBOUND"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"errors": [{
"message": "Display name is missing",
"path": "displayName"
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "is this new name?"
}, {
"name": "extensionNumber",
"value": "12345"
}, {
"name": "weight",
"value": 3
}, {
"name": "direction",
"value": "INBOUND"
}]
}
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/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "this is a way, way, way, way, way, way, way, way, way to long displayName"
}, {
"name": "extensionNumber",
"value": "12345"
}, {
"name": "weight",
"value": 3
}, {
"name": "direction",
"value": "INBOUND"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"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/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "name"
}, {
"name": "weight",
"value": 3
}, {
"name": "direction",
"value": "INBOUND"
}]
}
Then I should receive HTTP/1.1 201 Created/api/customers/K0002/targets/skill-services/0 HTTP/1.1 200 OK
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": " displayName"
}, {
"name": "extensionNumber",
"value": "0123"
}, {
"name": "weight",
"value": 3
}, {
"name": "direction",
"value": "INBOUND"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"errors": [{
"message": "Invalid extension number format. Must not start with the dial-out-prefix (default 0)",
"path": "extensionNumber",
"value": "0123"
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": " displayName"
}, {
"name": "extensionNumber",
"value": "12345678901234567890123456789"
}, {
"name": "weight",
"value": 3
}, {
"name": "direction",
"value": "INBOUND"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"errors": [{
"message": "Extension number length should not exceed 20 characters",
"path": "extensionNumber",
"value": "12345678901234567890123456789"
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "some display name"
}, {
"name": "extensionNumber",
"value": "12345"
}, {
"name": "weight",
"value": 0
}, {
"name": "direction",
"value": "INBOUND"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"errors": [{
"message": "Extension number is not unique.",
"path": "extensionNumber",
"value": "12345"
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "some display name"
}, {
"name": "direction",
"value": "INBOUND"
}]
}
Then I should receive HTTP/1.1 201 Created/api/customers/K0002/targets/skill-services/0 HTTP/1.1 200 OK application/vnd.collection.next+json {
"href": "/api/customers/K0002/targets/skill-services/0",
"links": [{
"rel": "customer",
"href": "/api/customers/K0002"
}],
"data": [{
"name": "displayName",
"value": "some display name"
}, {
"name": "direction",
"value": "INBOUND"
}, {
"name": "weight",
"value": 0
}, {
"name": "ringType",
"value": "DEFAULT"
}, {
"name": "selectionStrategy",
"value": "RING_ALL"
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "some display name"
}, {
"name": "weight",
"value": 1410
}, {
"name": "direction",
"value": "INBOUND"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"errors": [{
"message": "Weight should have a value between 0 and 255",
"path": "weight",
"value": 1410
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "some display name"
}, {
"name": "direction",
"value": "INBOUND"
}]
}
Then I should receive HTTP/1.1 201 Created/api/customers/K0002/targets/skill-services/0/timeout HTTP/1.1 200 OK application/vnd.collection.next+json {
"href": "/api/customers/K0002/targets/skill-services/0/timeout",
"links": [{
"rel": "availableDestinations",
"href": "/api/customers/K0002/targets/skill-services/available-destinations-on-timeout"
}, {
"rel": "destinationOnTimeout",
"href": "/api/customers/K0002/targets/NO_ACTION"
}],
"data": [{
"name": "timeoutDelay",
"value": 0
}]
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "displayName"
}, {
"name": "direction",
"value": "INBOUND"
}, {
"name": "retryTimeout",
"value": -3
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"detail": "Could not create or update resource due to constraint violations",
"title": "Validation error",
"errors": [{
"message": "must be non-negative",
"path": "retryTimeout",
"value": -3
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "displayName"
}, {
"name": "direction",
"value": "INBOUND"
}, {
"name": "memberTimeout",
"value": 1000000
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"detail": "Could not create or update resource due to constraint violations",
"title": "Validation error",
"errors": [{
"message": "must be smaller than 1000",
"path": "memberTimeout",
"value": 1000000
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "displayName"
}, {
"name": "direction",
"value": "INBOUND"
}, {
"name": "memberWrapUpTime",
"value": null
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "memberWrapUpTime cannot be null",
"path": "memberWrapUpTime",
"value": null
}]
}
/api/customers/K404/targets/skill-services application/json; charset=UTF-8{
"data": []
}
Then I should receive HTTP/1.1 404 Not Found application/api-problem+json {
"title": "Customer not found",
"detail": "Customer with identifier K404 has not been found",
"described_by": "http://api.nfon.net/probs/customer-not-found"
}
/api/customers/K0002/targets/skill-services application/json; charset=UTF-8{
"data": []
}
Then I should receive HTTP/1.1 403 Forbidden application/api-problem+json {
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0002]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0003/targets/skill-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/skill-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"
}