Skip to main content

User Base Microservice

Core user data persistence layer. Stores users, roles, preferences (tags, favorites, pins), activity logs, sharing/collaboration (features, shares, locks), integration tools, Langflow accounts, connectors, and languages.

  • Tech: NestJS 11, TypeORM, PostgreSQL
  • Port: 4000
  • Auth: JWT (RS256), API Key, Public
  • Database: user-base DB (16 tables)

User Endpoints

MethodPathAuthDescription
GET/api/v1/users?email=PublicGet user by email
GET/api/v1/users/:idPublicGet user by ID
GET/api/v1/users/search/:queryPublicSearch users
GET/api/v1/users/zitadel/:zitadelUserIdPublicGet by ZITADEL ID
POST/api/v1/usersPublicCreate user
POST/api/v1/users/batchPublicGet multiple by IDs
POST/api/v1/users/zitadelPublicCreate from ZITADEL
PATCH/api/v1/users/:idPublicUpdate user

User Role Endpoints

MethodPathAuthDescription
GET/api/v1/user-roleJWTList all roles
GET/api/v1/user-role/:idJWTGet by ID
GET/api/v1/user-role/user/:userIdPublicGet roles by user
POST/api/v1/user-rolePublicCreate role assignment
PATCH/api/v1/user-role/:idJWTUpdate
DELETE/api/v1/user-role/:idJWTDelete

Tag Endpoints

MethodPathAuthDescription
GET/api/v1/tags/user/:userIdPublicGet user's tags
POST/api/v1/tagsPublicCreate tag
PATCH/api/v1/tags/:tagIdPublicUpdate tag
DELETE/api/v1/tags/:tagIdPublicDelete tag
POST/api/v1/tags/tag-entities/:targetTypePublicGet tag entities by type + IDs
POST/api/v1/tags/tag-entitiesPublicCreate tag-entity link
DELETE/api/v1/tags/tag-entities/:tagEntityIdPublicDelete tag-entity link

Favorite Endpoints

MethodPathAuthDescription
GET/api/v1/favorites/user/:userIdPublicGet favorites
GET/api/v1/favorites/user/:userId/by-target-typePublicFilter by target type
GET/api/v1/favorites/user/:userId/by-target-idPublicGet single favorite by targetId
POST/api/v1/favoritesPublicCreate
DELETE/api/v1/favoritesPublicDelete
POST/api/v1/favorites/is-favoritedPublicCheck status
POST/api/v1/favorites/countsJWTGet counts

Pin Endpoints

MethodPathAuthDescription
GET/api/v1/pins/user/:userIdPublicGet user's pins
POST/api/v1/pinsPublicCreate
DELETE/api/v1/pins/:targetIdPublicDelete
POST/api/v1/pins/is-pinnedPublicCheck status

Activity Log Endpoints

MethodPathAuthDescription
GET/api/v1/activity-logs/user/:userId/recentPublicRecent logs
POST/api/v1/activity-logsPublicCreate entry
PATCH/api/v1/activity-logs/:activityLogId/hidePublicHide entry

Feature and Sharing Endpoints

Features are shareable resource abstractions. Types: conversation, source (with subtypes: folder, document), agent.

Feature CRUD

MethodPathAuthDescription
GET/api/v1/features/by-type-and-entityPublicGet by type + entity ID
GET/api/v1/features/:idPublicGet by ID
POST/api/v1/featuresPublicCreate
POST/api/v1/features/by-type-and-entitiesJWTBatch get

Shares

MethodPathAuthDescription
POST/api/v1/features/sharesJWTCreate share
POST/api/v1/features/shares/batchJWTBatch create
GET/api/v1/features/:featureId/sharesJWTGet shares for a feature
GET/api/v1/features/shares/user/:userIdJWTShared with user
GET/api/v1/features/shares/:shareIdJWTGet share by ID
PATCH/api/v1/features/shares/:shareIdJWTUpdate role
DELETE/api/v1/features/shares/:shareIdJWTRevoke
DELETE/api/v1/features/:featureId/sharesJWTRevoke all shares for a feature
MethodPathAuthDescription
GET/api/v1/features/:featureId/link-settingsJWTGet settings
PUT/api/v1/features/:featureId/link-settingsJWTUpdate
POST/api/v1/features/link-settings/batchJWTBatch get

Access Control

MethodPathAuthDescription
POST/api/v1/features/check-accessJWTCheck access
POST/api/v1/features/check-access/batchJWTBatch check

Locks

MethodPathAuthDescription
POST/api/v1/features/:featureId/locksJWTAcquire lock
DELETE/api/v1/features/:featureId/locksJWTRelease lock
GET/api/v1/features/:featureId/locksJWTGet status
DELETE/api/v1/features/:featureId/locks/forceJWTForce release

Lock TTL: 5 minutes by default.

Reference Data Endpoints

Integration Tools

MethodPathAuthDescription
GET/api/v1/integrations-toolsPublicList all
GET/api/v1/integrations-tools/by-key/:keyPublicGet by key
GET/api/v1/integrations-tools/enabled/by-key/:keyPublicGet enabled by key

Langflow Accounts

MethodPathAuthDescription
POST/api/v1/langflow-accountsPublicCreate
GET/api/v1/langflow-accounts/by-user-id/:userIdPublicGet by user
GET/api/v1/langflow-accounts/by-id/:idPublicGet by ID
PUT/api/v1/langflow-accounts/user/:userIdPublicUpdate

Connectors

MethodPathAuthDescription
GET/api/v1/connectorsJWTList all
GET/api/v1/connectors/paginatedJWTPaginated list
GET/api/v1/connectors/enabledJWTEnabled only
GET/api/v1/connectors/:idJWTGet by ID
POST/api/v1/connectors/by-idsJWTGet by IDs

Languages

MethodPathAuthDescription
GET/api/v1/languagesJWTList all
GET/api/v1/languages/:codeJWTGet by code
POST/api/v1/languages/by-codesJWTGet by codes

Inter-Service Communication

This service does not call other Jeen services. It is a data layer consumed by user-service and auth-service.