|
83 | 83 | }, |
84 | 84 | { |
85 | 85 | "properties": { |
86 | | - "payload": { |
87 | | - "$ref": "#/components/schemas/PayloadOrPointerResponse" |
| 86 | + "payloads": { |
| 87 | + "items": { |
| 88 | + "$ref": "#/components/schemas/GetPayload" |
| 89 | + }, |
| 90 | + "type": "array" |
88 | 91 | } |
89 | 92 | }, |
90 | 93 | "required": [ |
91 | | - "payload" |
| 94 | + "payloads" |
92 | 95 | ], |
93 | 96 | "type": "object" |
94 | 97 | } |
|
105 | 108 | ], |
106 | 109 | "type": "object" |
107 | 110 | }, |
| 111 | + "GetPayload": { |
| 112 | + "properties": { |
| 113 | + "data": { |
| 114 | + "$ref": "#/components/schemas/PayloadOrPointerResponse" |
| 115 | + }, |
| 116 | + "id": { |
| 117 | + "$ref": "#/components/schemas/PayloadId" |
| 118 | + }, |
| 119 | + "mime_type": { |
| 120 | + "type": "string" |
| 121 | + }, |
| 122 | + "name": { |
| 123 | + "type": "string" |
| 124 | + }, |
| 125 | + "size": { |
| 126 | + "minimum": 0, |
| 127 | + "type": "integer" |
| 128 | + } |
| 129 | + }, |
| 130 | + "required": [ |
| 131 | + "id", |
| 132 | + "name", |
| 133 | + "mime_type", |
| 134 | + "size", |
| 135 | + "data" |
| 136 | + ], |
| 137 | + "type": "object" |
| 138 | + }, |
| 139 | + "GroupId": { |
| 140 | + "description": "Unique identifier for a group\n\nGroup IDs are user-provided strings. By default, a UUID v7 string is generated,\nbut any string value is accepted.", |
| 141 | + "example": "018e9a3a2c1b7e3f8d2a4b5c6d7e8f9b", |
| 142 | + "type": "string" |
| 143 | + }, |
108 | 144 | "ListExecutionsResponse": { |
109 | 145 | "description": "Response for listing executions", |
110 | 146 | "properties": { |
|
170 | 206 | "$ref": "#/components/schemas/ExecutionId", |
171 | 207 | "description": "ID of the execution this observation belongs to" |
172 | 208 | }, |
173 | | - "id": { |
174 | | - "$ref": "#/components/schemas/ObservationId", |
175 | | - "description": "Unique identifier for this observation" |
176 | | - }, |
177 | | - "labels": { |
178 | | - "description": "Hierarchical labels for grouping observations\nUses path convention (e.g., \"api/request/headers\")", |
| 209 | + "group_ids": { |
| 210 | + "description": "IDs of groups this observation belongs to", |
179 | 211 | "items": { |
180 | | - "type": "string" |
| 212 | + "$ref": "#/components/schemas/GroupId" |
181 | 213 | }, |
182 | 214 | "type": "array" |
183 | 215 | }, |
| 216 | + "id": { |
| 217 | + "$ref": "#/components/schemas/ObservationId", |
| 218 | + "description": "Unique identifier for this observation" |
| 219 | + }, |
184 | 220 | "log_level": { |
185 | 221 | "$ref": "#/components/schemas/LogLevel", |
186 | 222 | "description": "Log level for this observation" |
|
195 | 231 | }, |
196 | 232 | "type": "object" |
197 | 233 | }, |
198 | | - "mime_type": { |
199 | | - "description": "MIME type of the payload (e.g., \"text/plain\", \"application/json\")", |
200 | | - "type": "string" |
201 | | - }, |
202 | 234 | "name": { |
203 | 235 | "description": "User-defined name for this observation", |
204 | 236 | "type": "string" |
|
207 | 239 | "$ref": "#/components/schemas/ObservationType", |
208 | 240 | "description": "Type of observation" |
209 | 241 | }, |
| 242 | + "parent_group_id": { |
| 243 | + "$ref": "#/components/schemas/GroupId", |
| 244 | + "description": "Parent group ID (used when observation_type == Group)", |
| 245 | + "nullable": true |
| 246 | + }, |
210 | 247 | "parent_span_id": { |
211 | 248 | "description": "Parent span ID (for tracing integration)", |
212 | 249 | "nullable": true, |
213 | 250 | "type": "string" |
214 | 251 | }, |
215 | | - "payload_size": { |
216 | | - "description": "Size of the payload in bytes", |
217 | | - "minimum": 0, |
218 | | - "type": "integer" |
219 | | - }, |
220 | 252 | "source": { |
221 | 253 | "$ref": "#/components/schemas/SourceInfo", |
222 | 254 | "description": "Source location where this observation was created", |
|
229 | 261 | "name", |
230 | 262 | "observation_type", |
231 | 263 | "log_level", |
232 | | - "created_at", |
233 | | - "mime_type", |
234 | | - "payload_size" |
| 264 | + "created_at" |
235 | 265 | ], |
236 | 266 | "type": "object" |
237 | 267 | }, |
|
245 | 275 | "enum": [ |
246 | 276 | "LogEntry", |
247 | 277 | "Payload", |
248 | | - "Span" |
| 278 | + "Span", |
| 279 | + "Group" |
249 | 280 | ], |
250 | 281 | "type": "string" |
251 | 282 | }, |
| 283 | + "PayloadId": { |
| 284 | + "description": "Unique identifier for a payload (UUIDv7)", |
| 285 | + "example": "018e9a3a2c1b7e3f8d2a4b5c6d7e8f9c", |
| 286 | + "type": "string" |
| 287 | + }, |
252 | 288 | "PayloadOrPointerResponse": { |
253 | 289 | "oneOf": [ |
254 | 290 | { |
|
556 | 592 | }, |
557 | 593 | "/api/exe/{execution_id}/obs/{observation_id}/content": { |
558 | 594 | "get": { |
559 | | - "operationId": "get_observation_blob", |
| 595 | + "operationId": "get_observation_blob_legacy", |
560 | 596 | "parameters": [ |
561 | 597 | { |
562 | 598 | "description": "Execution ID", |
|
600 | 636 | "description": "Observation blob not found" |
601 | 637 | } |
602 | 638 | }, |
603 | | - "summary": "Get observation blob content", |
| 639 | + "summary": "Get observation blob content (legacy route for backward compat)\nThis is kept to support old URLs like /api/exe/{exec_id}/obs/{obs_id}/content", |
| 640 | + "tags": [ |
| 641 | + "observations" |
| 642 | + ] |
| 643 | + } |
| 644 | + }, |
| 645 | + "/api/exe/{execution_id}/obs/{observation_id}/payload/{payload_id}/content": { |
| 646 | + "get": { |
| 647 | + "operationId": "get_observation_blob", |
| 648 | + "parameters": [ |
| 649 | + { |
| 650 | + "description": "Execution ID", |
| 651 | + "in": "path", |
| 652 | + "name": "execution_id", |
| 653 | + "required": true, |
| 654 | + "schema": { |
| 655 | + "type": "string" |
| 656 | + } |
| 657 | + }, |
| 658 | + { |
| 659 | + "description": "Observation ID", |
| 660 | + "in": "path", |
| 661 | + "name": "observation_id", |
| 662 | + "required": true, |
| 663 | + "schema": { |
| 664 | + "type": "string" |
| 665 | + } |
| 666 | + }, |
| 667 | + { |
| 668 | + "description": "Payload ID", |
| 669 | + "in": "path", |
| 670 | + "name": "payload_id", |
| 671 | + "required": true, |
| 672 | + "schema": { |
| 673 | + "type": "string" |
| 674 | + } |
| 675 | + } |
| 676 | + ], |
| 677 | + "responses": { |
| 678 | + "200": { |
| 679 | + "content": { |
| 680 | + "application/octet-stream": { |
| 681 | + "schema": { |
| 682 | + "items": { |
| 683 | + "format": "int32", |
| 684 | + "minimum": 0, |
| 685 | + "type": "integer" |
| 686 | + }, |
| 687 | + "type": "array" |
| 688 | + } |
| 689 | + } |
| 690 | + }, |
| 691 | + "description": "Payload content" |
| 692 | + }, |
| 693 | + "400": { |
| 694 | + "description": "Bad request" |
| 695 | + }, |
| 696 | + "404": { |
| 697 | + "description": "Payload not found" |
| 698 | + } |
| 699 | + }, |
| 700 | + "summary": "Get observation payload content", |
604 | 701 | "tags": [ |
605 | 702 | "observations" |
606 | 703 | ] |
|
0 commit comments