diff --git a/docs.json b/docs.json index 30a0d96..b10a95e 100644 --- a/docs.json +++ b/docs.json @@ -199,7 +199,11 @@ "reference/prompt-labels-create", "reference/prompt-labels-patch", "reference/prompt-labels-delete", - "reference/get-snippet-usage" + "reference/get-snippet-usage", + "reference/external-ids-prompt-templates-upsert", + "reference/external-ids-prompt-templates-attach", + "reference/external-ids-prompt-templates-list", + "reference/external-ids-prompt-templates-delete" ] }, { @@ -227,7 +231,10 @@ "reference/create-dataset-version-from-filter-params", "reference/create-draft-dataset-version", "reference/add-request-log-to-dataset", - "reference/save-draft-dataset-version" + "reference/save-draft-dataset-version", + "reference/external-ids-dataset-groups-attach", + "reference/external-ids-dataset-groups-list", + "reference/external-ids-dataset-groups-delete" ] }, { @@ -245,7 +252,10 @@ "reference/update-report-score-card", "reference/rename-report", "reference/delete-report", - "reference/delete-reports-by-name" + "reference/delete-reports-by-name", + "reference/external-ids-reports-attach", + "reference/external-ids-reports-list", + "reference/external-ids-reports-delete" ] }, { @@ -257,7 +267,10 @@ "reference/create-workflow", "reference/patch-workflow", "reference/run-workflow", - "reference/workflow-version-execution-results" + "reference/workflow-version-execution-results", + "reference/external-ids-workflows-attach", + "reference/external-ids-workflows-list", + "reference/external-ids-workflows-delete" ] }, { @@ -267,7 +280,10 @@ "reference/create-skill-collection", "reference/get-skill-collection", "reference/update-skill-collection", - "reference/save-skill-collection-version" + "reference/save-skill-collection-version", + "reference/external-ids-skill-collections-attach", + "reference/external-ids-skill-collections-list", + "reference/external-ids-skill-collections-delete" ] }, { @@ -275,7 +291,10 @@ "pages": [ "reference/tool-registry-list", "reference/tool-registry-get", - "reference/tool-registry-create" + "reference/tool-registry-create", + "reference/external-ids-tool-registry-attach", + "reference/external-ids-tool-registry-list", + "reference/external-ids-tool-registry-delete" ] }, { @@ -286,9 +305,13 @@ "reference/list-folder-entities", "reference/move-folder-entities", "reference/delete-folder-entities", - "reference/resolve-folder-id" + "reference/resolve-folder-id", + "reference/external-ids-folders-attach", + "reference/external-ids-folders-list", + "reference/external-ids-folders-delete" ] - } + }, + "reference/external-ids-overview" ] }, { diff --git a/openapi.json b/openapi.json index 0fd1e3a..7904cae 100644 --- a/openapi.json +++ b/openapi.json @@ -478,6 +478,16 @@ } } }, + "409": { + "description": "External ID conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, "422": { "description": "Validation Error", "content": { @@ -1061,6 +1071,13 @@ "required": [ "code" ] + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "Identifiers from other systems." } }, "required": [ @@ -1135,11 +1152,19 @@ } } } + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "External ID mappings for the evaluation pipeline." } }, "required": [ "success", - "report_id" + "report_id", + "external_ids" ], "example": { "success": true, @@ -1160,7 +1185,8 @@ } } } - ] + ], + "external_ids": [] } } } @@ -1216,6 +1242,16 @@ }, "401": { "description": "Unauthorized - Invalid or missing authentication" + }, + "409": { + "description": "External ID conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } } } } @@ -2133,7 +2169,7 @@ "/report-columns/{report_column_id}": { "patch": { "summary": "Edit Evaluation Pipeline Column", - "description": "Update an existing column on an evaluation pipeline. Use this to fix a bug in a CODE_EXECUTION script, change a column's configuration, rename it, or reorder it \u2014 without recreating the whole pipeline. Cannot edit DATASET columns. Editing a column re-queues the affected cells.", + "description": "Update an existing column on an evaluation pipeline. Use this to fix a bug in a CODE_EXECUTION script, change a column's configuration, rename it, or reorder it — without recreating the whole pipeline. Cannot edit DATASET columns. Editing a column re-queues the affected cells.", "operationId": "editReportColumn", "tags": [ "reports" @@ -3333,6 +3369,13 @@ "minimum": 1, "nullable": true, "description": "Optional folder ID to create the dataset group inside. If omitted, the dataset group is created at the workspace root." + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "Identifiers from other systems." } }, "required": [ @@ -3361,13 +3404,21 @@ }, "dataset": { "$ref": "#/components/schemas/Dataset" + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "External ID mappings for the dataset group." } }, "required": [ "success", "message", "dataset_group", - "dataset" + "dataset", + "external_ids" ] } } @@ -3382,6 +3433,16 @@ } } } + }, + "409": { + "description": "External ID conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } } } } @@ -3554,14 +3615,20 @@ "properties": { "logic": { "type": "string", - "enum": ["AND", "OR"], + "enum": [ + "AND", + "OR" + ], "description": "How to combine the filters in this group." }, "filters": { "type": "array", "items": { "type": "object", - "required": ["field", "operator"], + "required": [ + "field", + "operator" + ], "properties": { "field": { "type": "string", @@ -3593,7 +3660,10 @@ }, "sort_order": { "type": "string", - "enum": ["asc", "desc"], + "enum": [ + "asc", + "desc" + ], "description": "Sort direction. Defaults to `desc` when `sort_by` is provided." }, "variables_to_parse": { @@ -4081,6 +4151,24 @@ "title": "Status" }, "description": "Filter prompt templates by status: 'active' (default) returns only active templates, 'deleted' returns only deleted/archived templates, 'all' returns both" + }, + { + "in": "query", + "name": "external_source", + "schema": { + "type": "string", + "title": "External Source" + }, + "description": "External ID source to filter by. Must be provided with external_id." + }, + { + "in": "query", + "name": "external_id", + "schema": { + "type": "string", + "title": "External Id" + }, + "description": "External ID value to filter by. Must be provided with external_source." } ], "responses": { @@ -4380,6 +4468,16 @@ } } } + }, + "409": { + "description": "External ID conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } } } } @@ -5185,6 +5283,16 @@ } } } + }, + "409": { + "description": "External ID conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } } } } @@ -5708,7 +5816,7 @@ "otlp" ], "summary": "Ingest Traces (OTLP)", - "description": "Ingest OpenTelemetry traces using the standard OTLP/HTTP protocol.\n\nThis endpoint accepts an `ExportTraceServiceRequest` as defined by the [OpenTelemetry specification](https://opentelemetry.io/docs/specs/otel/protocol/otlp/#otlphttp). Spans carrying [GenAI semantic convention](https://opentelemetry.io/docs/specs/semconv/gen-ai/) attributes are automatically converted into PromptLayer request logs.\n\nSupported content types:\n- `application/x-protobuf` \u2014 binary protobuf encoding (recommended)\n- `application/json` \u2014 JSON encoding\n\nGzip `Content-Encoding` is supported for both formats.\n\nSpans can include `promptlayer.prompt.name` (or `promptlayer.prompt.id`) and `promptlayer.prompt.version` (or `promptlayer.prompt.label`) attributes to link the generated request log to an existing prompt template in your workspace.", + "description": "Ingest OpenTelemetry traces using the standard OTLP/HTTP protocol.\n\nThis endpoint accepts an `ExportTraceServiceRequest` as defined by the [OpenTelemetry specification](https://opentelemetry.io/docs/specs/otel/protocol/otlp/#otlphttp). Spans carrying [GenAI semantic convention](https://opentelemetry.io/docs/specs/semconv/gen-ai/) attributes are automatically converted into PromptLayer request logs.\n\nSupported content types:\n- `application/x-protobuf` — binary protobuf encoding (recommended)\n- `application/json` — JSON encoding\n\nGzip `Content-Encoding` is supported for both formats.\n\nSpans can include `promptlayer.prompt.name` (or `promptlayer.prompt.id`) and `promptlayer.prompt.version` (or `promptlayer.prompt.label`) attributes to link the generated request log to an existing prompt template in your workspace.", "operationId": "ingestOtlpTraces", "parameters": [ { @@ -6013,6 +6121,16 @@ } } } + }, + "409": { + "description": "External ID conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } } } } @@ -6566,6 +6684,13 @@ "type": "string", "description": "Commit message for the initial version", "nullable": true + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "Identifiers from other systems." } } } @@ -6588,8 +6713,28 @@ }, "version": { "type": "object" + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "External ID mappings for the tool." } - } + }, + "required": [ + "external_ids" + ] + } + } + } + }, + "409": { + "description": "External ID conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" } } } @@ -6689,6 +6834,2129 @@ } } } + }, + "/prompt-templates/by-external-id/{source}/{external_id}": { + "put": { + "tags": [ + "external-ids", + "prompt-templates" + ], + "summary": "Upsert Prompt Template by External ID", + "description": "Publish a prompt template by external ID. Existing mappings create a new version on the mapped prompt template. Missing mappings create or update a prompt template and attach the mapping.", + "operationId": "upsert_prompt_template_by_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "source", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "source", + "minLength": 1, + "maxLength": 128 + }, + "description": "External ID source." + }, + { + "name": "external_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "external_id", + "minLength": 1, + "maxLength": 512 + }, + "description": "External ID value. URL-encode any reserved path characters." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePromptTemplate" + } + } + } + }, + "responses": { + "200": { + "description": "Prompt template updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePromptTemplateResponse" + } + } + } + }, + "201": { + "description": "Prompt template created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePromptTemplateResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/prompt-templates/{prompt_template_id}/external-ids": { + "post": { + "tags": [ + "external-ids" + ], + "summary": "Attach Prompt Template External ID", + "operationId": "attach_prompt_template_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "prompt_template_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "prompt_template_id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachExternalIdRequest" + } + } + } + }, + "responses": { + "201": { + "description": "External ID attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdAttachResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "external-ids" + ], + "summary": "List Prompt Template External IDs", + "operationId": "list_prompt_template_id_external_ids", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "prompt_template_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "prompt_template_id" + } + } + ], + "responses": { + "200": { + "description": "External IDs for the entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdsListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/prompt-templates/{prompt_template_id}/external-ids/{source}/{external_id}": { + "delete": { + "tags": [ + "external-ids" + ], + "summary": "Delete Prompt Template External ID", + "operationId": "delete_prompt_template_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "prompt_template_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "prompt_template_id" + } + }, + { + "name": "source", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "source", + "minLength": 1, + "maxLength": 128 + }, + "description": "External ID source." + }, + { + "name": "external_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "external_id", + "minLength": 1, + "maxLength": 512 + }, + "description": "External ID value. URL-encode any reserved path characters." + } + ], + "responses": { + "200": { + "description": "External ID detached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdDeleteResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/public/v2/folders/{folder_id}/external-ids": { + "post": { + "tags": [ + "external-ids" + ], + "summary": "Attach Folder External ID", + "operationId": "attach_folder_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "folder_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "folder_id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachExternalIdRequest" + } + } + } + }, + "responses": { + "201": { + "description": "External ID attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdAttachResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "external-ids" + ], + "summary": "List Folder External IDs", + "operationId": "list_folder_id_external_ids", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "folder_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "folder_id" + } + } + ], + "responses": { + "200": { + "description": "External IDs for the entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdsListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/public/v2/folders/{folder_id}/external-ids/{source}/{external_id}": { + "delete": { + "tags": [ + "external-ids" + ], + "summary": "Delete Folder External ID", + "operationId": "delete_folder_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "folder_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "folder_id" + } + }, + { + "name": "source", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "source", + "minLength": 1, + "maxLength": 128 + }, + "description": "External ID source." + }, + { + "name": "external_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "external_id", + "minLength": 1, + "maxLength": 512 + }, + "description": "External ID value. URL-encode any reserved path characters." + } + ], + "responses": { + "200": { + "description": "External ID detached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdDeleteResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/workflows/{workflow_id}/external-ids": { + "post": { + "tags": [ + "external-ids" + ], + "summary": "Attach Workflow External ID", + "operationId": "attach_workflow_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "workflow_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "workflow_id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachExternalIdRequest" + } + } + } + }, + "responses": { + "201": { + "description": "External ID attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdAttachResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "external-ids" + ], + "summary": "List Workflow External IDs", + "operationId": "list_workflow_id_external_ids", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "workflow_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "workflow_id" + } + } + ], + "responses": { + "200": { + "description": "External IDs for the entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdsListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/workflows/{workflow_id}/external-ids/{source}/{external_id}": { + "delete": { + "tags": [ + "external-ids" + ], + "summary": "Delete Workflow External ID", + "operationId": "delete_workflow_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "workflow_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "workflow_id" + } + }, + { + "name": "source", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "source", + "minLength": 1, + "maxLength": 128 + }, + "description": "External ID source." + }, + { + "name": "external_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "external_id", + "minLength": 1, + "maxLength": 512 + }, + "description": "External ID value. URL-encode any reserved path characters." + } + ], + "responses": { + "200": { + "description": "External ID detached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdDeleteResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/public/v2/dataset-groups/{dataset_group_id}/external-ids": { + "post": { + "tags": [ + "external-ids" + ], + "summary": "Attach Dataset Group External ID", + "operationId": "attach_dataset_group_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "dataset_group_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "dataset_group_id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachExternalIdRequest" + } + } + } + }, + "responses": { + "201": { + "description": "External ID attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdAttachResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "external-ids" + ], + "summary": "List Dataset Group External IDs", + "operationId": "list_dataset_group_id_external_ids", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "dataset_group_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "dataset_group_id" + } + } + ], + "responses": { + "200": { + "description": "External IDs for the entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdsListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/public/v2/dataset-groups/{dataset_group_id}/external-ids/{source}/{external_id}": { + "delete": { + "tags": [ + "external-ids" + ], + "summary": "Delete Dataset Group External ID", + "operationId": "delete_dataset_group_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "dataset_group_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "dataset_group_id" + } + }, + { + "name": "source", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "source", + "minLength": 1, + "maxLength": 128 + }, + "description": "External ID source." + }, + { + "name": "external_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "external_id", + "minLength": 1, + "maxLength": 512 + }, + "description": "External ID value. URL-encode any reserved path characters." + } + ], + "responses": { + "200": { + "description": "External ID detached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdDeleteResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/reports/{report_id}/external-ids": { + "post": { + "tags": [ + "external-ids" + ], + "summary": "Attach Report External ID", + "operationId": "attach_report_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "report_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "report_id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachExternalIdRequest" + } + } + } + }, + "responses": { + "201": { + "description": "External ID attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdAttachResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "external-ids" + ], + "summary": "List Report External IDs", + "operationId": "list_report_id_external_ids", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "report_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "report_id" + } + } + ], + "responses": { + "200": { + "description": "External IDs for the entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdsListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/reports/{report_id}/external-ids/{source}/{external_id}": { + "delete": { + "tags": [ + "external-ids" + ], + "summary": "Delete Report External ID", + "operationId": "delete_report_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "report_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "report_id" + } + }, + { + "name": "source", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "source", + "minLength": 1, + "maxLength": 128 + }, + "description": "External ID source." + }, + { + "name": "external_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "external_id", + "minLength": 1, + "maxLength": 512 + }, + "description": "External ID value. URL-encode any reserved path characters." + } + ], + "responses": { + "200": { + "description": "External ID detached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdDeleteResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/public/v2/tool-registry/{tool_id}/external-ids": { + "post": { + "tags": [ + "external-ids" + ], + "summary": "Attach Tool Registry External ID", + "operationId": "attach_tool_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "tool_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "tool_id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachExternalIdRequest" + } + } + } + }, + "responses": { + "201": { + "description": "External ID attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdAttachResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "external-ids" + ], + "summary": "List Tool Registry External IDs", + "operationId": "list_tool_id_external_ids", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "tool_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "tool_id" + } + } + ], + "responses": { + "200": { + "description": "External IDs for the entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdsListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/public/v2/tool-registry/{tool_id}/external-ids/{source}/{external_id}": { + "delete": { + "tags": [ + "external-ids" + ], + "summary": "Delete Tool Registry External ID", + "operationId": "delete_tool_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "tool_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "tool_id" + } + }, + { + "name": "source", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "source", + "minLength": 1, + "maxLength": 128 + }, + "description": "External ID source." + }, + { + "name": "external_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "external_id", + "minLength": 1, + "maxLength": 512 + }, + "description": "External ID value. URL-encode any reserved path characters." + } + ], + "responses": { + "200": { + "description": "External ID detached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdDeleteResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/public/v2/skill-collections/{skill_collection_id}/external-ids": { + "post": { + "tags": [ + "external-ids" + ], + "summary": "Attach Skill Collection External ID", + "operationId": "attach_skill_collection_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "skill_collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "skill_collection_id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachExternalIdRequest" + } + } + } + }, + "responses": { + "201": { + "description": "External ID attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdAttachResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "external-ids" + ], + "summary": "List Skill Collection External IDs", + "operationId": "list_skill_collection_id_external_ids", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "skill_collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "skill_collection_id" + } + } + ], + "responses": { + "200": { + "description": "External IDs for the entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdsListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/public/v2/skill-collections/{skill_collection_id}/external-ids/{source}/{external_id}": { + "delete": { + "tags": [ + "external-ids" + ], + "summary": "Delete Skill Collection External ID", + "operationId": "delete_skill_collection_id_external_id", + "parameters": [ + { + "name": "X-API-KEY", + "in": "header", + "required": true, + "schema": { + "type": "string", + "title": "X-Api-Key" + } + }, + { + "name": "skill_collection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "skill_collection_id" + } + }, + { + "name": "source", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "source", + "minLength": 1, + "maxLength": 128 + }, + "description": "External ID source." + }, + { + "name": "external_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "external_id", + "minLength": 1, + "maxLength": 512 + }, + "description": "External ID value. URL-encode any reserved path characters." + } + ], + "responses": { + "200": { + "description": "External ID detached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdDeleteResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "404": { + "description": "Entity Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIdErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } } }, "components": { @@ -7181,6 +9449,13 @@ }, "nullable": true, "description": "Labels to attach to this version." + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "Identifiers from other systems." } }, "required": [ @@ -7335,6 +9610,13 @@ "type": "string" }, "description": "Required input variables for the workflow." + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "External ID mappings for the workflow." } }, "required": [ @@ -7342,7 +9624,8 @@ "workflow_id", "workflow_name", "workflow_version_id", - "version_number" + "version_number", + "external_ids" ], "description": "Response after creating or patching a workflow." }, @@ -7560,6 +9843,13 @@ "commit_message": { "type": "string", "nullable": true + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "Identifiers from other systems." } } }, @@ -7713,7 +10003,8 @@ "type": "object", "required": [ "success", - "skill_collection" + "skill_collection", + "external_ids" ], "properties": { "success": { @@ -7724,6 +10015,13 @@ }, "skill_collection": { "$ref": "#/components/schemas/SkillCollection" + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "External ID mappings for the skill collection." } } }, @@ -10606,7 +12904,8 @@ "type": "string", "maxLength": 512, "minLength": 1, - "title": "Prompt Name" + "title": "Prompt Name", + "description": "The unique prompt name within the workspace. 1-512 characters." }, "tags": { "items": { @@ -10614,7 +12913,8 @@ }, "type": "array", "title": "Tags", - "default": [] + "default": [], + "description": "Tags to attach to the prompt registry entry." }, "folder_id": { "anyOf": [ @@ -10627,7 +12927,19 @@ } ], "title": "Folder Id", - "description": "The ID of the folder to publish the prompt template into. If not provided, the prompt will be published to the root level." + "description": "The ID of the folder to publish the prompt template into. If omitted, the prompt is created at the workspace root. Use Resolve Folder ID by Path to look up an ID from a path, or Create Folder to make one." + }, + "workspace_id": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Workspace Id", + "description": "Optional workspace override; defaults to the workspace associated with the API key." } }, "type": "object", @@ -10654,7 +12966,8 @@ "chat": "#/components/schemas/ChatPrompt", "completion": "#/components/schemas/CompletionPrompt" } - } + }, + "description": "The prompt content, either chat or completion." }, "commit_message": { "anyOf": [ @@ -10666,7 +12979,8 @@ "type": "null" } ], - "title": "Commit Message" + "title": "Commit Message", + "description": "Message describing the changes in this version. Maximum 72 characters." }, "metadata": { "anyOf": [ @@ -10676,7 +12990,8 @@ { "type": "null" } - ] + ], + "description": "Metadata to attach to the prompt version." } }, "type": "object", @@ -10874,10 +13189,12 @@ "CreatePromptTemplate": { "properties": { "prompt_template": { - "$ref": "#/components/schemas/BasePromptTemplate" + "$ref": "#/components/schemas/BasePromptTemplate", + "description": "Template metadata, including prompt name, tags, folder, and workspace fields." }, "prompt_version": { - "$ref": "#/components/schemas/PromptVersion" + "$ref": "#/components/schemas/PromptVersion", + "description": "Version content and configuration." }, "release_labels": { "type": [ @@ -10887,7 +13204,19 @@ "items": { "type": "string" }, - "title": "Release Labels" + "title": "Release Labels", + "description": "Release labels to create or move to the newly created version." + }, + "external_ids": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "title": "External Ids", + "description": "Identifiers from other systems." } }, "type": "object", @@ -10974,6 +13303,14 @@ } ], "title": "Commit Message" + }, + "external_ids": { + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "type": "array", + "title": "External Ids", + "description": "External ID mappings attached to the prompt template." } }, "type": "object", @@ -10983,7 +13320,8 @@ "prompt_version_id", "version_number", "tags", - "prompt_template" + "prompt_template", + "external_ids" ], "title": "CreatePromptTemplateResponse" }, @@ -11236,7 +13574,7 @@ }, "items": { "items": { - "$ref": "#/components/schemas/GetPromptTemplateResponse" + "$ref": "#/components/schemas/ListPromptTemplateItem" }, "type": "array", "title": "Items" @@ -12121,6 +14459,18 @@ "type": "integer", "nullable": true, "description": "The ID of the parent folder. If null or not provided, the folder will be created at the root level of the workspace." + }, + "workspace_id": { + "type": "integer", + "minimum": 1, + "description": "Optional workspace ID. If not provided, uses the workspace associated with your API key." + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "Identifiers from other systems." } }, "title": "CreateFolderRequest" @@ -12175,6 +14525,13 @@ "type": "integer", "nullable": true, "description": "ID of the parent folder. Null for root-level folders." + }, + "external_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "description": "External ID mappings for the folder." } }, "title": "Folder" @@ -12954,7 +15311,218 @@ "description": "Previous page number, or null if on the first page." } } + }, + "ExternalId": { + "properties": { + "source": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "title": "Source", + "description": "The external system or namespace that owns the ID." + }, + "external_id": { + "type": "string", + "maxLength": 512, + "minLength": 1, + "title": "External Id", + "description": "The identifier for this entity in the external system." + } + }, + "type": "object", + "required": [ + "source", + "external_id" + ], + "additionalProperties": false, + "title": "ExternalId", + "description": "Customer-defined mapping between a PromptLayer entity and an external system identifier." + }, + "AttachExternalIdRequest": { + "properties": { + "source": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "title": "Source", + "description": "The external system or namespace that owns the ID." + }, + "external_id": { + "type": "string", + "maxLength": 512, + "minLength": 1, + "title": "External Id", + "description": "The identifier for this entity in the external system." + } + }, + "type": "object", + "required": [ + "source", + "external_id" + ], + "additionalProperties": false, + "title": "AttachExternalIdRequest", + "description": "External ID mapping to attach to an entity." + }, + "ExternalIdAttachResponse": { + "properties": { + "success": { + "type": "boolean", + "const": true, + "default": true, + "title": "Success" + }, + "external_id": { + "$ref": "#/components/schemas/ExternalId" + } + }, + "type": "object", + "required": [ + "success", + "external_id" + ], + "title": "ExternalIdAttachResponse" + }, + "ExternalIdsListResponse": { + "properties": { + "success": { + "type": "boolean", + "const": true, + "default": true, + "title": "Success" + }, + "external_ids": { + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "type": "array", + "title": "External Ids" + } + }, + "type": "object", + "required": [ + "success", + "external_ids" + ], + "title": "ExternalIdsListResponse" + }, + "ExternalIdDeleteResponse": { + "properties": { + "success": { + "type": "boolean", + "const": true, + "default": true, + "title": "Success" + } + }, + "type": "object", + "required": [ + "success" + ], + "title": "ExternalIdDeleteResponse" + }, + "ExternalIdErrorResponse": { + "properties": { + "success": { + "type": "boolean", + "const": false, + "default": false, + "title": "Success" + }, + "message": { + "type": "string", + "title": "Message" + } + }, + "type": "object", + "required": [ + "message" + ], + "title": "ExternalIdErrorResponse" + }, + "ListPromptTemplateItem": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "prompt_name": { + "type": "string", + "title": "Prompt Name" + }, + "prompt_template": { + "oneOf": [ + { + "$ref": "#/components/schemas/CompletionPrompt" + }, + { + "$ref": "#/components/schemas/ChatPrompt" + } + ], + "title": "Prompt Template", + "discriminator": { + "propertyName": "type", + "mapping": { + "chat": "#/components/schemas/ChatPrompt", + "completion": "#/components/schemas/CompletionPrompt" + } + } + }, + "metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/Metadata" + }, + { + "type": "null" + } + ] + }, + "commit_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Commit Message" + }, + "llm_kwargs": { + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Llm Kwargs", + "description": "When you optionally specify `provider` in the body, `llm_kwargs` will be returned for that specific provider and you can pass these kwargs to the provider's API directly. **Important:** This object's structure is provider-specific and may change without notice as LLM providers update their APIs. For stable, provider-agnostic prompt data, use `prompt_template` instead." + }, + "version": { + "type": "integer", + "title": "Version" + }, + "external_ids": { + "items": { + "$ref": "#/components/schemas/ExternalId" + }, + "type": "array", + "title": "External Ids", + "description": "External ID mappings attached to the prompt template." + } + }, + "type": "object", + "required": [ + "id", + "prompt_name", + "prompt_template", + "external_ids" + ], + "title": "ListPromptTemplateItem" } } } -} \ No newline at end of file +} diff --git a/reference/create-folder.mdx b/reference/create-folder.mdx index 7d70d44..dbef90d 100644 --- a/reference/create-folder.mdx +++ b/reference/create-folder.mdx @@ -3,4 +3,4 @@ title: "Create Folder" openapi: "POST /api/public/v2/folders" --- -Creates a new folder in the workspace. Folders can be nested within other folders by providing a parent_id. The folder name must be unique within its parent folder (or at the root level if no parent is specified). \ No newline at end of file +Creates a new folder in the workspace. Folders can be nested within other folders by providing a parent_id. The folder name must be unique within its parent folder (or at the root level if no parent is specified). diff --git a/reference/external-ids-dataset-groups-attach.mdx b/reference/external-ids-dataset-groups-attach.mdx new file mode 100644 index 0000000..69abfef --- /dev/null +++ b/reference/external-ids-dataset-groups-attach.mdx @@ -0,0 +1,8 @@ +--- +title: "Attach Dataset Group External ID" +openapi: "POST /api/public/v2/dataset-groups/{dataset_group_id}/external-ids" +--- + +Attach a `{source, external_id}` mapping to an existing dataset group. + +Attaching the same mapping to the same dataset group is idempotent. Reusing the mapping on another entity returns `409 Conflict`. See [External IDs](/reference/external-ids-overview). diff --git a/reference/external-ids-dataset-groups-delete.mdx b/reference/external-ids-dataset-groups-delete.mdx new file mode 100644 index 0000000..c6cdef5 --- /dev/null +++ b/reference/external-ids-dataset-groups-delete.mdx @@ -0,0 +1,6 @@ +--- +title: "Delete Dataset Group External ID" +openapi: "DELETE /api/public/v2/dataset-groups/{dataset_group_id}/external-ids/{source}/{external_id}" +--- + +Detach an external ID mapping from a dataset group. diff --git a/reference/external-ids-dataset-groups-list.mdx b/reference/external-ids-dataset-groups-list.mdx new file mode 100644 index 0000000..25eff6f --- /dev/null +++ b/reference/external-ids-dataset-groups-list.mdx @@ -0,0 +1,6 @@ +--- +title: "List Dataset Group External IDs" +openapi: "GET /api/public/v2/dataset-groups/{dataset_group_id}/external-ids" +--- + +List all external ID mappings attached to a dataset group. diff --git a/reference/external-ids-folders-attach.mdx b/reference/external-ids-folders-attach.mdx new file mode 100644 index 0000000..a7c34a6 --- /dev/null +++ b/reference/external-ids-folders-attach.mdx @@ -0,0 +1,8 @@ +--- +title: "Attach Folder External ID" +openapi: "POST /api/public/v2/folders/{folder_id}/external-ids" +--- + +Attach a `{source, external_id}` mapping to an existing folder. + +Attaching the same mapping to the same folder is idempotent. Reusing the mapping on another entity returns `409 Conflict`. See [External IDs](/reference/external-ids-overview). diff --git a/reference/external-ids-folders-delete.mdx b/reference/external-ids-folders-delete.mdx new file mode 100644 index 0000000..9217925 --- /dev/null +++ b/reference/external-ids-folders-delete.mdx @@ -0,0 +1,6 @@ +--- +title: "Delete Folder External ID" +openapi: "DELETE /api/public/v2/folders/{folder_id}/external-ids/{source}/{external_id}" +--- + +Detach an external ID mapping from a folder. diff --git a/reference/external-ids-folders-list.mdx b/reference/external-ids-folders-list.mdx new file mode 100644 index 0000000..62a346b --- /dev/null +++ b/reference/external-ids-folders-list.mdx @@ -0,0 +1,6 @@ +--- +title: "List Folder External IDs" +openapi: "GET /api/public/v2/folders/{folder_id}/external-ids" +--- + +List all external ID mappings attached to a folder. diff --git a/reference/external-ids-overview.mdx b/reference/external-ids-overview.mdx new file mode 100644 index 0000000..c2aa0b9 --- /dev/null +++ b/reference/external-ids-overview.mdx @@ -0,0 +1,31 @@ +--- +title: "External IDs" +description: "Attach identifiers from your own systems to PromptLayer resources so your integrations can easily find and sync resources." +--- + +```json +{ + "source": "acme_cms", + "external_id": "prompt_template_123" +} +``` + +## Common tasks + +| Task | Example | +|---|---| +| Set when creating an entity | [`POST /rest/prompt-templates`](/reference/templates-publish#body-external-ids) include `external_ids` in the payload body. | +| Set on an existing resource | [`POST /prompt-templates/{prompt_template_id}/external-ids`](/reference/external-ids-prompt-templates-attach) | +| Get an entity by external ID | [`GET /prompt-templates?external_source=...&external_id=...`](/reference/list-prompt-templates#query-external-source) (prompt templates only) | +| Get external IDs for an entity | [`GET /prompt-templates/{prompt_template_id}/external-ids`](/reference/external-ids-prompt-templates-list) | +| Delete an external ID from an entity | [`DELETE /prompt-templates/{prompt_template_id}/external-ids/{source}/{external_id}`](/reference/external-ids-prompt-templates-delete) | + +## Supported resources + +- [Prompt templates](/reference/templates-publish#body-external-ids) +- [Folders](/reference/create-folder#body-external-ids) +- [Workflows](/reference/create-workflow#body-external-ids) +- [Datasets](/reference/create-dataset-group#body-external-ids) +- [Evaluations](/reference/create-reports#body-external-ids) +- [Tools](/reference/tool-registry-create#body-external-ids) +- [Skill collections](/reference/create-skill-collection#body-external-ids) diff --git a/reference/external-ids-prompt-templates-attach.mdx b/reference/external-ids-prompt-templates-attach.mdx new file mode 100644 index 0000000..136f5f0 --- /dev/null +++ b/reference/external-ids-prompt-templates-attach.mdx @@ -0,0 +1,8 @@ +--- +title: "Attach Prompt Template External ID" +openapi: "POST /prompt-templates/{prompt_template_id}/external-ids" +--- + +Attach a `{source, external_id}` mapping to an existing prompt template. + +Attaching the same mapping to the same prompt template is idempotent. Reusing the mapping on another entity returns `409 Conflict`. See [External IDs](/reference/external-ids-overview). diff --git a/reference/external-ids-prompt-templates-delete.mdx b/reference/external-ids-prompt-templates-delete.mdx new file mode 100644 index 0000000..1d3b815 --- /dev/null +++ b/reference/external-ids-prompt-templates-delete.mdx @@ -0,0 +1,6 @@ +--- +title: "Delete Prompt Template External ID" +openapi: "DELETE /prompt-templates/{prompt_template_id}/external-ids/{source}/{external_id}" +--- + +Detach an external ID mapping from a prompt template. diff --git a/reference/external-ids-prompt-templates-list.mdx b/reference/external-ids-prompt-templates-list.mdx new file mode 100644 index 0000000..e7742eb --- /dev/null +++ b/reference/external-ids-prompt-templates-list.mdx @@ -0,0 +1,6 @@ +--- +title: "List Prompt Template External IDs" +openapi: "GET /prompt-templates/{prompt_template_id}/external-ids" +--- + +List all external ID mappings attached to a prompt template. diff --git a/reference/external-ids-prompt-templates-upsert.mdx b/reference/external-ids-prompt-templates-upsert.mdx new file mode 100644 index 0000000..f8bb077 --- /dev/null +++ b/reference/external-ids-prompt-templates-upsert.mdx @@ -0,0 +1,8 @@ +--- +title: "Upsert Prompt Template by External ID" +openapi: "PUT /prompt-templates/by-external-id/{source}/{external_id}" +--- + +Publish a prompt template by a customer-defined external ID. If the mapping already exists, PromptLayer creates a new version on the mapped prompt template. If the mapping does not exist, PromptLayer creates or updates the prompt template from the request body and attaches the mapping. + +This is the only external ID endpoint that uses `PUT`. See [External IDs](/reference/external-ids-overview) for mapping rules and conflict behavior. diff --git a/reference/external-ids-reports-attach.mdx b/reference/external-ids-reports-attach.mdx new file mode 100644 index 0000000..2cea6b0 --- /dev/null +++ b/reference/external-ids-reports-attach.mdx @@ -0,0 +1,8 @@ +--- +title: "Attach Report External ID" +openapi: "POST /reports/{report_id}/external-ids" +--- + +Attach a `{source, external_id}` mapping to an existing report or evaluation pipeline. + +Attaching the same mapping to the same report is idempotent. Reusing the mapping on another entity returns `409 Conflict`. See [External IDs](/reference/external-ids-overview). diff --git a/reference/external-ids-reports-delete.mdx b/reference/external-ids-reports-delete.mdx new file mode 100644 index 0000000..c2f6a2e --- /dev/null +++ b/reference/external-ids-reports-delete.mdx @@ -0,0 +1,6 @@ +--- +title: "Delete Report External ID" +openapi: "DELETE /reports/{report_id}/external-ids/{source}/{external_id}" +--- + +Detach an external ID mapping from a report or evaluation pipeline. diff --git a/reference/external-ids-reports-list.mdx b/reference/external-ids-reports-list.mdx new file mode 100644 index 0000000..c1bba23 --- /dev/null +++ b/reference/external-ids-reports-list.mdx @@ -0,0 +1,6 @@ +--- +title: "List Report External IDs" +openapi: "GET /reports/{report_id}/external-ids" +--- + +List all external ID mappings attached to a report or evaluation pipeline. diff --git a/reference/external-ids-skill-collections-attach.mdx b/reference/external-ids-skill-collections-attach.mdx new file mode 100644 index 0000000..bed8691 --- /dev/null +++ b/reference/external-ids-skill-collections-attach.mdx @@ -0,0 +1,8 @@ +--- +title: "Attach Skill Collection External ID" +openapi: "POST /api/public/v2/skill-collections/{skill_collection_id}/external-ids" +--- + +Attach a `{source, external_id}` mapping to an existing skill collection. + +Attaching the same mapping to the same skill collection is idempotent. Reusing the mapping on another entity returns `409 Conflict`. See [External IDs](/reference/external-ids-overview). diff --git a/reference/external-ids-skill-collections-delete.mdx b/reference/external-ids-skill-collections-delete.mdx new file mode 100644 index 0000000..3e1cdf6 --- /dev/null +++ b/reference/external-ids-skill-collections-delete.mdx @@ -0,0 +1,6 @@ +--- +title: "Delete Skill Collection External ID" +openapi: "DELETE /api/public/v2/skill-collections/{skill_collection_id}/external-ids/{source}/{external_id}" +--- + +Detach an external ID mapping from a skill collection. diff --git a/reference/external-ids-skill-collections-list.mdx b/reference/external-ids-skill-collections-list.mdx new file mode 100644 index 0000000..19ef98b --- /dev/null +++ b/reference/external-ids-skill-collections-list.mdx @@ -0,0 +1,6 @@ +--- +title: "List Skill Collection External IDs" +openapi: "GET /api/public/v2/skill-collections/{skill_collection_id}/external-ids" +--- + +List all external ID mappings attached to a skill collection. diff --git a/reference/external-ids-tool-registry-attach.mdx b/reference/external-ids-tool-registry-attach.mdx new file mode 100644 index 0000000..c6600c2 --- /dev/null +++ b/reference/external-ids-tool-registry-attach.mdx @@ -0,0 +1,8 @@ +--- +title: "Attach Tool Registry External ID" +openapi: "POST /api/public/v2/tool-registry/{tool_id}/external-ids" +--- + +Attach a `{source, external_id}` mapping to an existing tool registry entry. + +Attaching the same mapping to the same tool is idempotent. Reusing the mapping on another entity returns `409 Conflict`. See [External IDs](/reference/external-ids-overview). diff --git a/reference/external-ids-tool-registry-delete.mdx b/reference/external-ids-tool-registry-delete.mdx new file mode 100644 index 0000000..e713b49 --- /dev/null +++ b/reference/external-ids-tool-registry-delete.mdx @@ -0,0 +1,6 @@ +--- +title: "Delete Tool Registry External ID" +openapi: "DELETE /api/public/v2/tool-registry/{tool_id}/external-ids/{source}/{external_id}" +--- + +Detach an external ID mapping from a tool registry entry. diff --git a/reference/external-ids-tool-registry-list.mdx b/reference/external-ids-tool-registry-list.mdx new file mode 100644 index 0000000..4d0254a --- /dev/null +++ b/reference/external-ids-tool-registry-list.mdx @@ -0,0 +1,6 @@ +--- +title: "List Tool Registry External IDs" +openapi: "GET /api/public/v2/tool-registry/{tool_id}/external-ids" +--- + +List all external ID mappings attached to a tool registry entry. diff --git a/reference/external-ids-workflows-attach.mdx b/reference/external-ids-workflows-attach.mdx new file mode 100644 index 0000000..7eafec8 --- /dev/null +++ b/reference/external-ids-workflows-attach.mdx @@ -0,0 +1,8 @@ +--- +title: "Attach Workflow External ID" +openapi: "POST /workflows/{workflow_id}/external-ids" +--- + +Attach a `{source, external_id}` mapping to an existing workflow. + +Attaching the same mapping to the same workflow is idempotent. Reusing the mapping on another entity returns `409 Conflict`. See [External IDs](/reference/external-ids-overview). diff --git a/reference/external-ids-workflows-delete.mdx b/reference/external-ids-workflows-delete.mdx new file mode 100644 index 0000000..b2cb2b0 --- /dev/null +++ b/reference/external-ids-workflows-delete.mdx @@ -0,0 +1,6 @@ +--- +title: "Delete Workflow External ID" +openapi: "DELETE /workflows/{workflow_id}/external-ids/{source}/{external_id}" +--- + +Detach an external ID mapping from a workflow. diff --git a/reference/external-ids-workflows-list.mdx b/reference/external-ids-workflows-list.mdx new file mode 100644 index 0000000..591ae99 --- /dev/null +++ b/reference/external-ids-workflows-list.mdx @@ -0,0 +1,6 @@ +--- +title: "List Workflow External IDs" +openapi: "GET /workflows/{workflow_id}/external-ids" +--- + +List all external ID mappings attached to a workflow. diff --git a/reference/list-prompt-templates.mdx b/reference/list-prompt-templates.mdx index 4918b08..00adadd 100644 --- a/reference/list-prompt-templates.mdx +++ b/reference/list-prompt-templates.mdx @@ -17,6 +17,9 @@ Each returned prompt template includes the latest version by default. When filte - **label**: Filter prompt templates by release label (e.g., `prod`, `dev`, `staging`). Returns the version associated with that label for each matching template. - **name**: Filter prompt templates by name (case-insensitive partial match) - **tags**: Filter prompt templates by one or more tags. Can be provided as a single string or a list of strings. Only templates whose tags contain all specified values are returned. +- **external_source** and **external_id**: Filter to the prompt template mapped to a specific external ID. These parameters must be provided together. If no mapping exists in the workspace, the endpoint returns an empty page. + +Each returned prompt template includes an `external_ids` array with the mappings attached to that prompt template. See [External IDs](/reference/external-ids-overview). ### Filtering by Status diff --git a/reference/templates-publish.mdx b/reference/templates-publish.mdx index 5d7a430..32fd8ed 100644 --- a/reference/templates-publish.mdx +++ b/reference/templates-publish.mdx @@ -4,48 +4,3 @@ openapi: "POST /rest/prompt-templates" --- Publish Prompt Template allows you to programmatically create a new version of a prompt template and make it available for use in the application. - -## Request Body - -The request body has two top-level objects: `prompt_template` (template metadata) and `prompt_version` (the version content). - -### `prompt_template` - -| Field | Type | Required | Description | -|---|---|---|---| -| `prompt_name` | `string` | Yes | The unique prompt name within the workspace. 1–512 characters. | -| `tags` | `string[]` | No | Tags to attach to the prompt registry entry. | -| `folder_id` | `integer` | No | The ID of the folder to publish the prompt template into. If omitted, the prompt is created at the workspace root. Use [Resolve Folder ID by Path](/reference/resolve-folder-id) to look up an ID from a path, or [Create Folder](/reference/create-folder) to make one. | -| `workspace_id` | `integer` | No | Optional workspace override; defaults to the workspace associated with the API key. | - -### `prompt_version` - -The version body (`prompt_template`, `commit_message`, `metadata`, `provider_id`, etc.) is documented in the schema below. - -## Example: publish into a folder - -```python -import requests - -response = requests.post( - "https://api.promptlayer.com/rest/prompt-templates", - headers={"X-API-KEY": "your-api-key"}, - json={ - "prompt_template": { - "prompt_name": "summarizer", - "tags": ["production", "summarization"], - "folder_id": 42, - }, - "prompt_version": { - "prompt_template": { - "type": "chat", - "messages": [ - {"role": "system", "content": [{"type": "text", "text": "You are a summarizer."}]}, - {"role": "user", "content": [{"type": "text", "text": "{input}"}]}, - ], - }, - "commit_message": "Initial release", - }, - }, -) -```