Document Catalog

Metadata

PATCH
Bulk patch metadata for documents, synced natively by Credal or manual API uploads

Request

This endpoint expects a list of objects.
sourceSystemId
stringRequired

The ID of this document according to its native source system. This is often found in the URL, such as 1kMCxqUWLJryFYsB9o7Hh1XjGwkaDOIhSNAbdx1C-wOA in the Google Doc https://docs.google.com/document/d/1kMCxqUWLJryFYsB9o7Hh1XjGwkaDOIhSNAbdx1C-wOA/edit or 23086827215764 in the Zendesk help center article https://credalai.zendesk.com/hc/en-us/articles/23086827215764-Here-is-an-article-that-I-added. Contact Credal for information on your systems.

sourceType
stringRequired

The type of the source system in Credal to disambiguate potentially colliding IDs. Each source system has its own type, such as Google Doc, Zendesk Article, Manual Upload, etc. Contact Credal for information on your systems.

metadata
anyRequired

Key-value object of metadata for document. Keys will be merged with any existing values but can also be set to null to effectively remove

PATCH
$curl -X PATCH https://api.credal.ai/api/v0/catalog/metadata \
> -H "Authorization: Bearer <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "sourceSystemId": "23086827215764",
> "sourceType": "Zendesk Article",
> "metadata": {
> "Department": "HR",
> "Country": "United States"
> }
> },
> {
> "sourceSystemId": "1kMCxqUWLJryFYsB9o7Hh1XjGwkaDOIhSNAbdx1C-wOA",
> "sourceType": "Google Doc",
> "metadata": {
> "Department": "Sales",
> "Vertical": "Healthcare"
> }
> }
>]'