LDAP Tenant Management¶
Retrieve a list of tenants with filter¶
-
GET
/api/v1/ldap/
(string: ldap_id)/tenants/
¶ Gets a list of LDAP tenants for the selected LDAP backend. This list may include tenants details as per LDAP backend configuration. As such, output of the service is not fixed and may vary according to LDAP backend Service Data configuration (section
tenantMapping
). Output may also be filtered out using a special filter structure.Example request:
GET /api/v1/ldap/Customer_LDAP_Concentrator/tenants/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "filter": { "mode": "and", "criteria": [ { "attribute": "tenantId", "operation": "exists" } ] } }
- Request JSON Object:
filter (object) – (Optional) a filter expression as defined by LDAP Filter Details
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "tenants": [ { "id": "ldap_tenant_1", "ou": "ou=ldap_tenant_1,ou=Instance1,dc=vendor,dc=intra", "tenantId": "bwks_tenant_1", "description": "An LDAP tenant", "udsProxy": "tenant1.uds.uc.be.intra" }, { "id": "ldap_tenant_2", "ou": "ou=ldap_tenant_2,ou=Instance1,dc=vendor,dc=intra", "tenantId": "test_tenant", "description": "Modified LDAP tenant" } ] }
- Response JSON Object:
tenants (array) – a list of tenants as defined by LDAP Object Details
- Status Codes:
200 OK – no error.
400 Bad Request – format of the JSON input data not valid.
404 Not Found – no matching tenant could be found.
Retrieve a list of tenants with custom filter¶
-
GET
/api/v1/ldap/
(string: ldap_id)/tenants/
¶ 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/ 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" { "tenants": [ { "id": "ldap_tenant_3", "ou": "ou=ldap_tenant_3,ou=Instance1,dc=vendor,dc=intra", "description": "An LDAP tenant", "udsProxy": "tenant3.uds.uc.be.intra" } ] }
- Response JSON Object:
tenants (array) – a list of tenants as defined by LDAP Object Details
- Status Codes:
200 OK – no error.
400 Bad Request – the custom filter could not be found or was not correctly configured.
404 Not Found – no matching tenant could be found.
Retrieve one specific tenant¶
-
GET
/api/v1/ldap/
(string: ldap_id)/tenants/
(string: tenant_id)/
¶ Gets the requested tenant ID for the selected LDAP backend. This tenant ID is the one returned by the
id
attribute when reading.Example request:
GET /api/v1/ldap/Customer_LDAP_Concentrator/tenants/ldap_tenant_1/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "tenant": { "id": "ldap_tenant_1", "ou": "ou=ldap_tenant_1,ou=Instance1,dc=vendor,dc=intra", "tenantId": "bwks_tenant_1", "description": "My first LDAP Tenant" } }
- Response JSON Object:
tenant (object) – a tenant as defined by LDAP Object Details
- Status Codes:
200 OK – no error.
404 Not Found – no matching tenant could be found.
Create a new tenant¶
-
POST
/api/v1/ldap/
(string: ldap_id)/tenants/
¶ Creates a new LDAP tenant for the selected LDAP backend. Parameters set as input of the service are not fixed and may vary according to LDAP backend Service Data configuration (section
tenantMapping
).Authorization Right: System Admin.
Example request:
POST /api/v1/ldap/Customer_LDAP_Concentrator/tenants/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "id": "ldap_tenant_1", "description": "My first LDAP Tenant", "tenantId": "bwks_tenant_1" }
- Request JSON Object:
id (string) – the LDAP ID of the tenant 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": { "tenant": "ou=ldap_tenant_1,ou=Instance1,dc=vendor,dc=intra" } }
- Response JSON Object:
created (object) – contains the complete LDAP OU reference of the created tenant
- Status Codes:
200 OK – no error.
400 Bad Request – format of the JSON input data not valid or tenant already exists.
Modify an existing tenant¶
-
PUT
/api/v1/ldap/
(string: ldap_id)/tenants/
(string: tenant_id)/
¶ Modifies attributes of an existing LDAP tenant for the selected LDAP backend. Parameters set as input of the service are not fixed and may vary according to LDAP backend Service Data configuration (section
tenantMapping
).Authorization Right: System Admin.
Example request:
PUT /api/v1/ldap/Customer_LDAP_Concentrator/tenants/ldap_tenant_1/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "tenantId": null, "description": "Modified LDAP tenant" }
- 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": { "tenantId": "deleted", "description": "modified" } }
- Response JSON Object:
results (object) – a summary of performed actions on every passed attribute
- Status Codes:
200 OK – no error.
400 Bad Request – format of the JSON input data not valid.
404 Not Found – no matching tenant could be found.
Delete a tenant¶
-
DELETE
/api/v1/ldap/
(string: ldap_id)/tenants/
(string: tenant_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/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "deleted": { "tenant": "ou=ldap_tenant_1,ou=Instance1,dc=vendor,dc=intra" } }
- Response JSON Object:
deleted (object) – contains the complete LDAP OU reference of the deleted tenant
- Status Codes:
200 OK – no error.
404 Not Found – no matching tenant could be found.