Departments

Display group’s list of departments

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/departments/

Retrieve a list of departments assigned to the group.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/departments/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
  "departments": [
                  {
                      "departmentName": "test_department_parent_1",
                      "enterpriseDepartment": "false",
                      "fullPathName": "test_department_parent_1",
                      "cliName": "",
                      "cliPhoneNumber": ""
                  },
                  {
                      "departmentName": "test_department_initial",
                      "enterpriseDepartment": "false",
                      "fullPathName": "test_department_parent_1 \\ test_department_initial",
                      "cliName": "test_cLineIdName_initial",
                      "cliPhoneNumber": "+3225126777"
                  }
                 ]
}
Response JSON Object:
Status Codes:

Add a group’s department

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/departments/

Add a new department to the group.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/departments/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
      "departmentName": "test_department_initial",
      "parentDepartment": {
          "tenantId": "ApioSpTest",
          "groupId": "ApioGrpTest",
          "departmentName": "test_department_parent_1"
      },
      "cliName": "test_cLineIdName_initial",
      "cliPhoneNumber": "025126777"
}
Request JSON Object:

Example response:

HTTP/1.1 201 CREATED
Status Codes:

Get informations of a single department

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/departments/(string: instance_name)/

Get informations of a single department.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/departments/fooDepartment/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
      "parentDepartment": {
          "tenantId": "ApioSpTest",
          "groupId": "ApioGrpTest",
          "departmentName": "test_department_parent_1"
      },
      "cliName": "test_cLineIdName_initial",
      "cliPhoneNumber": "+3225126777"
}
Response JSON Object:
Status Codes:

Remove a department

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/departments/(string: instance_name)/

Remove a single department.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/departments/fooDepartment/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:

Modify a department attributes

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/departments/(string: instance_name)/

Modify the attributes of a department.

Example request:

PUT /api/v1/tenants/footenant/groups/foogroup/departments/fooDepartment/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
  "departmentName": "newname",
  "parentDepartment": {
      "tenantId": "ApioSpTest",
      "groupId": "ApioGrpTest",
      "departmentName": "test_department_available_parent_1"
  },
  "cliName": "newNamecallId",
  "cliPhoneNumber": "3225126778"
}
Request JSON Object:

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:

Display a list of a department available parents

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/departments/(string: instance_name)/available_parent/

Retrieve a list of a department available parents.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/departments/fooDepartment/available_parent/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
  "availableParents": [
                  {
                      "tenantId": "ApioSpTest",
                      "groupId": "ApioGrpTest",
                      "departmentName": "test_department_parent_1",
                      "fullPathName": "test_department_parent_1"
                  },
                  {
                      "tenantId": "ApioSpTest",
                      "groupId": "ApioGrpTest",
                      "departmentName": "test_department_initial",
                      "fullPathName": "test_department_parent_1 \\ test_department_initial"
                  }
                 ]
}
Response JSON Object:
Status Codes:

Configuration Information for the Password

The rules are the same as for the Group Admins. See Configuration Information for the Password.