Skip to main content

User Configuration Management

K5 User License Service API

The K5 User License Service API allows you to assign licenses (available in your IBM Common License Key Server) to a dedicated user.

ℹ️note

Important: The username must be the username of the keycloak user and be part of the JWT Token of the users.

API Access

Prerequisites

Before using the License Management APIs, ensure you have:

  • Access to the License Service Endpoint: The License Service must be accessible from your environment
  • Authentication Token: Valid authentication credentials for API access including role dc_admin
  • Network Connectivity: Proper network access to the License Service

Route Endpoint

The License Service API is available at:

https://k5-user-license-service-<NAMESPACE>.apps.openshift.domain.cloud

For interactive API exploration, use the Swagger UI:

https://k5-user-license-service-<NAMESPACE>.apps.openshift.domain.cloud/swagger-ui/index.html

Authentication and Authorization

OAuth2 Authentication

The API uses OAuth2 authentication with Keycloak integration:

  • Required Role: dc_admin role for administrative access

Using Swagger UI Authentication

  1. Navigate to the Swagger UI: https://k5-user-license-service-<NAMESPACE>.apps.openshift.domain.cloud/swagger-ui/index.html
  2. Click the "Authorize" button
  3. Login with your Keycloak credentials (admin rights required)
  4. Use the interactive API testing interface

You can use the API directly via Swagger-UI or use following curl commands:

API Endpoints

The K5 User License Service API provides the following endpoints for user license management:

1. User License Management

Get All User Details

  • Endpoint: /api/userconfig/v1/user-details
  • Method: GET
  • Description: Retrieves all user details and their license assignments from the system configuration
curl -X GET "https://k5-user-license-service-<NAMESPACE>.apps.openshift.domain.cloud/api/userconfig/v1/user-details" \
-H "Authorization: Bearer <your-token>"

Response Example:

[
{
"user": "john.doe",
"featureName": "DSWProfessionalFL"
},
{
"user": "jane.smith",
"featureName": "DSWArchitectFL"
}
]

Get User Details by Username

  • Endpoint: /api/userconfig/v1/user-details/{username}
  • Method: GET
  • Description: Retrieves specific user details by username
curl -X GET "https://k5-user-license-service-<NAMESPACE>.apps.openshift.domain.cloud/api/userconfig/v1/user-details/john.doe" \
-H "Authorization: Bearer <your-token>"

Response Example:

{
"user": "john.doe",
"featureName": "DSWProfessionalFL"
}

Assign License to User

  • Endpoint: /api/userconfig/v1/user-details/{username}/license/{licenseName}
  • Method: POST
  • Description: Assigns a license permanently to a user (Keycloak username)
curl -X POST "https://k5-user-license-service-<NAMESPACE>.apps.openshift.domain.cloud/api/userconfig/v1/user-details/john.doe/license/DSWProfessionalFL" \
-H "Authorization: Bearer <your-token>"

Supported License Types:

  • DSWProfessionalFL: Professional Floating License
  • DSWArchitectFL: Architect Floating License
  • DSWProfessional: Professional License
  • DSWArchitect: Architect License

Update User License

  • Endpoint: /api/userconfig/v1/user-details/{username}/license/{licenseName}
  • Method: PUT
  • Description: Updates the assigned license for an existing user
curl -X PUT "https://k5-user-license-service-<NAMESPACE>.apps.openshift.domain.cloud/api/userconfig/v1/user-details/john.doe/license/DSWArchitectFL" \
-H "Authorization: Bearer <your-token>"

Remove User License

  • Endpoint: /api/userconfig/v1/user-details/{username}
  • Method: DELETE
  • Description: Removes user details and license assignment from configuration
curl -X DELETE "https://k5-user-license-service-<NAMESPACE>.apps.openshift.domain.cloud/api/userconfig/v1/user-details/john.doe" \
-H "Authorization: Bearer <your-token>"