{"openapi":"3.1.0","info":{"title":"Data Type Swagger","summary":"Data dictionaries, data items, code sources, and AI-assisted management","description":"\n## WorkFINITY® Solution Configuration Management System — Data Dictionary AI API\n\nA high-performance enterprise REST API for managing data dictionary definitions, structured data items, code manager value sources, dynamic JSON Schema generation, and AI-assisted dictionary authoring over BPRM.\n\n---\n\n### 🔑 Authentication\nMost endpoints in this microservice require internal service authentication.\nClick the green **Authorize 🔓** button in Swagger UI and provide your internal service secret:\n- **Header:** `X-Internal-Auth`\n- **Value:** `<INTERNAL_SERVICE_SECRET>` (e.g., `wf_internal_...`)\n\nPublic diagnostic endpoints (`/health`) do not require authentication.\n\n---\n\n### 🧱 Architecture & Data Model\n- **`DataDictionary`**: Top-level entity defining a domain model or dictionary catalog (e.g. `Customer`, `Invoice`, `Address`).\n- **`DataItem`**: Individual typed fields and properties under a dictionary (e.g. `firstName`, `accountNumber`, `status`).\n- **`AttributesJson`**: Fine-grained field metadata (JSON Schema rules, validation patterns, min/max, multiple-select flags).\n- **`CodeManager` & `DataItemCodeSource`**: Mappings connecting data items to managed lookup code values.\n- **Dynamic JSON Schema Generation**: On-the-fly compilation of dictionary definitions into standard JSON Schema (draft 2020-12 / draft-07) with reference resolution.\n\n---\n\n### 🤖 AI Assistant\n- **Natural Language Parsing**: Add, update, delete, and query dictionaries and items using natural language prompts (`/api/ai/query`).\n- **AI Schema Ingestion**: Convert schema definitions and domain requests into database entities automatically.\n- **Token Accounting**: Automatic recording of prompt and completion token consumption in `AiTokenUsage`.\n\n---\n\n### 📦 Bulk Transfer & Data Quality\n- **Multi-Format Transfer**: Export and import supporting **JSON**, **JSON Schema**, **CSV**, **Excel**, **Word (DOCX)**, and **PDF** formats with full `dryRun` pre-validation.\n- **Data Quality Scans**: Automated detection of duplicate dictionaries, orphan data items, and repeating item values (`/api/data-quality`).\n- **Audit Logging**: Request latency tracking, categorized error logs, and activity records (`/api/audit`).\n","termsOfService":"https://workfinity.net/terms","contact":{"name":"WorkFINITY Support","url":"https://workfinity.net/","email":"support@workfinity.net"},"license":{"name":"Proprietary","url":"https://workfinity.net/"},"version":"1.9-debug"},"servers":[{"url":"/","description":"Current Server (Auto-detected)"},{"url":"http://localhost:8000","description":"Local Development (Port 8000)"},{"url":"http://localhost:5000","description":"Local Development (Port 5000)"},{"url":"https://datadictionary-ai-portal.workfinity.com","description":"Production Portal"}],"paths":{"/api/data-dictionaries":{"get":{"tags":["Data Dictionary"],"summary":"List data dictionaries","description":"Search and page through DataDictionary records.","operationId":"api_list_data_dictionaries_api_data_dictionaries_get","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search Name, Label, and Description.","title":"Q"},"description":"Search Name, Label, and Description."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Match an exact dictionary Name (case-insensitive).","title":"Name"},"description":"Match an exact dictionary Name (case-insensitive)."},{"name":"order","in":"query","required":false,"schema":{"enum":["newest","oldest"],"type":"string","default":"newest","title":"Order"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Pagesize"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedDataDictionary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Data Dictionary"],"summary":"Create a data dictionary","description":"Creates a DataDictionary. Optionally copies DataItem rows from another dictionary.","operationId":"api_create_data_dictionary_api_data_dictionaries_post","security":[{"InternalServiceSecret":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataDictionaryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataDictionaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-dictionaries/{id}":{"get":{"tags":["Data Dictionary"],"summary":"Get a data dictionary","operationId":"api_get_data_dictionary_api_data_dictionaries__id__get","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataDictionary.Id","title":"Id"},"description":"DataDictionary.Id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataDictionaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Data Dictionary"],"summary":"Update a data dictionary","description":"Partial update. Send If-Match: <RowVersion> to get 412 instead of overwriting someone else's change.","operationId":"api_update_data_dictionary_api_data_dictionaries__id__patch","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataDictionary.Id","title":"Id"},"description":"DataDictionary.Id"},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since.","title":"If-Match"},"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataDictionaryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataDictionaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Data Dictionary"],"summary":"Delete a data dictionary","description":"Deletes an empty DataDictionary. Returns 409 when it still has items or is referenced by another dictionary's item.","operationId":"api_delete_data_dictionary_api_data_dictionaries__id__delete","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataDictionary.Id","title":"Id"},"description":"DataDictionary.Id"},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since.","title":"If-Match"},"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityDeleteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-dictionaries/{id}/schema":{"get":{"tags":["Data Dictionary"],"summary":"Get the JSON Schema of a data dictionary","description":"Returns DataSchemaJson: a JSON Schema (draft 2020-12) generated from the dictionary's DataItem rows and kept in sync on every change. Other systems can use it to validate payloads or build forms. With `resolve=true`, referenced dictionaries are inlined under `$defs` so the document is self-contained.","operationId":"api_get_data_dictionary_schema_api_data_dictionaries__id__schema_get","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataDictionary.Id","title":"Id"},"description":"DataDictionary.Id"},{"name":"resolve","in":"query","required":false,"schema":{"type":"boolean","description":"Inline referenced dictionaries under $defs.","default":false,"title":"Resolve"},"description":"Inline referenced dictionaries under $defs."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"application/schema+json":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-dictionaries/schemas/rebuild":{"post":{"tags":["Data Dictionary"],"summary":"Regenerate stored JSON Schemas","description":"Regenerates DataSchemaJson for every dictionary (or only `ids`). Run after CodeManager values change, or after rows were edited directly in the database. Only changed schemas are written.","operationId":"api_rebuild_schemas_api_data_dictionaries_schemas_rebuild_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_api_rebuild_schemas_api_data_dictionaries_schemas_rebuild_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaRebuildOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"InternalServiceSecret":[]}]}},"/api/data-dictionaries/{id}/items":{"get":{"tags":["Data Dictionary","Data Items"],"summary":"List data items in a dictionary","operationId":"api_list_data_items_api_data_dictionaries__id__items_get","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataDictionary.Id","title":"Id"},"description":"DataDictionary.Id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Data Dictionary","Data Items"],"summary":"Replace all data items","description":"Deletes every DataItem (and its DataItemCodeSource links) in the dictionary, then inserts the given list.","operationId":"api_replace_data_items_api_data_dictionaries__id__items_put","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataDictionary.Id","title":"Id"},"description":"DataDictionary.Id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataItemCreate"},"description":"Complete replacement list.","title":"Items"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Data Dictionary","Data Items"],"summary":"Add or upsert a data item into a dictionary","description":"Inserts a DataItem (or updates an existing item with the same Value) in the specified DataDictionary.\n\n**Automatic Schema Update:** `DataDictionary.DataSchemaJson` in the `DataDictionary` table is automatically recalculated and persisted in real time upon every item add/update.","operationId":"api_upsert_data_item_api_data_dictionaries__id__items_post","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataDictionary.Id","title":"Id"},"description":"DataDictionary.Id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-items":{"post":{"tags":["Data Dictionary","Data Items"],"summary":"Create or upsert a data item","description":"Creates or updates a DataItem under the specified dictionary (`DataDictionaryId` in the body or `dataDictionaryId` query parameter).\n\n**Automatic Schema Update:** Automatically recalculates and updates `DataSchemaJson` in the `DataDictionary` table.","operationId":"api_create_data_item_api_data_items_post","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"dataDictionaryId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"DataDictionary.Id","title":"Datadictionaryid"},"description":"DataDictionary.Id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-items/{id}":{"get":{"tags":["Data Dictionary","Data Items"],"summary":"Get a data item","operationId":"api_get_data_item_api_data_items__id__get","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataItem.Id","title":"Id"},"description":"DataItem.Id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Data Dictionary","Data Items"],"summary":"Partial update a data item","description":"Partial update. Send `If-Match: <RowVersion>` to get 412 instead of overwriting concurrent changes. Automatically updates `DataDictionary.DataSchemaJson` in the database table.","operationId":"api_update_data_item_api_data_items__id__patch","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataItem.Id","title":"Id"},"description":"DataItem.Id"},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since.","title":"If-Match"},"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Data Dictionary","Data Items"],"summary":"Update a data item","description":"Updates DataItem fields with optimistic concurrency support via `If-Match`. Automatically updates `DataDictionary.DataSchemaJson` in the database table.","operationId":"api_update_data_item_api_data_items__id__put","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataItem.Id","title":"Id"},"description":"DataItem.Id"},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since.","title":"If-Match"},"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Data Dictionary","Data Items"],"summary":"Delete a data item","description":"Deletes the DataItem and its DataItemCodeSource links. Automatically updates `DataDictionary.DataSchemaJson` in the database table.","operationId":"api_delete_data_item_api_data_items__id__delete","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataItem.Id","title":"Id"},"description":"DataItem.Id"},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since.","title":"If-Match"},"description":"RowVersion from a previous read. When sent, the write fails with 412 if the row changed since."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityDeleteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/transfer/export":{"get":{"tags":["Data Dictionary","Transfer"],"summary":"Export data dictionaries and/or data items","description":"Exports DataDictionary rows, DataItem rows, or both as CSV, JSON, DOCX, or PDF.","operationId":"api_export_api_transfer_export_get","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"format","in":"query","required":true,"schema":{"enum":["csv","json","docx","pdf"],"type":"string","description":"Output file format.","title":"Format"},"description":"Output file format."},{"name":"dataset","in":"query","required":false,"schema":{"enum":["dictionaries","items","all"],"type":"string","description":"'dictionaries' = DataDictionary, 'items' = DataItem, 'all' = both.","default":"dictionaries","title":"Dataset"},"description":"'dictionaries' = DataDictionary, 'items' = DataItem, 'all' = both."}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/transfer/import":{"post":{"tags":["Data Dictionary","Transfer"],"summary":"Bulk import data dictionaries and data items","description":"Imports a file produced by /transfer/export (or any file with the same columns).\n\n- **DataDictionary rows**: `Name` (required), `Label`, `Description`, `IsActive`.\n- **DataItem rows**: `DataDictionaryName` (or `DataDictionaryId`), `Value` (required), `Label`, `DataItemType`, `SelectSource`, `SelectSourceId`, `ReferencedDataDictionaryId`, `AttributesJson`, `IsActive`, `Description`.\n\nA table with a `Value` column is read as DataItem rows. CSV may hold both sections (`=== DataDictionary ===` / `=== DataItem ===`) and JSON may be `{\"DataDictionary\": [...], \"DataItem\": [...]}`. Rows whose Name (dictionary) or Value (within its dictionary) already exist are skipped.\n\n**JSON Schema** (draft 2020-12 or draft-07, e.g. from GET /data-dictionaries/{id}/schema or another system): objects become dictionaries and properties become items; nested objects and `$defs` become referenced dictionaries. Existing dictionaries (by Name) and items (by Value) are updated, never deleted. The whole document is validated first; if anything is invalid nothing is written.","operationId":"api_import_api_transfer_import_post","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json","jsonschema","pdf","docx"],"type":"string"},{"type":"null"}],"description":"Import format (auto-detected when omitted). A JSON file that is a JSON Schema is imported as one automatically.","title":"Format"},"description":"Import format (auto-detected when omitted). A JSON file that is a JSON Schema is imported as one automatically."},{"name":"dryRun","in":"query","required":false,"schema":{"type":"boolean","description":"Validate only; do not write to the database.","default":false,"title":"Dryrun"},"description":"Validate only; do not write to the database."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_api_import_api_transfer_import_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/query":{"post":{"tags":["AI Assistant"],"summary":"Run an AI-assisted data dictionary query","description":"Runs a natural-language operation and records provider token counts in AiTokenUsage. Pass X-App-Id so usage is attributed to the correct ApplicationId.","operationId":"ai_query_api_query_post","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"X-App-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Application UUID for AiTokenUsage.ApplicationId.","title":"X-App-Id"},"description":"Application UUID for AiTokenUsage.ApplicationId."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NLQuery"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit":{"get":{"tags":["Audit"],"summary":"Get Audit Logs","description":"Retrieve audit logs with filtering and pagination.\n\nReturns an object with 'logs' array and metadata including total count, filters, pagination, and debug info.","operationId":"get_audit_logs_endpoint_api_audit_get","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date in YYYY-MM-DD format (defaults to today). Ignored if date_from and date_to are provided.","title":"Date"},"description":"Date in YYYY-MM-DD format (defaults to today). Ignored if date_from and date_to are provided."},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date in YYYY-MM-DD format (inclusive)","title":"Date From"},"description":"Start date in YYYY-MM-DD format (inclusive)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date in YYYY-MM-DD format (inclusive)","title":"Date To"},"description":"End date in YYYY-MM-DD format (inclusive)"},{"name":"error_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by error type","title":"Error Type"},"description":"Filter by error type"},{"name":"status_code","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by HTTP status code","title":"Status Code"},"description":"Filter by HTTP status code"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date/time in ISO format","title":"Start Date"},"description":"Start date/time in ISO format"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date/time in ISO format","title":"End Date"},"description":"End date/time in ISO format"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of entries to return. Default value: 100","default":100,"title":"Limit"},"description":"Maximum number of entries to return. Default value: 100"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page index (1-based). For example, offset=3 with limit=10 returns page 3 (entries 20-29). Default value: 1","default":1,"title":"Offset"},"description":"Page index (1-based). For example, offset=3 with limit=10 returns page 3 (entries 20-29). Default value: 1"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Audit Logs Endpoint Api Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-quality":{"get":{"tags":["Data Quality"],"summary":"Scan data dictionary quality","description":"Finds duplicate DataDictionary names, orphan DataItem rows, and repeated DataItem values.","operationId":"run_data_quality_scan_api_data_quality_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataQualityReportOut"}}}}},"security":[{"InternalServiceSecret":[]}]}},"/api/code-manager":{"get":{"tags":["Code Manager"],"summary":"List code manager records","description":"Lists CodeManager records, optionally filtered by CodeType, parent id, and active status.","operationId":"api_list_code_manager_api_code_manager_get","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"codeType","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CodeManager.CodeType","title":"Codetype"},"description":"CodeManager.CodeType"},{"name":"parentId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"CodeManager.ParentCodeManagerId","title":"Parentid"},"description":"CodeManager.ParentCodeManagerId"},{"name":"activeOnly","in":"query","required":false,"schema":{"type":"boolean","description":"Only rows where IsActive = 1","default":true,"title":"Activeonly"},"description":"Only rows where IsActive = 1"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeManagerRecordsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-items/{data_item_id}/code-sources":{"get":{"tags":["Code Manager","Data Items"],"summary":"List code sources for a data item","description":"Reads DataItemCodeSource relationships joined to CodeManager. When no explicit relationships exist, active children of DataItem.SelectSourceId are returned.","operationId":"api_get_data_item_code_sources_api_data_items__data_item_id__code_sources_get","security":[{"InternalServiceSecret":[]}],"parameters":[{"name":"data_item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"DataItem.Id","title":"Data Item Id"},"description":"DataItem.Id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemCodeSourcesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stats":{"get":{"tags":["Diagnostics"],"summary":"Application operational runtime statistics","description":"Returns service name, current version, process uptime in seconds, and health status.","operationId":"api_stats_api_stats_get","responses":{"200":{"description":"Runtime operational metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStatsResponse"}}}},"401":{"description":"Missing or invalid internal authorization header"}},"security":[{"InternalServiceSecret":[]}]}},"/health":{"get":{"tags":["Health"],"summary":"Check service health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AppStatsResponse":{"properties":{"app":{"type":"string","title":"App","description":"Application service name"},"version":{"type":"string","title":"Version","description":"Application release version"},"uptime_sec":{"type":"number","title":"Uptime Sec","description":"Process uptime in seconds"},"status":{"type":"string","title":"Status","description":"Operational status","default":"ok"}},"type":"object","required":["app","version","uptime_sec"],"title":"AppStatsResponse","example":{"app":"WorkFINITY® Solution Configuration Management System — Data Dictionary AI API","status":"ok","uptime_sec":3600.5,"version":"3.2.0"}},"Body_api_import_api_transfer_import_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"CSV, JSON, PDF, or DOCX file"}},"type":"object","required":["file"],"title":"Body_api_import_api_transfer_import_post"},"Body_api_rebuild_schemas_api_data_dictionaries_schemas_rebuild_post":{"properties":{"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids","description":"Limit to these DataDictionary ids."}},"type":"object","title":"Body_api_rebuild_schemas_api_data_dictionaries_schemas_rebuild_post"},"CodeManagerRecordOut":{"properties":{"Id":{"type":"string","format":"uuid","title":"Id"},"CodeType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codetype"},"Code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"Name":{"type":"string","title":"Name"},"Description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"OrderNumber":{"type":"integer","title":"Ordernumber"},"IsActive":{"type":"boolean","title":"Isactive"},"AllowDelete":{"type":"boolean","title":"Allowdelete"},"ParentCodeManagerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parentcodemanagerid"}},"type":"object","required":["Id","Name","OrderNumber","IsActive","AllowDelete"],"title":"CodeManagerRecordOut"},"CodeManagerRecordsOut":{"properties":{"Count":{"type":"integer","title":"Count"},"Items":{"items":{"$ref":"#/components/schemas/CodeManagerRecordOut"},"type":"array","title":"Items"}},"type":"object","required":["Count","Items"],"title":"CodeManagerRecordsOut"},"DataDictionaryCreate":{"properties":{"Name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"Label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label"},"Description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"IsActive":{"type":"boolean","title":"Isactive","default":true},"CopyFromDataDictionaryId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Copyfromdatadictionaryid","description":"Copy DataItem rows from this DataDictionary into the new one."},"CopyDataItemIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Copydataitemids","description":"Only copy these DataItem ids (requires CopyFromDataDictionaryId). Omit to copy all."}},"type":"object","required":["Name"],"title":"DataDictionaryCreate","example":{"Description":"Fields captured for an applicant","IsActive":true,"Label":"Applicant details","Name":"Applicant"}},"DataDictionaryOut":{"properties":{"Id":{"type":"string","format":"uuid","title":"Id"},"Name":{"type":"string","title":"Name"},"Label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"Description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"DataSchemaJson":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dataschemajson","description":"JSON Schema (draft 2020-12) generated from the dictionary's DataItem rows. Read-only."},"IsActive":{"type":"boolean","title":"Isactive"},"CreatedAtUtc":{"type":"string","format":"date-time","title":"Createdatutc"},"UpdatedAtUtc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedatutc"},"HasItems":{"type":"boolean","title":"Hasitems","description":"True when the dictionary has at least one DataItem.","default":false},"ItemCount":{"type":"integer","title":"Itemcount","description":"Total number of DataItems / attributes.","default":0},"RowVersion":{"type":"string","title":"Rowversion","description":"Concurrency token. Send it back in the If-Match header to reject stale updates."}},"type":"object","required":["Id","Name","IsActive","CreatedAtUtc","RowVersion"],"title":"DataDictionaryOut"},"DataDictionaryUpdate":{"properties":{"Name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"Label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label"},"Description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"IsActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isactive"}},"type":"object","title":"DataDictionaryUpdate"},"DataItemAttributes":{"properties":{"required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Required","description":"Any type. Listed in the schema's `required`."},"sortOrder":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sortorder","description":"Any type. Display order."},"helpText":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Helptext"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"readOnly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Readonly"},"hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hidden"},"parentAttributeCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentattributecode"},"default":{"anyOf":[{},{"type":"null"}],"title":"Default","description":"Must match the item type (and `enum`, if set)."},"minLength":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Minlength","description":"Text"},"maxLength":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Maxlength","description":"Text, Link"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pattern","description":"Text. Regular expression."},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Text. One of: email, idn-email, uri, uuid, hostname, ipv4, ipv6, time"},"minimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum","description":"Number, Integer"},"maximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maximum","description":"Number, Integer"},"exclusiveMinimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exclusiveminimum","description":"Number, Integer"},"exclusiveMaximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exclusivemaximum","description":"Number, Integer"},"multipleOf":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Multipleof","description":"Number, Integer"},"multiple":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Multiple","description":"Select, Reference. Allow several values."},"minItems":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Minitems","description":"Select, Reference (with multiple)"},"maxItems":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Maxitems","description":"Select, Reference (with multiple)"},"enum":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enum","description":"Select. Fixed list, used when no CodeManager values are linked."}},"additionalProperties":true,"type":"object","title":"DataItemAttributes","description":"Per-item rules stored in DataItem.AttributesJson. Keys reuse JSON Schema keyword names.\nWhich keys are allowed depends on DataItemType; custom keys must start with \"x-\".","example":{"maxLength":10,"pattern":"^[A-Z]{5}[0-9]{4}[A-Z]$","required":true,"sortOrder":3}},"DataItemCodeSourceItemOut":{"properties":{"Id":{"type":"string","format":"uuid","title":"Id"},"Code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"Name":{"type":"string","title":"Name"}},"type":"object","required":["Id","Name"],"title":"DataItemCodeSourceItemOut"},"DataItemCodeSourcesOut":{"properties":{"DataItemId":{"type":"string","format":"uuid","title":"Dataitemid"},"DataDictionaryId":{"type":"string","format":"uuid","title":"Datadictionaryid"},"DataItemValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataitemvalue"},"SelectSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selectsource"},"SelectSourceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selectsourceid"},"Count":{"type":"integer","title":"Count"},"Items":{"items":{"$ref":"#/components/schemas/DataItemCodeSourceItemOut"},"type":"array","title":"Items"}},"type":"object","required":["DataItemId","DataDictionaryId","Count","Items"],"title":"DataItemCodeSourcesOut"},"DataItemCreate":{"properties":{"DataDictionaryId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Datadictionaryid","description":"DataDictionary.Id (required when calling POST /data-items)"},"Value":{"type":"string","maxLength":4000,"minLength":1,"title":"Value"},"Label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label"},"DataItemType":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Dataitemtype","description":"One of Text, Number, Integer, Boolean, Date, DateTime, Select, Reference, Link, Document. Common aliases (string, int, decimal, bool, url, dropdown, ...) are accepted and stored as the canonical name.","default":"Text"},"SelectSource":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Selectsource"},"SelectSourceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selectsourceid"},"ReferencedDataDictionaryId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Referenceddatadictionaryid"},"AttributesJson":{"anyOf":[{"$ref":"#/components/schemas/DataItemAttributes"},{"type":"null"}]},"IsActive":{"type":"boolean","title":"Isactive","default":true},"Description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"CodeSourceIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Codesourceids","description":"CodeManager ids stored in DataItemCodeSource. Omit to leave links unchanged."}},"type":"object","required":["Value"],"title":"DataItemCreate","example":{"AttributesJson":{"required":true,"sortOrder":1},"CodeSourceIds":["e6194e83-d4da-4d79-adeb-09ee579118d6"],"DataItemType":"Select","IsActive":true,"Label":"Loan purpose","SelectSource":"CodeManager","Value":"loanPurpose"}},"DataItemListOut":{"properties":{"DataDictionaryId":{"type":"string","format":"uuid","title":"Datadictionaryid"},"DataDictionaryName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datadictionaryname"},"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/DataItemOut"},"type":"array","title":"Items"},"DataSchemaJson":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dataschemajson","description":"The regenerated draft 2020-12 JSON Schema stored in DataDictionary.DataSchemaJson."}},"type":"object","required":["DataDictionaryId","count","items"],"title":"DataItemListOut"},"DataItemOut":{"properties":{"Id":{"type":"string","format":"uuid","title":"Id"},"DataDictionaryId":{"type":"string","format":"uuid","title":"Datadictionaryid"},"Value":{"type":"string","title":"Value"},"Label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"DataItemType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataitemtype"},"SelectSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selectsource"},"SelectSourceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selectsourceid"},"ReferencedDataDictionaryId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Referenceddatadictionaryid"},"AttributesJson":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributesjson"},"IsActive":{"type":"boolean","title":"Isactive"},"Description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"CreatedAtUtc":{"type":"string","format":"date-time","title":"Createdatutc"},"CodeSourceIds":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Codesourceids"},"RowVersion":{"type":"string","title":"Rowversion","description":"Concurrency token. Send it back in the If-Match header to reject stale updates."}},"type":"object","required":["Id","DataDictionaryId","Value","IsActive","CreatedAtUtc","RowVersion"],"title":"DataItemOut"},"DataItemUpdate":{"properties":{"Value":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Value"},"Label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label"},"DataItemType":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Dataitemtype","description":"One of Text, Number, Integer, Boolean, Date, DateTime, Select, Reference, Link, Document. Common aliases (string, int, decimal, bool, url, dropdown, ...) are accepted and stored as the canonical name."},"SelectSource":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Selectsource"},"SelectSourceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selectsourceid"},"ReferencedDataDictionaryId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Referenceddatadictionaryid"},"AttributesJson":{"anyOf":[{"$ref":"#/components/schemas/DataItemAttributes"},{"type":"null"}]},"IsActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isactive"},"Description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"CodeSourceIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Codesourceids"}},"type":"object","title":"DataItemUpdate"},"DataQualityReportOut":{"properties":{"DuplicateDictionaries":{"items":{"$ref":"#/components/schemas/DuplicateDataDictionaryOut"},"type":"array","title":"Duplicatedictionaries"},"OrphanDataItems":{"items":{"$ref":"#/components/schemas/OrphanDataItemOut"},"type":"array","title":"Orphandataitems"},"RepeatedDataItemValues":{"items":{"$ref":"#/components/schemas/RepeatedDataItemValueOut"},"type":"array","title":"Repeateddataitemvalues"},"StaleSchemas":{"items":{"$ref":"#/components/schemas/StaleSchemaOut"},"type":"array","title":"Staleschemas","description":"Dictionaries whose stored DataSchemaJson no longer matches their items (fix with POST /data-dictionaries/schemas/rebuild)."},"Summary":{"$ref":"#/components/schemas/DataQualitySummaryOut"}},"type":"object","required":["DuplicateDictionaries","OrphanDataItems","RepeatedDataItemValues","StaleSchemas","Summary"],"title":"DataQualityReportOut"},"DataQualitySummaryOut":{"properties":{"DuplicateDictionaries":{"type":"integer","title":"Duplicatedictionaries"},"OrphanDataItems":{"type":"integer","title":"Orphandataitems"},"RepeatedDataItemValues":{"type":"integer","title":"Repeateddataitemvalues"},"StaleSchemas":{"type":"integer","title":"Staleschemas"}},"type":"object","required":["DuplicateDictionaries","OrphanDataItems","RepeatedDataItemValues","StaleSchemas"],"title":"DataQualitySummaryOut"},"DuplicateDataDictionaryOut":{"properties":{"Id":{"type":"string","format":"uuid","title":"Id"},"Name":{"type":"string","title":"Name"},"Label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"IsActive":{"type":"boolean","title":"Isactive"},"CreatedAtUtc":{"type":"string","format":"date-time","title":"Createdatutc"}},"type":"object","required":["Id","Name","IsActive","CreatedAtUtc"],"title":"DuplicateDataDictionaryOut"},"EntityDeleteResult":{"properties":{"deleted":{"type":"boolean","title":"Deleted"},"Id":{"type":"string","format":"uuid","title":"Id"},"affectedRows":{"type":"integer","title":"Affectedrows"},"message":{"type":"string","title":"Message"}},"type":"object","required":["deleted","Id","affectedRows","message"],"title":"EntityDeleteResult"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NLQuery":{"properties":{"query":{"type":"string","title":"Query","description":"Natural language prompt from the user"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Override model"},"maxSteps":{"type":"integer","maximum":8.0,"minimum":1.0,"title":"Maxsteps","description":"Model/tool rounds. 1 = one round of tool calls (cheapest). Higher values let the model see tool results, recover from errors, and chain steps, at the cost of extra OpenAI calls.","default":1},"dryRun":{"type":"boolean","title":"Dryrun","default":false}},"type":"object","required":["query"],"title":"NLQuery"},"OrphanDataItemOut":{"properties":{"Id":{"type":"string","format":"uuid","title":"Id"},"DataDictionaryId":{"type":"string","format":"uuid","title":"Datadictionaryid"},"Value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"Label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"DataItemType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataitemtype"},"SelectSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selectsource"},"AttributesJson":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributesjson"},"CreatedAtUtc":{"type":"string","format":"date-time","title":"Createdatutc"}},"type":"object","required":["Id","DataDictionaryId","CreatedAtUtc"],"title":"OrphanDataItemOut"},"PagedDataDictionary":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DataDictionaryOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"pageSize":{"type":"integer","title":"Pagesize"}},"type":"object","required":["items","total","page","pageSize"],"title":"PagedDataDictionary"},"RepeatedDataItemValueOut":{"properties":{"Id":{"type":"string","format":"uuid","title":"Id"},"DataDictionaryId":{"type":"string","format":"uuid","title":"Datadictionaryid"},"DataDictionaryName":{"type":"string","title":"Datadictionaryname"},"Value":{"type":"string","title":"Value"},"Label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"DataItemType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataitemtype"},"CreatedAtUtc":{"type":"string","format":"date-time","title":"Createdatutc"}},"type":"object","required":["Id","DataDictionaryId","DataDictionaryName","Value","CreatedAtUtc"],"title":"RepeatedDataItemValueOut"},"SchemaRebuildOut":{"properties":{"checked":{"type":"integer","title":"Checked"},"updated":{"type":"integer","title":"Updated"},"updatedIds":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Updatedids"}},"type":"object","required":["checked","updated","updatedIds"],"title":"SchemaRebuildOut"},"StaleSchemaOut":{"properties":{"Id":{"type":"string","format":"uuid","title":"Id"},"Name":{"type":"string","title":"Name"}},"type":"object","required":["Id","Name"],"title":"StaleSchemaOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"InternalServiceSecret":{"type":"apiKey","description":"Internal service secret required by all /api endpoints.","in":"header","name":"X-Internal-Auth"}}},"tags":[{"name":"Data Dictionary","description":"CRUD, search, schema generation, and lifecycle management for `DataDictionary` definitions."},{"name":"Data Items","description":"Manage `DataItem` definitions, their `AttributesJson` metadata, data types, and `DataItemCodeSource` linkages."},{"name":"Code Manager","description":"Browse reference lookup values from `dbo.CodeManager`."},{"name":"Transfer","description":"Bulk import and export across CSV, JSON, JSON Schema, Word (DOCX), and PDF formats with dry-run pre-validation."},{"name":"AI Assistant","description":"Natural-language query, schema generation, and dictionary operations. Token consumption recorded in `AiTokenUsage`."},{"name":"Data Quality","description":"Integrity scans detecting duplicate dictionaries, orphan items, and overlapping values."},{"name":"Audit","description":"File-backed API request latency, error logging, and activity audit records."},{"name":"Diagnostics","description":"Database connectivity, runtime operational statistics, and diagnostic information."},{"name":"Health","description":"Service health and operational availability checks."}]}