LDAP User Management

Retrieve a list of users with filter

GET /api/v1/ldap/(string: ldap_id)/tenants/(string: tenant_id)/groups/(string: group_id)/users/

Gets a list of LDAP users for the selected LDAP backend, tenant ID and group ID. This list may include users details as per Service LDAP backend configuration. As such, output of the service is not fixed and may vary according to LDAP backend Data configuration (section userMapping). Output may also be filtered out using a special filter structure.

Example request:

GET /api/v1/ldap/Customer_LDAP_Concentrator/tenants/groups/ldap_group_1/users/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "filter": {
          "mode": "and",
          "criteria": [
                 {
                        "attribute": "extension",
                        "operation": "equals",
            "value": "6677"
                 },
         {
            "attribute": "userId",
            "operation": "exists"
         }
          ]
   }
}
Request JSON Object:

Example response:

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

{
   "users": [
      {
         "id": "ldap.user@netaxis.be",
         "ou": "uid=ldap.user@netaxis.be,ou=ldap_group_1,ou=ldap_tenant_1,ou=Instance1,dc=vendor,dc=intra",
         "fullName": "User Netaxis",
         "lastName": "Netaxis",
         "firstName": "User",
         "extension": "6677",
         "phoneNumber": "+3223661285",
         "faxNumber": "+3269441552",
         "userId": "bwks.user@netaxis.be"
      }
   ]
}
Response JSON Object:
Status Codes:

Retrieve a list of users with custom filter

GET /api/v1/ldap/(string: ldap_id)/tenants/(string: tenant_id)/groups/(string: group_id)/users/

Works the same way as previous API but with a pre-defined custom filter at LDAP backend configuration level .

Example request:

GET /api/v1/ldap/Customer_LDAP_Concentrator/tenants/groups/ldap_group_1/users/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "custom_filter": "not_in_bwks"
}
Request JSON Object:
  • custom_filter (string) – (Optional) a reference to a custom filter expression defined by LDAP backend configuration

Example response:

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

{
   "users": [
      {
         "id": "another_ldap.user@netaxis.be",
         "ou": "uid=another_ldap.user@netaxis.be,ou=ldap_group_3,ou=ldap_tenant_3,ou=Instance1,dc=vendor,dc=intra",
         "fullName": "Another User Netaxis",
         "lastName": "Netaxis",
         "firstName": "Another User",
         "extension": "7788",
         "phoneNumber": "+3223661286",
         "faxNumber": "+3269441553",
      }
   ]
}
Response JSON Object:
Status Codes:

Retrieve one specific user

GET /api/v1/ldap/(string: ldap_id)/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/

Gets the requested user ID for the selected LDAP backend, tenant ID and group ID. This user ID is the one returned by the id attribute when reading.

Example request:

GET /api/v1/ldap/Customer_LDAP_Concentrator/tenants/ldap_tenant_1/groups/ldap_group_1/users/ldap.user@netaxis.be/ HTTP/1.1
Host: example.com

Example response:

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

{
   "users": {
         "id": "ldap.user@netaxis.be",
         "ou": "uid=ldap.user@netaxis.be,ou=ldap_group_1,ou=ldap_tenant_1,ou=Instance1,dc=vendor,dc=intra",
         "fullName": "User Netaxis",
         "lastName": "Netaxis",
         "firstName": "User",
         "extension": "6677",
         "phoneNumber": "+3223661285",
         "faxNumber": "+3269441552",
         "userId": "bwks.user@netaxis.be"
   }
}
Response JSON Object:
Status Codes:

Create a new user

POST /api/v1/ldap/(string: ldap_id)/tenants/(string: tenant_id)/groups/(string: group_id)/users/

Creates a new LDAP user for the selected LDAP backend, tenant ID and group ID. Parameters set as input of the service are not fixed and may vary according to LDAP backend Service Data configuration (section userMapping).

Authorization Right: System Admin.

Example request:

POST /api/v1/ldap/Customer_LDAP_Concentrator/tenants/groups/ldap_group_1/users/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "id": "ldap.user@netaxis.be",
   "fullName": "User Netaxis",
   "lastName": "Netaxis",
   "firstName": "User",
   "extension": "6677",
   "phoneNumber": "+3223661285",
   "faxNumber": "+3269441552",
   "userId": "bwks.user@netaxis.be"
}
Request JSON Object:
  • id (string) – the LDAP ID of the user to create - this is the only required parameter

  • <ldap_attribute> (object) – any valid attribute defined by LDAP Object Details

Example response:

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

{
   "created": {
      "user": "uid=ldap.user@netaxis.be,ou=ldap_group_1,ou=ldap_tenant_1,ou=Instance1,dc=vendor,dc=intra"
   }
}
Response JSON Object:
  • created (object) – contains the complete LDAP OU reference of the created user

Status Codes:
  • 200 OK – no error.

  • 400 Bad Request – format of the JSON input data not valid or user already exists.

Modify an existing user

PUT /api/v1/ldap/(string: ldap_id)/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/

Modifies attributes of an existing LDAP user for the selected LDAP backend, tenant ID and group ID. Parameters set as input of the service are not fixed and may vary according to LDAP backend Service Data configuration (section userMapping).

Authorization Right: System Admin.

Example request:

PUT /api/v1/ldap/Customer_LDAP_Concentrator/tenants/ldap_tenant_1/groups/ldap_group_1/users/ldap.user@netaxis.be/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "userId": null
}
Request JSON Object:
  • <ldap_attribute> (object) –

    any valid attribute defined by LDAP Object Details

    Note

    If you want to delete an attribute, put this attribute in the request body and use JSON value null

Example response:

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

{
   "results": {
      "userId": "deleted"
   }
}
Response JSON Object:
  • results (object) – a summary of performed actions on every passed attribute

Status Codes:

Delete a user

DELETE /api/v1/ldap/(string: ldap_id)/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/

Deletes an LDAP tenant by its ID. This ID is the one returned by the id attribute when reading.

Authorization Right: System Admin.

Example request:

DELETE /api/v1/ldap/Customer_LDAP_Concentrator/tenants/ldap_tenant_1/groups/ldap_group_1/users/ldap.user@netaxis.be/ HTTP/1.1
Host: example.com

Example response:

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

{
   "deleted": {
      "user": "uid=ldap.user@netaxis.be,ou=ldap_group_1,ou=ldap_tenant_1,ou=Instance1,dc=vendor,dc=intra"
   }
}
Response JSON Object:
  • deleted (object) – contains the complete LDAP OU reference of the deleted user

Status Codes: