/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "failoverSoftswitch",
"href": "/api/operators/C0002/softswitches/100"
}],
"data": [{
"name": "name",
"value": "SoftswitchName1"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "selectableByOperator",
"value": true
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}, {
"name": "trunkExtensionAvailable",
"value": true
}, {
"name": "privateUse",
"value": true
}, {
"name": "primaryCodec",
"value": "codec"
}]
}
Then I should receive HTTP/1.1 201 Created http://localhost:9998/api/operators/C0002/softswitches/200
and following body:
{
"href": "/api/operators/C0002/softswitches/200"
}
/api/operators/C0002/softswitches/200 HTTP/1.1 200 OK
with following body:
{
"href": "/api/operators/C0002/softswitches/200",
"links": [{
"rel": "failoverSoftswitch",
"href": "/api/operators/C0002/softswitches/100"
}],
"data": [{
"name": "name",
"value": "SoftswitchName1"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "selectableByOperator",
"value": true
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}, {
"name": "trunkExtensionAvailable",
"value": true
}, {
"name": "privateUse",
"value": true
}, {
"name": "primaryCodec",
"value": "codec"
}]
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "SoftswitchName1"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 201 Created /api/operators/C0002/softswitches/200 HTTP/1.1 200 OK
with following body:
{
"href": "/api/operators/C0002/softswitches/200",
"data": [{
"name": "name",
"value": "SoftswitchName1"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "SoftswitchName1"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Softswitch with name [SoftswitchName1] already exists for Operator [C0002]",
"value": null
}]
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": ""
}, {
"name": "identifier",
"value": null
}, {
"name": "cidType",
"value": null
}, {
"name": "dialType",
"value": null
}, {
"name": "privacyType",
"value": null
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Field cannot be empty",
"path": "cidType",
"value": null
}, {
"message": "Field cannot be empty",
"path": "dialType",
"value": null
}, {
"message": "Field cannot be empty",
"path": "privacyType",
"value": null
}, {
"message": "Field cannot be empty",
"path": "identifier",
"value": null
}, {
"message": "Field cannot be empty",
"path": "name",
"value": ""
}]
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long name"
}, {
"name": "identifier",
"value": "long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long name"
}, {
"name": "primaryCodec",
"value": "very long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long identifier"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Length of property cannot be greater than 16",
"path": "name"
}, {
"message": "Length of property cannot be greater than 100",
"path": "identifier"
}, {
"message": "Length of property cannot be greater than 255",
"path": "primaryCodec"
}]
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "12345678901234567"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Length of property cannot be greater than 16",
"path": "name",
"value": "12345678901234567"
}]
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "name"
}, {
"name": "identifier",
"value": "id"
}, {
"name": "cidType",
"value": "INVALID"
}, {
"name": "dialType",
"value": "INVALID"
}, {
"name": "privacyType",
"value": ""
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Unknown enum value. Allowed values: [ENUM_164_00, ENUM_164_PLUS, ENUM_164_MINUS]",
"path": "cidType",
"value": "INVALID"
}, {
"message": "Unknown enum value. Allowed values: [ENUM_164_00, ENUM_164_PLUS, ENUM_164_MINUS]",
"path": "dialType",
"value": "INVALID"
}, {
"message": "Unknown enum value. Allowed values: [ANONYMOUS, UNAVAILABLE, PRIVACY_FULL]",
"path": "privacyType",
"value": ""
}]
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "1234567890123456"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 201 Created /api/operators/C0002/softswitches/200 HTTP/1.1 200 OK
with following body:
{
"href": "/api/operators/C0002/softswitches/200",
"data": [{
"name": "name",
"value": "1234567890123456"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "failoverSoftswitch",
"href": "/api/operators/C0003/softswitches/100"
}],
"data": [{
"name": "name",
"value": "name"
}, {
"name": "identifier",
"value": "id"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Softswitch [100] does not belong to Operator [C0002]",
"path": "failoverSoftswitch",
"value": "/api/operators/C0003/softswitches/100"
}]
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "failoverSoftswitch",
"href": null
}],
"data": [{
"name": "name",
"value": "name"
}, {
"name": "identifier",
"value": "id"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 201 Created /api/operators/C0002/softswitches/200 HTTP/1.1 200 OK
with following body:
{
"href": "/api/operators/C0002/softswitches/200",
"links": [{
"rel": "failoverSoftswitch",
"href": null
}]
}
/api/operators/C0404/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "SoftswitchName1"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
"detail": "Operator C0404 has not been found",
"title": "Operator not found",
"described_by": "http://api.nfon.net/probs/operator-not-found"
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "SoftswitchName1"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 403 Forbidden application/api-problem+json {
"title": "Access forbidden",
"detail": "Access denied to [Operator] with id [C0002]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "SoftswitchName1"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Access denied to [Operator] with id [C0002]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/operators/C0002/softswitches application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "SoftswitchName1"
}, {
"name": "identifier",
"value": "dns"
}, {
"name": "cidType",
"value": "ENUM_164_00"
}, {
"name": "dialType",
"value": "ENUM_164_PLUS"
}, {
"name": "privacyType",
"value": "ANONYMOUS"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"detail": "Required role is missing",
"title": "Access forbidden",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}