@epilot/sdk 2.19.3 → 2.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/access-token-runtime.json +1 -0
- package/definitions/access-token.json +835 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +2863 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +5743 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +5557 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +2386 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +7718 -0
- package/definitions/calendar-runtime.json +1 -0
- package/definitions/calendar.json +2904 -0
- package/definitions/configuration-hub-runtime.json +1 -0
- package/definitions/configuration-hub.json +2250 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +19919 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +1355 -0
- package/definitions/data-governance-runtime.json +1 -0
- package/definitions/data-governance.json +1126 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +782 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1827 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +758 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +3736 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1441 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1642 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +11517 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +539 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +1524 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +3905 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/integration-toolkit-runtime.json +1 -0
- package/definitions/integration-toolkit.json +12769 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +2640 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +1506 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +3667 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +3132 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1698 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1439 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +1192 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +2284 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1598 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +11569 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/query-runtime.json +1 -0
- package/definitions/query.json +3178 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/sharing-runtime.json +1 -0
- package/definitions/sharing.json +956 -0
- package/definitions/snapshot-runtime.json +1 -0
- package/definitions/snapshot.json +1103 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +2222 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1416 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +3051 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +2365 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1875 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3592 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4669 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-QWWGJOYR.cjs → chunk-AD5FK5LK.cjs} +1 -1
- package/dist/{chunk-UC3IKFHD.js → chunk-PHOP6DMJ.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/targeting-5U4XGOXY.cjs +7 -0
- package/dist/targeting-R3G32HI4.js +7 -0
- package/dist/{targeting.d-16SvPyj4.d.cts → targeting.d-KcawmWBB.d.cts} +8 -0
- package/dist/{targeting.d-16SvPyj4.d.ts → targeting.d-KcawmWBB.d.ts} +8 -0
- package/docs/targeting.md +9 -1
- package/package.json +1 -1
- package/dist/targeting-BTVCLYFW.cjs +0 -7
- package/dist/targeting-NWYDE3E7.js +0 -7
|
@@ -0,0 +1,3905 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "File API",
|
|
5
|
+
"version": "1.13.0",
|
|
6
|
+
"description": "The File API enables you to upload, store, manage, and share files within the epilot platform.\n\n## Key Features\n- **Upload files** to temporary storage and save them permanently as File entities\n- **Generate previews** (thumbnails) for images and documents\n- **Create public links** to share private files externally\n- **Organize files** into collections for better management\n- **Version control** with automatic file versioning on updates\n\n## File Upload Workflow\n1. Call `uploadFileV2` to get a pre-signed S3 URL\n2. Upload your file directly to S3 using the pre-signed URL (PUT request)\n3. Call `saveFileV2` with the S3 reference to create a permanent File entity\n\n## Changelog\n<a href=\"changelog\">View API Changelog</a>\n"
|
|
7
|
+
},
|
|
8
|
+
"tags": [
|
|
9
|
+
{
|
|
10
|
+
"name": "File",
|
|
11
|
+
"description": "Core file operations for uploading, saving, retrieving, and deleting files.\n\nFiles are stored as epilot entities with the `file` schema and support:\n- Multiple versions (each save creates a new version)\n- Custom metadata and tags\n- Relations to other entities (contacts, orders, etc.)\n- Access control (private or public-read)\n"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Preview",
|
|
15
|
+
"description": "Generate thumbnail previews for files. Supports images, PDFs, and common document formats.\n\nPreview images are generated on-demand and cached for performance.\nYou can specify custom dimensions using the `w` (width) and `h` (height) parameters.\n"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Public Links",
|
|
19
|
+
"description": "Create shareable public links for private files.\n\nPublic links allow external users to access files without authentication.\nLinks are permanent until revoked and include the filename for user-friendly URLs.\n"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Session",
|
|
23
|
+
"description": "Browser session management for cookie-based authentication.\n\nUse `getSession` to convert a Bearer token into a session cookie. This enables:\n- Direct use of preview URLs in `<img>` tags\n- File downloads without manual token handling\n\n**Typical flow:**\n1. Authenticate and obtain a Bearer token\n2. Call `GET /v1/files/session` with the Bearer token\n3. Subsequent requests use the session cookie automatically\n"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "Deprecated",
|
|
27
|
+
"description": "Legacy API endpoints scheduled for removal.\n\n**Important:** These endpoints will be removed on **2025-06-30**.\nPlease migrate to the v2 equivalents before this date.\n\n| Deprecated Endpoint | Replacement |\n|---------------------|-------------|\n| `POST /v1/files/upload` | `POST /v2/files/upload` |\n| `POST /v1/files` | `POST /v2/files` |\n"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "file_schema",
|
|
31
|
+
"x-displayName": "File",
|
|
32
|
+
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/FileEntity\" />\n"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "File Collections",
|
|
36
|
+
"description": "Organize files into collections (folders) for better management.\n\nCollections can be:\n- **User-scoped**: Personal collections visible only to the creating user\n- **Global**: Shared collections available to all users for a schema\n\nCollections support hierarchical organization with parent-child relationships.\n"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"x-tagGroups": [
|
|
40
|
+
{
|
|
41
|
+
"name": "APIs",
|
|
42
|
+
"tags": [
|
|
43
|
+
"File",
|
|
44
|
+
"Preview",
|
|
45
|
+
"Public Links",
|
|
46
|
+
"Session",
|
|
47
|
+
"File Collections",
|
|
48
|
+
"Deprecated"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "Schemas",
|
|
53
|
+
"tags": [
|
|
54
|
+
"file_schema"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"security": [
|
|
59
|
+
{
|
|
60
|
+
"EpilotAuth": []
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"CookieAuth": []
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"paths": {
|
|
67
|
+
"/v2/files/upload": {
|
|
68
|
+
"post": {
|
|
69
|
+
"operationId": "uploadFileV2",
|
|
70
|
+
"summary": "uploadFileV2",
|
|
71
|
+
"description": "Create pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFileV2 operation to store file file permanently.\n",
|
|
72
|
+
"tags": [
|
|
73
|
+
"File"
|
|
74
|
+
],
|
|
75
|
+
"parameters": [
|
|
76
|
+
{
|
|
77
|
+
"name": "file_entity_id",
|
|
78
|
+
"in": "query",
|
|
79
|
+
"description": "Use this parameter when uploading a file directly to an existing file entity.\n\nNote: still requires calling saveFileV2 to save the file permanently.\n",
|
|
80
|
+
"schema": {
|
|
81
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"requestBody": {
|
|
86
|
+
"content": {
|
|
87
|
+
"application/json": {
|
|
88
|
+
"schema": {
|
|
89
|
+
"$ref": "#/components/schemas/UploadFilePayload"
|
|
90
|
+
},
|
|
91
|
+
"examples": {
|
|
92
|
+
"Upload an image file": {
|
|
93
|
+
"description": "Upload an image file",
|
|
94
|
+
"value": {
|
|
95
|
+
"filename": "image.png",
|
|
96
|
+
"mime_type": "image/png"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"Upload a document": {
|
|
100
|
+
"description": "Upload an image file",
|
|
101
|
+
"value": {
|
|
102
|
+
"filename": "document.pdf",
|
|
103
|
+
"mime_type": "application/pdf"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"responses": {
|
|
111
|
+
"201": {
|
|
112
|
+
"description": "Pre-signed URL for POST / PUT upload",
|
|
113
|
+
"content": {
|
|
114
|
+
"application/json": {
|
|
115
|
+
"schema": {
|
|
116
|
+
"$ref": "#/components/schemas/FileUpload"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"400": {
|
|
122
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
123
|
+
},
|
|
124
|
+
"401": {
|
|
125
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
126
|
+
},
|
|
127
|
+
"500": {
|
|
128
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"/v2/files": {
|
|
134
|
+
"post": {
|
|
135
|
+
"operationId": "saveFileV2",
|
|
136
|
+
"summary": "saveFileV2",
|
|
137
|
+
"description": "Saves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\nSaves metadata to file entity and stores a version when `s3ref` or `source_url` is passed.\n",
|
|
138
|
+
"tags": [
|
|
139
|
+
"File"
|
|
140
|
+
],
|
|
141
|
+
"parameters": [
|
|
142
|
+
{
|
|
143
|
+
"$ref": "#/components/parameters/ActivityIdQueryParam"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"$ref": "#/components/parameters/FillActivityQueryParam"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"$ref": "#/components/parameters/StrictQueryParam"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"$ref": "#/components/parameters/AsyncOperationQueryParam"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"$ref": "#/components/parameters/DeleteTempFileQueryParam"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"$ref": "#/components/parameters/VersionOnlyQueryParam"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"requestBody": {
|
|
162
|
+
"content": {
|
|
163
|
+
"application/json": {
|
|
164
|
+
"schema": {
|
|
165
|
+
"oneOf": [
|
|
166
|
+
{
|
|
167
|
+
"$ref": "#/components/schemas/SaveFilePayloadV2"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"type": "array",
|
|
171
|
+
"description": "Batch version mode: array of s3ref payloads to add multiple versions to a single file entity.\nAll payloads must target the same file entity (_id or file_entity_id).\nRequires version_only=true query parameter.\nS3 operations run in parallel, with a single entity update at the end.\n",
|
|
172
|
+
"items": {
|
|
173
|
+
"$ref": "#/components/schemas/BatchSaveFileVersionPayload"
|
|
174
|
+
},
|
|
175
|
+
"minItems": 1,
|
|
176
|
+
"maxItems": 20
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"examples": {
|
|
181
|
+
"New file from s3ref": {
|
|
182
|
+
"description": "Standard epilot file entity with S3 Ref",
|
|
183
|
+
"value": {
|
|
184
|
+
"type": "document",
|
|
185
|
+
"filename": "document.pdf",
|
|
186
|
+
"_tags": [
|
|
187
|
+
"string"
|
|
188
|
+
],
|
|
189
|
+
"access_control": "private",
|
|
190
|
+
"s3ref": {
|
|
191
|
+
"bucket": "epilot-prod-user-content",
|
|
192
|
+
"key": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"Update existing file with relations": {
|
|
197
|
+
"description": "Update existing file entity with _id",
|
|
198
|
+
"value": {
|
|
199
|
+
"_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
200
|
+
"filename": "document.pdf",
|
|
201
|
+
"access_control": "private",
|
|
202
|
+
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
203
|
+
"shared_with_end_customer": true,
|
|
204
|
+
"relations": [
|
|
205
|
+
{
|
|
206
|
+
"entity_id": "77a1e0cc-7b92-4d41-8cce-eefd317ec004",
|
|
207
|
+
"_schema": "contact"
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"New file from source_url": {
|
|
213
|
+
"description": "New epilot file entity from a source_url",
|
|
214
|
+
"value": {
|
|
215
|
+
"type": "document",
|
|
216
|
+
"filename": "document.pdf",
|
|
217
|
+
"_tags": [
|
|
218
|
+
"string"
|
|
219
|
+
],
|
|
220
|
+
"access_control": "private",
|
|
221
|
+
"source_url": "https://docs.epilot.io/document.pdf"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"File with custom download URL (external)": {
|
|
225
|
+
"description": "Custom file entity with custom download url",
|
|
226
|
+
"value": {
|
|
227
|
+
"type": "document",
|
|
228
|
+
"filename": "document.pdf",
|
|
229
|
+
"_tags": [
|
|
230
|
+
"string"
|
|
231
|
+
],
|
|
232
|
+
"access_control": "private",
|
|
233
|
+
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
234
|
+
"shared_with_end_customer": true
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"Batch save multiple versions": {
|
|
238
|
+
"description": "Save multiple file versions in a single request (parallel S3 processing)",
|
|
239
|
+
"value": [
|
|
240
|
+
{
|
|
241
|
+
"_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
242
|
+
"filename": "photo1.jpg",
|
|
243
|
+
"access_control": "private",
|
|
244
|
+
"s3ref": {
|
|
245
|
+
"bucket": "epilot-prod-user-content",
|
|
246
|
+
"key": "123/temp/abc/photo1.jpg"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
251
|
+
"filename": "photo2.jpg",
|
|
252
|
+
"access_control": "private",
|
|
253
|
+
"s3ref": {
|
|
254
|
+
"bucket": "epilot-prod-user-content",
|
|
255
|
+
"key": "123/temp/def/photo2.jpg"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"responses": {
|
|
265
|
+
"200": {
|
|
266
|
+
"description": "Created or updated File Entity",
|
|
267
|
+
"content": {
|
|
268
|
+
"application/json": {
|
|
269
|
+
"schema": {
|
|
270
|
+
"$ref": "#/components/schemas/FileEntity"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"400": {
|
|
276
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
277
|
+
},
|
|
278
|
+
"401": {
|
|
279
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
280
|
+
},
|
|
281
|
+
"404": {
|
|
282
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
283
|
+
},
|
|
284
|
+
"500": {
|
|
285
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"/v1/files/upload": {
|
|
291
|
+
"post": {
|
|
292
|
+
"operationId": "uploadFile",
|
|
293
|
+
"summary": "uploadFile",
|
|
294
|
+
"deprecated": true,
|
|
295
|
+
"description": "**DEPRECATED** - Will be removed on **2025-06-30**. Use `POST /v2/files/upload` instead.\n\n## Migration Guide\nReplace calls to this endpoint with `uploadFileV2`:\n\n| v1 Parameter | v2 Parameter | Notes |\n|--------------|--------------|-------|\n| `file_entity_id` | `file_entity_id` | No change |\n\nThe v2 response includes the same fields with improved structure.\n\n---\n\nCreate pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFile operation to store file file permanently.\n",
|
|
296
|
+
"tags": [
|
|
297
|
+
"Deprecated"
|
|
298
|
+
],
|
|
299
|
+
"parameters": [
|
|
300
|
+
{
|
|
301
|
+
"name": "file_entity_id",
|
|
302
|
+
"in": "query",
|
|
303
|
+
"description": "file entity id",
|
|
304
|
+
"schema": {
|
|
305
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"requestBody": {
|
|
310
|
+
"content": {
|
|
311
|
+
"application/json": {
|
|
312
|
+
"schema": {
|
|
313
|
+
"$ref": "#/components/schemas/UploadFilePayload"
|
|
314
|
+
},
|
|
315
|
+
"examples": {
|
|
316
|
+
"Upload a document": {
|
|
317
|
+
"value": {
|
|
318
|
+
"filename": "document.pdf",
|
|
319
|
+
"mime_type": "application/pdf"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"responses": {
|
|
327
|
+
"201": {
|
|
328
|
+
"description": "Pre-signed URL for POST / PUT upload",
|
|
329
|
+
"content": {
|
|
330
|
+
"application/json": {
|
|
331
|
+
"schema": {
|
|
332
|
+
"type": "object",
|
|
333
|
+
"properties": {
|
|
334
|
+
"s3ref": {
|
|
335
|
+
"allOf": [
|
|
336
|
+
{
|
|
337
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"example": {
|
|
341
|
+
"bucket": "epilot-prod-user-content",
|
|
342
|
+
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"upload_url": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"format": "url",
|
|
350
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
351
|
+
},
|
|
352
|
+
"public_url": {
|
|
353
|
+
"description": "Returned only if file is permanent i.e. file_entity_id is passed",
|
|
354
|
+
"type": "string",
|
|
355
|
+
"format": "url",
|
|
356
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"400": {
|
|
364
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
365
|
+
},
|
|
366
|
+
"401": {
|
|
367
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
368
|
+
},
|
|
369
|
+
"500": {
|
|
370
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"/v1/files": {
|
|
376
|
+
"post": {
|
|
377
|
+
"operationId": "saveFile",
|
|
378
|
+
"summary": "saveFile",
|
|
379
|
+
"deprecated": true,
|
|
380
|
+
"description": "**DEPRECATED** - Will be removed on **2025-06-30**. Use `POST /v2/files` instead.\n\n## Migration Guide\nReplace calls to this endpoint with `saveFileV2`:\n\n| v1 Feature | v2 Feature | Notes |\n|------------|------------|-------|\n| `activity_id` param | `activity_id` param | No change |\n| `async` param | `async` param | No change |\n| - | `fill_activity` param | New in v2 |\n| - | `strict` param | New in v2 |\n| - | `delete_temp_file` param | New in v2, defaults to true |\n\nThe v2 endpoint supports additional parameters for better control over file saving behavior.\n\n---\n\nCreate / Update a permanent File entity.\n\nMakes file object permanent and saves metadata to file entity.\n",
|
|
381
|
+
"tags": [
|
|
382
|
+
"Deprecated"
|
|
383
|
+
],
|
|
384
|
+
"parameters": [
|
|
385
|
+
{
|
|
386
|
+
"$ref": "#/components/parameters/ActivityIdQueryParam"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"$ref": "#/components/parameters/AsyncOperationQueryParam"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"$ref": "#/components/parameters/VersionOnlyQueryParam"
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"requestBody": {
|
|
396
|
+
"content": {
|
|
397
|
+
"application/json": {
|
|
398
|
+
"schema": {
|
|
399
|
+
"$ref": "#/components/schemas/SaveFilePayload"
|
|
400
|
+
},
|
|
401
|
+
"examples": {
|
|
402
|
+
"Save file with S3 reference": {
|
|
403
|
+
"value": {
|
|
404
|
+
"filename": "document.pdf",
|
|
405
|
+
"type": "document",
|
|
406
|
+
"access_control": "private",
|
|
407
|
+
"s3ref": {
|
|
408
|
+
"bucket": "epilot-prod-user-content",
|
|
409
|
+
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"responses": {
|
|
418
|
+
"201": {
|
|
419
|
+
"description": "Created File Entity",
|
|
420
|
+
"content": {
|
|
421
|
+
"application/json": {
|
|
422
|
+
"schema": {
|
|
423
|
+
"$ref": "#/components/schemas/FileEntity"
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"400": {
|
|
429
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
430
|
+
},
|
|
431
|
+
"401": {
|
|
432
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
433
|
+
},
|
|
434
|
+
"500": {
|
|
435
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"/v2/files/{id}": {
|
|
441
|
+
"get": {
|
|
442
|
+
"operationId": "getFile",
|
|
443
|
+
"summary": "getFile",
|
|
444
|
+
"description": "Get a file entity by id",
|
|
445
|
+
"tags": [
|
|
446
|
+
"File"
|
|
447
|
+
],
|
|
448
|
+
"parameters": [
|
|
449
|
+
{
|
|
450
|
+
"name": "id",
|
|
451
|
+
"in": "path",
|
|
452
|
+
"required": true,
|
|
453
|
+
"schema": {
|
|
454
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"name": "source_url",
|
|
459
|
+
"in": "query",
|
|
460
|
+
"schema": {
|
|
461
|
+
"type": "boolean",
|
|
462
|
+
"default": false,
|
|
463
|
+
"description": "Generate a source_url for the file entity, if it doesn't have one"
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"$ref": "#/components/parameters/StrictQueryParam"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"$ref": "#/components/parameters/AsyncOperationQueryParam"
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"responses": {
|
|
474
|
+
"200": {
|
|
475
|
+
"description": "File Entity",
|
|
476
|
+
"content": {
|
|
477
|
+
"application/json": {
|
|
478
|
+
"schema": {
|
|
479
|
+
"$ref": "#/components/schemas/FileEntity"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"401": {
|
|
485
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
486
|
+
},
|
|
487
|
+
"403": {
|
|
488
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
489
|
+
},
|
|
490
|
+
"404": {
|
|
491
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
492
|
+
},
|
|
493
|
+
"500": {
|
|
494
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
"delete": {
|
|
499
|
+
"operationId": "deleteFile",
|
|
500
|
+
"summary": "deleteFile",
|
|
501
|
+
"description": "Delete a file entity by id",
|
|
502
|
+
"tags": [
|
|
503
|
+
"File"
|
|
504
|
+
],
|
|
505
|
+
"parameters": [
|
|
506
|
+
{
|
|
507
|
+
"name": "id",
|
|
508
|
+
"in": "path",
|
|
509
|
+
"required": true,
|
|
510
|
+
"schema": {
|
|
511
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"name": "purge",
|
|
516
|
+
"in": "query",
|
|
517
|
+
"schema": {
|
|
518
|
+
"type": "boolean",
|
|
519
|
+
"default": false,
|
|
520
|
+
"description": "Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"$ref": "#/components/parameters/ActivityIdQueryParam"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"$ref": "#/components/parameters/StrictQueryParam"
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
"responses": {
|
|
531
|
+
"200": {
|
|
532
|
+
"description": "The deleted file",
|
|
533
|
+
"content": {
|
|
534
|
+
"application/json": {
|
|
535
|
+
"schema": {
|
|
536
|
+
"$ref": "#/components/schemas/FileEntity"
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"401": {
|
|
542
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
543
|
+
},
|
|
544
|
+
"403": {
|
|
545
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
546
|
+
},
|
|
547
|
+
"404": {
|
|
548
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
549
|
+
},
|
|
550
|
+
"500": {
|
|
551
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
"/v1/files/{id}/download": {
|
|
557
|
+
"get": {
|
|
558
|
+
"operationId": "downloadFile",
|
|
559
|
+
"summary": "downloadFile",
|
|
560
|
+
"description": "Generate a pre-signed download URL for a file.\n\nThe returned URL is valid for a limited time (typically 15 minutes) and can be used to download the file directly.\n\n**Download attribution (`x-track-*`):** any query parameter whose name starts with\n`x-track-` is treated as opaque tracking metadata and signed into the returned URL, so it\nshows up in the S3 access logs / CloudTrail data events when the link is actually opened.\nThis is a generic, service-agnostic channel — e.g. the customer portal sends\n`x-track-portal-id` and `x-track-contact-id`. Only the `x-track-` namespace is forwarded;\nthe values cannot affect how S3 resolves or serves the object. Parameter names must match\n`^x-track-[a-z0-9](?:[a-z0-9_-]{0,38}[a-z0-9])?$`, values are capped at 256 characters, and\nat most 10 such parameters are honoured (see the `x-track` parameter below).\n",
|
|
561
|
+
"tags": [
|
|
562
|
+
"File"
|
|
563
|
+
],
|
|
564
|
+
"parameters": [
|
|
565
|
+
{
|
|
566
|
+
"name": "id",
|
|
567
|
+
"in": "path",
|
|
568
|
+
"required": true,
|
|
569
|
+
"description": "The UUID of the file entity",
|
|
570
|
+
"schema": {
|
|
571
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"name": "version",
|
|
576
|
+
"in": "query",
|
|
577
|
+
"description": "Index of the file version to download (0 = latest)",
|
|
578
|
+
"schema": {
|
|
579
|
+
"type": "integer",
|
|
580
|
+
"default": 0
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"name": "attachment",
|
|
585
|
+
"in": "query",
|
|
586
|
+
"description": "Controls the Content-Disposition header. Set to `true` to trigger browser download dialog, `false` to display inline.",
|
|
587
|
+
"schema": {
|
|
588
|
+
"type": "boolean",
|
|
589
|
+
"default": true
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "x-track",
|
|
594
|
+
"in": "query",
|
|
595
|
+
"required": false,
|
|
596
|
+
"style": "form",
|
|
597
|
+
"explode": true,
|
|
598
|
+
"description": "Download-attribution channel. Provide any number of query parameters whose names\nstart with `x-track-` (e.g. `x-track-portal-id`, `x-track-contact-id`); each is signed\ninto the pre-signed URL verbatim so the download is recorded in the S3 access logs /\nCloudTrail data events. Only the `x-track-` namespace is forwarded — values cannot\naffect how S3 resolves or serves the object. Parameter names must match\n`^x-track-[a-z0-9](?:[a-z0-9_-]{0,38}[a-z0-9])?$`, values are capped at 256 characters,\nand at most 10 such parameters are honoured.\n",
|
|
599
|
+
"schema": {
|
|
600
|
+
"type": "object",
|
|
601
|
+
"additionalProperties": {
|
|
602
|
+
"type": "string"
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
],
|
|
607
|
+
"responses": {
|
|
608
|
+
"200": {
|
|
609
|
+
"description": "Pre-signed download URL",
|
|
610
|
+
"content": {
|
|
611
|
+
"application/json": {
|
|
612
|
+
"schema": {
|
|
613
|
+
"type": "object",
|
|
614
|
+
"properties": {
|
|
615
|
+
"download_url": {
|
|
616
|
+
"type": "string",
|
|
617
|
+
"format": "uri",
|
|
618
|
+
"description": "Pre-signed S3 URL valid for downloading the file",
|
|
619
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
"example": {
|
|
624
|
+
"download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&..."
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"401": {
|
|
630
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
631
|
+
},
|
|
632
|
+
"403": {
|
|
633
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
634
|
+
},
|
|
635
|
+
"404": {
|
|
636
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
637
|
+
},
|
|
638
|
+
"500": {
|
|
639
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
"/v1/files:downloadS3": {
|
|
645
|
+
"post": {
|
|
646
|
+
"operationId": "downloadS3File",
|
|
647
|
+
"summary": "downloadS3File",
|
|
648
|
+
"description": "Generate a pre-signed download URL for a file using its S3 reference.\n\nUse this endpoint when you have the S3 bucket and key but not the file entity ID.\n",
|
|
649
|
+
"tags": [
|
|
650
|
+
"File"
|
|
651
|
+
],
|
|
652
|
+
"parameters": [
|
|
653
|
+
{
|
|
654
|
+
"name": "s3_key",
|
|
655
|
+
"in": "query",
|
|
656
|
+
"required": true,
|
|
657
|
+
"description": "The S3 object key, as returned in `s3ref.key` of the file entity.\n\nNote: object keys store the filename segment percent-encoded. For example, a file named\n`Straße 1.pdf` is stored under the key `.../Stra%C3%9Fe%201.pdf`, and that is the value\n`s3ref.key` contains. Pass it exactly as returned by the API and make sure your HTTP client\nURL-encodes the query parameter value, so a literal `%` arrives encoded as `%25`.\n",
|
|
658
|
+
"schema": {
|
|
659
|
+
"type": "string"
|
|
660
|
+
},
|
|
661
|
+
"example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/Stra%C3%9Fe%201.pdf"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"name": "s3_bucket",
|
|
665
|
+
"in": "query",
|
|
666
|
+
"required": true,
|
|
667
|
+
"description": "The S3 bucket name",
|
|
668
|
+
"schema": {
|
|
669
|
+
"type": "string"
|
|
670
|
+
},
|
|
671
|
+
"example": "epilot-prod-user-content"
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"name": "attachment",
|
|
675
|
+
"in": "query",
|
|
676
|
+
"description": "Controls the Content-Disposition header. Set to `true` to trigger browser download dialog, `false` to display inline.",
|
|
677
|
+
"schema": {
|
|
678
|
+
"type": "boolean",
|
|
679
|
+
"default": true
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
],
|
|
683
|
+
"responses": {
|
|
684
|
+
"200": {
|
|
685
|
+
"description": "Pre-signed download URL",
|
|
686
|
+
"content": {
|
|
687
|
+
"application/json": {
|
|
688
|
+
"schema": {
|
|
689
|
+
"type": "object",
|
|
690
|
+
"properties": {
|
|
691
|
+
"download_url": {
|
|
692
|
+
"type": "string",
|
|
693
|
+
"format": "uri",
|
|
694
|
+
"description": "Pre-signed S3 URL valid for downloading the file",
|
|
695
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
"400": {
|
|
703
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
704
|
+
},
|
|
705
|
+
"401": {
|
|
706
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
707
|
+
},
|
|
708
|
+
"403": {
|
|
709
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
710
|
+
},
|
|
711
|
+
"404": {
|
|
712
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
713
|
+
},
|
|
714
|
+
"500": {
|
|
715
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
"/v1/files:downloadFiles": {
|
|
721
|
+
"post": {
|
|
722
|
+
"operationId": "downloadFiles",
|
|
723
|
+
"summary": "downloadFiles",
|
|
724
|
+
"description": "Bulk generate pre-signed download URLs for multiple files in a single request.\n\nThis is more efficient than calling `downloadFile` multiple times when you need to download several files.\n",
|
|
725
|
+
"tags": [
|
|
726
|
+
"File"
|
|
727
|
+
],
|
|
728
|
+
"requestBody": {
|
|
729
|
+
"content": {
|
|
730
|
+
"application/json": {
|
|
731
|
+
"schema": {
|
|
732
|
+
"$ref": "#/components/schemas/DownloadFilesPayload"
|
|
733
|
+
},
|
|
734
|
+
"examples": {
|
|
735
|
+
"Download multiple files": {
|
|
736
|
+
"value": [
|
|
737
|
+
{
|
|
738
|
+
"id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
739
|
+
"version": 0
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
743
|
+
"version": 0
|
|
744
|
+
}
|
|
745
|
+
]
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
"responses": {
|
|
752
|
+
"200": {
|
|
753
|
+
"description": "Generated download URLs for each requested file",
|
|
754
|
+
"content": {
|
|
755
|
+
"application/json": {
|
|
756
|
+
"schema": {
|
|
757
|
+
"type": "array",
|
|
758
|
+
"items": {
|
|
759
|
+
"type": "object",
|
|
760
|
+
"properties": {
|
|
761
|
+
"download_url": {
|
|
762
|
+
"type": "string",
|
|
763
|
+
"format": "uri",
|
|
764
|
+
"description": "Pre-signed S3 URL for downloading the file",
|
|
765
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
766
|
+
},
|
|
767
|
+
"file_entity_id": {
|
|
768
|
+
"type": "string",
|
|
769
|
+
"format": "uuid",
|
|
770
|
+
"description": "The file entity ID (matches the requested ID)"
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
"example": [
|
|
776
|
+
{
|
|
777
|
+
"download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/document.pdf?X-Amz-...",
|
|
778
|
+
"file_entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/image.png?X-Amz-...",
|
|
782
|
+
"file_entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
783
|
+
}
|
|
784
|
+
]
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"400": {
|
|
789
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
790
|
+
},
|
|
791
|
+
"401": {
|
|
792
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
793
|
+
},
|
|
794
|
+
"500": {
|
|
795
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
"/v1/files:zipJob": {
|
|
801
|
+
"post": {
|
|
802
|
+
"operationId": "createZipJob",
|
|
803
|
+
"summary": "createZipJob",
|
|
804
|
+
"description": "Create a background job to ZIP multiple files and send a download link via email.\n\nFor bulk downloads of more than 50 files, use this async endpoint instead of client-side zipping.\nThe job will:\n1. Download all requested files from S3\n2. Create a ZIP archive\n3. Upload the ZIP to temporary storage\n4. Send an email notification with the download link\n\nThe ZIP file will be available for 7 days.\n",
|
|
805
|
+
"tags": [
|
|
806
|
+
"File"
|
|
807
|
+
],
|
|
808
|
+
"requestBody": {
|
|
809
|
+
"content": {
|
|
810
|
+
"application/json": {
|
|
811
|
+
"schema": {
|
|
812
|
+
"$ref": "#/components/schemas/CreateZipJobPayload"
|
|
813
|
+
},
|
|
814
|
+
"examples": {
|
|
815
|
+
"Zip multiple files": {
|
|
816
|
+
"value": {
|
|
817
|
+
"file_entity_ids": [
|
|
818
|
+
"ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
819
|
+
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
820
|
+
],
|
|
821
|
+
"zip_filename": "Documents.zip",
|
|
822
|
+
"notify_email": "user@example.com"
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
"responses": {
|
|
830
|
+
"202": {
|
|
831
|
+
"description": "Job created, processing in background",
|
|
832
|
+
"content": {
|
|
833
|
+
"application/json": {
|
|
834
|
+
"schema": {
|
|
835
|
+
"$ref": "#/components/schemas/ZipJob"
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
"400": {
|
|
841
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
842
|
+
},
|
|
843
|
+
"401": {
|
|
844
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
845
|
+
},
|
|
846
|
+
"500": {
|
|
847
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
"/v1/files:zipJob/{job_id}": {
|
|
853
|
+
"get": {
|
|
854
|
+
"operationId": "getZipJob",
|
|
855
|
+
"summary": "getZipJob",
|
|
856
|
+
"description": "Get the status of a ZIP job",
|
|
857
|
+
"tags": [
|
|
858
|
+
"File"
|
|
859
|
+
],
|
|
860
|
+
"parameters": [
|
|
861
|
+
{
|
|
862
|
+
"name": "job_id",
|
|
863
|
+
"in": "path",
|
|
864
|
+
"required": true,
|
|
865
|
+
"description": "The UUID of the ZIP job",
|
|
866
|
+
"schema": {
|
|
867
|
+
"type": "string",
|
|
868
|
+
"format": "uuid"
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
"responses": {
|
|
873
|
+
"200": {
|
|
874
|
+
"description": "ZIP job status",
|
|
875
|
+
"content": {
|
|
876
|
+
"application/json": {
|
|
877
|
+
"schema": {
|
|
878
|
+
"$ref": "#/components/schemas/ZipJob"
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
"401": {
|
|
884
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
885
|
+
},
|
|
886
|
+
"404": {
|
|
887
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
888
|
+
},
|
|
889
|
+
"500": {
|
|
890
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"/v1/files/{id}/summary": {
|
|
896
|
+
"get": {
|
|
897
|
+
"operationId": "getFileSummary",
|
|
898
|
+
"summary": "getFileSummary",
|
|
899
|
+
"description": "Get summary text for a file entity together with the current summary job status when available.",
|
|
900
|
+
"tags": [
|
|
901
|
+
"File"
|
|
902
|
+
],
|
|
903
|
+
"parameters": [
|
|
904
|
+
{
|
|
905
|
+
"name": "id",
|
|
906
|
+
"in": "path",
|
|
907
|
+
"required": true,
|
|
908
|
+
"description": "The UUID of the file entity",
|
|
909
|
+
"schema": {
|
|
910
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
],
|
|
914
|
+
"responses": {
|
|
915
|
+
"200": {
|
|
916
|
+
"description": "Current file summary state",
|
|
917
|
+
"content": {
|
|
918
|
+
"application/json": {
|
|
919
|
+
"schema": {
|
|
920
|
+
"$ref": "#/components/schemas/FileSummary"
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"400": {
|
|
926
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
927
|
+
},
|
|
928
|
+
"401": {
|
|
929
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
930
|
+
},
|
|
931
|
+
"403": {
|
|
932
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
933
|
+
},
|
|
934
|
+
"404": {
|
|
935
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
936
|
+
},
|
|
937
|
+
"500": {
|
|
938
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
"/v1/files/{id}/summary/feedback": {
|
|
944
|
+
"get": {
|
|
945
|
+
"operationId": "getFileSummaryFeedback",
|
|
946
|
+
"summary": "Get file summary feedback",
|
|
947
|
+
"description": "Get the authenticated user's feedback for the current generated file summary.",
|
|
948
|
+
"tags": [
|
|
949
|
+
"File"
|
|
950
|
+
],
|
|
951
|
+
"parameters": [
|
|
952
|
+
{
|
|
953
|
+
"name": "id",
|
|
954
|
+
"in": "path",
|
|
955
|
+
"required": true,
|
|
956
|
+
"description": "The UUID of the file entity",
|
|
957
|
+
"schema": {
|
|
958
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
],
|
|
962
|
+
"responses": {
|
|
963
|
+
"200": {
|
|
964
|
+
"description": "Current feedback state",
|
|
965
|
+
"content": {
|
|
966
|
+
"application/json": {
|
|
967
|
+
"schema": {
|
|
968
|
+
"$ref": "#/components/schemas/FileSummaryFeedbackResponse"
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
"400": {
|
|
974
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
975
|
+
},
|
|
976
|
+
"401": {
|
|
977
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
978
|
+
},
|
|
979
|
+
"403": {
|
|
980
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
981
|
+
},
|
|
982
|
+
"404": {
|
|
983
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
984
|
+
},
|
|
985
|
+
"500": {
|
|
986
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
},
|
|
990
|
+
"put": {
|
|
991
|
+
"operationId": "putFileSummaryFeedback",
|
|
992
|
+
"summary": "Submit file summary feedback",
|
|
993
|
+
"description": "Upsert thumbs up/down feedback for the current generated file summary.",
|
|
994
|
+
"tags": [
|
|
995
|
+
"File"
|
|
996
|
+
],
|
|
997
|
+
"parameters": [
|
|
998
|
+
{
|
|
999
|
+
"name": "id",
|
|
1000
|
+
"in": "path",
|
|
1001
|
+
"required": true,
|
|
1002
|
+
"description": "The UUID of the file entity",
|
|
1003
|
+
"schema": {
|
|
1004
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
],
|
|
1008
|
+
"requestBody": {
|
|
1009
|
+
"required": true,
|
|
1010
|
+
"content": {
|
|
1011
|
+
"application/json": {
|
|
1012
|
+
"schema": {
|
|
1013
|
+
"$ref": "#/components/schemas/PutFileSummaryFeedbackRequest"
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
"responses": {
|
|
1019
|
+
"200": {
|
|
1020
|
+
"description": "Feedback recorded",
|
|
1021
|
+
"content": {
|
|
1022
|
+
"application/json": {
|
|
1023
|
+
"schema": {
|
|
1024
|
+
"$ref": "#/components/schemas/FileSummaryFeedbackResponse"
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
"400": {
|
|
1030
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1031
|
+
},
|
|
1032
|
+
"401": {
|
|
1033
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1034
|
+
},
|
|
1035
|
+
"403": {
|
|
1036
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1037
|
+
},
|
|
1038
|
+
"404": {
|
|
1039
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1040
|
+
},
|
|
1041
|
+
"409": {
|
|
1042
|
+
"$ref": "#/components/responses/ConflictError"
|
|
1043
|
+
},
|
|
1044
|
+
"500": {
|
|
1045
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
"/v1/files/{id}/summary-jobs": {
|
|
1051
|
+
"post": {
|
|
1052
|
+
"operationId": "createFileSummaryJob",
|
|
1053
|
+
"summary": "createFileSummaryJob",
|
|
1054
|
+
"description": "Create or return the current AI summary job for a file entity.",
|
|
1055
|
+
"tags": [
|
|
1056
|
+
"File"
|
|
1057
|
+
],
|
|
1058
|
+
"parameters": [
|
|
1059
|
+
{
|
|
1060
|
+
"name": "id",
|
|
1061
|
+
"in": "path",
|
|
1062
|
+
"required": true,
|
|
1063
|
+
"description": "The UUID of the file entity",
|
|
1064
|
+
"schema": {
|
|
1065
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
],
|
|
1069
|
+
"responses": {
|
|
1070
|
+
"202": {
|
|
1071
|
+
"description": "Summary job accepted",
|
|
1072
|
+
"content": {
|
|
1073
|
+
"application/json": {
|
|
1074
|
+
"schema": {
|
|
1075
|
+
"$ref": "#/components/schemas/FileSummaryJob"
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
"400": {
|
|
1081
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1082
|
+
},
|
|
1083
|
+
"401": {
|
|
1084
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1085
|
+
},
|
|
1086
|
+
"403": {
|
|
1087
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1088
|
+
},
|
|
1089
|
+
"404": {
|
|
1090
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1091
|
+
},
|
|
1092
|
+
"500": {
|
|
1093
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
"/v1/files/{id}/summary-jobs/current": {
|
|
1099
|
+
"get": {
|
|
1100
|
+
"operationId": "getCurrentFileSummaryJob",
|
|
1101
|
+
"summary": "getCurrentFileSummaryJob",
|
|
1102
|
+
"description": "Get the latest AI summary job for the file entity's current source.",
|
|
1103
|
+
"tags": [
|
|
1104
|
+
"File"
|
|
1105
|
+
],
|
|
1106
|
+
"parameters": [
|
|
1107
|
+
{
|
|
1108
|
+
"name": "id",
|
|
1109
|
+
"in": "path",
|
|
1110
|
+
"required": true,
|
|
1111
|
+
"description": "The UUID of the file entity",
|
|
1112
|
+
"schema": {
|
|
1113
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
],
|
|
1117
|
+
"responses": {
|
|
1118
|
+
"200": {
|
|
1119
|
+
"description": "Current summary job",
|
|
1120
|
+
"content": {
|
|
1121
|
+
"application/json": {
|
|
1122
|
+
"schema": {
|
|
1123
|
+
"$ref": "#/components/schemas/FileSummaryJob"
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
"400": {
|
|
1129
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1130
|
+
},
|
|
1131
|
+
"401": {
|
|
1132
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1133
|
+
},
|
|
1134
|
+
"403": {
|
|
1135
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1136
|
+
},
|
|
1137
|
+
"404": {
|
|
1138
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1139
|
+
},
|
|
1140
|
+
"500": {
|
|
1141
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
"/v1/files/{id}/summary-jobs/{job_id}": {
|
|
1147
|
+
"get": {
|
|
1148
|
+
"operationId": "getFileSummaryJob",
|
|
1149
|
+
"summary": "getFileSummaryJob",
|
|
1150
|
+
"description": "Get an AI summary job by id.",
|
|
1151
|
+
"tags": [
|
|
1152
|
+
"File"
|
|
1153
|
+
],
|
|
1154
|
+
"parameters": [
|
|
1155
|
+
{
|
|
1156
|
+
"name": "id",
|
|
1157
|
+
"in": "path",
|
|
1158
|
+
"required": true,
|
|
1159
|
+
"description": "The UUID of the file entity",
|
|
1160
|
+
"schema": {
|
|
1161
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"name": "job_id",
|
|
1166
|
+
"in": "path",
|
|
1167
|
+
"required": true,
|
|
1168
|
+
"description": "The UUID of the summary job",
|
|
1169
|
+
"schema": {
|
|
1170
|
+
"type": "string",
|
|
1171
|
+
"format": "uuid"
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
],
|
|
1175
|
+
"responses": {
|
|
1176
|
+
"200": {
|
|
1177
|
+
"description": "Summary job",
|
|
1178
|
+
"content": {
|
|
1179
|
+
"application/json": {
|
|
1180
|
+
"schema": {
|
|
1181
|
+
"$ref": "#/components/schemas/FileSummaryJob"
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
"400": {
|
|
1187
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1188
|
+
},
|
|
1189
|
+
"401": {
|
|
1190
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1191
|
+
},
|
|
1192
|
+
"403": {
|
|
1193
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1194
|
+
},
|
|
1195
|
+
"404": {
|
|
1196
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1197
|
+
},
|
|
1198
|
+
"500": {
|
|
1199
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
},
|
|
1204
|
+
"/v1/files/{id}/summary:generate": {
|
|
1205
|
+
"post": {
|
|
1206
|
+
"operationId": "generateFileSummary",
|
|
1207
|
+
"summary": "generateFileSummary",
|
|
1208
|
+
"description": "Compatibility alias for creating or returning the current AI summary job for a file entity.",
|
|
1209
|
+
"tags": [
|
|
1210
|
+
"File"
|
|
1211
|
+
],
|
|
1212
|
+
"parameters": [
|
|
1213
|
+
{
|
|
1214
|
+
"name": "id",
|
|
1215
|
+
"in": "path",
|
|
1216
|
+
"required": true,
|
|
1217
|
+
"description": "The UUID of the file entity",
|
|
1218
|
+
"schema": {
|
|
1219
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
],
|
|
1223
|
+
"responses": {
|
|
1224
|
+
"202": {
|
|
1225
|
+
"description": "Summary generation accepted",
|
|
1226
|
+
"content": {
|
|
1227
|
+
"application/json": {
|
|
1228
|
+
"schema": {
|
|
1229
|
+
"$ref": "#/components/schemas/FileSummaryJob"
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
},
|
|
1234
|
+
"400": {
|
|
1235
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1236
|
+
},
|
|
1237
|
+
"401": {
|
|
1238
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1239
|
+
},
|
|
1240
|
+
"403": {
|
|
1241
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1242
|
+
},
|
|
1243
|
+
"404": {
|
|
1244
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1245
|
+
},
|
|
1246
|
+
"500": {
|
|
1247
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1252
|
+
"/v1/files/{id}/text": {
|
|
1253
|
+
"get": {
|
|
1254
|
+
"operationId": "getFileText",
|
|
1255
|
+
"summary": "getFileText",
|
|
1256
|
+
"description": "Get the plain-text representation of a file entity. Returns status `not_ready` while text is being prepared and `unsupported` when text is unavailable for the file or organization.",
|
|
1257
|
+
"tags": [
|
|
1258
|
+
"File"
|
|
1259
|
+
],
|
|
1260
|
+
"parameters": [
|
|
1261
|
+
{
|
|
1262
|
+
"name": "id",
|
|
1263
|
+
"in": "path",
|
|
1264
|
+
"required": true,
|
|
1265
|
+
"description": "The UUID of the file entity",
|
|
1266
|
+
"schema": {
|
|
1267
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
],
|
|
1271
|
+
"responses": {
|
|
1272
|
+
"200": {
|
|
1273
|
+
"description": "Text state for the file entity",
|
|
1274
|
+
"content": {
|
|
1275
|
+
"application/json": {
|
|
1276
|
+
"schema": {
|
|
1277
|
+
"$ref": "#/components/schemas/FileText"
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
},
|
|
1282
|
+
"400": {
|
|
1283
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1284
|
+
},
|
|
1285
|
+
"401": {
|
|
1286
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1287
|
+
},
|
|
1288
|
+
"403": {
|
|
1289
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1290
|
+
},
|
|
1291
|
+
"404": {
|
|
1292
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1293
|
+
},
|
|
1294
|
+
"500": {
|
|
1295
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
"/v1/files/{id}/preview": {
|
|
1301
|
+
"get": {
|
|
1302
|
+
"operationId": "previewFile",
|
|
1303
|
+
"summary": "previewFile",
|
|
1304
|
+
"description": "Generate a thumbnail preview for a file entity.\n\nSupported file types include images (PNG, JPEG, GIF, WebP), PDFs, and common document formats.\nThe preview is returned as an image (PNG or JPEG).\n\n**Tip:** Use with CookieAuth to embed previews directly in `<img>` tags.\n",
|
|
1305
|
+
"tags": [
|
|
1306
|
+
"Preview"
|
|
1307
|
+
],
|
|
1308
|
+
"parameters": [
|
|
1309
|
+
{
|
|
1310
|
+
"name": "id",
|
|
1311
|
+
"in": "path",
|
|
1312
|
+
"required": true,
|
|
1313
|
+
"description": "The UUID of the file entity",
|
|
1314
|
+
"schema": {
|
|
1315
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"name": "version",
|
|
1320
|
+
"in": "query",
|
|
1321
|
+
"description": "Index of the file version to preview (0 = latest)",
|
|
1322
|
+
"schema": {
|
|
1323
|
+
"type": "integer",
|
|
1324
|
+
"default": 0
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
"name": "w",
|
|
1329
|
+
"in": "query",
|
|
1330
|
+
"description": "Desired width in pixels (maintains aspect ratio if only width is specified)",
|
|
1331
|
+
"schema": {
|
|
1332
|
+
"type": "integer"
|
|
1333
|
+
},
|
|
1334
|
+
"example": 200
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
"name": "h",
|
|
1338
|
+
"in": "query",
|
|
1339
|
+
"description": "Desired height in pixels (maintains aspect ratio if only height is specified)",
|
|
1340
|
+
"schema": {
|
|
1341
|
+
"type": "integer"
|
|
1342
|
+
},
|
|
1343
|
+
"example": 200
|
|
1344
|
+
}
|
|
1345
|
+
],
|
|
1346
|
+
"responses": {
|
|
1347
|
+
"200": {
|
|
1348
|
+
"description": "Generated thumbnail image",
|
|
1349
|
+
"content": {
|
|
1350
|
+
"image/png": {
|
|
1351
|
+
"schema": {
|
|
1352
|
+
"type": "string",
|
|
1353
|
+
"format": "binary"
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
"image/jpeg": {
|
|
1357
|
+
"schema": {
|
|
1358
|
+
"type": "string",
|
|
1359
|
+
"format": "binary"
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
"401": {
|
|
1365
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1366
|
+
},
|
|
1367
|
+
"403": {
|
|
1368
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1369
|
+
},
|
|
1370
|
+
"404": {
|
|
1371
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1372
|
+
},
|
|
1373
|
+
"500": {
|
|
1374
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
},
|
|
1379
|
+
"/v1/files:previewS3": {
|
|
1380
|
+
"post": {
|
|
1381
|
+
"operationId": "previewS3File",
|
|
1382
|
+
"summary": "previewS3File",
|
|
1383
|
+
"description": "Generate a thumbnail preview from an S3 reference.\n\nUse this endpoint when you have the S3 bucket and key but not the file entity ID.\n",
|
|
1384
|
+
"tags": [
|
|
1385
|
+
"Preview"
|
|
1386
|
+
],
|
|
1387
|
+
"parameters": [
|
|
1388
|
+
{
|
|
1389
|
+
"name": "w",
|
|
1390
|
+
"in": "query",
|
|
1391
|
+
"description": "Desired width in pixels",
|
|
1392
|
+
"schema": {
|
|
1393
|
+
"type": "integer"
|
|
1394
|
+
},
|
|
1395
|
+
"example": 200
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
"name": "h",
|
|
1399
|
+
"in": "query",
|
|
1400
|
+
"description": "Desired height in pixels",
|
|
1401
|
+
"schema": {
|
|
1402
|
+
"type": "integer"
|
|
1403
|
+
},
|
|
1404
|
+
"example": 200
|
|
1405
|
+
}
|
|
1406
|
+
],
|
|
1407
|
+
"requestBody": {
|
|
1408
|
+
"content": {
|
|
1409
|
+
"application/json": {
|
|
1410
|
+
"schema": {
|
|
1411
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
1412
|
+
},
|
|
1413
|
+
"examples": {
|
|
1414
|
+
"Preview from S3": {
|
|
1415
|
+
"value": {
|
|
1416
|
+
"bucket": "epilot-prod-user-content",
|
|
1417
|
+
"key": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/image.png"
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
},
|
|
1424
|
+
"responses": {
|
|
1425
|
+
"200": {
|
|
1426
|
+
"description": "Generated thumbnail image",
|
|
1427
|
+
"content": {
|
|
1428
|
+
"image/png": {
|
|
1429
|
+
"schema": {
|
|
1430
|
+
"type": "string",
|
|
1431
|
+
"format": "binary"
|
|
1432
|
+
}
|
|
1433
|
+
},
|
|
1434
|
+
"image/jpeg": {
|
|
1435
|
+
"schema": {
|
|
1436
|
+
"type": "string",
|
|
1437
|
+
"format": "binary"
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
"400": {
|
|
1443
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1444
|
+
},
|
|
1445
|
+
"401": {
|
|
1446
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1447
|
+
},
|
|
1448
|
+
"404": {
|
|
1449
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1450
|
+
},
|
|
1451
|
+
"500": {
|
|
1452
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
},
|
|
1456
|
+
"get": {
|
|
1457
|
+
"operationId": "previewS3FileGet",
|
|
1458
|
+
"summary": "previewS3FileGet",
|
|
1459
|
+
"description": "Get a thumbnail preview from an S3 reference using query parameters.\n\nThis GET variant is useful for embedding previews directly in `<img>` tags.\n",
|
|
1460
|
+
"tags": [
|
|
1461
|
+
"Preview"
|
|
1462
|
+
],
|
|
1463
|
+
"parameters": [
|
|
1464
|
+
{
|
|
1465
|
+
"name": "key",
|
|
1466
|
+
"in": "query",
|
|
1467
|
+
"description": "The S3 object key",
|
|
1468
|
+
"required": true,
|
|
1469
|
+
"schema": {
|
|
1470
|
+
"type": "string"
|
|
1471
|
+
},
|
|
1472
|
+
"example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/image.png"
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
"name": "bucket",
|
|
1476
|
+
"in": "query",
|
|
1477
|
+
"description": "The S3 bucket name",
|
|
1478
|
+
"required": true,
|
|
1479
|
+
"schema": {
|
|
1480
|
+
"type": "string"
|
|
1481
|
+
},
|
|
1482
|
+
"example": "epilot-prod-user-content"
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"name": "w",
|
|
1486
|
+
"in": "query",
|
|
1487
|
+
"description": "Desired width in pixels",
|
|
1488
|
+
"schema": {
|
|
1489
|
+
"type": "integer"
|
|
1490
|
+
},
|
|
1491
|
+
"example": 200
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
"name": "h",
|
|
1495
|
+
"in": "query",
|
|
1496
|
+
"description": "Desired height in pixels",
|
|
1497
|
+
"schema": {
|
|
1498
|
+
"type": "integer"
|
|
1499
|
+
},
|
|
1500
|
+
"example": 200
|
|
1501
|
+
}
|
|
1502
|
+
],
|
|
1503
|
+
"responses": {
|
|
1504
|
+
"200": {
|
|
1505
|
+
"description": "Generated thumbnail image",
|
|
1506
|
+
"content": {
|
|
1507
|
+
"image/png": {
|
|
1508
|
+
"schema": {
|
|
1509
|
+
"type": "string",
|
|
1510
|
+
"format": "binary"
|
|
1511
|
+
}
|
|
1512
|
+
},
|
|
1513
|
+
"image/jpeg": {
|
|
1514
|
+
"schema": {
|
|
1515
|
+
"type": "string",
|
|
1516
|
+
"format": "binary"
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
"400": {
|
|
1522
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1523
|
+
},
|
|
1524
|
+
"401": {
|
|
1525
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1526
|
+
},
|
|
1527
|
+
"404": {
|
|
1528
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1529
|
+
},
|
|
1530
|
+
"500": {
|
|
1531
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
},
|
|
1536
|
+
"/v1/files/public/{id}/preview": {
|
|
1537
|
+
"get": {
|
|
1538
|
+
"operationId": "previewPublicFile",
|
|
1539
|
+
"summary": "previewPublicFile",
|
|
1540
|
+
"description": "Generate a thumbnail preview for a public file entity.\n\n**No authentication required.** This endpoint only works for files with `access_control: public-read`.\n",
|
|
1541
|
+
"security": [],
|
|
1542
|
+
"tags": [
|
|
1543
|
+
"Preview"
|
|
1544
|
+
],
|
|
1545
|
+
"parameters": [
|
|
1546
|
+
{
|
|
1547
|
+
"name": "id",
|
|
1548
|
+
"in": "path",
|
|
1549
|
+
"required": true,
|
|
1550
|
+
"description": "The UUID of the public file entity",
|
|
1551
|
+
"schema": {
|
|
1552
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1553
|
+
}
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
"name": "version",
|
|
1557
|
+
"in": "query",
|
|
1558
|
+
"description": "Index of the file version to preview (0 = latest)",
|
|
1559
|
+
"schema": {
|
|
1560
|
+
"type": "integer",
|
|
1561
|
+
"default": 0
|
|
1562
|
+
}
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
"name": "w",
|
|
1566
|
+
"in": "query",
|
|
1567
|
+
"description": "Desired width in pixels",
|
|
1568
|
+
"schema": {
|
|
1569
|
+
"type": "integer"
|
|
1570
|
+
},
|
|
1571
|
+
"example": 200
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
"name": "h",
|
|
1575
|
+
"in": "query",
|
|
1576
|
+
"description": "Desired height in pixels",
|
|
1577
|
+
"schema": {
|
|
1578
|
+
"type": "integer"
|
|
1579
|
+
},
|
|
1580
|
+
"example": 200
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
"name": "org_id",
|
|
1584
|
+
"in": "query",
|
|
1585
|
+
"description": "Organization ID that owns the file",
|
|
1586
|
+
"schema": {
|
|
1587
|
+
"type": "string"
|
|
1588
|
+
},
|
|
1589
|
+
"example": "123"
|
|
1590
|
+
}
|
|
1591
|
+
],
|
|
1592
|
+
"responses": {
|
|
1593
|
+
"200": {
|
|
1594
|
+
"description": "Generated thumbnail image for a public file",
|
|
1595
|
+
"headers": {
|
|
1596
|
+
"ETag": {
|
|
1597
|
+
"description": "Identifier of the previewed file version, for conditional requests",
|
|
1598
|
+
"schema": {
|
|
1599
|
+
"type": "string"
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1602
|
+
"Cache-Control": {
|
|
1603
|
+
"description": "Caching policy for the preview",
|
|
1604
|
+
"schema": {
|
|
1605
|
+
"type": "string"
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
},
|
|
1609
|
+
"content": {
|
|
1610
|
+
"image/png": {
|
|
1611
|
+
"schema": {
|
|
1612
|
+
"type": "string",
|
|
1613
|
+
"format": "binary"
|
|
1614
|
+
}
|
|
1615
|
+
},
|
|
1616
|
+
"image/jpeg": {
|
|
1617
|
+
"schema": {
|
|
1618
|
+
"type": "string",
|
|
1619
|
+
"format": "binary"
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
},
|
|
1624
|
+
"204": {
|
|
1625
|
+
"description": "No preview could be generated and no redirect target is available\n(the file has no public URL). No body is returned.\n"
|
|
1626
|
+
},
|
|
1627
|
+
"302": {
|
|
1628
|
+
"description": "The preview could not be optimized (e.g. image dimensions above the input\npixel limit, an oversized file, or an unsupported/undecodable format).\nSince the file is public, the client is redirected to the original file,\nwhich the browser can render directly.\n",
|
|
1629
|
+
"headers": {
|
|
1630
|
+
"Location": {
|
|
1631
|
+
"description": "URL of the original public file",
|
|
1632
|
+
"schema": {
|
|
1633
|
+
"type": "string",
|
|
1634
|
+
"format": "uri"
|
|
1635
|
+
}
|
|
1636
|
+
},
|
|
1637
|
+
"Cache-Control": {
|
|
1638
|
+
"description": "Caching policy for the redirect",
|
|
1639
|
+
"schema": {
|
|
1640
|
+
"type": "string"
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
},
|
|
1645
|
+
"304": {
|
|
1646
|
+
"description": "The preview is unchanged since the version identified by the `If-None-Match`\nrequest header. No body is returned; the cached copy should be reused.\n",
|
|
1647
|
+
"headers": {
|
|
1648
|
+
"ETag": {
|
|
1649
|
+
"description": "Identifier of the current file version's preview",
|
|
1650
|
+
"schema": {
|
|
1651
|
+
"type": "string"
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1654
|
+
"Cache-Control": {
|
|
1655
|
+
"description": "Caching policy for the preview",
|
|
1656
|
+
"schema": {
|
|
1657
|
+
"type": "string"
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
},
|
|
1662
|
+
"403": {
|
|
1663
|
+
"description": "File is not public",
|
|
1664
|
+
"content": {
|
|
1665
|
+
"application/json": {
|
|
1666
|
+
"schema": {
|
|
1667
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
1668
|
+
},
|
|
1669
|
+
"example": {
|
|
1670
|
+
"status": 403,
|
|
1671
|
+
"error": "File is not publicly accessible"
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
},
|
|
1676
|
+
"404": {
|
|
1677
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1678
|
+
},
|
|
1679
|
+
"500": {
|
|
1680
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
},
|
|
1685
|
+
"/v1/files/session": {
|
|
1686
|
+
"get": {
|
|
1687
|
+
"operationId": "getSession",
|
|
1688
|
+
"summary": "getSession",
|
|
1689
|
+
"description": "Start a browser session by converting a Bearer token into a server-side cookie.\n\n**Use case:** After calling this endpoint, you can use preview URLs directly in `<img>` tags\nwithout needing to set the Authorization header manually.\n\n**Example flow:**\n1. Call this endpoint with your Bearer token: `GET /v1/files/session` with `Authorization: Bearer <token>`\n2. The server sets an HTTP-only cookie named `token`\n3. Use preview URLs directly: `<img src=\"https://file.sls.epilot.io/v1/files/{id}/preview\" />`\n",
|
|
1690
|
+
"tags": [
|
|
1691
|
+
"Session"
|
|
1692
|
+
],
|
|
1693
|
+
"responses": {
|
|
1694
|
+
"200": {
|
|
1695
|
+
"description": "Session started successfully. A session cookie has been set.",
|
|
1696
|
+
"headers": {
|
|
1697
|
+
"Set-Cookie": {
|
|
1698
|
+
"description": "HTTP-only session cookie containing the authentication token",
|
|
1699
|
+
"schema": {
|
|
1700
|
+
"type": "string",
|
|
1701
|
+
"example": "token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...; HttpOnly; Secure; Path=/"
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
},
|
|
1706
|
+
"401": {
|
|
1707
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
"delete": {
|
|
1712
|
+
"operationId": "deleteSession",
|
|
1713
|
+
"summary": "deleteSession",
|
|
1714
|
+
"description": "End a browser session by deleting the token cookie.\n\nCall this endpoint to log out and clear the session cookie.\n",
|
|
1715
|
+
"tags": [
|
|
1716
|
+
"Session"
|
|
1717
|
+
],
|
|
1718
|
+
"responses": {
|
|
1719
|
+
"200": {
|
|
1720
|
+
"description": "Session deleted successfully. The session cookie has been cleared."
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
"/v1/files/{id}/public/links": {
|
|
1726
|
+
"post": {
|
|
1727
|
+
"operationId": "generatePublicLink",
|
|
1728
|
+
"summary": "generatePublicLink",
|
|
1729
|
+
"description": "Generate a public link to share a private file externally.\n\nThe generated link:\n- Is permanent until explicitly revoked\n- Includes the filename for user-friendly URLs\n- Does not require authentication to access\n- Redirects to a signed download URL when accessed\n\n**Use case:** Share invoices, contracts, or documents with external parties who don't have epilot accounts.\n",
|
|
1730
|
+
"tags": [
|
|
1731
|
+
"Public Links"
|
|
1732
|
+
],
|
|
1733
|
+
"parameters": [
|
|
1734
|
+
{
|
|
1735
|
+
"name": "id",
|
|
1736
|
+
"in": "path",
|
|
1737
|
+
"required": true,
|
|
1738
|
+
"description": "The UUID of the file entity to share",
|
|
1739
|
+
"schema": {
|
|
1740
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
],
|
|
1744
|
+
"responses": {
|
|
1745
|
+
"201": {
|
|
1746
|
+
"description": "Public link generated successfully",
|
|
1747
|
+
"content": {
|
|
1748
|
+
"application/json": {
|
|
1749
|
+
"schema": {
|
|
1750
|
+
"type": "string",
|
|
1751
|
+
"description": "The public URL that can be shared externally"
|
|
1752
|
+
},
|
|
1753
|
+
"example": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c/invoice-2023-12.pdf"
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
"401": {
|
|
1758
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1759
|
+
},
|
|
1760
|
+
"403": {
|
|
1761
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1762
|
+
},
|
|
1763
|
+
"404": {
|
|
1764
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1765
|
+
},
|
|
1766
|
+
"500": {
|
|
1767
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
"get": {
|
|
1772
|
+
"operationId": "listPublicLinksForFile",
|
|
1773
|
+
"summary": "listPublicLinksForFile",
|
|
1774
|
+
"description": "Fetches all public links previously generated for a file",
|
|
1775
|
+
"parameters": [
|
|
1776
|
+
{
|
|
1777
|
+
"name": "id",
|
|
1778
|
+
"in": "path",
|
|
1779
|
+
"required": true,
|
|
1780
|
+
"description": "The UUID of the file entity",
|
|
1781
|
+
"schema": {
|
|
1782
|
+
"type": "string"
|
|
1783
|
+
},
|
|
1784
|
+
"example": "13d22918-36bd-4227-9ad4-2cb978788c8d"
|
|
1785
|
+
}
|
|
1786
|
+
],
|
|
1787
|
+
"tags": [
|
|
1788
|
+
"Public Links"
|
|
1789
|
+
],
|
|
1790
|
+
"responses": {
|
|
1791
|
+
"200": {
|
|
1792
|
+
"description": "Public links retrieved successfully",
|
|
1793
|
+
"content": {
|
|
1794
|
+
"application/json": {
|
|
1795
|
+
"schema": {
|
|
1796
|
+
"type": "object",
|
|
1797
|
+
"properties": {
|
|
1798
|
+
"results": {
|
|
1799
|
+
"type": "array",
|
|
1800
|
+
"items": {
|
|
1801
|
+
"$ref": "#/components/schemas/PublicLink"
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
"example": {
|
|
1807
|
+
"results": [
|
|
1808
|
+
{
|
|
1809
|
+
"id": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c",
|
|
1810
|
+
"link": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c/invoice.pdf",
|
|
1811
|
+
"last_accessed_at": "2024-01-15T10:30:00Z"
|
|
1812
|
+
}
|
|
1813
|
+
]
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
},
|
|
1818
|
+
"501": {
|
|
1819
|
+
"description": "Not implemented",
|
|
1820
|
+
"content": {
|
|
1821
|
+
"application/json": {
|
|
1822
|
+
"schema": {
|
|
1823
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
1824
|
+
},
|
|
1825
|
+
"example": {
|
|
1826
|
+
"status": 501,
|
|
1827
|
+
"error": "Not Implemented"
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
},
|
|
1835
|
+
"/v1/files/public/links/{id}/{filename}": {
|
|
1836
|
+
"get": {
|
|
1837
|
+
"operationId": "accessPublicLink",
|
|
1838
|
+
"summary": "accessPublicLink",
|
|
1839
|
+
"security": [],
|
|
1840
|
+
"tags": [
|
|
1841
|
+
"Public Links"
|
|
1842
|
+
],
|
|
1843
|
+
"description": "Access a file via its public link.\n\n**No authentication required.** This endpoint redirects to a signed S3 URL for downloading the file.\n\nThe filename in the URL is for user-friendliness and SEO; the actual file is identified by the link ID.\n",
|
|
1844
|
+
"parameters": [
|
|
1845
|
+
{
|
|
1846
|
+
"name": "id",
|
|
1847
|
+
"in": "path",
|
|
1848
|
+
"required": true,
|
|
1849
|
+
"description": "The UUID of the public link (not the file entity ID)",
|
|
1850
|
+
"schema": {
|
|
1851
|
+
"type": "string"
|
|
1852
|
+
},
|
|
1853
|
+
"example": "13d22918-36bd-4227-9ad4-2cb978788c8d"
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
"name": "filename",
|
|
1857
|
+
"in": "path",
|
|
1858
|
+
"required": true,
|
|
1859
|
+
"description": "The filename (for user-friendly URLs)",
|
|
1860
|
+
"schema": {
|
|
1861
|
+
"type": "string"
|
|
1862
|
+
},
|
|
1863
|
+
"example": "invoice-2023-12.pdf"
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
"name": "hash",
|
|
1867
|
+
"in": "query",
|
|
1868
|
+
"required": false,
|
|
1869
|
+
"description": "Optional cache-busting hash to force re-download",
|
|
1870
|
+
"schema": {
|
|
1871
|
+
"type": "string"
|
|
1872
|
+
},
|
|
1873
|
+
"example": "abc123"
|
|
1874
|
+
}
|
|
1875
|
+
],
|
|
1876
|
+
"responses": {
|
|
1877
|
+
"302": {
|
|
1878
|
+
"description": "Redirect to a signed S3 URL for downloading the file",
|
|
1879
|
+
"headers": {
|
|
1880
|
+
"Location": {
|
|
1881
|
+
"description": "The signed S3 URL to download the file",
|
|
1882
|
+
"schema": {
|
|
1883
|
+
"type": "string",
|
|
1884
|
+
"format": "uri"
|
|
1885
|
+
},
|
|
1886
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/document.pdf?X-Amz-..."
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
},
|
|
1890
|
+
"404": {
|
|
1891
|
+
"description": "Public link not found or has been revoked",
|
|
1892
|
+
"content": {
|
|
1893
|
+
"application/json": {
|
|
1894
|
+
"schema": {
|
|
1895
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
1896
|
+
},
|
|
1897
|
+
"example": {
|
|
1898
|
+
"status": 404,
|
|
1899
|
+
"error": "Public link not found"
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
},
|
|
1904
|
+
"500": {
|
|
1905
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
},
|
|
1910
|
+
"/v1/files/public/links/{id}": {
|
|
1911
|
+
"delete": {
|
|
1912
|
+
"operationId": "revokePublicLink",
|
|
1913
|
+
"summary": "revokePublicLink",
|
|
1914
|
+
"description": "Revokes a given public link by ID",
|
|
1915
|
+
"parameters": [
|
|
1916
|
+
{
|
|
1917
|
+
"name": "id",
|
|
1918
|
+
"in": "path",
|
|
1919
|
+
"required": true,
|
|
1920
|
+
"description": "The UUID of the public link to revoke",
|
|
1921
|
+
"schema": {
|
|
1922
|
+
"type": "string"
|
|
1923
|
+
},
|
|
1924
|
+
"example": "13d22918-36bd-4227-9ad4-2cb978788c8d"
|
|
1925
|
+
}
|
|
1926
|
+
],
|
|
1927
|
+
"tags": [
|
|
1928
|
+
"Public Links"
|
|
1929
|
+
],
|
|
1930
|
+
"responses": {
|
|
1931
|
+
"204": {
|
|
1932
|
+
"description": "Public link revoked successfully"
|
|
1933
|
+
},
|
|
1934
|
+
"501": {
|
|
1935
|
+
"description": "Not implemented",
|
|
1936
|
+
"content": {
|
|
1937
|
+
"application/json": {
|
|
1938
|
+
"schema": {
|
|
1939
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
1940
|
+
},
|
|
1941
|
+
"example": {
|
|
1942
|
+
"status": 501,
|
|
1943
|
+
"error": "Not Implemented"
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
},
|
|
1951
|
+
"/v1/files/download:verify": {
|
|
1952
|
+
"post": {
|
|
1953
|
+
"operationId": "verifyCustomDownloadUrl",
|
|
1954
|
+
"summary": "verifyCustomDownloadUrl",
|
|
1955
|
+
"description": "Verify that a custom download URL is valid and has not expired.\n\nUse this endpoint to validate custom download URLs before redirecting users.\nCustom download URLs include a signature and expiration time for security.\n",
|
|
1956
|
+
"tags": [
|
|
1957
|
+
"File"
|
|
1958
|
+
],
|
|
1959
|
+
"requestBody": {
|
|
1960
|
+
"content": {
|
|
1961
|
+
"application/json": {
|
|
1962
|
+
"schema": {
|
|
1963
|
+
"$ref": "#/components/schemas/VerifyCustomDownloadUrlPayload"
|
|
1964
|
+
},
|
|
1965
|
+
"examples": {
|
|
1966
|
+
"Verify URL": {
|
|
1967
|
+
"value": {
|
|
1968
|
+
"custom_download_url": "https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg"
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
"responses": {
|
|
1976
|
+
"200": {
|
|
1977
|
+
"description": "Verification result",
|
|
1978
|
+
"content": {
|
|
1979
|
+
"application/json": {
|
|
1980
|
+
"schema": {
|
|
1981
|
+
"type": "object",
|
|
1982
|
+
"properties": {
|
|
1983
|
+
"valid": {
|
|
1984
|
+
"type": "boolean",
|
|
1985
|
+
"description": "Whether the URL is valid and not expired"
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
"examples": {
|
|
1990
|
+
"Valid URL": {
|
|
1991
|
+
"value": {
|
|
1992
|
+
"valid": true
|
|
1993
|
+
}
|
|
1994
|
+
},
|
|
1995
|
+
"Invalid URL": {
|
|
1996
|
+
"value": {
|
|
1997
|
+
"valid": false
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
"400": {
|
|
2005
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
2006
|
+
},
|
|
2007
|
+
"401": {
|
|
2008
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
2009
|
+
},
|
|
2010
|
+
"500": {
|
|
2011
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
},
|
|
2016
|
+
"/v1/files/public/upload": {
|
|
2017
|
+
"post": {
|
|
2018
|
+
"operationId": "uploadFilePublic",
|
|
2019
|
+
"summary": "uploadFilePublic",
|
|
2020
|
+
"security": [],
|
|
2021
|
+
"description": "Create a pre-signed S3 URL for uploading a file without authentication.\n\n**No authentication required.** This endpoint is intended for public-facing forms and journeys\nwhere end-users need to upload files without logging in.\n\nThe uploaded file is stored temporarily (one week). Use `saveFileV2` with proper authentication\nto store the file permanently.\n\n**Security note:** Files uploaded via this endpoint are temporary and require authenticated\naccess to be saved permanently.\n",
|
|
2022
|
+
"tags": [
|
|
2023
|
+
"File"
|
|
2024
|
+
],
|
|
2025
|
+
"requestBody": {
|
|
2026
|
+
"content": {
|
|
2027
|
+
"application/json": {
|
|
2028
|
+
"schema": {
|
|
2029
|
+
"$ref": "#/components/schemas/UploadFilePayload"
|
|
2030
|
+
},
|
|
2031
|
+
"examples": {
|
|
2032
|
+
"Upload an image": {
|
|
2033
|
+
"description": "Upload an image file",
|
|
2034
|
+
"value": {
|
|
2035
|
+
"filename": "image.png",
|
|
2036
|
+
"mime_type": "image/png"
|
|
2037
|
+
}
|
|
2038
|
+
},
|
|
2039
|
+
"Upload a document": {
|
|
2040
|
+
"description": "Upload a PDF document",
|
|
2041
|
+
"value": {
|
|
2042
|
+
"filename": "document.pdf",
|
|
2043
|
+
"mime_type": "application/pdf"
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
},
|
|
2050
|
+
"responses": {
|
|
2051
|
+
"201": {
|
|
2052
|
+
"description": "Pre-signed URL for uploading the file",
|
|
2053
|
+
"content": {
|
|
2054
|
+
"application/json": {
|
|
2055
|
+
"schema": {
|
|
2056
|
+
"type": "object",
|
|
2057
|
+
"properties": {
|
|
2058
|
+
"s3ref": {
|
|
2059
|
+
"allOf": [
|
|
2060
|
+
{
|
|
2061
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
"description": "S3 reference to use when saving the file permanently"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"example": {
|
|
2068
|
+
"bucket": "epilot-prod-user-content",
|
|
2069
|
+
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
]
|
|
2073
|
+
},
|
|
2074
|
+
"upload_url": {
|
|
2075
|
+
"type": "string",
|
|
2076
|
+
"format": "url",
|
|
2077
|
+
"description": "Pre-signed URL for uploading the file via PUT request",
|
|
2078
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
2079
|
+
},
|
|
2080
|
+
"error": {
|
|
2081
|
+
"type": "string",
|
|
2082
|
+
"description": "Error message if the upload preparation failed",
|
|
2083
|
+
"example": "File entity not found"
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
},
|
|
2090
|
+
"400": {
|
|
2091
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
2092
|
+
},
|
|
2093
|
+
"500": {
|
|
2094
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
},
|
|
2099
|
+
"/v1/{slug}/collections": {
|
|
2100
|
+
"get": {
|
|
2101
|
+
"operationId": "getUserSchemaFileCollections",
|
|
2102
|
+
"summary": "getUserSchemaFileCollections",
|
|
2103
|
+
"description": "Get all file collections for the current user within a specific schema.\n\nCollections help organize files into logical groups (e.g., \"Contracts\", \"Invoices\").\nUser collections are private to the creating user.\n",
|
|
2104
|
+
"tags": [
|
|
2105
|
+
"File Collections"
|
|
2106
|
+
],
|
|
2107
|
+
"parameters": [
|
|
2108
|
+
{
|
|
2109
|
+
"name": "slug",
|
|
2110
|
+
"in": "path",
|
|
2111
|
+
"required": true,
|
|
2112
|
+
"description": "The entity schema slug (e.g., order, opportunity, contact)",
|
|
2113
|
+
"schema": {
|
|
2114
|
+
"type": "string"
|
|
2115
|
+
},
|
|
2116
|
+
"example": "opportunity"
|
|
2117
|
+
}
|
|
2118
|
+
],
|
|
2119
|
+
"responses": {
|
|
2120
|
+
"200": {
|
|
2121
|
+
"description": "List of collections for the user and schema",
|
|
2122
|
+
"content": {
|
|
2123
|
+
"application/json": {
|
|
2124
|
+
"schema": {
|
|
2125
|
+
"type": "array",
|
|
2126
|
+
"items": {
|
|
2127
|
+
"$ref": "#/components/schemas/FileCollectionItem"
|
|
2128
|
+
}
|
|
2129
|
+
},
|
|
2130
|
+
"example": [
|
|
2131
|
+
{
|
|
2132
|
+
"slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",
|
|
2133
|
+
"name": "Documents",
|
|
2134
|
+
"id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
2135
|
+
"parents": [],
|
|
2136
|
+
"starred": false,
|
|
2137
|
+
"order": 0,
|
|
2138
|
+
"created_at": "2024-01-01T12:00:00Z",
|
|
2139
|
+
"updated_at": "2024-01-02T12:00:00Z"
|
|
2140
|
+
}
|
|
2141
|
+
]
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
},
|
|
2145
|
+
"401": {
|
|
2146
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
2147
|
+
},
|
|
2148
|
+
"500": {
|
|
2149
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
},
|
|
2153
|
+
"post": {
|
|
2154
|
+
"operationId": "createUserSchemaFileCollection",
|
|
2155
|
+
"summary": "createUserSchemaFileCollection",
|
|
2156
|
+
"description": "Create a new file collection for the current user within a specific schema.\n\nThe collection will be private to the creating user and associated with the specified schema.\n",
|
|
2157
|
+
"tags": [
|
|
2158
|
+
"File Collections"
|
|
2159
|
+
],
|
|
2160
|
+
"parameters": [
|
|
2161
|
+
{
|
|
2162
|
+
"name": "slug",
|
|
2163
|
+
"in": "path",
|
|
2164
|
+
"required": true,
|
|
2165
|
+
"description": "The entity schema slug (e.g., order, opportunity, contact)",
|
|
2166
|
+
"schema": {
|
|
2167
|
+
"type": "string"
|
|
2168
|
+
},
|
|
2169
|
+
"example": "opportunity"
|
|
2170
|
+
}
|
|
2171
|
+
],
|
|
2172
|
+
"requestBody": {
|
|
2173
|
+
"required": true,
|
|
2174
|
+
"content": {
|
|
2175
|
+
"application/json": {
|
|
2176
|
+
"schema": {
|
|
2177
|
+
"$ref": "#/components/schemas/FileCollectionCreateRequest"
|
|
2178
|
+
},
|
|
2179
|
+
"examples": {
|
|
2180
|
+
"Create collection": {
|
|
2181
|
+
"value": {
|
|
2182
|
+
"name": "Contracts",
|
|
2183
|
+
"starred": false
|
|
2184
|
+
}
|
|
2185
|
+
},
|
|
2186
|
+
"Create nested collection": {
|
|
2187
|
+
"value": {
|
|
2188
|
+
"name": "2024 Contracts",
|
|
2189
|
+
"parents": [
|
|
2190
|
+
"_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:contracts"
|
|
2191
|
+
]
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
},
|
|
2198
|
+
"responses": {
|
|
2199
|
+
"201": {
|
|
2200
|
+
"description": "File collection created successfully",
|
|
2201
|
+
"content": {
|
|
2202
|
+
"application/json": {
|
|
2203
|
+
"schema": {
|
|
2204
|
+
"$ref": "#/components/schemas/FileCollectionItem"
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
},
|
|
2209
|
+
"400": {
|
|
2210
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
2211
|
+
},
|
|
2212
|
+
"401": {
|
|
2213
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
2214
|
+
},
|
|
2215
|
+
"500": {
|
|
2216
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
},
|
|
2221
|
+
"/v1/{slug}/collections/{collectionSlug}": {
|
|
2222
|
+
"put": {
|
|
2223
|
+
"operationId": "updateUserSchemaFileCollection",
|
|
2224
|
+
"summary": "updateUserSchemaFileCollection",
|
|
2225
|
+
"description": "Update an existing file collection.\n\nYou can update the name, parent relationships, starred status, and enabled locations/purposes.\n",
|
|
2226
|
+
"tags": [
|
|
2227
|
+
"File Collections"
|
|
2228
|
+
],
|
|
2229
|
+
"parameters": [
|
|
2230
|
+
{
|
|
2231
|
+
"name": "slug",
|
|
2232
|
+
"in": "path",
|
|
2233
|
+
"required": true,
|
|
2234
|
+
"description": "The entity schema slug (e.g., order, opportunity)",
|
|
2235
|
+
"schema": {
|
|
2236
|
+
"type": "string"
|
|
2237
|
+
},
|
|
2238
|
+
"example": "opportunity"
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
"name": "collectionSlug",
|
|
2242
|
+
"in": "path",
|
|
2243
|
+
"required": true,
|
|
2244
|
+
"description": "The collection slug identifier",
|
|
2245
|
+
"schema": {
|
|
2246
|
+
"type": "string"
|
|
2247
|
+
},
|
|
2248
|
+
"example": "documents"
|
|
2249
|
+
}
|
|
2250
|
+
],
|
|
2251
|
+
"requestBody": {
|
|
2252
|
+
"required": true,
|
|
2253
|
+
"content": {
|
|
2254
|
+
"application/json": {
|
|
2255
|
+
"schema": {
|
|
2256
|
+
"$ref": "#/components/schemas/FileCollectionAttributes"
|
|
2257
|
+
},
|
|
2258
|
+
"examples": {
|
|
2259
|
+
"Rename collection": {
|
|
2260
|
+
"value": {
|
|
2261
|
+
"name": "Important Documents"
|
|
2262
|
+
}
|
|
2263
|
+
},
|
|
2264
|
+
"Star collection": {
|
|
2265
|
+
"value": {
|
|
2266
|
+
"starred": true
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
},
|
|
2273
|
+
"responses": {
|
|
2274
|
+
"200": {
|
|
2275
|
+
"description": "File collection updated successfully",
|
|
2276
|
+
"content": {
|
|
2277
|
+
"application/json": {
|
|
2278
|
+
"schema": {
|
|
2279
|
+
"$ref": "#/components/schemas/FileCollectionItem"
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
},
|
|
2284
|
+
"400": {
|
|
2285
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
2286
|
+
},
|
|
2287
|
+
"401": {
|
|
2288
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
2289
|
+
},
|
|
2290
|
+
"404": {
|
|
2291
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
2292
|
+
},
|
|
2293
|
+
"500": {
|
|
2294
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
},
|
|
2298
|
+
"delete": {
|
|
2299
|
+
"operationId": "deleteUserSchemaFileCollection",
|
|
2300
|
+
"summary": "deleteUserSchemaFileCollection",
|
|
2301
|
+
"description": "Delete a file collection.\n\n**Note:** Deleting a collection does not delete the files within it.\nFiles will remain but will no longer be associated with this collection.\n",
|
|
2302
|
+
"tags": [
|
|
2303
|
+
"File Collections"
|
|
2304
|
+
],
|
|
2305
|
+
"parameters": [
|
|
2306
|
+
{
|
|
2307
|
+
"name": "slug",
|
|
2308
|
+
"in": "path",
|
|
2309
|
+
"required": true,
|
|
2310
|
+
"description": "The entity schema slug (e.g., order, opportunity)",
|
|
2311
|
+
"schema": {
|
|
2312
|
+
"type": "string"
|
|
2313
|
+
},
|
|
2314
|
+
"example": "opportunity"
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
"name": "collectionSlug",
|
|
2318
|
+
"in": "path",
|
|
2319
|
+
"required": true,
|
|
2320
|
+
"description": "The collection slug identifier",
|
|
2321
|
+
"schema": {
|
|
2322
|
+
"type": "string"
|
|
2323
|
+
},
|
|
2324
|
+
"example": "documents"
|
|
2325
|
+
}
|
|
2326
|
+
],
|
|
2327
|
+
"responses": {
|
|
2328
|
+
"200": {
|
|
2329
|
+
"description": "File collection deleted successfully"
|
|
2330
|
+
},
|
|
2331
|
+
"401": {
|
|
2332
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
2333
|
+
},
|
|
2334
|
+
"404": {
|
|
2335
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
2336
|
+
},
|
|
2337
|
+
"500": {
|
|
2338
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
},
|
|
2343
|
+
"/v1/entity/{id}/collections/{collectionSlug}/files": {
|
|
2344
|
+
"get": {
|
|
2345
|
+
"operationId": "getFilesInCollection",
|
|
2346
|
+
"summary": "getFilesInCollection",
|
|
2347
|
+
"description": "Get all files within a specific collection for an entity.\n\nThe schema is automatically derived from the entity. This endpoint requires\nview permission on the parent entity to access its files.\n",
|
|
2348
|
+
"tags": [
|
|
2349
|
+
"File Collections"
|
|
2350
|
+
],
|
|
2351
|
+
"parameters": [
|
|
2352
|
+
{
|
|
2353
|
+
"$ref": "#/components/parameters/EntityIdPathParam"
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
"name": "collectionSlug",
|
|
2357
|
+
"in": "path",
|
|
2358
|
+
"required": true,
|
|
2359
|
+
"description": "The collection slug identifier",
|
|
2360
|
+
"schema": {
|
|
2361
|
+
"type": "string"
|
|
2362
|
+
},
|
|
2363
|
+
"example": "documents"
|
|
2364
|
+
}
|
|
2365
|
+
],
|
|
2366
|
+
"responses": {
|
|
2367
|
+
"200": {
|
|
2368
|
+
"description": "List of files in the collection",
|
|
2369
|
+
"content": {
|
|
2370
|
+
"application/json": {
|
|
2371
|
+
"schema": {
|
|
2372
|
+
"type": "array",
|
|
2373
|
+
"items": {
|
|
2374
|
+
"$ref": "#/components/schemas/FileEntity"
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
},
|
|
2380
|
+
"401": {
|
|
2381
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
2382
|
+
},
|
|
2383
|
+
"403": {
|
|
2384
|
+
"description": "Insufficient permissions to view the entity's files",
|
|
2385
|
+
"content": {
|
|
2386
|
+
"application/json": {
|
|
2387
|
+
"schema": {
|
|
2388
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
2389
|
+
},
|
|
2390
|
+
"example": {
|
|
2391
|
+
"status": 403,
|
|
2392
|
+
"error": "User must have permission to view this entity to access its files"
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
},
|
|
2397
|
+
"404": {
|
|
2398
|
+
"description": "Entity or collection not found",
|
|
2399
|
+
"content": {
|
|
2400
|
+
"application/json": {
|
|
2401
|
+
"schema": {
|
|
2402
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
2403
|
+
},
|
|
2404
|
+
"example": {
|
|
2405
|
+
"status": 404,
|
|
2406
|
+
"error": "Entity not found"
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
},
|
|
2411
|
+
"500": {
|
|
2412
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
2415
|
+
}
|
|
2416
|
+
},
|
|
2417
|
+
"/v1/collections/{schemaSlug}": {
|
|
2418
|
+
"get": {
|
|
2419
|
+
"operationId": "getGlobalFileCollections",
|
|
2420
|
+
"summary": "getGlobalFileCollections",
|
|
2421
|
+
"description": "Get all global file collections for a specific schema.\n\nGlobal collections are shared across all users in the organization for the specified schema.\nUnlike user collections, these are visible to everyone with access to entities of that schema.\n",
|
|
2422
|
+
"tags": [
|
|
2423
|
+
"File Collections"
|
|
2424
|
+
],
|
|
2425
|
+
"parameters": [
|
|
2426
|
+
{
|
|
2427
|
+
"name": "schemaSlug",
|
|
2428
|
+
"in": "path",
|
|
2429
|
+
"required": true,
|
|
2430
|
+
"description": "The entity schema slug (e.g., order, opportunity, contact)",
|
|
2431
|
+
"schema": {
|
|
2432
|
+
"type": "string"
|
|
2433
|
+
},
|
|
2434
|
+
"example": "order"
|
|
2435
|
+
}
|
|
2436
|
+
],
|
|
2437
|
+
"responses": {
|
|
2438
|
+
"200": {
|
|
2439
|
+
"description": "List of global collections for the schema",
|
|
2440
|
+
"content": {
|
|
2441
|
+
"application/json": {
|
|
2442
|
+
"schema": {
|
|
2443
|
+
"type": "array",
|
|
2444
|
+
"items": {
|
|
2445
|
+
"$ref": "#/components/schemas/FileCollectionItem"
|
|
2446
|
+
}
|
|
2447
|
+
},
|
|
2448
|
+
"example": [
|
|
2449
|
+
{
|
|
2450
|
+
"slug": "_system_files_collection_schema_order:templates",
|
|
2451
|
+
"name": "Templates",
|
|
2452
|
+
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2453
|
+
"parents": [],
|
|
2454
|
+
"starred": false,
|
|
2455
|
+
"order": 0,
|
|
2456
|
+
"created_at": "2024-01-01T12:00:00Z",
|
|
2457
|
+
"updated_at": "2024-01-01T12:00:00Z"
|
|
2458
|
+
}
|
|
2459
|
+
]
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
},
|
|
2463
|
+
"401": {
|
|
2464
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
2465
|
+
},
|
|
2466
|
+
"500": {
|
|
2467
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
},
|
|
2473
|
+
"components": {
|
|
2474
|
+
"securitySchemes": {
|
|
2475
|
+
"EpilotAuth": {
|
|
2476
|
+
"type": "http",
|
|
2477
|
+
"scheme": "bearer",
|
|
2478
|
+
"bearerFormat": "JWT",
|
|
2479
|
+
"description": "Bearer token authentication using epilot OAuth2 JWT tokens.\n\n**When to use:** Server-to-server integrations, API clients, and programmatic access.\n\n**How to obtain a token:**\n1. Use the epilot Auth API to authenticate\n2. Include the token in the `Authorization` header: `Authorization: Bearer <token>`\n\n**Example:**\n```\nAuthorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\n```\n\n**Token contents:** The JWT contains user identity, organization ID, and permissions.\n"
|
|
2480
|
+
},
|
|
2481
|
+
"CookieAuth": {
|
|
2482
|
+
"type": "apiKey",
|
|
2483
|
+
"in": "cookie",
|
|
2484
|
+
"name": "token",
|
|
2485
|
+
"description": "Cookie-based session authentication for browser applications.\n\n**When to use:** Browser-based applications that need to:\n- Embed file previews directly in `<img>` tags\n- Download files without JavaScript token handling\n- Access files from HTML elements that cannot set custom headers\n\n**How to establish a session:**\n1. Obtain a Bearer token via EpilotAuth\n2. Call `GET /v1/files/session` with the Bearer token\n3. The server sets an HTTP-only cookie named `token`\n4. Subsequent requests automatically include the cookie\n\n**Security note:** The cookie is HTTP-only and secure, protecting against XSS attacks.\n"
|
|
2486
|
+
}
|
|
2487
|
+
},
|
|
2488
|
+
"schemas": {
|
|
2489
|
+
"EntityId": {
|
|
2490
|
+
"type": "string",
|
|
2491
|
+
"example": "ef7d985c-2385-44f4-9c71-ae06a52264f8"
|
|
2492
|
+
},
|
|
2493
|
+
"EntitySlug": {
|
|
2494
|
+
"description": "URL-friendly identifier for the entity schema",
|
|
2495
|
+
"type": "string",
|
|
2496
|
+
"example": "contact"
|
|
2497
|
+
},
|
|
2498
|
+
"ActivityId": {
|
|
2499
|
+
"type": "string",
|
|
2500
|
+
"format": "ulid",
|
|
2501
|
+
"description": "See https://github.com/ulid/spec",
|
|
2502
|
+
"example": "01F130Q52Q6MWSNS8N2AVXV4JN"
|
|
2503
|
+
},
|
|
2504
|
+
"FileEntityId": {
|
|
2505
|
+
"oneOf": [
|
|
2506
|
+
{
|
|
2507
|
+
"type": "string",
|
|
2508
|
+
"maxLength": 0,
|
|
2509
|
+
"description": "Empty string (used when file ID not yet assigned)"
|
|
2510
|
+
},
|
|
2511
|
+
{
|
|
2512
|
+
"type": "string",
|
|
2513
|
+
"format": "uuid",
|
|
2514
|
+
"description": "Valid UUID v4"
|
|
2515
|
+
}
|
|
2516
|
+
],
|
|
2517
|
+
"example": "ef7d985c-2385-44f4-9c71-ae06a52264f8"
|
|
2518
|
+
},
|
|
2519
|
+
"FileAttributes": {
|
|
2520
|
+
"type": "object",
|
|
2521
|
+
"properties": {
|
|
2522
|
+
"_tags": {
|
|
2523
|
+
"type": "array",
|
|
2524
|
+
"items": {
|
|
2525
|
+
"type": "string"
|
|
2526
|
+
},
|
|
2527
|
+
"example": [
|
|
2528
|
+
"tag1",
|
|
2529
|
+
"tag2"
|
|
2530
|
+
]
|
|
2531
|
+
},
|
|
2532
|
+
"_purpose": {
|
|
2533
|
+
"type": "array",
|
|
2534
|
+
"items": {
|
|
2535
|
+
"type": "string"
|
|
2536
|
+
},
|
|
2537
|
+
"example": [
|
|
2538
|
+
"8d396871-95a0-4c9d-bb4d-9eda9c35776c",
|
|
2539
|
+
"da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"
|
|
2540
|
+
]
|
|
2541
|
+
},
|
|
2542
|
+
"_manifest": {
|
|
2543
|
+
"type": "array",
|
|
2544
|
+
"description": "Manifest ID used to create/update the entity",
|
|
2545
|
+
"items": {
|
|
2546
|
+
"type": "string",
|
|
2547
|
+
"format": "uuid",
|
|
2548
|
+
"example": "123e4567-e89b-12d3-a456-426614174000"
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2551
|
+
"filename": {
|
|
2552
|
+
"type": "string",
|
|
2553
|
+
"example": "document.pdf"
|
|
2554
|
+
},
|
|
2555
|
+
"type": {
|
|
2556
|
+
"$ref": "#/components/schemas/FileType"
|
|
2557
|
+
},
|
|
2558
|
+
"mime_type": {
|
|
2559
|
+
"type": "string",
|
|
2560
|
+
"description": "MIME type of the file",
|
|
2561
|
+
"example": "application/pdf"
|
|
2562
|
+
},
|
|
2563
|
+
"size_bytes": {
|
|
2564
|
+
"type": "integer",
|
|
2565
|
+
"minimum": 0,
|
|
2566
|
+
"description": "File size in bytes",
|
|
2567
|
+
"example": 1234,
|
|
2568
|
+
"readOnly": true
|
|
2569
|
+
},
|
|
2570
|
+
"readable_size": {
|
|
2571
|
+
"type": "string",
|
|
2572
|
+
"example": "1.2 MB",
|
|
2573
|
+
"description": "Human readable file size",
|
|
2574
|
+
"readOnly": true
|
|
2575
|
+
},
|
|
2576
|
+
"etag": {
|
|
2577
|
+
"type": "string",
|
|
2578
|
+
"description": "Content hash (S3 ETag) of the latest file version. For single-part uploads this is the hex MD5 of the content and is stable across orgs, so identical content yields an identical etag. Used to detect real content changes without re-downloading the bytes.",
|
|
2579
|
+
"example": "9bb58f26192e4ba00f01e2e7b136bbd8",
|
|
2580
|
+
"readOnly": true
|
|
2581
|
+
},
|
|
2582
|
+
"access_control": {
|
|
2583
|
+
"type": "string",
|
|
2584
|
+
"default": "private",
|
|
2585
|
+
"enum": [
|
|
2586
|
+
"private",
|
|
2587
|
+
"public-read"
|
|
2588
|
+
]
|
|
2589
|
+
},
|
|
2590
|
+
"public_url": {
|
|
2591
|
+
"description": "Direct URL for file (public only if file access control is public-read)",
|
|
2592
|
+
"type": "string",
|
|
2593
|
+
"format": "url",
|
|
2594
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",
|
|
2595
|
+
"readOnly": true
|
|
2596
|
+
},
|
|
2597
|
+
"custom_download_url": {
|
|
2598
|
+
"$ref": "#/components/schemas/CustomDownloadUrl"
|
|
2599
|
+
},
|
|
2600
|
+
"custom_download_url_auth": {
|
|
2601
|
+
"$ref": "#/components/schemas/CustomDownloadUrlAuth"
|
|
2602
|
+
},
|
|
2603
|
+
"preview_summary_de": {
|
|
2604
|
+
"type": "string",
|
|
2605
|
+
"description": "Compact German summary for hover and list preview surfaces.",
|
|
2606
|
+
"readOnly": true
|
|
2607
|
+
},
|
|
2608
|
+
"short_summary_de": {
|
|
2609
|
+
"type": "string",
|
|
2610
|
+
"description": "Short German paragraph summary for file preview surfaces.",
|
|
2611
|
+
"readOnly": true
|
|
2612
|
+
},
|
|
2613
|
+
"preview_summary_en": {
|
|
2614
|
+
"type": "string",
|
|
2615
|
+
"description": "Compact English summary for hover and list preview surfaces.",
|
|
2616
|
+
"readOnly": true
|
|
2617
|
+
},
|
|
2618
|
+
"short_summary_en": {
|
|
2619
|
+
"type": "string",
|
|
2620
|
+
"description": "Short English paragraph summary for file preview surfaces.",
|
|
2621
|
+
"readOnly": true
|
|
2622
|
+
},
|
|
2623
|
+
"file_summary_execution_id": {
|
|
2624
|
+
"type": "string",
|
|
2625
|
+
"format": "uuid",
|
|
2626
|
+
"description": "AI execution that produced the current summary. Used to correlate user feedback.",
|
|
2627
|
+
"readOnly": true
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
},
|
|
2631
|
+
"FileType": {
|
|
2632
|
+
"type": "string",
|
|
2633
|
+
"enum": [
|
|
2634
|
+
"document",
|
|
2635
|
+
"document_template",
|
|
2636
|
+
"text",
|
|
2637
|
+
"image",
|
|
2638
|
+
"video",
|
|
2639
|
+
"audio",
|
|
2640
|
+
"spreadsheet",
|
|
2641
|
+
"presentation",
|
|
2642
|
+
"font",
|
|
2643
|
+
"archive",
|
|
2644
|
+
"application",
|
|
2645
|
+
"unknown"
|
|
2646
|
+
]
|
|
2647
|
+
},
|
|
2648
|
+
"FileSummaryJobStatus": {
|
|
2649
|
+
"type": "string",
|
|
2650
|
+
"description": "Current state of a file summary job.",
|
|
2651
|
+
"enum": [
|
|
2652
|
+
"queued",
|
|
2653
|
+
"waiting_for_extraction",
|
|
2654
|
+
"processing",
|
|
2655
|
+
"completed",
|
|
2656
|
+
"failed",
|
|
2657
|
+
"unsupported",
|
|
2658
|
+
"stale"
|
|
2659
|
+
],
|
|
2660
|
+
"readOnly": true
|
|
2661
|
+
},
|
|
2662
|
+
"FileSummaryJob": {
|
|
2663
|
+
"type": "object",
|
|
2664
|
+
"properties": {
|
|
2665
|
+
"job_id": {
|
|
2666
|
+
"type": "string",
|
|
2667
|
+
"format": "uuid",
|
|
2668
|
+
"description": "File summary job ID."
|
|
2669
|
+
},
|
|
2670
|
+
"file_id": {
|
|
2671
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
2672
|
+
},
|
|
2673
|
+
"status": {
|
|
2674
|
+
"$ref": "#/components/schemas/FileSummaryJobStatus"
|
|
2675
|
+
},
|
|
2676
|
+
"error": {
|
|
2677
|
+
"type": "string",
|
|
2678
|
+
"description": "Human-readable failure or unsupported reason when available."
|
|
2679
|
+
},
|
|
2680
|
+
"created_at": {
|
|
2681
|
+
"type": "string",
|
|
2682
|
+
"format": "date-time"
|
|
2683
|
+
},
|
|
2684
|
+
"updated_at": {
|
|
2685
|
+
"type": "string",
|
|
2686
|
+
"format": "date-time"
|
|
2687
|
+
},
|
|
2688
|
+
"completed_at": {
|
|
2689
|
+
"type": "string",
|
|
2690
|
+
"format": "date-time"
|
|
2691
|
+
}
|
|
2692
|
+
},
|
|
2693
|
+
"required": [
|
|
2694
|
+
"job_id",
|
|
2695
|
+
"file_id",
|
|
2696
|
+
"status",
|
|
2697
|
+
"created_at",
|
|
2698
|
+
"updated_at"
|
|
2699
|
+
]
|
|
2700
|
+
},
|
|
2701
|
+
"FileSummary": {
|
|
2702
|
+
"type": "object",
|
|
2703
|
+
"properties": {
|
|
2704
|
+
"status": {
|
|
2705
|
+
"$ref": "#/components/schemas/FileSummaryJobStatus"
|
|
2706
|
+
},
|
|
2707
|
+
"job_id": {
|
|
2708
|
+
"type": "string",
|
|
2709
|
+
"format": "uuid",
|
|
2710
|
+
"description": "Current summary job ID when available."
|
|
2711
|
+
},
|
|
2712
|
+
"feedback_available": {
|
|
2713
|
+
"type": "boolean",
|
|
2714
|
+
"description": "Whether the current summary can receive user feedback."
|
|
2715
|
+
},
|
|
2716
|
+
"preview_summary_de": {
|
|
2717
|
+
"type": "string",
|
|
2718
|
+
"nullable": true,
|
|
2719
|
+
"description": "Compact German summary for hover and list preview surfaces."
|
|
2720
|
+
},
|
|
2721
|
+
"short_summary_de": {
|
|
2722
|
+
"type": "string",
|
|
2723
|
+
"nullable": true,
|
|
2724
|
+
"description": "Short German paragraph summary for file preview surfaces."
|
|
2725
|
+
},
|
|
2726
|
+
"preview_summary_en": {
|
|
2727
|
+
"type": "string",
|
|
2728
|
+
"nullable": true,
|
|
2729
|
+
"description": "Compact English summary for hover and list preview surfaces."
|
|
2730
|
+
},
|
|
2731
|
+
"short_summary_en": {
|
|
2732
|
+
"type": "string",
|
|
2733
|
+
"nullable": true,
|
|
2734
|
+
"description": "Short English paragraph summary for file preview surfaces."
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
},
|
|
2738
|
+
"FileSummaryFeedback": {
|
|
2739
|
+
"type": "object",
|
|
2740
|
+
"required": [
|
|
2741
|
+
"rating",
|
|
2742
|
+
"user_id",
|
|
2743
|
+
"submitted_at"
|
|
2744
|
+
],
|
|
2745
|
+
"properties": {
|
|
2746
|
+
"rating": {
|
|
2747
|
+
"type": "string",
|
|
2748
|
+
"enum": [
|
|
2749
|
+
"up",
|
|
2750
|
+
"down"
|
|
2751
|
+
]
|
|
2752
|
+
},
|
|
2753
|
+
"comment": {
|
|
2754
|
+
"type": "string"
|
|
2755
|
+
},
|
|
2756
|
+
"user_id": {
|
|
2757
|
+
"type": "string"
|
|
2758
|
+
},
|
|
2759
|
+
"submitted_at": {
|
|
2760
|
+
"type": "string",
|
|
2761
|
+
"format": "date-time"
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
},
|
|
2765
|
+
"FileSummaryFeedbackResponse": {
|
|
2766
|
+
"type": "object",
|
|
2767
|
+
"required": [
|
|
2768
|
+
"feedback"
|
|
2769
|
+
],
|
|
2770
|
+
"properties": {
|
|
2771
|
+
"feedback": {
|
|
2772
|
+
"allOf": [
|
|
2773
|
+
{
|
|
2774
|
+
"$ref": "#/components/schemas/FileSummaryFeedback"
|
|
2775
|
+
}
|
|
2776
|
+
],
|
|
2777
|
+
"nullable": true
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
},
|
|
2781
|
+
"PutFileSummaryFeedbackRequest": {
|
|
2782
|
+
"type": "object",
|
|
2783
|
+
"required": [
|
|
2784
|
+
"rating"
|
|
2785
|
+
],
|
|
2786
|
+
"properties": {
|
|
2787
|
+
"rating": {
|
|
2788
|
+
"type": "string",
|
|
2789
|
+
"enum": [
|
|
2790
|
+
"up",
|
|
2791
|
+
"down"
|
|
2792
|
+
]
|
|
2793
|
+
},
|
|
2794
|
+
"comment": {
|
|
2795
|
+
"type": "string"
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
},
|
|
2799
|
+
"FileTextStatus": {
|
|
2800
|
+
"type": "string",
|
|
2801
|
+
"description": "Availability of the plain-text representation for a file entity.",
|
|
2802
|
+
"enum": [
|
|
2803
|
+
"ready",
|
|
2804
|
+
"not_ready",
|
|
2805
|
+
"unsupported"
|
|
2806
|
+
],
|
|
2807
|
+
"readOnly": true
|
|
2808
|
+
},
|
|
2809
|
+
"FileText": {
|
|
2810
|
+
"type": "object",
|
|
2811
|
+
"properties": {
|
|
2812
|
+
"status": {
|
|
2813
|
+
"$ref": "#/components/schemas/FileTextStatus"
|
|
2814
|
+
},
|
|
2815
|
+
"text": {
|
|
2816
|
+
"type": "string"
|
|
2817
|
+
},
|
|
2818
|
+
"truncated": {
|
|
2819
|
+
"type": "boolean"
|
|
2820
|
+
},
|
|
2821
|
+
"total_chars": {
|
|
2822
|
+
"type": "integer",
|
|
2823
|
+
"minimum": 0
|
|
2824
|
+
}
|
|
2825
|
+
},
|
|
2826
|
+
"required": [
|
|
2827
|
+
"status"
|
|
2828
|
+
],
|
|
2829
|
+
"oneOf": [
|
|
2830
|
+
{
|
|
2831
|
+
"$ref": "#/components/schemas/FileTextReady"
|
|
2832
|
+
},
|
|
2833
|
+
{
|
|
2834
|
+
"$ref": "#/components/schemas/FileTextNotReady"
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
"$ref": "#/components/schemas/FileTextUnsupported"
|
|
2838
|
+
}
|
|
2839
|
+
]
|
|
2840
|
+
},
|
|
2841
|
+
"FileTextReady": {
|
|
2842
|
+
"type": "object",
|
|
2843
|
+
"additionalProperties": false,
|
|
2844
|
+
"properties": {
|
|
2845
|
+
"status": {
|
|
2846
|
+
"type": "string",
|
|
2847
|
+
"enum": [
|
|
2848
|
+
"ready"
|
|
2849
|
+
]
|
|
2850
|
+
},
|
|
2851
|
+
"text": {
|
|
2852
|
+
"type": "string",
|
|
2853
|
+
"description": "Plain-text representation, trimmed and truncated to a server-side limit of 50000 characters."
|
|
2854
|
+
},
|
|
2855
|
+
"truncated": {
|
|
2856
|
+
"type": "boolean",
|
|
2857
|
+
"description": "True when the returned text was cut off by the character limit."
|
|
2858
|
+
},
|
|
2859
|
+
"total_chars": {
|
|
2860
|
+
"type": "integer",
|
|
2861
|
+
"minimum": 0,
|
|
2862
|
+
"description": "Length of the full text before truncation."
|
|
2863
|
+
}
|
|
2864
|
+
},
|
|
2865
|
+
"required": [
|
|
2866
|
+
"status",
|
|
2867
|
+
"text",
|
|
2868
|
+
"truncated",
|
|
2869
|
+
"total_chars"
|
|
2870
|
+
]
|
|
2871
|
+
},
|
|
2872
|
+
"FileTextNotReady": {
|
|
2873
|
+
"type": "object",
|
|
2874
|
+
"additionalProperties": false,
|
|
2875
|
+
"properties": {
|
|
2876
|
+
"status": {
|
|
2877
|
+
"type": "string",
|
|
2878
|
+
"enum": [
|
|
2879
|
+
"not_ready"
|
|
2880
|
+
]
|
|
2881
|
+
}
|
|
2882
|
+
},
|
|
2883
|
+
"required": [
|
|
2884
|
+
"status"
|
|
2885
|
+
]
|
|
2886
|
+
},
|
|
2887
|
+
"FileTextUnsupported": {
|
|
2888
|
+
"type": "object",
|
|
2889
|
+
"additionalProperties": false,
|
|
2890
|
+
"properties": {
|
|
2891
|
+
"status": {
|
|
2892
|
+
"type": "string",
|
|
2893
|
+
"enum": [
|
|
2894
|
+
"unsupported"
|
|
2895
|
+
]
|
|
2896
|
+
}
|
|
2897
|
+
},
|
|
2898
|
+
"required": [
|
|
2899
|
+
"status"
|
|
2900
|
+
]
|
|
2901
|
+
},
|
|
2902
|
+
"CustomDownloadUrl": {
|
|
2903
|
+
"description": "Custom external download url used for the file",
|
|
2904
|
+
"type": "string",
|
|
2905
|
+
"format": "uri",
|
|
2906
|
+
"example": "https://some-api-url.com/download?file_id=123"
|
|
2907
|
+
},
|
|
2908
|
+
"CustomDownloadUrlAuth": {
|
|
2909
|
+
"description": "Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.",
|
|
2910
|
+
"type": "string",
|
|
2911
|
+
"enum": [
|
|
2912
|
+
"presigned",
|
|
2913
|
+
"token"
|
|
2914
|
+
],
|
|
2915
|
+
"default": "presigned",
|
|
2916
|
+
"example": "token"
|
|
2917
|
+
},
|
|
2918
|
+
"FileEntity": {
|
|
2919
|
+
"allOf": [
|
|
2920
|
+
{
|
|
2921
|
+
"type": "object",
|
|
2922
|
+
"properties": {
|
|
2923
|
+
"_title": {
|
|
2924
|
+
"type": "string",
|
|
2925
|
+
"example": "document.pdf"
|
|
2926
|
+
},
|
|
2927
|
+
"_schema": {
|
|
2928
|
+
"type": "string",
|
|
2929
|
+
"enum": [
|
|
2930
|
+
"file"
|
|
2931
|
+
],
|
|
2932
|
+
"readOnly": true
|
|
2933
|
+
},
|
|
2934
|
+
"_org": {
|
|
2935
|
+
"type": "string",
|
|
2936
|
+
"example": "123",
|
|
2937
|
+
"readOnly": true
|
|
2938
|
+
},
|
|
2939
|
+
"_id": {
|
|
2940
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
},
|
|
2944
|
+
{
|
|
2945
|
+
"$ref": "#/components/schemas/FileAttributes"
|
|
2946
|
+
},
|
|
2947
|
+
{
|
|
2948
|
+
"type": "object",
|
|
2949
|
+
"properties": {
|
|
2950
|
+
"source_url": {
|
|
2951
|
+
"type": "string",
|
|
2952
|
+
"description": "Source URL for the file. Included if the entity was created from source_url, or when ?source_url=true",
|
|
2953
|
+
"example": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf"
|
|
2954
|
+
},
|
|
2955
|
+
"s3ref": {
|
|
2956
|
+
"allOf": [
|
|
2957
|
+
{
|
|
2958
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
2959
|
+
},
|
|
2960
|
+
{
|
|
2961
|
+
"readOnly": true
|
|
2962
|
+
}
|
|
2963
|
+
]
|
|
2964
|
+
},
|
|
2965
|
+
"versions": {
|
|
2966
|
+
"type": "array",
|
|
2967
|
+
"items": {
|
|
2968
|
+
"$ref": "#/components/schemas/FileItem"
|
|
2969
|
+
},
|
|
2970
|
+
"readOnly": true
|
|
2971
|
+
},
|
|
2972
|
+
"_updated_at": {
|
|
2973
|
+
"type": "string",
|
|
2974
|
+
"format": "date-time",
|
|
2975
|
+
"readOnly": true
|
|
2976
|
+
},
|
|
2977
|
+
"_created_at": {
|
|
2978
|
+
"type": "string",
|
|
2979
|
+
"format": "date-time",
|
|
2980
|
+
"readOnly": true
|
|
2981
|
+
},
|
|
2982
|
+
"_acl": {
|
|
2983
|
+
"$ref": "#/components/schemas/BaseEntityAcl"
|
|
2984
|
+
},
|
|
2985
|
+
"_owners": {
|
|
2986
|
+
"type": "array",
|
|
2987
|
+
"readOnly": true,
|
|
2988
|
+
"items": {
|
|
2989
|
+
"$ref": "#/components/schemas/BaseEntityOwner"
|
|
2990
|
+
}
|
|
2991
|
+
},
|
|
2992
|
+
"__additional": {
|
|
2993
|
+
"type": "object",
|
|
2994
|
+
"description": "Additional fields that are not part of the schema",
|
|
2995
|
+
"additionalProperties": true,
|
|
2996
|
+
"nullable": true
|
|
2997
|
+
}
|
|
2998
|
+
},
|
|
2999
|
+
"required": [
|
|
3000
|
+
"_title",
|
|
3001
|
+
"_schema",
|
|
3002
|
+
"_org",
|
|
3003
|
+
"_id",
|
|
3004
|
+
"filename",
|
|
3005
|
+
"type",
|
|
3006
|
+
"access_control",
|
|
3007
|
+
"versions"
|
|
3008
|
+
]
|
|
3009
|
+
}
|
|
3010
|
+
]
|
|
3011
|
+
},
|
|
3012
|
+
"CommonSaveFilePayload": {
|
|
3013
|
+
"type": "object",
|
|
3014
|
+
"properties": {
|
|
3015
|
+
"_id": {
|
|
3016
|
+
"allOf": [
|
|
3017
|
+
{
|
|
3018
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
3019
|
+
},
|
|
3020
|
+
{
|
|
3021
|
+
"description": "if passed, adds a new version to existing file entity"
|
|
3022
|
+
}
|
|
3023
|
+
]
|
|
3024
|
+
},
|
|
3025
|
+
"file_entity_id": {
|
|
3026
|
+
"type": "string",
|
|
3027
|
+
"description": "Deprecated, use _id instead",
|
|
3028
|
+
"deprecated": true
|
|
3029
|
+
},
|
|
3030
|
+
"relations": {
|
|
3031
|
+
"type": "array",
|
|
3032
|
+
"description": "List of entities to relate the file to",
|
|
3033
|
+
"items": {
|
|
3034
|
+
"$ref": "#/components/schemas/FileRelationItem"
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
},
|
|
3038
|
+
"additionalProperties": true
|
|
3039
|
+
},
|
|
3040
|
+
"SaveS3FilePayload": {
|
|
3041
|
+
"allOf": [
|
|
3042
|
+
{
|
|
3043
|
+
"$ref": "#/components/schemas/CommonSaveFilePayload"
|
|
3044
|
+
},
|
|
3045
|
+
{
|
|
3046
|
+
"$ref": "#/components/schemas/FileAttributes"
|
|
3047
|
+
},
|
|
3048
|
+
{
|
|
3049
|
+
"type": "object",
|
|
3050
|
+
"properties": {
|
|
3051
|
+
"s3ref": {
|
|
3052
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
]
|
|
3057
|
+
},
|
|
3058
|
+
"SaveFileFromSourceURLPayload": {
|
|
3059
|
+
"allOf": [
|
|
3060
|
+
{
|
|
3061
|
+
"$ref": "#/components/schemas/CommonSaveFilePayload"
|
|
3062
|
+
},
|
|
3063
|
+
{
|
|
3064
|
+
"$ref": "#/components/schemas/FileAttributes"
|
|
3065
|
+
},
|
|
3066
|
+
{
|
|
3067
|
+
"type": "object",
|
|
3068
|
+
"properties": {
|
|
3069
|
+
"source_url": {
|
|
3070
|
+
"$ref": "#/components/schemas/CustomDownloadUrl"
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
}
|
|
3074
|
+
]
|
|
3075
|
+
},
|
|
3076
|
+
"SaveCustomFilePayload": {
|
|
3077
|
+
"allOf": [
|
|
3078
|
+
{
|
|
3079
|
+
"$ref": "#/components/schemas/CommonSaveFilePayload"
|
|
3080
|
+
},
|
|
3081
|
+
{
|
|
3082
|
+
"$ref": "#/components/schemas/FileAttributes"
|
|
3083
|
+
},
|
|
3084
|
+
{
|
|
3085
|
+
"type": "object",
|
|
3086
|
+
"properties": {
|
|
3087
|
+
"custom_download_url": {
|
|
3088
|
+
"$ref": "#/components/schemas/CustomDownloadUrl"
|
|
3089
|
+
},
|
|
3090
|
+
"custom_download_url_auth": {
|
|
3091
|
+
"$ref": "#/components/schemas/CustomDownloadUrlAuth"
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
]
|
|
3096
|
+
},
|
|
3097
|
+
"SaveFilePayload": {
|
|
3098
|
+
"anyOf": [
|
|
3099
|
+
{
|
|
3100
|
+
"$ref": "#/components/schemas/SaveS3FilePayload"
|
|
3101
|
+
},
|
|
3102
|
+
{
|
|
3103
|
+
"$ref": "#/components/schemas/SaveFileFromSourceURLPayload"
|
|
3104
|
+
},
|
|
3105
|
+
{
|
|
3106
|
+
"$ref": "#/components/schemas/SaveCustomFilePayload"
|
|
3107
|
+
}
|
|
3108
|
+
]
|
|
3109
|
+
},
|
|
3110
|
+
"SaveFilePayloadV2": {
|
|
3111
|
+
"anyOf": [
|
|
3112
|
+
{
|
|
3113
|
+
"$ref": "#/components/schemas/SaveS3FilePayload"
|
|
3114
|
+
},
|
|
3115
|
+
{
|
|
3116
|
+
"$ref": "#/components/schemas/SaveFileFromSourceURLPayload"
|
|
3117
|
+
},
|
|
3118
|
+
{
|
|
3119
|
+
"$ref": "#/components/schemas/SaveCustomFilePayload"
|
|
3120
|
+
}
|
|
3121
|
+
]
|
|
3122
|
+
},
|
|
3123
|
+
"BatchSaveFileVersionPayload": {
|
|
3124
|
+
"type": "object",
|
|
3125
|
+
"description": "Payload for batch version save. Only s3ref payloads are supported.",
|
|
3126
|
+
"properties": {
|
|
3127
|
+
"_id": {
|
|
3128
|
+
"allOf": [
|
|
3129
|
+
{
|
|
3130
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
"description": "Target file entity to add version to"
|
|
3134
|
+
}
|
|
3135
|
+
]
|
|
3136
|
+
},
|
|
3137
|
+
"file_entity_id": {
|
|
3138
|
+
"type": "string",
|
|
3139
|
+
"description": "Deprecated, use _id instead",
|
|
3140
|
+
"deprecated": true
|
|
3141
|
+
},
|
|
3142
|
+
"filename": {
|
|
3143
|
+
"type": "string",
|
|
3144
|
+
"example": "document.pdf"
|
|
3145
|
+
},
|
|
3146
|
+
"mime_type": {
|
|
3147
|
+
"type": "string",
|
|
3148
|
+
"example": "application/pdf"
|
|
3149
|
+
},
|
|
3150
|
+
"access_control": {
|
|
3151
|
+
"type": "string",
|
|
3152
|
+
"default": "private",
|
|
3153
|
+
"enum": [
|
|
3154
|
+
"private",
|
|
3155
|
+
"public-read"
|
|
3156
|
+
]
|
|
3157
|
+
},
|
|
3158
|
+
"s3ref": {
|
|
3159
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
3160
|
+
}
|
|
3161
|
+
},
|
|
3162
|
+
"required": [
|
|
3163
|
+
"s3ref"
|
|
3164
|
+
],
|
|
3165
|
+
"additionalProperties": false
|
|
3166
|
+
},
|
|
3167
|
+
"UploadFilePayload": {
|
|
3168
|
+
"type": "object",
|
|
3169
|
+
"properties": {
|
|
3170
|
+
"filename": {
|
|
3171
|
+
"type": "string",
|
|
3172
|
+
"example": "document.pdf"
|
|
3173
|
+
},
|
|
3174
|
+
"mime_type": {
|
|
3175
|
+
"description": "MIME type of file",
|
|
3176
|
+
"type": "string",
|
|
3177
|
+
"example": "application/pdf",
|
|
3178
|
+
"default": "application/octet-stream"
|
|
3179
|
+
},
|
|
3180
|
+
"index_tag": {
|
|
3181
|
+
"type": "string",
|
|
3182
|
+
"example": "2f6a377c8e78",
|
|
3183
|
+
"maxLength": 64,
|
|
3184
|
+
"description": "Used to index the file at the storage layer, which helps when browsing for this file"
|
|
3185
|
+
},
|
|
3186
|
+
"metadata": {
|
|
3187
|
+
"type": "object",
|
|
3188
|
+
"additionalProperties": {
|
|
3189
|
+
"anyOf": [
|
|
3190
|
+
{
|
|
3191
|
+
"type": "string"
|
|
3192
|
+
}
|
|
3193
|
+
]
|
|
3194
|
+
},
|
|
3195
|
+
"example": {
|
|
3196
|
+
"color": "blue"
|
|
3197
|
+
},
|
|
3198
|
+
"description": "Allows passing in custom metadata for the file, expects key-value pairs of string type"
|
|
3199
|
+
}
|
|
3200
|
+
},
|
|
3201
|
+
"required": [
|
|
3202
|
+
"filename"
|
|
3203
|
+
]
|
|
3204
|
+
},
|
|
3205
|
+
"FileUpload": {
|
|
3206
|
+
"type": "object",
|
|
3207
|
+
"properties": {
|
|
3208
|
+
"s3ref": {
|
|
3209
|
+
"allOf": [
|
|
3210
|
+
{
|
|
3211
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
3212
|
+
},
|
|
3213
|
+
{
|
|
3214
|
+
"example": {
|
|
3215
|
+
"bucket": "epilot-prod-user-content",
|
|
3216
|
+
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
3219
|
+
]
|
|
3220
|
+
},
|
|
3221
|
+
"upload_url": {
|
|
3222
|
+
"type": "string",
|
|
3223
|
+
"format": "url",
|
|
3224
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
3225
|
+
},
|
|
3226
|
+
"public_url": {
|
|
3227
|
+
"description": "Returned only if file is permanent i.e. file_entity_id is passed",
|
|
3228
|
+
"type": "string",
|
|
3229
|
+
"format": "url",
|
|
3230
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
},
|
|
3234
|
+
"DownloadFilesPayload": {
|
|
3235
|
+
"type": "array",
|
|
3236
|
+
"items": {
|
|
3237
|
+
"type": "object",
|
|
3238
|
+
"properties": {
|
|
3239
|
+
"id": {
|
|
3240
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
3241
|
+
},
|
|
3242
|
+
"version": {
|
|
3243
|
+
"type": "integer",
|
|
3244
|
+
"description": "File version",
|
|
3245
|
+
"example": 0
|
|
3246
|
+
}
|
|
3247
|
+
},
|
|
3248
|
+
"required": [
|
|
3249
|
+
"id"
|
|
3250
|
+
]
|
|
3251
|
+
}
|
|
3252
|
+
},
|
|
3253
|
+
"CreateZipJobPayload": {
|
|
3254
|
+
"type": "object",
|
|
3255
|
+
"description": "Request payload to create a ZIP job for bulk file download.\nProvide either an explicit list of `file_entity_ids` (up to 1000) or an\n`entity_query` that resolves to file entities (up to 10000).\n",
|
|
3256
|
+
"properties": {
|
|
3257
|
+
"file_entity_ids": {
|
|
3258
|
+
"type": "array",
|
|
3259
|
+
"description": "List of file entity IDs to include in the ZIP",
|
|
3260
|
+
"items": {
|
|
3261
|
+
"type": "string",
|
|
3262
|
+
"format": "uuid"
|
|
3263
|
+
},
|
|
3264
|
+
"minItems": 1,
|
|
3265
|
+
"maxItems": 1000,
|
|
3266
|
+
"example": [
|
|
3267
|
+
"ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
3268
|
+
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
3269
|
+
]
|
|
3270
|
+
},
|
|
3271
|
+
"entity_query": {
|
|
3272
|
+
"type": "object",
|
|
3273
|
+
"description": "Entity search query used to resolve files to include in the ZIP",
|
|
3274
|
+
"properties": {
|
|
3275
|
+
"q": {
|
|
3276
|
+
"type": "string",
|
|
3277
|
+
"description": "Lucene-style search query (same syntax as entity search)",
|
|
3278
|
+
"example": "_schema:file AND _tags:invoice"
|
|
3279
|
+
},
|
|
3280
|
+
"sort": {
|
|
3281
|
+
"type": "string",
|
|
3282
|
+
"description": "Sort expression forwarded to the entity search",
|
|
3283
|
+
"example": "_created_at:desc"
|
|
3284
|
+
}
|
|
3285
|
+
},
|
|
3286
|
+
"required": [
|
|
3287
|
+
"q"
|
|
3288
|
+
]
|
|
3289
|
+
},
|
|
3290
|
+
"zip_filename": {
|
|
3291
|
+
"type": "string",
|
|
3292
|
+
"description": "Name of the generated ZIP file",
|
|
3293
|
+
"default": "Files.zip",
|
|
3294
|
+
"example": "Documents.zip"
|
|
3295
|
+
},
|
|
3296
|
+
"notify_email": {
|
|
3297
|
+
"type": "string",
|
|
3298
|
+
"format": "email",
|
|
3299
|
+
"description": "Email address to notify when the ZIP is ready. Omit to skip the email notification.",
|
|
3300
|
+
"example": "user@example.com"
|
|
3301
|
+
}
|
|
3302
|
+
},
|
|
3303
|
+
"oneOf": [
|
|
3304
|
+
{
|
|
3305
|
+
"required": [
|
|
3306
|
+
"file_entity_ids"
|
|
3307
|
+
]
|
|
3308
|
+
},
|
|
3309
|
+
{
|
|
3310
|
+
"required": [
|
|
3311
|
+
"entity_query"
|
|
3312
|
+
]
|
|
3313
|
+
}
|
|
3314
|
+
]
|
|
3315
|
+
},
|
|
3316
|
+
"ZipJob": {
|
|
3317
|
+
"type": "object",
|
|
3318
|
+
"description": "ZIP job status and result",
|
|
3319
|
+
"properties": {
|
|
3320
|
+
"job_id": {
|
|
3321
|
+
"type": "string",
|
|
3322
|
+
"format": "uuid",
|
|
3323
|
+
"description": "Unique identifier for the ZIP job",
|
|
3324
|
+
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
3325
|
+
},
|
|
3326
|
+
"status": {
|
|
3327
|
+
"type": "string",
|
|
3328
|
+
"description": "Current status of the ZIP job",
|
|
3329
|
+
"enum": [
|
|
3330
|
+
"queued",
|
|
3331
|
+
"downloading",
|
|
3332
|
+
"zipping",
|
|
3333
|
+
"uploading",
|
|
3334
|
+
"sending_notification",
|
|
3335
|
+
"completed",
|
|
3336
|
+
"failed"
|
|
3337
|
+
],
|
|
3338
|
+
"example": "completed"
|
|
3339
|
+
},
|
|
3340
|
+
"progress": {
|
|
3341
|
+
"type": "object",
|
|
3342
|
+
"description": "Progress information for the job",
|
|
3343
|
+
"properties": {
|
|
3344
|
+
"total_files": {
|
|
3345
|
+
"type": "integer",
|
|
3346
|
+
"description": "Total number of files to process",
|
|
3347
|
+
"example": 100
|
|
3348
|
+
},
|
|
3349
|
+
"downloaded_files": {
|
|
3350
|
+
"type": "integer",
|
|
3351
|
+
"description": "Number of files successfully downloaded",
|
|
3352
|
+
"example": 75
|
|
3353
|
+
},
|
|
3354
|
+
"failed_files": {
|
|
3355
|
+
"type": "integer",
|
|
3356
|
+
"description": "Number of files that failed to download",
|
|
3357
|
+
"example": 2
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
},
|
|
3361
|
+
"result": {
|
|
3362
|
+
"type": "object",
|
|
3363
|
+
"description": "Result of the completed ZIP job",
|
|
3364
|
+
"properties": {
|
|
3365
|
+
"file_entity_id": {
|
|
3366
|
+
"type": "string",
|
|
3367
|
+
"format": "uuid",
|
|
3368
|
+
"description": "File entity ID of the generated ZIP",
|
|
3369
|
+
"example": "ef7d985c-2385-44f4-9c71-ae06a52264f8"
|
|
3370
|
+
},
|
|
3371
|
+
"download_url": {
|
|
3372
|
+
"type": "string",
|
|
3373
|
+
"format": "uri",
|
|
3374
|
+
"description": "Presigned download URL (expires in 24 hours)",
|
|
3375
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/files.zip?X-Amz-..."
|
|
3376
|
+
},
|
|
3377
|
+
"expires_at": {
|
|
3378
|
+
"type": "string",
|
|
3379
|
+
"format": "date-time",
|
|
3380
|
+
"description": "When the download URL expires",
|
|
3381
|
+
"example": "2024-01-02T12:00:00Z"
|
|
3382
|
+
},
|
|
3383
|
+
"zip_size_bytes": {
|
|
3384
|
+
"type": "integer",
|
|
3385
|
+
"description": "Size of the generated ZIP file in bytes",
|
|
3386
|
+
"example": 104857600
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
},
|
|
3390
|
+
"error": {
|
|
3391
|
+
"type": "string",
|
|
3392
|
+
"description": "Error message if job failed",
|
|
3393
|
+
"example": "Failed to download file: access denied"
|
|
3394
|
+
},
|
|
3395
|
+
"created_at": {
|
|
3396
|
+
"type": "string",
|
|
3397
|
+
"format": "date-time",
|
|
3398
|
+
"description": "When the job was created",
|
|
3399
|
+
"example": "2024-01-01T12:00:00Z"
|
|
3400
|
+
},
|
|
3401
|
+
"created_by": {
|
|
3402
|
+
"type": "string",
|
|
3403
|
+
"description": "User ID who created the job",
|
|
3404
|
+
"example": "10234"
|
|
3405
|
+
},
|
|
3406
|
+
"org_id": {
|
|
3407
|
+
"type": "string",
|
|
3408
|
+
"description": "Organization ID",
|
|
3409
|
+
"example": "123"
|
|
3410
|
+
},
|
|
3411
|
+
"updated_at": {
|
|
3412
|
+
"type": "string",
|
|
3413
|
+
"format": "date-time",
|
|
3414
|
+
"description": "When the job was last updated",
|
|
3415
|
+
"example": "2024-01-01T12:05:00Z"
|
|
3416
|
+
}
|
|
3417
|
+
}
|
|
3418
|
+
},
|
|
3419
|
+
"VerifyCustomDownloadUrlPayload": {
|
|
3420
|
+
"type": "object",
|
|
3421
|
+
"properties": {
|
|
3422
|
+
"custom_download_url": {
|
|
3423
|
+
"description": "Custom external download url with signature and expiration time",
|
|
3424
|
+
"type": "string",
|
|
3425
|
+
"example": "https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg"
|
|
3426
|
+
}
|
|
3427
|
+
},
|
|
3428
|
+
"required": [
|
|
3429
|
+
"custom_download_url"
|
|
3430
|
+
]
|
|
3431
|
+
},
|
|
3432
|
+
"S3Reference": {
|
|
3433
|
+
"type": "object",
|
|
3434
|
+
"properties": {
|
|
3435
|
+
"bucket": {
|
|
3436
|
+
"type": "string",
|
|
3437
|
+
"example": "epilot-prod-user-content"
|
|
3438
|
+
},
|
|
3439
|
+
"key": {
|
|
3440
|
+
"type": "string",
|
|
3441
|
+
"example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
3442
|
+
}
|
|
3443
|
+
},
|
|
3444
|
+
"required": [
|
|
3445
|
+
"bucket",
|
|
3446
|
+
"key"
|
|
3447
|
+
]
|
|
3448
|
+
},
|
|
3449
|
+
"S3Ref": {
|
|
3450
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
3451
|
+
},
|
|
3452
|
+
"FileItem": {
|
|
3453
|
+
"type": "object",
|
|
3454
|
+
"properties": {
|
|
3455
|
+
"s3ref": {
|
|
3456
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
3457
|
+
},
|
|
3458
|
+
"filename": {
|
|
3459
|
+
"type": "string",
|
|
3460
|
+
"example": "document.pdf"
|
|
3461
|
+
},
|
|
3462
|
+
"size_bytes": {
|
|
3463
|
+
"type": "integer",
|
|
3464
|
+
"example": 1234
|
|
3465
|
+
},
|
|
3466
|
+
"readable_size": {
|
|
3467
|
+
"type": "string",
|
|
3468
|
+
"example": "1.2 MB"
|
|
3469
|
+
},
|
|
3470
|
+
"mime_type": {
|
|
3471
|
+
"type": "string",
|
|
3472
|
+
"example": "image/jpeg"
|
|
3473
|
+
},
|
|
3474
|
+
"etag": {
|
|
3475
|
+
"type": "string",
|
|
3476
|
+
"description": "Content hash (S3 ETag) of this file version",
|
|
3477
|
+
"example": "9bb58f26192e4ba00f01e2e7b136bbd8"
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3480
|
+
},
|
|
3481
|
+
"FileRelationItem": {
|
|
3482
|
+
"type": "object",
|
|
3483
|
+
"properties": {
|
|
3484
|
+
"entity_id": {
|
|
3485
|
+
"$ref": "#/components/schemas/EntityId"
|
|
3486
|
+
},
|
|
3487
|
+
"_schema": {
|
|
3488
|
+
"$ref": "#/components/schemas/EntitySlug"
|
|
3489
|
+
},
|
|
3490
|
+
"_tags": {
|
|
3491
|
+
"type": "array",
|
|
3492
|
+
"items": {
|
|
3493
|
+
"type": "string"
|
|
3494
|
+
}
|
|
3495
|
+
}
|
|
3496
|
+
},
|
|
3497
|
+
"required": [
|
|
3498
|
+
"entity_id"
|
|
3499
|
+
]
|
|
3500
|
+
},
|
|
3501
|
+
"PublicLink": {
|
|
3502
|
+
"type": "object",
|
|
3503
|
+
"properties": {
|
|
3504
|
+
"id": {
|
|
3505
|
+
"type": "string",
|
|
3506
|
+
"description": "ID of the public link",
|
|
3507
|
+
"example": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c"
|
|
3508
|
+
},
|
|
3509
|
+
"link": {
|
|
3510
|
+
"type": "string",
|
|
3511
|
+
"description": "Public link of the file",
|
|
3512
|
+
"example": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c"
|
|
3513
|
+
},
|
|
3514
|
+
"last_accessed_at": {
|
|
3515
|
+
"type": "string",
|
|
3516
|
+
"description": "The most recent timestamp when the file was accessed"
|
|
3517
|
+
}
|
|
3518
|
+
}
|
|
3519
|
+
},
|
|
3520
|
+
"BaseEntityOwner": {
|
|
3521
|
+
"description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n",
|
|
3522
|
+
"type": "object",
|
|
3523
|
+
"properties": {
|
|
3524
|
+
"org_id": {
|
|
3525
|
+
"type": "string",
|
|
3526
|
+
"example": "123"
|
|
3527
|
+
},
|
|
3528
|
+
"user_id": {
|
|
3529
|
+
"type": "string",
|
|
3530
|
+
"example": "123"
|
|
3531
|
+
}
|
|
3532
|
+
},
|
|
3533
|
+
"required": [
|
|
3534
|
+
"org_id"
|
|
3535
|
+
]
|
|
3536
|
+
},
|
|
3537
|
+
"BaseEntityAcl": {
|
|
3538
|
+
"type": "object",
|
|
3539
|
+
"description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.",
|
|
3540
|
+
"properties": {
|
|
3541
|
+
"view": {
|
|
3542
|
+
"type": "array",
|
|
3543
|
+
"items": {
|
|
3544
|
+
"type": "string",
|
|
3545
|
+
"example": "org:456"
|
|
3546
|
+
}
|
|
3547
|
+
},
|
|
3548
|
+
"edit": {
|
|
3549
|
+
"type": "array",
|
|
3550
|
+
"items": {
|
|
3551
|
+
"type": "string",
|
|
3552
|
+
"example": "org:456"
|
|
3553
|
+
}
|
|
3554
|
+
},
|
|
3555
|
+
"delete": {
|
|
3556
|
+
"type": "array",
|
|
3557
|
+
"items": {
|
|
3558
|
+
"type": "string",
|
|
3559
|
+
"example": "org:456"
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3563
|
+
},
|
|
3564
|
+
"ErrorObject": {
|
|
3565
|
+
"description": "A generic error returned by the API",
|
|
3566
|
+
"type": "object",
|
|
3567
|
+
"properties": {
|
|
3568
|
+
"status": {
|
|
3569
|
+
"type": "integer",
|
|
3570
|
+
"description": "The HTTP status code of the error",
|
|
3571
|
+
"example": 400
|
|
3572
|
+
},
|
|
3573
|
+
"error": {
|
|
3574
|
+
"type": "string",
|
|
3575
|
+
"description": "The error message",
|
|
3576
|
+
"example": "Bad Request"
|
|
3577
|
+
}
|
|
3578
|
+
}
|
|
3579
|
+
},
|
|
3580
|
+
"FileCollectionId": {
|
|
3581
|
+
"description": "Generated uuid for a file collection",
|
|
3582
|
+
"type": "string",
|
|
3583
|
+
"format": "uuid"
|
|
3584
|
+
},
|
|
3585
|
+
"FileCollectionItem": {
|
|
3586
|
+
"description": "A file collection with identifiers and timestamps",
|
|
3587
|
+
"type": "object",
|
|
3588
|
+
"properties": {
|
|
3589
|
+
"slug": {
|
|
3590
|
+
"type": "string",
|
|
3591
|
+
"description": "Full slug for the collection. Format depends on collection type:\n- User collection: `_system_files_collection_{entity_uuid}_{user_id}:{collection_name}`\n Example: `_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents`\n- Global collection: `_system_files_collection_schema_{schema_slug}:{collection_name}`\n Example: `_system_files_collection_schema_opportunity:templates`\n",
|
|
3592
|
+
"example": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents"
|
|
3593
|
+
},
|
|
3594
|
+
"name": {
|
|
3595
|
+
"type": "string",
|
|
3596
|
+
"description": "Display name of the collection",
|
|
3597
|
+
"example": "Documents"
|
|
3598
|
+
},
|
|
3599
|
+
"id": {
|
|
3600
|
+
"$ref": "#/components/schemas/FileCollectionId"
|
|
3601
|
+
},
|
|
3602
|
+
"parents": {
|
|
3603
|
+
"type": "array",
|
|
3604
|
+
"description": "Array of parent collection slugs, empty array if top-level collection. Format depends on collection type:\n- User collection: `_system_files_collection_{entity_uuid}_{user_id}`\n Example: `[\"_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234\"]`\n- Global collection: `_system_files_collection_schema_{schema_slug}`\n Example: `[\"_system_files_collection_schema_opportunity\"]`\n",
|
|
3605
|
+
"items": {
|
|
3606
|
+
"type": "string"
|
|
3607
|
+
},
|
|
3608
|
+
"example": [
|
|
3609
|
+
"_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"
|
|
3610
|
+
]
|
|
3611
|
+
},
|
|
3612
|
+
"starred": {
|
|
3613
|
+
"type": "boolean",
|
|
3614
|
+
"description": "Whether the collection is starred / favorited",
|
|
3615
|
+
"example": false
|
|
3616
|
+
},
|
|
3617
|
+
"order": {
|
|
3618
|
+
"type": "number",
|
|
3619
|
+
"description": "Display order for the collection",
|
|
3620
|
+
"example": 0
|
|
3621
|
+
},
|
|
3622
|
+
"enabled_locations": {
|
|
3623
|
+
"description": "List of location slugs where the collection is enabled. If empty, enabled for all.",
|
|
3624
|
+
"type": "array",
|
|
3625
|
+
"items": {
|
|
3626
|
+
"type": "string"
|
|
3627
|
+
}
|
|
3628
|
+
},
|
|
3629
|
+
"enabled_purposes": {
|
|
3630
|
+
"description": "List of purpose slugs where the collection is enabled. If empty, enabled for all.",
|
|
3631
|
+
"type": "array",
|
|
3632
|
+
"items": {
|
|
3633
|
+
"type": "string"
|
|
3634
|
+
},
|
|
3635
|
+
"example": [
|
|
3636
|
+
"9eefcb98-93cf-4c5b-a040-f1d26d57c177",
|
|
3637
|
+
"5c544c09-a691-43ed-a7fa-0a8b44b5b161"
|
|
3638
|
+
]
|
|
3639
|
+
},
|
|
3640
|
+
"created_at": {
|
|
3641
|
+
"type": "string",
|
|
3642
|
+
"format": "date-time",
|
|
3643
|
+
"description": "Timestamp when the collection was created",
|
|
3644
|
+
"example": "2024-01-01T12:00:00Z"
|
|
3645
|
+
},
|
|
3646
|
+
"updated_at": {
|
|
3647
|
+
"type": "string",
|
|
3648
|
+
"format": "date-time",
|
|
3649
|
+
"description": "Timestamp when the collection was last updated",
|
|
3650
|
+
"example": "2024-01-02T12:00:00Z"
|
|
3651
|
+
}
|
|
3652
|
+
},
|
|
3653
|
+
"required": [
|
|
3654
|
+
"name"
|
|
3655
|
+
]
|
|
3656
|
+
},
|
|
3657
|
+
"FileCollectionAttributes": {
|
|
3658
|
+
"type": "object",
|
|
3659
|
+
"properties": {
|
|
3660
|
+
"name": {
|
|
3661
|
+
"type": "string",
|
|
3662
|
+
"description": "Name of the collection"
|
|
3663
|
+
},
|
|
3664
|
+
"parents": {
|
|
3665
|
+
"type": "array",
|
|
3666
|
+
"description": "Array of parent collection slugs, empty array if top-level collection",
|
|
3667
|
+
"items": {
|
|
3668
|
+
"type": "string"
|
|
3669
|
+
}
|
|
3670
|
+
},
|
|
3671
|
+
"starred": {
|
|
3672
|
+
"type": "boolean",
|
|
3673
|
+
"description": "Whether the collection is starred / favorited",
|
|
3674
|
+
"default": false
|
|
3675
|
+
},
|
|
3676
|
+
"enabled_locations": {
|
|
3677
|
+
"description": "List of location slugs where the collection is enabled. If empty, enabled for all.",
|
|
3678
|
+
"type": "array",
|
|
3679
|
+
"items": {
|
|
3680
|
+
"type": "string"
|
|
3681
|
+
}
|
|
3682
|
+
},
|
|
3683
|
+
"enabled_purposes": {
|
|
3684
|
+
"description": "List of purpose IDs where the collection is enabled. If empty, enabled for all.",
|
|
3685
|
+
"type": "array",
|
|
3686
|
+
"items": {
|
|
3687
|
+
"type": "string"
|
|
3688
|
+
}
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
},
|
|
3692
|
+
"FileCollectionCreateRequest": {
|
|
3693
|
+
"description": "Request body for creating a file collection",
|
|
3694
|
+
"allOf": [
|
|
3695
|
+
{
|
|
3696
|
+
"$ref": "#/components/schemas/FileCollectionAttributes"
|
|
3697
|
+
},
|
|
3698
|
+
{
|
|
3699
|
+
"type": "object",
|
|
3700
|
+
"required": [
|
|
3701
|
+
"name"
|
|
3702
|
+
]
|
|
3703
|
+
}
|
|
3704
|
+
]
|
|
3705
|
+
}
|
|
3706
|
+
},
|
|
3707
|
+
"parameters": {
|
|
3708
|
+
"EntityIdPathParam": {
|
|
3709
|
+
"name": "id",
|
|
3710
|
+
"description": "Entity id",
|
|
3711
|
+
"in": "path",
|
|
3712
|
+
"required": true,
|
|
3713
|
+
"schema": {
|
|
3714
|
+
"$ref": "#/components/schemas/EntityId"
|
|
3715
|
+
}
|
|
3716
|
+
},
|
|
3717
|
+
"StrictQueryParam": {
|
|
3718
|
+
"name": "strict",
|
|
3719
|
+
"in": "query",
|
|
3720
|
+
"required": false,
|
|
3721
|
+
"description": "When passed true, the response will contain only fields that match the schema, with non-matching fields included in `__additional`",
|
|
3722
|
+
"schema": {
|
|
3723
|
+
"type": "boolean",
|
|
3724
|
+
"default": false
|
|
3725
|
+
}
|
|
3726
|
+
},
|
|
3727
|
+
"ActivityIdQueryParam": {
|
|
3728
|
+
"name": "activity_id",
|
|
3729
|
+
"description": "Activity to include in event feed",
|
|
3730
|
+
"in": "query",
|
|
3731
|
+
"required": false,
|
|
3732
|
+
"schema": {
|
|
3733
|
+
"$ref": "#/components/schemas/ActivityId"
|
|
3734
|
+
}
|
|
3735
|
+
},
|
|
3736
|
+
"FillActivityQueryParam": {
|
|
3737
|
+
"name": "fill_activity",
|
|
3738
|
+
"description": "Update the diff and entity for the custom activity included in the query.\nPending state on activity is automatically ended when activity is filled.\n",
|
|
3739
|
+
"in": "query",
|
|
3740
|
+
"required": false,
|
|
3741
|
+
"schema": {
|
|
3742
|
+
"type": "boolean",
|
|
3743
|
+
"default": false
|
|
3744
|
+
}
|
|
3745
|
+
},
|
|
3746
|
+
"AsyncOperationQueryParam": {
|
|
3747
|
+
"name": "async",
|
|
3748
|
+
"description": "Don't wait for updated entity to become available in Search API. Useful for large migrations",
|
|
3749
|
+
"in": "query",
|
|
3750
|
+
"required": false,
|
|
3751
|
+
"schema": {
|
|
3752
|
+
"type": "boolean",
|
|
3753
|
+
"default": false
|
|
3754
|
+
}
|
|
3755
|
+
},
|
|
3756
|
+
"DeleteTempFileQueryParam": {
|
|
3757
|
+
"name": "delete_temp_file",
|
|
3758
|
+
"description": "Delete the temp file from S3 after copying it permanently",
|
|
3759
|
+
"in": "query",
|
|
3760
|
+
"required": false,
|
|
3761
|
+
"schema": {
|
|
3762
|
+
"type": "boolean",
|
|
3763
|
+
"default": true
|
|
3764
|
+
}
|
|
3765
|
+
},
|
|
3766
|
+
"VersionOnlyQueryParam": {
|
|
3767
|
+
"name": "version_only",
|
|
3768
|
+
"in": "query",
|
|
3769
|
+
"description": "When true, only adds a new file version and updates the entity's\ns3ref to point to the new version, without overwriting the entity's\nexisting top-level metadata. The entity's filename, type, and other\nfields are preserved as-is. The new version entry in the versions\narray will contain the file-level metadata (filename, mime_type, etc).\nOnly applies when updating an existing entity (_id or file_entity_id is set).\n",
|
|
3770
|
+
"required": false,
|
|
3771
|
+
"schema": {
|
|
3772
|
+
"type": "boolean",
|
|
3773
|
+
"default": false
|
|
3774
|
+
}
|
|
3775
|
+
}
|
|
3776
|
+
},
|
|
3777
|
+
"responses": {
|
|
3778
|
+
"BadRequestError": {
|
|
3779
|
+
"description": "Invalid request parameters or payload",
|
|
3780
|
+
"content": {
|
|
3781
|
+
"application/json": {
|
|
3782
|
+
"schema": {
|
|
3783
|
+
"allOf": [
|
|
3784
|
+
{
|
|
3785
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
3786
|
+
},
|
|
3787
|
+
{
|
|
3788
|
+
"example": {
|
|
3789
|
+
"status": 400,
|
|
3790
|
+
"error": "Bad Request: filename is required"
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
]
|
|
3794
|
+
}
|
|
3795
|
+
}
|
|
3796
|
+
}
|
|
3797
|
+
},
|
|
3798
|
+
"UnauthorizedError": {
|
|
3799
|
+
"description": "Authentication required or invalid credentials",
|
|
3800
|
+
"content": {
|
|
3801
|
+
"application/json": {
|
|
3802
|
+
"schema": {
|
|
3803
|
+
"allOf": [
|
|
3804
|
+
{
|
|
3805
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
3806
|
+
},
|
|
3807
|
+
{
|
|
3808
|
+
"example": {
|
|
3809
|
+
"status": 401,
|
|
3810
|
+
"error": "Unauthorized: Invalid or expired token"
|
|
3811
|
+
}
|
|
3812
|
+
}
|
|
3813
|
+
]
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
}
|
|
3817
|
+
},
|
|
3818
|
+
"ForbiddenError": {
|
|
3819
|
+
"description": "Insufficient permissions to access the resource",
|
|
3820
|
+
"content": {
|
|
3821
|
+
"application/json": {
|
|
3822
|
+
"schema": {
|
|
3823
|
+
"allOf": [
|
|
3824
|
+
{
|
|
3825
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
3826
|
+
},
|
|
3827
|
+
{
|
|
3828
|
+
"example": {
|
|
3829
|
+
"status": 403,
|
|
3830
|
+
"error": "Forbidden: You do not have permission to access this file"
|
|
3831
|
+
}
|
|
3832
|
+
}
|
|
3833
|
+
]
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3837
|
+
},
|
|
3838
|
+
"NotFoundError": {
|
|
3839
|
+
"description": "The requested resource was not found",
|
|
3840
|
+
"content": {
|
|
3841
|
+
"application/json": {
|
|
3842
|
+
"schema": {
|
|
3843
|
+
"allOf": [
|
|
3844
|
+
{
|
|
3845
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
3846
|
+
},
|
|
3847
|
+
{
|
|
3848
|
+
"example": {
|
|
3849
|
+
"status": 404,
|
|
3850
|
+
"error": "Not Found: File entity not found"
|
|
3851
|
+
}
|
|
3852
|
+
}
|
|
3853
|
+
]
|
|
3854
|
+
}
|
|
3855
|
+
}
|
|
3856
|
+
}
|
|
3857
|
+
},
|
|
3858
|
+
"ConflictError": {
|
|
3859
|
+
"description": "The request conflicts with the current resource state",
|
|
3860
|
+
"content": {
|
|
3861
|
+
"application/json": {
|
|
3862
|
+
"schema": {
|
|
3863
|
+
"allOf": [
|
|
3864
|
+
{
|
|
3865
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
3866
|
+
},
|
|
3867
|
+
{
|
|
3868
|
+
"example": {
|
|
3869
|
+
"status": 409,
|
|
3870
|
+
"error": "Extracted file content is still being prepared"
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
]
|
|
3874
|
+
}
|
|
3875
|
+
}
|
|
3876
|
+
}
|
|
3877
|
+
},
|
|
3878
|
+
"InternalServerError": {
|
|
3879
|
+
"description": "An unexpected error occurred on the server",
|
|
3880
|
+
"content": {
|
|
3881
|
+
"application/json": {
|
|
3882
|
+
"schema": {
|
|
3883
|
+
"allOf": [
|
|
3884
|
+
{
|
|
3885
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
3886
|
+
},
|
|
3887
|
+
{
|
|
3888
|
+
"example": {
|
|
3889
|
+
"status": 500,
|
|
3890
|
+
"error": "Internal Server Error"
|
|
3891
|
+
}
|
|
3892
|
+
}
|
|
3893
|
+
]
|
|
3894
|
+
}
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3898
|
+
}
|
|
3899
|
+
},
|
|
3900
|
+
"servers": [
|
|
3901
|
+
{
|
|
3902
|
+
"url": "https://file.sls.epilot.io"
|
|
3903
|
+
}
|
|
3904
|
+
]
|
|
3905
|
+
}
|