# Schema Explorer

APIs for exploring and managing schemas.

 - [POST /schema-explorer/v1/schema/upload](https://docs.businessai.uniphorecloud.com/api-reference/api/schema-explorer/upload_user_schema_v1_schema_upload_post.md): Upload a user-provided baseline schema from JSON file. Allows users to upload their own schema as a starting point or reference. If auto_promote is true, the schema is immediately activated for RAG us
 - [POST /schema-explorer/v1/schema/promote](https://docs.businessai.uniphorecloud.com/api-reference/api/schema-explorer/promote_schema_v1_schema_promote_post.md): Promote a schema (user or workflow) as the active schema. This endpoint allows users to choose which schema to activate for RAG queries: - Promote 'user' schema: Sets user-provided baseline as active
 - [PUT /schema-explorer/v1/schema/update](https://docs.businessai.uniphorecloud.com/api-reference/api/schema-explorer/update_schema_v1_schema_update_put.md): Update one or more schemas (user, workflow, and/or promoted) for an existing record. This endpoint provides flexible schema updates: - Update only user_schema - Update only workflow_schema - Update on
 - [GET /schema-explorer/v1/schema/{source_id}](https://docs.businessai.uniphorecloud.com/api-reference/api/schema-explorer/get_schema_v1_schema__source_id__get.md): Get full schema record by source_id. Returns all three schemas (user, workflow, promoted) for comparison. Used by UI to display schema comparison view in Journey 2. Args: source_id: Source identifier
 - [DELETE /schema-explorer/v1/schema/{source_id}](https://docs.businessai.uniphorecloud.com/api-reference/api/schema-explorer/delete_schema_v1_schema__source_id__delete.md): Delete a schema record by source_id. Called by forge-backend when a SCHEMA_GENERATOR workflow is deleted, so the schema tied to that source is cleaned up. Idempotent: if no record exists for (source_i
 - [GET /schema-explorer/v1/schema/{source_id}/promoted](https://docs.businessai.uniphorecloud.com/api-reference/api/schema-explorer/get_promoted_schema_v1_schema__source_id__promoted_get.md): Get only the promoted (active) schema by source_id. Returns just the promoted schema without user/workflow schemas. Used by RAG service and downstream consumers to get the active schema. Args: source_
 - [GET /schema-explorer/v1/schema/{source_id}/user](https://docs.businessai.uniphorecloud.com/api-reference/api/schema-explorer/get_user_schema_v1_schema__source_id__user_get.md): Get only the user schema by source_id. Returns just the user-provided baseline schema. Used when you only need the user's uploaded schema without workflow or promoted schemas. Args: source_id: Source
