|
248 | 248 | "content": { |
249 | 249 | "application/json": { |
250 | 250 | "schema": { |
251 | | - "$ref": "#/components/schemas/V2FileResponse" |
| 251 | + "$ref": "#/components/schemas/V2CreatedFileResponse" |
252 | 252 | } |
253 | 253 | } |
254 | 254 | } |
|
4044 | 4044 | } |
4045 | 4045 | ] |
4046 | 4046 | }, |
4047 | | - "V2FileResponse": { |
| 4047 | + "V2CreatedFile": { |
| 4048 | + "type": "object", |
| 4049 | + "properties": { |
| 4050 | + "id": { |
| 4051 | + "type": "string", |
| 4052 | + "description": "Unique file identifier.", |
| 4053 | + "examples": ["wf_V1StGXR8z5jdHi6BmyT91"] |
| 4054 | + }, |
| 4055 | + "webUrl": { |
| 4056 | + "type": "string", |
| 4057 | + "format": "uri", |
| 4058 | + "description": "Canonical absolute URL for opening this resource in the Sim web application." |
| 4059 | + }, |
| 4060 | + "name": { |
| 4061 | + "type": "string", |
| 4062 | + "description": "Original file name.", |
| 4063 | + "examples": ["data.csv"] |
| 4064 | + }, |
| 4065 | + "size": { |
| 4066 | + "type": "number", |
| 4067 | + "minimum": 0, |
| 4068 | + "description": "Size in bytes of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source, not the rendered document, so it does not predict how many bytes downloading the file returns.", |
| 4069 | + "examples": [1024] |
| 4070 | + }, |
| 4071 | + "type": { |
| 4072 | + "type": "string", |
| 4073 | + "description": "MIME type of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source type, not the rendered document type a download serves.", |
| 4074 | + "examples": ["text/csv"] |
| 4075 | + }, |
| 4076 | + "key": { |
| 4077 | + "type": "string", |
| 4078 | + "description": "Storage key for the file.", |
| 4079 | + "examples": ["workspace/example/data.csv"] |
| 4080 | + }, |
| 4081 | + "folderPath": { |
| 4082 | + "type": "string", |
| 4083 | + "title": "Folder path", |
| 4084 | + "description": "Canonical containing-folder path. `/` is the workspace root.", |
| 4085 | + "maxLength": 4096 |
| 4086 | + }, |
| 4087 | + "uploadedByEmail": { |
| 4088 | + "type": "string", |
| 4089 | + "format": "email", |
| 4090 | + "pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", |
| 4091 | + "description": "Current email address of the uploader.", |
| 4092 | + "examples": ["jane@example.com"] |
| 4093 | + }, |
| 4094 | + "uploadedAt": { |
| 4095 | + "type": "string", |
| 4096 | + "description": "ISO 8601 timestamp when the file was uploaded.", |
| 4097 | + "format": "date-time", |
| 4098 | + "examples": ["2026-01-15T10:30:00Z"] |
| 4099 | + }, |
| 4100 | + "updatedAt": { |
| 4101 | + "type": "string", |
| 4102 | + "description": "ISO 8601 timestamp of the last content or metadata write.", |
| 4103 | + "format": "date-time", |
| 4104 | + "examples": ["2026-01-15T10:30:00Z"] |
| 4105 | + }, |
| 4106 | + "deletedAt": { |
| 4107 | + "anyOf": [ |
| 4108 | + { |
| 4109 | + "type": "string" |
| 4110 | + }, |
| 4111 | + { |
| 4112 | + "type": "null" |
| 4113 | + } |
| 4114 | + ], |
| 4115 | + "description": "ISO 8601 timestamp when the file was archived by deleting it, or null while the file is active. Only an archived-scope file list returns files with a non-null value.", |
| 4116 | + "format": "date-time", |
| 4117 | + "examples": ["2026-01-16T09:00:00Z"] |
| 4118 | + }, |
| 4119 | + "diagnostics": { |
| 4120 | + "description": "For a dashboard file, the YAML parse errors in the written content. Empty when it parses; the file is saved either way. Absent for other file types.", |
| 4121 | + "type": "array", |
| 4122 | + "items": { |
| 4123 | + "type": "string" |
| 4124 | + } |
| 4125 | + } |
| 4126 | + }, |
| 4127 | + "required": [ |
| 4128 | + "id", |
| 4129 | + "webUrl", |
| 4130 | + "name", |
| 4131 | + "size", |
| 4132 | + "type", |
| 4133 | + "key", |
| 4134 | + "folderPath", |
| 4135 | + "uploadedByEmail", |
| 4136 | + "uploadedAt", |
| 4137 | + "updatedAt", |
| 4138 | + "deletedAt" |
| 4139 | + ], |
| 4140 | + "additionalProperties": false, |
| 4141 | + "title": "Created file", |
| 4142 | + "description": "A newly created workspace file, with any dashboard parse errors." |
| 4143 | + }, |
| 4144 | + "V2CreatedFileResponse": { |
4048 | 4145 | "type": "object", |
4049 | 4146 | "properties": { |
4050 | 4147 | "data": { |
4051 | 4148 | "description": "Response data.", |
4052 | | - "$ref": "#/components/schemas/V2File" |
| 4149 | + "$ref": "#/components/schemas/V2CreatedFile" |
4053 | 4150 | } |
4054 | 4151 | }, |
4055 | 4152 | "required": ["data"], |
4056 | 4153 | "additionalProperties": false, |
4057 | | - "title": "File response", |
4058 | | - "description": "A single workspace file.", |
| 4154 | + "title": "Created file response", |
| 4155 | + "description": "A newly created workspace file, with any dashboard parse errors.", |
4059 | 4156 | "examples": [ |
4060 | 4157 | { |
4061 | 4158 | "data": { |
|
5115 | 5212 | "title": "Delete file response", |
5116 | 5213 | "description": "Deletion confirmation for one file." |
5117 | 5214 | }, |
| 5215 | + "V2FileResponse": { |
| 5216 | + "type": "object", |
| 5217 | + "properties": { |
| 5218 | + "data": { |
| 5219 | + "description": "Response data.", |
| 5220 | + "$ref": "#/components/schemas/V2File" |
| 5221 | + } |
| 5222 | + }, |
| 5223 | + "required": ["data"], |
| 5224 | + "additionalProperties": false, |
| 5225 | + "title": "File response", |
| 5226 | + "description": "A single workspace file.", |
| 5227 | + "examples": [ |
| 5228 | + { |
| 5229 | + "data": { |
| 5230 | + "id": "wf_V1StGXR8z5jdHi6BmyT91", |
| 5231 | + "webUrl": "https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91", |
| 5232 | + "name": "data.csv", |
| 5233 | + "size": 1024, |
| 5234 | + "type": "text/csv", |
| 5235 | + "key": "workspace/example/data.csv", |
| 5236 | + "folderPath": "/Engineering", |
| 5237 | + "uploadedByEmail": "jane@example.com", |
| 5238 | + "uploadedAt": "2026-01-15T10:30:00Z", |
| 5239 | + "updatedAt": "2026-01-15T10:30:00Z", |
| 5240 | + "deletedAt": null |
| 5241 | + } |
| 5242 | + } |
| 5243 | + ] |
| 5244 | + }, |
5118 | 5245 | "RenameFileRequest": { |
5119 | 5246 | "type": "object", |
5120 | 5247 | "properties": { |
|
5832 | 5959 | "revision": { |
5833 | 5960 | "description": "Opaque token for the content this write produced. Send it back as `expectedRevision` on the next write. Absent for a file with no recorded content version.", |
5834 | 5961 | "type": "string" |
| 5962 | + }, |
| 5963 | + "diagnostics": { |
| 5964 | + "description": "For a dashboard file, the YAML parse errors in the written content. Empty when it parses; the file is saved either way. Absent for other file types.", |
| 5965 | + "type": "array", |
| 5966 | + "items": { |
| 5967 | + "type": "string" |
| 5968 | + } |
5835 | 5969 | } |
5836 | 5970 | }, |
5837 | 5971 | "required": ["file", "lineCount"], |
|
6234 | 6368 | "revision": { |
6235 | 6369 | "description": "Opaque token for the content this write produced. Send it back as `expectedRevision` on the next write. Absent for a file with no recorded content version.", |
6236 | 6370 | "type": "string" |
| 6371 | + }, |
| 6372 | + "diagnostics": { |
| 6373 | + "description": "For a dashboard file, the YAML parse errors in the written content. Empty when it parses; the file is saved either way. Absent for other file types.", |
| 6374 | + "type": "array", |
| 6375 | + "items": { |
| 6376 | + "type": "string" |
| 6377 | + } |
6237 | 6378 | } |
6238 | 6379 | }, |
6239 | 6380 | "required": [ |
|
0 commit comments