/api/sip-servers/100 application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "pbxGroup",
"href": "/api/pbx-groups/Pbx2"
}],
"data": [{
"name": "name",
"value": "newName"
}, {
"name": "externalIp",
"value": "192.168.1.3"
}, {
"name": "internalIp",
"value": "192.168.1.4"
}, {
"name": "maxSubscribers",
"value": 500
}, {
"name": "subscribersLimit",
"value": 1000
}, {
"name": "location",
"value": "new Location"
}, {
"name": "partition",
"value": "P02"
}, {
"name": "description",
"value": "4xE5504-2GHZ;8GB"
}]
}
Then I should receive HTTP/1.1 204 No Content /api/sip-servers/100 HTTP/1.1 200 OK {
"href": "/api/sip-servers/100",
"links": [{
"rel": "pbxGroup",
"href": "/api/pbx-groups/Pbx2"
}, {
"rel": "availablePbxGroup",
"href": "/api/pbx-groups"
}],
"data": [{
"name": "name",
"value": "newName"
}, {
"name": "externalIp",
"value": "192.168.1.3"
}, {
"name": "internalIp",
"value": "192.168.1.4"
}, {
"name": "maxSubscribers",
"value": 500
}, {
"name": "subscribersLimit",
"value": 1000
}, {
"name": "location",
"value": "new Location"
}, {
"name": "partition",
"value": "P02"
}, {
"name": "description",
"value": "4xE5504-2GHZ;8GB"
}]
}
/api/sip-servers/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "maxSubscribers",
"value": -10000000
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "maxSubscribers must be greater than or equal -10000",
"path": "maxSubscribers",
"value": -10000000
}]
}
/api/sip-servers/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "subscribersLimit",
"value": 0
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "subscribersLimit must be greater than 0",
"path": "subscribersLimit",
"value": 0
}]
}
/api/sip-servers/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "sipServerName"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "name is not unique",
"path": "name",
"value": "sipServerName"
}]
}
/api/sip-servers/100 application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "pbxGroup",
"href": "/api/operators/C0002/pbx-groups/Pbx1"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"detail": "Resource at /api/operators/C0002/pbx-groups/Pbx1 is of incorrect type",
"title": "Invalid resource type",
"described_by": "http://api.nfon.net/probs/invalid-resource-type"
}
/api/sip-servers/100 application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "pbxGroup",
"href": "/api/pbx-groups/Pbx404"
}]
}
Then I should receive HTTP/1.1 404 Not Found {
"detail": "Pbx Group with name Pbx404 has not been found",
"title": "Pbx Group not found",
"described_by": "http://api.nfon.net/probs/pbx-group-not-found"
}
/api/sip-servers/404 application/json; charset=UTF-8
and following body:
{}
Then I should receive HTTP/1.1 404 Not Found {
"detail": "Sip Server with ID 404 has not been found",
"title": "Sip Server not found",
"described_by": "http://api.nfon.net/probs/sip-server-not-found"
}
/api/sip-servers/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"
}
/api/sip-servers/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"
}
/api/sip-servers/100 application/json; charset=UTF-8
and following 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"
}