summaryrefslogtreecommitdiff
path: root/matweb/oas
diff options
context:
space:
mode:
Diffstat (limited to 'matweb/oas')
-rw-r--r--matweb/oas/upload.yml80
1 files changed, 80 insertions, 0 deletions
diff --git a/matweb/oas/upload.yml b/matweb/oas/upload.yml
new file mode 100644
index 0000000..c7a9bd7
--- /dev/null
+++ b/matweb/oas/upload.yml
@@ -0,0 +1,80 @@
1---
2tags:
3 - "File Upload (Metadata removal)"
4summary: 'Upload a single file which will be cleaned from metadata'
5consumes:
6 - "application/json"
7produces:
8 - "application/json"
9parameters:
10- in: "body"
11 name: "body"
12 description: "The file that will be cleaned from metadata. Note that the file must be base64 encoded"
13 required: true
14 schema:
15 type: "object"
16 properties:
17 file_name:
18 type: "string"
19 example: 'my_example.jpg'
20 file:
21 type: "string"
22 example: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=='
23
24responses:
25 200:
26 description: "An object containing all info about the cleaned file"
27 schema:
28 $ref: '#/definitions/UploadResponse'
29 400:
30 description: "Invalid input"
31 schema:
32 $ref: '#/definitions/ErrorResponse'
33 415:
34 description: "Unsupported file type"
35 schema:
36 $ref: '#/definitions/ErrorResponse'
37 500:
38 description: "Unable to clean the file"
39 schema:
40 $ref: '#/definitions/ErrorResponse'
41
42definitions:
43 UploadResponse:
44 type: "object"
45 properties:
46 inactive_after_sec:
47 type: "integer"
48 format: "int64"
49 description: "Defines after how many seconds the download wont be available"
50 output_filename:
51 type: "string"
52 description: "The resulting filename after metadata removal"
53 mime:
54 type: "string"
55 description: "The mime type of the cleaned file"
56 key:
57 type: "string"
58 description: "A key used to guarantee file integrity"
59 secret:
60 type: "string"
61 description: "A secret used to guarantee file integrity"
62 meta:
63 type: "object"
64 description: "An object of the removed metadata where key indicates the metadata type"
65 items:
66 type: "string"
67 meta_after:
68 type: "object"
69 description: "An object of the remaining metadata where key indicates the metadata type"
70 items:
71 type: "string"
72 download_link:
73 type: "string"
74 description: "The link to download the cleaned file"
75 ErrorResponse:
76 type: "object"
77 properties:
78 message:
79 type: "string"
80 description: "A description of the error" \ No newline at end of file