Metadata
PATCH https://api.credal.ai/api/v0/catalog/metadata Content-Type: application/json
Bulk patch metadata for documents, synced natively by Credal or manual API uploads
Reference: https://docs.credal.ai/api-reference/api-reference/document-catalog/metadata
Authentication
Section titled “Authentication”Authorizationheader (bearer token, required) — Bearer authentication of the formBearer <token>, where token is your auth token.
Request
Section titled “Request”Body (application/json)
This endpoint expects a DocumentMetadataPatchRequest.
sources(list of DocumentMetadataPatch, required)uploadAsUserEmail(string, required)
Types
DocumentMetadataPatch
resourceIdentifier(ResourceIdentifier, required) — The identifier for the resource you want to patchmetadata(map from string to any, required) — Key-value object of metadata for document. Keys will be merged with any existing values but can also be set tonullto effectively remove
ResourceIdentifier
type:external-resource-idexternalResourceId(string, required)resourceType(enum, required)- Allowed values:
GOOGLE_DRIVE_ITEM,MICROSOFT_DRIVE_ITEM,ZENDESK_TICKET,ZENDESK_ARTICLE,ZENDESK_GROUP,ZENDESK_ARTICLE_SECTION,ZENDESK_ARTICLE_CATEGORY,CONFLUENCE_PAGE,CONFLUENCE_SPACE,JIRA_TICKET,JIRA_PROJECT,SALESFORCE_TASK,BOX_FILE,BOX_FOLDER,NOTION_PAGE,NOTION_DATABASE,SLACK_CHANNEL,MONGO_COLLECTION_SYNC,UNKNOWN
- Allowed values:
type:urlurl(string, required)
Examples
Request
{
"sources": [
{
"resourceIdentifier": {
"type": "external-resource-id",
"externalResourceId": "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
"resourceType": "GOOGLE_DRIVE_ITEM"
},
"metadata": {
"Department": "HR",
"Country": "United States"
}
},
{
"resourceIdentifier": {
"type": "external-resource-id",
"externalResourceId": "123456",
"resourceType": "ZENDESK_TICKET"
},
"metadata": {
"Department": "Sales",
"Vertical": "Healthcare"
}
}
],
"uploadAsUserEmail": "ben@credal.ai"
}