/api/operators/C0002/softswitches/100 application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "failoverSoftswitch",
"href": "/api/operators/C0002/softswitches/300"
}],
"data": [{
"name": "name",
"value": "new name"
}, {
"name": "identifier",
"value": "new dns"
}, {
"name": "cidType",
"value": "ENUM_164_PLUS"
}, {
"name": "dialType",
"value": "ENUM_164_00"
}, {
"name": "selectableByOperator",
"value": true
}, {
"name": "privacyType",
"value": "UNAVAILABLE"
}, {
"name": "trunkExtensionAvailable",
"value": false
}, {
"name": "privateUse",
"value": false
}, {
"name": "primaryCodec",
"value": "new codec"
}]
}
Then I should receive HTTP/1.1 204 No Content /api/operators/C0002/softswitches/100 HTTP/1.1 200 OK
with following body:
{
"href": "/api/operators/C0002/softswitches/100",
"links": [{
"rel": "failoverSoftswitch",
"href": "/api/operators/C0002/softswitches/300"
}],
"data": [{
"name": "name",
"value": "new name"
}, {
"name": "identifier",
"value": "new dns"
}, {
"name": "cidType",
"value": "ENUM_164_PLUS"
}, {
"name": "dialType",
"value": "ENUM_164_00"
}, {
"name": "selectableByOperator",
"value": true
}, {
"name": "privacyType",
"value": "UNAVAILABLE"
}, {
"name": "trunkExtensionAvailable",
"value": false
}, {
"name": "privateUse",
"value": false
}, {
"name": "primaryCodec",
"value": "new codec"
}]
}
/api/operators/C0002/softswitches/100 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/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "SoftswitchName1"
}]
}
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/100 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"
}]
}
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/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "12345678901234567"
}]
}
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/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "9876543210654321"
}]
}
Then I should receive HTTP/1.1 204 No Content /api/operators/C0002/softswitches/100 HTTP/1.1 200 OK
with following body:
{
"href": "/api/operators/C0002/softswitches/100",
"data": [{
"name": "name",
"value": "9876543210654321"
}]
}
/api/operators/C0002/softswitches/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"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/100 application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "failoverSoftswitch",
"href": "/api/operators/C0003/softswitches/200"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Softswitch [200] does not belong to Operator [C0002]",
"path": "failoverSoftswitch",
"value": "/api/operators/C0003/softswitches/200"
}]
}
/api/operators/C0002/softswitches/100 application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "failoverSoftswitch",
"href": "/api/operators/C0002/softswitches/100"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "failoverSoftswitch cannot be the same as current Softswitch",
"path": "failoverSoftswitch",
"value": "/api/operators/C0002/softswitches/100"
}]
}
/api/operators/C0002/softswitches/100 application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "failoverSoftswitch",
"href": null
}]
}
Then I should receive HTTP/1.1 204 No Content /api/operators/C0002/softswitches/100 HTTP/1.1 200 OK
with following body:
{
"href": "/api/operators/C0002/softswitches/100",
"links": [{
"rel": "failoverSoftswitch",
"href": null
}]
}
/api/operators/C0002/softswitches/100 application/json; charset=UTF-8
and following body:
{}
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
"detail": "Softswitch with ID 100 has not been found",
"title": "Softswitch not found",
"described_by": "http://api.nfon.net/probs/softswitch-not-found"
}
/api/operators/C0002/softswitches/404 application/json; charset=UTF-8
and following body:
{}
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
"detail": "Softswitch with ID 404 has not been found",
"title": "Softswitch not found",
"described_by": "http://api.nfon.net/probs/softswitch-not-found"
}
/api/operators/C0404/softswitches/100 application/json; charset=UTF-8
and following body:
{}
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/100 application/json; charset=UTF-8
and following body:
{}
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/100 application/json; charset=UTF-8
and following body:
{}
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/100 application/json; charset=UTF-8
and following body:
{}
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"
}