Skip to main content
Credal | Documentation
current

Search documentation

Type to search this documentation.

On this pageOverview

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

  • Authorization header (bearer token, required) — Bearer authentication of the form Bearer <token>, where token is your auth token.

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 patch
  • metadata (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 to null to effectively remove

ResourceIdentifier

  • type: external-resource-id
    • externalResourceId (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
  • type: url
    • url (string, required)

Examples

Request

JSON
{
  "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"
}
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu