Skip to main content

Metadata Import API

Bulk import and update metadata for tables, views, and datamaps. Supports updating descriptions, tags, domains, and field-level metadata in a single request.

warning

This API currently supports a maximum of 50 objects per call. To update a larger number of objects please make multiple calls with separate batches.


Endpoint​

POST https://api.{env}.promethium.ai/metadata/import

Headers​

Header NameValueRequiredDescription
Content-Typeapplication/json✅Request body format
idtoken<authentication_id_token>✅JWT token obtained via login

Request Body​

{
"metadata_objects": [
{
"type": "TABLE|VIEW|DATAMAP",
"id": "string",
"display_name": "string",
"description": "string",
"tags": ["string"],
"add_tags": ["string"],
"remove_tags": ["string"],
"domains": ["string"],
"add_domains": ["string"],
"remove_domains": ["string"],
"fields": [
{
"name": "string",
"description": "string",
"tags": ["string"],
"add_tags": ["string"],
"remove_tags": ["string"]
}
]
}
]
}

Fields​

FieldTypeRequiredDescription
metadata_objectsarray✅List of objects to update metadata for
typeenum✅Object type: TABLE, VIEW, or DATAMAP
idstring✅Datamap ID for DATAMAP, FQN for TABLE/VIEW (format: catalog.schema.table_name)
display_namestring❌Display name (only for datamaps, cannot be null/empty if provided)
descriptionstring❌Object description (null/empty removes value)
tagsstring[]❌Tags to replace all existing tags (mutually exclusive with add/remove)
add_tagsstring[]❌Tags to add to existing tags
remove_tagsstring[]❌Tags to remove from existing tags
domainsstring[]❌Domain IDs to replace all existing domains (mutually exclusive with add/remove)
add_domainsstring[]❌Domain IDs to add to existing domains
remove_domainsstring[]❌Domain IDs to remove from existing domains
fieldsarray❌Field-level metadata (for all entity types)

Field-Level Metadata​

FieldTypeRequiredDescription
fields.namestring✅Field/column name
fields.descriptionstring❌Field description (null/empty removes value)
fields.tagsstring[]❌Tags to replace all existing field tags
fields.add_tagsstring[]❌Tags to add to existing field tags
fields.remove_tagsstring[]❌Tags to remove from existing field tags

Response​

Success (200 OK)​

{
"metadata_results": [
{
"id": "string",
"type": "TABLE|VIEW|DATAMAP",
"fact_id": "string",
"success": true,
"fields_processed": true,
"error_message": null
}
],
"success_count": 3,
"failure_count": 0,
"total_count": 3
}
FieldTypeDescription
metadata_resultsarrayResults for each processed object
metadata_results[].idstringObject identifier
metadata_results[].typestringObject type
metadata_results[].fact_idstringInternal fact ID
metadata_results[].successbooleanWhether the update succeeded
metadata_results[].fields_processedbooleanWhether field metadata was processed
metadata_results[].error_messagestringError message if failed
success_countintegerNumber of successful updates
failure_countintegerNumber of failed updates
total_countintegerTotal objects processed

Error Response​

{
"error": "string",
"message": "string"
}
HTTP CodeDescriptionCommon Causes
400Bad RequestInvalid request format, validation errors
401UnauthorizedMissing or invalid ID token
403ForbiddenInsufficient permissions
404Not FoundObject not found by ID/FQN
500Internal Server ErrorSystem error during processing

Validation Rules​

Request Validation​

  • metadata_objects array cannot be empty
  • Each object must have valid type and id
  • Field names must be unique within each object
  • Field name is required when fields array is provided

Business Logic Validation​

  • Objects must exist in the system (no creation of new objects)
  • User must have appropriate permissions for the object type
  • For datamaps: must exist with the provided ID
  • For tables/views: must exist with the provided FQN in catalog.schema.table_name format
  • display_name for datamaps cannot be null or empty when provided

Example: curl​

Update Table with Field Metadata​

curl -X POST https://api.prod.promethium.ai/metadata/import \
-H "Content-Type: application/json" \
-H "idtoken: YOUR_ID_TOKEN_HERE" \
-d '{
"metadata_objects": [
{
"type": "TABLE",
"id": "sales.public.orders",
"description": "Customer order transactions with payment details",
"tags": ["sales", "transactions", "customer_data"],
"fields": [
{
"name": "order_id",
"description": "Unique order identifier",
"tags": ["primary_key", "identifier"]
},
{
"name": "customer_email",
"description": "Customer email address",
"add_tags": ["pii", "contact"],
"remove_tags": ["public"]
}
]
}
]
}'

Update Multiple Object Types​

curl -X POST https://api.prod.promethium.ai/metadata/import \
-H "Content-Type: application/json" \
-H "idtoken: YOUR_ID_TOKEN_HERE" \
-d '{
"metadata_objects": [
{
"type": "TABLE",
"id": "sales.public.orders",
"description": "Customer order transactions",
"tags": ["sales", "transactions"]
},
{
"type": "VIEW",
"id": "analytics.reporting.daily_sales",
"description": "Daily aggregated sales metrics",
"add_tags": ["reporting", "daily"],
"remove_tags": ["raw_data"]
},
{
"type": "DATAMAP",
"id": "dm_customer_360",
"display_name": "Customer 360 View",
"description": "Unified customer profile datamap",
"add_domains": ["customer_domain", "marketing_domain"]
}
]
}'

Add and Remove Tags Incrementally​

curl -X POST https://api.prod.promethium.ai/metadata/import \
-H "Content-Type: application/json" \
-H "idtoken: YOUR_ID_TOKEN_HERE" \
-d '{
"metadata_objects": [
{
"type": "VIEW",
"id": "analytics.reporting.daily_sales",
"add_tags": ["reporting", "daily"],
"remove_tags": ["raw_data"],
"fields": [
{
"name": "sale_date",
"description": "Date of sales aggregation",
"tags": ["temporal", "partition_key"]
},
{
"name": "total_revenue",
"add_tags": ["kpi", "financial"]
}
]
}
]
}'