forked from dev-magdy/Shreyash-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hashlookup.yaml
288 lines (288 loc) · 8.24 KB
/
hashlookup.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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
openapi: 3.0.1
info:
title: hashlookup CIRCL API
description: |-
![](https://www.circl.lu/assets/images/circl-logo.png)
[CIRCL hash lookup](https://hashlookup.circl.lu/) is a public API to lookup hash values against known database of files. For more details about all the datasets included [visit the website of the project](https://www.circl.lu/services/hashlookup/). The API is accessible via HTTP ReST API and the API is also [described as an OpenAPI](https://hashlookup.circl.lu/swagger.json). A [documentation is available with](https://www.circl.lu/services/hashlookup/) with sample queries and software using hashlookup. An offline version as Bloom filter is also [available](https://circl.lu/services/hashlookup/#how-to-quickly-check-a-set-of-files-in-a-local-directory). The API can be tested live in the interface below.
license:
name: CC-BY
version: "1.2"
servers:
- url: https://hashlookup.circl.lu
tags:
- name: default
description: Default namespace
paths:
/bulk/md5:
post:
tags:
- default
description: Bulk search of MD5 hashes in a JSON array with the key 'hashes'. Example MD5 hash - 8ED4B4ED952526D89899E723F3488DE4
operationId: post_bulkmd5
requestBody:
description: Optional description in *Markdown*
required: true
content:
application/json:
schema:
type: object
properties:
hashes:
type: array
required: true
items:
description: md5 hashes
type: string
example: 8ED4B4ED952526D89899E723F3488DE4
responses:
200:
description: Success
content: {}
404:
description:
JSON format incorrect. An array of hashes in the key 'hashes'
is expected.
content: {}
/bulk/sha1:
post:
tags:
- default
description: Bulk search of SHA1 hashes in a JSON array with the 'hashes', example SHA1 - FFFFFDAC1B1B4C513896C805C2C698D9688BE69F.
operationId: post_bulksha1
requestBody:
description: Optional description in *Markdown*
content:
application/json:
schema:
type: object
properties:
hashes:
type: array
required: true
items:
description: md5 hashes
type: string
example: FFFFFDAC1B1B4C513896C805C2C698D9688BE69F
responses:
200:
description: Success
content: {}
404:
description:
JSON format incorrect. An array of hashes in the key 'hashes'
is expected.
content: {}
/children/{sha1}/{count}/{cursor}:
get:
tags:
- default
description:
Return children from a given SHA1. A number of element to return
and an offset must be given. If not set it will be the 100 first elements.
A cursor must be given to paginate over. The starting cursor is 0.
operationId: get_children
parameters:
- name: sha1
in: path
required: true
schema:
type: string
- name: count
in: path
required: true
schema:
type: integer
- name: cursor
in: path
required: true
schema:
type: string
responses:
200:
description: Success
content: {}
400:
description: SHA1 value incorrect, expecting a SHA1 value in hex format
content: {}
404:
description: The SHA1 value has no known child.
content: {}
/info:
get:
tags:
- default
description: Info about the hashlookup database
operationId: get_info
responses:
200:
description: Success
content: {}
/lookup/md5/{md5}:
get:
tags:
- default
description: Lookup MD5.
operationId: get_lookup_md5
parameters:
- name: md5
in: path
required: true
schema:
type: string
responses:
200:
description: Success
content: {}
400:
description: MD5 value incorrect, expecting a MD5 value in hex format
content: {}
404:
description: Non existing MD5
content: {}
/lookup/sha1/{sha1}:
get:
tags:
- default
description: Lookup SHA-1.
operationId: get_lookup_sha1
parameters:
- name: sha1
in: path
required: true
schema:
type: string
responses:
200:
description: Success
content: {}
400:
description: SHA1 value incorrect, expecting a SHA1 value in hex format
content: {}
404:
description: Non existing SHA1
content: {}
/lookup/sha256/{sha256}:
get:
tags:
- default
description: Lookup SHA-256.
operationId: get_lookup_sha256
parameters:
- name: sha256
in: path
required: true
schema:
type: string
responses:
200:
description: Success
content: {}
400:
description: SHA-256 value incorrect, expecting a SHA-256 value in hex format
content: {}
404:
description: Non existing SHA-256
content: {}
/parents/{sha1}/{count}/{cursor}:
get:
tags:
- default
description:
Return parents from a given SHA1. A number of element to return
and an offset must be given. If not set it will be the 100 first elements.
A cursor must be given to paginate over. The starting cursor is 0.
operationId: get_parents
parameters:
- name: sha1
in: path
required: true
schema:
type: string
- name: count
in: path
required: true
schema:
type: integer
- name: cursor
in: path
required: true
schema:
type: string
responses:
200:
description: Success
content: {}
400:
description: SHA1 value incorrect, expecting a SHA1 value in hex format
content: {}
404:
description: The SHA1 value has no known parent.
content: {}
/session/create/{name}:
get:
tags:
- default
description:
Create a session key to keep search context. The session is attached
to a name. After the session is created, the header `hashlookup_session` can
be set to the session name.
operationId: get_session_create
parameters:
- name: name
in: path
required: true
schema:
type: string
responses:
200:
description: Success
content: {}
400:
description: Expecting a name for the session
content: {}
500:
description: Session feature is not enabled
content: {}
/session/get/{name}:
get:
tags:
- default
description: Return set of matching and non-matching hashes from a session.
operationId: get_session_matches
parameters:
- name: name
in: path
required: true
schema:
type: string
responses:
200:
description: Success
content: {}
400:
description: Expecting a name for the session
content: {}
500:
description: Session feature is not enabled
content: {}
/stats/top:
get:
tags:
- default
description: Return the top 100 of most queried values.
operationId: get_stattop
responses:
200:
description: Success
content: {}
400:
description: Public statistics not enabled
content: {}
components:
responses:
MaskError:
description: When any error occurs on mask
content: {}
ParseError:
description: When a mask can't be parsed
content: {}