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 issue to make the file-diff logic again run smoothly:
apiUrl (can be taken from the frontend calls - e.g.
gateway.myTenant.unique.app)token of the root organisation user
(optional query:
dryRun- default is true. More information below)
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“:
If nothing is provided or not set explicitly to
falseit will run the “dryRun“. This run will only create the correct sources if needed but not update the contents to the fixed source. Also it will log the process what would happen for the real run including how many contents would be affected.If explicitly set to
falseit will run the cleanup and modify the data.