/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "name",
"value": "new operator name"
}, {
"name": "contactName",
"value": "new contact name"
}, {
"name": "contactEmail",
"value": "newemail@nfon.net"
}, {
"name": "contactPhone",
"value": "+48 (12) 555-666"
}, {
"name": "notes",
"value": "new notes"
}, {
"name": "billingAccumulated",
"value": true
}, {
"name": "offlineBilling",
"value": true
}, {
"name": "generateCdrs",
"value": true
}, {
"name": "ldapVisible",
"value": true
}, {
"name": "enableTps",
"value": true
}, {
"name": "domainName",
"value": "new.nfon.net"
}, {
"name": "snomLoginName",
"value": "new snom login"
}, {
"name": "aastraLoginName",
"value": "newaastralogin@nfon.net"
}, {
"name": "snomLoginPassword",
"value": "newSnomPassword"
}, {
"name": "aastraLoginPassword",
"value": "newAastraPassword"
}, {
"name": "nmeeting",
"value": "FLATRATE_UNITS"
}, {
"name": "nmeetingCustomerDefault",
"value": "FLATRATE"
}, {
"name": "nmeetingAfdDefault",
"value": true
}, {
"name": "minimumPasswordLength",
"value": 4
}, {
"name": "maximumPasswordLength",
"value": 32
}, {
"name": "voiceTrafficEncryption",
"value": true
}, {
"name": "rdsHost",
"value": "new.nfon.net"
}, {
"name": "language",
"value": "de"
}, {
"name": "nqmEnabled",
"value": true
}]
}
Then I should receive HTTP/1.1 204 No Content /api/operators/C0002 HTTP/1.1 200 OK {
"data": [{
"name": "name",
"value": "new operator name"
}, {
"name": "contactName",
"value": "new contact name"
}, {
"name": "contactEmail",
"value": "newemail@nfon.net"
}, {
"name": "contactPhone",
"value": "+48 (12) 555-666"
}, {
"name": "notes",
"value": "new notes"
}, {
"name": "billingAccumulated",
"value": true
}, {
"name": "offlineBilling",
"value": true
}, {
"name": "generateCdrs",
"value": true
}, {
"name": "ldapVisible",
"value": true
}, {
"name": "enableTps",
"value": true
}, {
"name": "domainName",
"value": "new.nfon.net"
}, {
"name": "snomLoginName",
"value": "new snom login"
}, {
"name": "aastraLoginName",
"value": "newaastralogin@nfon.net"
}, {
"name": "nmeeting",
"value": "FLATRATE_UNITS"
}, {
"name": "nmeetingCustomerDefault",
"value": "FLATRATE"
}, {
"name": "nmeetingAfdDefault",
"value": true
}, {
"name": "minimumPasswordLength",
"value": 4
}, {
"name": "maximumPasswordLength",
"value": 32
}, {
"name": "voiceTrafficEncryption",
"value": true
}, {
"name": "rdsHost",
"value": "new.nfon.net"
}, {
"name": "language",
"value": "de"
}, {
"name": "nqmEnabled",
"value": true
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "defaultSystemIntegrator",
"href": "/api/system-integrators/S0005"
}, {
"rel": "defaultBlacklistProfile",
"href": "/api/operators/C0002/blacklist-profiles/200"
}, {
"rel": "defaultPbxGroup",
"href": "/api/operators/C0002/pbx-groups/asterisk-2.0"
}, {
"rel": "defaultRatingProfile",
"href": "/api/operators/C0002/rating-profiles/23"
}, {
"rel": "timezone",
"href": "/api/time-zones/Europe.Berlin"
}]
}
Then I should receive HTTP/1.1 204 No Content /api/operators/C0002 HTTP/1.1 200 OK {
"links": [{
"rel": "defaultSystemIntegrator",
"href": "/api/system-integrators/S0005"
}, {
"rel": "defaultBlacklistProfile",
"href": "/api/operators/C0002/blacklist-profiles/200"
}, {
"rel": "defaultPbxGroup",
"href": "/api/operators/C0002/pbx-groups/asterisk-2.0"
}, {
"rel": "defaultRatingProfile",
"href": "/api/operators/C0002/rating-profiles/23"
}, {
"rel": "timezone",
"href": "/api/time-zones/Europe.Berlin"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "name",
"value": ""
}, {
"name": "contactName",
"value": null
}, {
"name": "contactEmail",
"value": ""
}, {
"name": "contactPhone",
"value": null
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Field is required",
"path": "name"
}, {
"message": "Field is required",
"path": "contactName"
}, {
"message": "Email is required",
"path": "contactEmail"
}, {
"message": "Field is required",
"path": "contactPhone"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "contactEmail",
"value": "invalid email"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Email is invalid",
"path": "contactEmail",
"value": "invalid email"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "contactPhone",
"value": "invalid phone"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Phone Number is invalid",
"path": "contactPhone",
"value": "invalid phone"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "defaultSystemIntegrator",
"href": "/api/system-integrators/S0003"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "System Integrator [S0003] does not belong to Operator [C0002]",
"path": "defaultSystemIntegrator"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "defaultBlacklistProfile",
"href": "/api/customers/K0002/blacklist-profiles/200"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"detail": "Resource at /api/customers/K0002/blacklist-profiles/200 is of incorrect type",
"title": "Invalid resource type",
"described_by": "http://api.nfon.net/probs/invalid-resource-type"
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "defaultBlacklistProfile",
"href": "/api/operators/C0003/blacklist-profiles/200"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Blacklist Profile [200] does not belong to Operator [C0002]",
"path": "defaultBlacklistProfile"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "defaultRatingProfile",
"href": "/api/operators/C0003/rating-profiles/8"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Rating Profile [8] does not belong to Operator [C0002]",
"path": "defaultRatingProfile"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "defaultPbxGroup",
"href": "/api/operators/C0003/pbx-groups/pbx_name"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Pbx Group [pbx_name] does not belong to Operator [C0002]",
"path": "defaultPbxGroup"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "nmeeting",
"value": "INVALID_UNITS"
}, {
"name": "nmeetingCustomerDefault",
"value": "FLATRATE_UNITS"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Unknown enum value. Allowed values: [DEACTIVATED, UNITS, FLATRATE, FLATRATE_UNITS]",
"path": "nmeeting",
"value": "INVALID_UNITS"
}, {
"message": "Unknown enum value. Allowed values: [DEACTIVATED, UNITS, FLATRATE]",
"path": "nmeetingCustomerDefault",
"value": "FLATRATE_UNITS"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "minimumPasswordLength",
"value": 3
}, {
"name": "maximumPasswordLength",
"value": 33
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Password length must be between 4 and 32",
"path": "minimumPasswordLength",
"value": 3
}, {
"message": "Password length must be between 4 and 32",
"path": "maximumPasswordLength",
"value": 33
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "minimumPasswordLength",
"value": 10
}, {
"name": "maximumPasswordLength",
"value": 10
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Password minimum length must be less than maximum length",
"path": "minimumPasswordLength",
"value": 10
}, {
"message": "Password maximum length must be greater than minimum length",
"path": "maximumPasswordLength",
"value": 10
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "nmeeting",
"value": "FLATRATE"
}, {
"name": "nmeetingCustomerDefault",
"value": "UNITS"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Invalid nmeetingCustomerDefault. FLATRATE nmeeting allows only [DEACTIVATED, FLATRATE] nmeetingCustomerDefault values",
"path": "nmeetingCustomerDefault",
"value": "UNITS"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "nmeeting",
"value": "UNITS"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Invalid nmeetingCustomerDefault. UNITS nmeeting allows only [DEACTIVATED, UNITS] nmeetingCustomerDefault values",
"path": "nmeetingCustomerDefault",
"value": "FLATRATE"
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "nmeeting",
"value": "DEACTIVATED"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Invalid nmeetingCustomerDefault. DEACTIVATED nmeeting allows only [DEACTIVATED] nmeetingCustomerDefault values",
"path": "nmeetingCustomerDefault",
"value": "FLATRATE"
}, {
"message": "Invalid nmeetingAfdDefault, should be disabled if nmeeting or nmeetingCustomerDefault are DEACTIVATED",
"path": "nmeetingAfdDefault",
"value": true
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "nmeetingCustomerDefault",
"value": "DEACTIVATED"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Invalid nmeetingAfdDefault, should be disabled if nmeeting or nmeetingCustomerDefault are DEACTIVATED",
"path": "nmeetingAfdDefault",
"value": true
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "nmeetingAfdDefault",
"value": true
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Invalid nmeetingAfdDefault, should be disabled if nmeeting or nmeetingCustomerDefault are DEACTIVATED",
"path": "nmeetingAfdDefault",
"value": true
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and body:
{
"data": [{
"name": "nmeeting",
"value": "DEACTIVATED"
}, {
"name": "nmeetingCustomerDefault",
"value": "DEACTIVATED"
}, {
"name": "nmeetingAfdDefault",
"value": false
}]
}
Then I should receive HTTP/1.1 204 No Content /api/operators/C0002 HTTP/1.1 200 OK {
"data": [{
"name": "nmeeting",
"value": "DEACTIVATED"
}, {
"name": "nmeetingCustomerDefault",
"value": "DEACTIVATED"
}, {
"name": "nmeetingAfdDefault",
"value": false
}]
}
/api/operators/C0002 application/json; charset=UTF-8
and 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 application/json; charset=UTF-8
and 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 application/json; charset=UTF-8
and body:
{}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Required role is missing",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/operators/C0404 application/json; charset=UTF-8
and body:
{}
Then I should receive HTTP/1.1 404 Not Found {
"title": "Operator not found",
"detail": "Operator C0404 has not been found",
"described_by": "http://api.nfon.net/probs/operator-not-found"
}