Raw
1 get:
2 operationId: GetUploadsId
3 summary: Get a File
4 description: >-
5 Retrieve an uploaded file by its ID. You can expand the file's relations or
6 select the fields that should be returned.
7 x-authenticated: true
8 parameters:
9 - name: id
10 in: path
11 description: The upload's ID.
12 required: true
13 schema:
14 type: string
15 - name: fields
16 in: query
17 description: >-
18 Comma-separated fields that should be included in the returned data. if
19 a field is prefixed with `+` it will be added to the default fields,
20 using `-` will remove it from the default fields. without prefix it will
21 replace the entire default fields.
22 required: false
23 schema:
24 type: string
25 title: fields
26 description: >-
27 Comma-separated fields that should be included in the returned data.
28 if a field is prefixed with `+` it will be added to the default
29 fields, using `-` will remove it from the default fields. without
30 prefix it will replace the entire default fields.
31 externalDocs:
32 url: '#select-fields-and-relations'
33 security:
34 - api_token: []
35 - cookie_auth: []
36 - jwt_token: []
37 x-codeSamples:
38 - lang: JavaScript
39 label: JS SDK
40 source:
41 $ref: ../code_samples/JavaScript/admin_uploads_{id}/get.js
42 - lang: Shell
43 label: cURL
44 source:
45 $ref: ../code_samples/Shell/admin_uploads_{id}/get.sh
46 tags:
47 - Uploads
48 responses:
49 '200':
50 description: OK
51 content:
52 application/json:
53 schema:
54 $ref: ../components/schemas/AdminFileResponse.yaml
55 '400':
56 $ref: ../components/responses/400_error.yaml
57 '401':
58 $ref: ../components/responses/unauthorized.yaml
59 '404':
60 $ref: ../components/responses/not_found_error.yaml
61 '409':
62 $ref: ../components/responses/invalid_state_error.yaml
63 '422':
64 $ref: ../components/responses/invalid_request_error.yaml
65 '500':
66 $ref: ../components/responses/500_error.yaml
67 delete:
68 operationId: DeleteUploadsId
69 summary: Delete a File
70 description: Delete a file. Uses the installed file module provider to delete the file.
71 x-authenticated: true
72 parameters:
73 - name: id
74 in: path
75 description: The file's ID.
76 required: true
77 schema:
78 type: string
79 security:
80 - api_token: []
81 - cookie_auth: []
82 - jwt_token: []
83 x-codeSamples:
84 - lang: JavaScript
85 label: JS SDK
86 source:
87 $ref: ../code_samples/JavaScript/admin_uploads_{id}/delete.js
88 - lang: Shell
89 label: cURL
90 source:
91 $ref: ../code_samples/Shell/admin_uploads_{id}/delete.sh
92 tags:
93 - Uploads
94 responses:
95 '200':
96 description: OK
97 content:
98 application/json:
99 schema:
100 type: object
101 description: The deletion's details.
102 required:
103 - id
104 - object
105 - deleted
106 properties:
107 id:
108 type: string
109 title: id
110 description: The file's ID.
111 object:
112 type: string
113 title: object
114 description: The name of the deleted object.
115 default: file
116 deleted:
117 type: boolean
118 title: deleted
119 description: Whether the file was deleted.
120 '400':
121 $ref: ../components/responses/400_error.yaml
122 '401':
123 $ref: ../components/responses/unauthorized.yaml
124 '404':
125 $ref: ../components/responses/not_found_error.yaml
126 '409':
127 $ref: ../components/responses/invalid_state_error.yaml
128 '422':
129 $ref: ../components/responses/invalid_request_error.yaml
130 '500':
131 $ref: ../components/responses/500_error.yaml
132 x-workflow: deleteFilesWorkflow
133 x-events: []