Account Authorization Codes¶
List all account authorization codes in a Group¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/
¶ List all account authorization codes in a Group.
Example request:
GET /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "authCodes": [ { "code": "000001", "description": "test_code_01" }, { "code": "000002", "description": "test_code_02" } ] }
- Response JSON Object:
authCodes (array) – a list of objects as defined as Group account authorization code list attributes.
- Status Codes:
200 OK – no error
404 Not Found – service not assigned.
Create a list of account authorization codes in a Group¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/
¶ Create a list of account authorization codes in a Group.
Example request:
POST /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "authCodes": [ { "code": "000003", "description": "test_code_03" }, { "code": "000004", "description": "test_code_04" } ] }
- Request JSON Object:
authCodes (array) – a list of objects as defined as Group account authorization code list attributes.
Example response:
HTTP/1.1 201 CREATED Content-Type: "application/json" {}
- Status Codes:
201 Created – no error.
400 Bad Request – bad request due to invalid parameters or already existent code instance
404 Not Found – service not assigned.
Configuration Information for Account Authorization Code Creation¶
The APIO behaviour is controlled by the following settings:
"READ_AUTH_CODE_SIZE_FROM_NE": false,
"AUTH_CODE_SIZE": {
"MIN": 6,
"MAX": 6
},
- With following parameters:
READ_AUTH_CODE_SIZE_FROM_NE: Read the constraint from the Network Element (Application Server), it is recommended if it can be different Group by Group (default is False)
AUTH_CODE_SIZE.MIN: The minimum number of digits for a code (default is 6), not used if READ_AUTH_CODE_SIZE_FROM_NE is True
AUTH_CODE_SIZE.MAX: The maximum number of digits for a code (default is 6), not used if READ_AUTH_CODE_SIZE_FROM_NE is True
Create an account authorization code in a Group¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/
¶ Create an account authorization code in a Group.
Example request:
POST /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "code": "000003", "description": "test_code_03" }
- Request JSON Object:
code (string) – see code from Group account authorization code list attributes.
description (string) – (Optional) see description from Group account authorization code list attributes.
Example response:
HTTP/1.1 201 CREATED Content-Type: "application/json" {}
- Status Codes:
201 Created – no error.
400 Bad Request – bad request due to invalid parameters or already existent code instance.
404 Not Found – service not assigned.
The APIO behaviour is controlled with the same settings as for the creation of list of codes.
Get an account authorization code in a Group¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/
(string: instance_name)/
¶ Get an account authorization code in a Group.
Example request:
GET /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/fooCode/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "code": "000001", "description": "test_code_01" }
- Response JSON Object:
code (string) – see code from Group account authorization code list attributes.
description (string) – see description from Group account authorization code list attributes.
- Status Codes:
200 OK – no error
404 Not Found – authorization code not found in the group
404 Not Found – service not assigned.
Remove a list of account authorization codes from a Group¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/
¶ Remove a list of account authorization codes from a Group.
Example request:
DELETE /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "authCodes": [ { "code": "000001" }, { "code": "000002" } ] }
- Request JSON Object:
authCodes (array) – a list of objects as defined as Group account authorization code list attributes.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error. Note that trying to delete an authorization code that is not present in the group will not generate an error
400 Bad Request – bad request due to invalid parameters
404 Not Found – service not assigned.
Remove an account authorization code from a Group¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/
(string: instance_name)/
¶ Remove an account authorization code from a Group.
Example request:
DELETE /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/fooCode/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error. Note that trying to delete an authorization code that is not present in the group will not generate an error
404 Not Found – service not assigned.
Get account authorization codes settings¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/config/
¶ Get account authorization codes settings.
Example request:
GET /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/config/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "type": "Deactivated", "numberOfDigits": 6, "allowLocalAndTollFreeCalls": false }
- Response JSON Object:
type (string) – The type of account authorization code. Value comes from list: {‘Account Code’|’Authorization Code’|’Deactivated’}
numberOfDigits (integer) – Number of Account/Authorization Code Digits.
allowLocalAndTollFreeCalls (boolean) – Enable or disable local and toll free calls.
- Status Codes:
200 OK – no error.
404 Not Found – service not assigned.
Modify account authorization codes settings¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/config/
¶ Modify account authorization codes settings.
Example request:
PUT /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/config/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "type": "Deactivated", "numberOfDigits": 6, "allowLocalAndTollFreeCalls": false }
- Request JSON Object:
type (string) – The type of account authorization code. Value comes from list: {‘Account Code’|’Authorization Code’|’Deactivated’}
numberOfDigits (integer) – Number of Account/Authorization Code Digits.
allowLocalAndTollFreeCalls (boolean) – Enable or disable local and toll free calls.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error.
400 Bad Request – bad request due to invalid parameters
404 Not Found – service not assigned.
Get users with an account authorization code assigned¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/users/
¶ Get users with an account authorization code assigned.
Example request:
GET /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/users/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "mandatoryUsageUserIds": [ { "userId": "ApioUserTest@sip.netaxis.be", "lastName": "Test", "firstName": "Test", "hiraganaLastName": "Test", "hiraganaFirstName": "Test", "phoneNumber": "", "extension": "4000", "department": { "tenantId": "ApioSpTest", "groupId": "ApioGrpTest", "departmentName": "test_department_initial", "fullPathName": "test_department_parent_1 \\ test_department_initial" }, "emailAddress": "test_mail@test.netaxis.be" } ], "optionalUsageUserIds": [], }
- Response JSON Object:
mandatoryUsageUserIds (array) – a list of objects as defined as Group account authorization code list attributes.
optionalUsageUserIds (array) – a list of objects as defined as Group account authorization code list attributes.
- Status Codes:
200 OK – no error.
404 Not Found – service not assigned.
Modify users with an account authorization code assigned¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/properties/auth_codes/users/
¶ Modify users with an account authorization code assigned.
Example request:
PUT /api/v1/tenants/footenant/groups/foogroup/properties/auth_codes/users/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "mandatoryUsageUserIds": [ { "userId": "ApioUserTest@sip.netaxis.be" } ], "optionalUsageUserIds": [], }
- Request JSON Object:
mandatoryUsageUserIds (array) – a replacement list of objects as defined as Group account authorization code list attributes. An empty list will delete all users.
optionalUsageUserIds (array) – a replacement list of objects as defined as Group account authorization code list attributes. An empty list will delete all users.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error.
400 Bad Request – bad request due to invalid parameters
404 Not Found – service not assigned.