forked from PinataCloud/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpinata-api-v3-uploads.yaml
210 lines (210 loc) · 5.98 KB
/
pinata-api-v3-uploads.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
openapi: 3.0.0
info:
title: Private Files API
version: 1.0.0
servers:
- url: https://uploads.pinata.cloud/v3
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
security:
- bearerAuth: []
paths:
/files:
post:
tags:
- default
summary: Upload a File
requestBody:
content:
multipart/form-data:
schema:
type: object
required:
- file
properties:
file:
type: string
format: binary
description: File object you want to upload
name:
type: string
description: Add a custom name for the file
group_id:
type: string
description: ID of the group you would like to upload
keyvalues:
type: object
description: Add additional key value metadata to files upon upload
additionalProperties:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
id:
type: string
name:
type: string
cid:
type: string
created_at:
type: string
size:
type: number
number_of_files:
type: number
mime_type:
type: string
user_id:
type: string
group_id:
type: string
is_duplicate:
type: boolean
/files/sign:
post:
tags:
- default
summary: Create Signed Upload URL
requestBody:
content:
application/json:
schema:
type: object
required:
- date
- expires
properties:
date:
type: number
description: The unix timestamp that the URL is signed, ie time of request
expires:
type: number
description: How long the URL is valid for in sconds after signing based on the date parameter
group_id:
type: string
description: ID of the group that the file will be uploaded to
keyvalues:
type: object
description: Add additional key value metadata to files upon upload
additionalProperties:
type: string
filename:
type: string
description: Name of the file that will be uploaded
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
type: string
/vectorize/files/{file_id}:
post:
tags:
- Private Files
summary: Vectorize a File
description: Vectorize an existing file. File must already be part of a group.
parameters:
- schema:
type: string
format: uuid
required: true
name: file_id
in: path
responses:
'200':
description: Vectorize File Response
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
required:
- success
delete:
tags:
- Private Files
summary: Delete File Vectors
description: Delete file vectors for an existing file.
parameters:
- schema:
type: string
format: uuid
required: true
name: file_id
in: path
responses:
'200':
description: Vectorize File Response
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
required:
- success
/vectorize/groups/{group_id}/query:
post:
tags:
- Private Files
summary: Query File Vectors
description: Query file vectors for a given group
parameters:
- schema:
type: string
description: ID of the target group
format: uuid
required: true
name: group_id
in: path
requestBody:
content:
application/json:
schema:
type: object
properties:
text:
type: string
description: Query string
responses:
'200':
description: Vectorize File Response
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
count:
type: number
matches:
type: array
items:
type: object
properties:
file_id:
type: string
cid:
type: string
score:
type: number