Using user Profiles
Why and how to use profiles
User profiles offer a flexible mechanism for storing custom, application-specific data associated with users. Each profile is stored as a jsonb (JSON binary) record, allowing applications to define and manage their own data structures within the profile, provided the content is valid JSON.
Both operators and users (for their own profiles) can access these profiles. This is particularly useful for:
- Storing application-specific user preferences or settings.
- Sharing user-related data (e.g., feedback, progress) across different applications.
- Enabling applications to maintain their own structured data for users without modifying the central user model.
Operator Endpoints
POST /operator/profile/create-bulk
This endpoint allows an operator to create multiple user profiles in a single request. This is useful for batch operations or initial setup. You are not limited to how many users or appID's are contained within the whole request body. As long as each object contains 1 profiles and 1 appID with a userID
For example:
{
"profiles": [
{
"app_id": 0,
"profile_data": {
"additionalProp1": {}
},
"user_id": "string"
},
{
"app_id": 0,
"profile_data": {
"additionalProp1": {}
},
"user_id": "string"
}
]
}GET /operator/users/profile/:userid/:appid
This endpoint enables an operator to retrieve a specific user's profile for a particular application.
:userid- The ID of the user whose profile is being requested.:appid- The ID of the application to which the profile belongs.
User Endpoints
GET /user/profiles/:appid
This endpoint allows an authenticated user to retrieve their own profiles associated with a specific application.
:appid- The ID of the application for which the user's profiles are being requested.
POST /user/profiles/create
This endpoint allows an authenticated user to create a new profile for themselves, associated with a specific application.
App ID's
App IDs can allways be viewed with the domains, appid and app and description being returned from