Raw
1 post:
2 operationId: PostUploads
3 summary: Upload Files
4 description: Upload files to the configured File Module Provider.
5 x-authenticated: true
6 security:
7 - api_token: []
8 - cookie_auth: []
9 - jwt_token: []
10 requestBody:
11 content:
12 application/json:
13 schema:
14 oneOf:
15 - type: object
16 description: The files to upload
17 required:
18 - files
19 properties:
20 files:
21 type: array
22 description: The upload's files.
23 items:
24 oneOf:
25 - type: object
26 description: The file's files.
27 required:
28 - name
29 - content
30 properties:
31 name:
32 type: string
33 title: name
34 description: The file's name.
35 content:
36 type: string
37 title: content
38 description: The file's content.
39 - type: object
40 description: A File to upload.
41 externalDocs:
42 url: >-
43 https://developer.mozilla.org/en-US/docs/Web/API/File
44 description: Learn more about the File API
45 title: files
46 - type: array
47 description: list of files to upload.
48 items:
49 type: object
50 description: A File to upload.
51 externalDocs:
52 url: https://developer.mozilla.org/en-US/docs/Web/API/File
53 description: Learn more about the File API
54 title: FileList
55 description: The files to upload.
56 x-codeSamples:
57 - lang: JavaScript
58 label: JS SDK
59 source:
60 $ref: ../code_samples/JavaScript/admin_uploads/post.js
61 - lang: Shell
62 label: cURL
63 source:
64 $ref: ../code_samples/Shell/admin_uploads/post.sh
65 tags:
66 - Uploads
67 responses:
68 '200':
69 description: OK
70 content:
71 application/json:
72 schema:
73 $ref: ../components/schemas/AdminFileListResponse.yaml
74 '400':
75 $ref: ../components/responses/400_error.yaml
76 '401':
77 $ref: ../components/responses/unauthorized.yaml
78 '404':
79 $ref: ../components/responses/not_found_error.yaml
80 '409':
81 $ref: ../components/responses/invalid_state_error.yaml
82 '422':
83 $ref: ../components/responses/invalid_request_error.yaml
84 '500':
85 $ref: ../components/responses/500_error.yaml
86 x-workflow: uploadFilesWorkflow
87 x-events: []