Persistence - Company Source Integrity Cleanup — Unique AI Documentation

Persistence - Company Source Integrity Cleanup

1 min read

Describes procedures to check the data integrity of the Company Source for content owned by the Company. In case of any inconsistencies this procedure allows to perform a cleanup of all affected Company Sources and Content linked to them.

To be able to use these maintenance endpoints you need to obtain a token of a service user which belongs to the “root” organization in Zitadel. With a user JWT token of this root organization, which holds the Unique Zitadel project, you are able to call those maintenance endpoints.

Get Token of Root Organisation User

Check here how to get a token: How To Get An API Token

Maintenance Endpoints

Cleanup company Source

In some cases Unique AI can have some data integrity problems which is affecting integrations relying on the file-diff logic to detect what files need to be sent to Unique AI. This endpoint provided here will clean up those company source issues to make the file-diff logic again run smoothly:

curl --location --request POST 'https://{apiUrl}/ingestion/v1/maintenance/cleanup-company-sources?dryRun=true' \
--header 'Authorization: Bearer token'

This will now synchronously fix the sources of ingested content to make this file-diff logic run again correctly.

Query Param “dryRun“: