-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathopenapi.yml
772 lines (767 loc) · 24.1 KB
/
openapi.yml
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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
openapi: 3.1.0
info:
title: Sprax's public Minecraft APIs
description: |-
// TODO (Markdown seems to be allowed here?)
Get support on my [Discord server](https://sprax.me/discord)
contact:
name: Christian Koop
url: https://github.com/SpraxDev
license:
name: GNU GPLv3
url: https://www.gnu.org/licenses/gpl-3.0.html.en
version: 3.0.0-SNAPSHOT
servers:
- url: https://api.sprax.dev/
- url: https://api.sprax2013.de/
description: DEPRECATED (Backwards compatibility mode)
tags:
- name: Minecraft (v2)
description: // TODO
- name: Minecraft (v1)
description: DO NOT use this in new apps – These v1 endpoints exist solely for compatibility with old apps that still use the api.sprax2013.de host
- name: Miscellaneous
description: Other endpoints
paths:
/status:
get:
tags:
- Miscellaneous
summary: Check if the API is online/responding
description: This endpoint can be used for uptime checks
operationId: getApiStatus
responses:
'200':
description: API is online and responding
content:
application/json:
schema:
type: object
properties:
online:
type: boolean
example:
online: true
/mc/v2/uuid/{username}:
get:
tags:
- Minecraft (v2)
summary: Get the UUID for a given Minecraft username
parameters:
- name: username
in: path
description: Minecraft username
required: true
schema:
type: string
/mc/v2/profile/{user}:
get:
tags:
- Minecraft (v2)
summary: Get the profile for a given UUID or username
parameters:
- name: user
in: path
description: UUID or username
required: true
schema:
type: string
/mc/v2/skin/{userOrX-Url}:
get:
tags:
- Minecraft (v2)
summary: Returns the (effective) skin image for a given user
/mc/v2/skin/{userOrX-Url}/{skinArea}:
get:
tags:
- Minecraft (v2)
summary: Returns the (effective) skin image, optionally cropped to a specific area
/mc/v2/skin/{userOrX-Url}/{skinArea}/3d:
get:
tags:
- Minecraft (v2)
summary: Returns the (effective) skin image in 3D, optionally cropped to a specific area
/mc/v2/cape/{user}:
get:
tags:
- Minecraft (v2)
summary: Lists all current capes for a given user
/mc/v2/cape/{user}/{capeService}:
get:
tags:
- Minecraft (v2)
summary: Returns the cape image for a given user and service
/mc/v2/server/blocklist:
get:
tags:
- Minecraft (v2)
summary: Returns a SHA-1 list of all currently blocked Minecraft servers
externalDocs:
description: You can check wiki.vg for more information about this list
url: https://wiki.vg/Mojang_API#Blocked_Servers
/mc/v2/server/blocklist/discovered:
get:
tags:
- Minecraft (v2)
summary: Returns the blocklist with its discovered hostnames, if available
/mc/v2/server/blocklist/check:
get:
tags:
- Minecraft (v2)
summary: Checks if a given hostname and some variations are blocked by Mojang right now
/mc/v2/server/ping:
get:
tags:
- Minecraft (v2)
summary: Pings a give Minecraft server and returns its status
description: This endpoint is able to properly resolve SRV records and ping Minecraft Java Edition servers
/mc/v1/uuid/{username}:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Get the UUID for a given Minecraft username
description: This endpoint returns the UUID for a given Minecraft username
operationId: getMcUuidByNameV1
parameters:
- name: username
in: path
description: Minecraft username
required: true
schema:
type: string
responses:
'200':
description: User found
content:
application/json:
schema:
type: object
properties:
id:
type: string
name:
type: string
example:
id: 955e4cf6411c40d1a1765bc8e03a8a9a
name: SpraxDev
'404':
description: No user found with the given name
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
example:
error: Not Found
message: UUID for given username
/mc/v1/profile/{usernameOrId}:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Minecraft profile for a given username or UUID
operationId: getMcProfileV1
parameters:
- name: usernameOrId
in: path
description: Minecraft username or UUID
required: true
schema:
type: string
- name: full
in: query
description: If set to true, a parsed representation of the profile will be returned (e.g. with the extracted skin URL)
required: false
schema:
type: boolean
default: false
responses:
'200':
description: Found a profile
content:
application/json:
schema:
type: object
properties:
id:
type: string
name:
type: string
properties:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
signature:
type: string
profileActions:
type: array
items:
type: string
example:
id: 955e4cf6411c40d1a1765bc8e03a8a9a
name: SpraxDev
properties:
- name: textures
value: <base64 string>
signature: <base64 string; signed data using Yggdrasil's private key>
profileActions: [ ]
'404':
description: No profile found
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
example:
error: Not Found
message: Profile for given user
/mc/v1/history/{usernameOrId}:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: '[GONE] Get the name history for a given Minecraft username or UUID'
description: Mojang removed the name history endpoint on 13 September 2022 to "improve player safety and data privacy"
operationId: getMcNameHistoryV1
parameters:
- name: usernameOrId
in: path
description: Minecraft username or UUID
required: true
schema:
type: string
responses:
'410':
description: Mojang removed the name history endpoint on 13 September 2022 to "improve player safety and data privacy"
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
example:
error: Gone
message: This endpoint has been removed as Mojang removed the username history API (https://web.archive.org/web/20221006001721/https://help.minecraft.net/hc/en-us/articles/8969841895693-Username-History-API-Removal-FAQ-)
/mc/v1/skin/{usernameOrIdOrX-Url}:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Get the skin for a given Minecraft username or UUID
description: This endpoints tries to return the effective skin for a give player (e.g. steve/alex skin is returned if user does not have a skin or the returned skin is normalized by default)
operationId: getMcSkinV1
parameters:
- name: usernameOrIdOrX-Url
in: path
description: Minecraft username or UUID or "x-url"
required: true
schema:
type: string
- name: raw
in: query
description: Setting raw to true returns the skin as-is (steve/alex skin is returned if user does not have a skin) – Otherwise the skin is somewhat normalized. This includes (but is not limited to) forcing 64x64 pixels or removing unused pixels (vanilla client)
schema:
type: boolean
default: false
- name: download
in: query
description: Sends response headers to force the browser to download the skin
schema:
type: boolean
default: false
- name: url
in: query
description: Uses a given Skin-URL instead of extracting it from a given Minecraft profile; Required if "x-url" is used as usernameOrIdOrX-Url
required: false
schema:
type: string
responses:
'200':
description: Skin found
content:
image/png:
schema:
type: string
format: binary
'404':
description: No skin found
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
example:
error: Not Found
message: Profile for given user
/mc/v1/skin/{usernameOrIdOrX-Url}/{skinArea}:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Get the rendered skin(-area) for a given Minecraft username or UUID
description: This endpoint renders a specific skin and area
operationId: getMcSkinRenderedAreaV1
parameters:
- name: usernameOrIdOrX-Url
in: path
description: Minecraft username or UUID or "x-url"
required: true
schema:
type: string
- name: skinArea
in: path
description: What skin area to render
required: true
schema:
type: string
enum:
- head
- body
- name: overlay
in: query
description: Weather to render the overlay (e.g. helmet) or not
required: false
schema:
type: boolean
default: true
- name: size
in: query
description: The size of the rendered skin (in pixels)
required: false
schema:
type: integer
format: int32
default: 512
minimum: 8
maximum: 1024
- name: slim
in: query
description: Weather to render as slim (alex) or not (steve) – Not setting this will automatically detect the skin type
required: false
schema:
type: boolean
- name: download
in: query
description: Sends response headers to force the browser to download the skin
schema:
type: boolean
default: false
- name: url
in: query
description: Uses a given Skin-URL instead of extracting it from a given Minecraft profile; Required if "x-url" is used as usernameOrIdOrX-Url
required: false
schema:
type: string
responses:
'200':
description: Skin found and rendered
content:
image/png:
schema:
type: string
format: binary
'404':
description: No skin found
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
example:
error: Not Found
message: Profile for given user
/mc/v1/skin/{usernameOrIdOrX-Url}/{skinArea}/3d:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Get the 3D rendered skin(-area) for a given Minecraft username or UUID
description: This endpoint renders a specific skin and area in 3D
operationId: getMcSkinRenderedArea3dV1
parameters:
- name: usernameOrIdOrX-Url
in: path
description: Minecraft username or UUID or "x-url"
required: true
schema:
type: string
- name: skinArea
in: path
description: What skin area to render
required: true
schema:
type: string
enum:
- head
- body
- name: overlay
in: query
description: Weather to render the overlay (e.g. helmet) or not
required: false
schema:
type: boolean
default: true
- name: size
in: query
description: The size of the rendered skin (in pixels)
required: false
schema:
type: integer
format: int32
default: 512
minimum: 8
maximum: 1024
- name: slim
in: query
description: Weather to render as slim (alex) or not (steve) – Not setting this will automatically detect the skin type
required: false
schema:
type: boolean
- name: download
in: query
description: Sends response headers to force the browser to download the skin
schema:
type: boolean
default: false
- name: url
in: query
description: Uses a given Skin-URL instead of extracting it from a given Minecraft profile; Required if "x-url" is used as usernameOrIdOrX-Url
required: false
schema:
type: string
responses:
'200':
description: Skin found and rendered in 3D
content:
image/png:
schema:
type: string
format: binary
'404':
description: No skin found
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
example:
error: Not Found
message: Profile for given user
/mc/v1/render/block:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Renders a block texture in 3D
operationId: getMcBlockRenderedV1
parameters:
- name: download
in: query
description: Sends response headers to force the browser to download the skin
schema:
type: boolean
default: false
- name: size
in: query
description: The size of the rendered skin (in pixels)
required: false
schema:
type: integer
format: int32
default: 150
minimum: 8
maximum: 1024
requestBody:
content:
image/png:
schema:
type: string
format: binary
responses:
'200':
description: Client provided a valid image and it was rendered
content:
image/png:
schema:
type: string
format: binary
'400':
description: Invalid image provided
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
details:
type: object
properties:
param:
type: string
condition:
type: string
example:
error: Bad Request
message: Missing or invalid query parameters
details:
param: size
condition: size >= 8 and size <= 1024
/mc/v1/capes/all/{usernameOrId}:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Finds all (supported) capes for a given user
description: Looks up all capes for a given user and returns their internal IDs (Looks like SkinDB had an endpoint that supported those IDs)
operationId: getMcCapesAllV1
parameters:
- name: usernameOrId
in: path
description: Minecraft username or UUID
required: true
schema:
type: string
responses:
'200':
description: Found the player and zero or more capes
content:
application/json:
schema:
type: object
properties:
Mojang:
type: string
nullable: true
OptiFine:
type: string
nullable: true
LabyMod:
type: string
nullable: true
example:
Mojang: null
OptiFine: '2339409327057536487'
LabyMod: null
/mc/v1/capes/{capeType}/{usernameOrId}:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Get a specific cape (image) for a given user
description: This endpoint returns the image for a specific cape type for a given user
operationId: getMcCapeByTypeV1
parameters:
- name: capeType
in: path
description: Cape type (e.g. "OptiFine")
required: true
schema:
type: string
enum:
- Mojang
- OptiFine
- LabyMod
- name: usernameOrId
in: path
description: Minecraft username or UUID
required: true
schema:
type: string
- name: download
in: query
description: Sends response headers to force the browser to download the skin
schema:
type: boolean
default: false
responses:
'200':
description: Cape found
content:
image/png:
schema:
type: string
format: binary
'404':
description: User does not have that cape, user not found, ...
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
example:
error: Not Found
message: User does not have a cape for that type
/mc/v1/capes/{capeType}/{usernameOrIdOrX-Url}/render:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Get a rendered version of a specific cape for a given user
description: This endpoint returns a rendered version of the image for a specific cape type for a given user
operationId: getMcCapeByTypeRenderedV1
parameters:
- name: capeType
in: path
description: Cape type (e.g. "OptiFine")
required: true
schema:
type: string
enum:
- Mojang
- OptiFine
- LabyMod
- name: usernameOrIdOrX-Url
in: path
description: Minecraft username or UUID or "x-url"
required: true
schema:
type: string
- name: size
in: query
description: The size of the rendered skin (in pixels)
required: false
schema:
type: integer
format: int32
default: 512
minimum: 8
maximum: 1024
- name: download
in: query
description: Sends response headers to force the browser to download the skin
schema:
type: boolean
default: false
- name: url
in: query
description: Uses a given Skin-URL instead of extracting it from a given Minecraft profile; Required if "x-url" is used as usernameOrIdOrX-Url
required: false
schema:
type: string
responses:
'200':
description: Cape found and rendered
content:
image/png:
schema:
type: string
format: binary
'404':
description: User does not have that cape, user not found, ...
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
example:
error: Not Found
message: User does not have a cape for that type
/mc/v1/servers/blocked:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Get a list of blocked Minecraft server hashes
description: Mojang has a list of blocked servers, that the client is not allowed to connect to. Mojang stores these blocked servers as hashes in a list. This endpoint returns the list of blocked server hashes.
operationId: getMcBlockedServersV1
responses:
'200':
description: List of blocked server hashes
content:
application/json:
schema:
type: array
items:
type: string
example:
- 9127048af7d5114492c05bd83323b6256420571f
- 330b87ef0ecd27ef4155d5a05019c990512c4937
- 817533e2b27f3942a8486edd62b4398c1f938e11
/mc/v1/servers/blocked/known:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: List all known blocked Minecraft server hostnames and their hashes
operationId: getMcBlockedServersKnownV1
responses:
'200':
description: List of known blocked server hostnames and their hashes
content:
application/json:
schema:
type: object
additionalProperties:
type: string
example:
9127048af7d5114492c05bd83323b6256420571f: minecraftmc.ddns.net
330b87ef0ecd27ef4155d5a05019c990512c4937: mojang1.ddns.net
817533e2b27f3942a8486edd62b4398c1f938e11: mojang2.ddns.net
/mc/v1/servers/blocked/check:
get:
tags:
- Minecraft (v1)
deprecated: true
summary: Check if a given Minecraft server/host is blocked
operationId: getMcBlockedServerCheckV1
parameters:
- name: host
in: query
description: Minecraft server host (Domain, IPv4, IPv6, ...)
required: true
schema:
type: string
responses:
'200':
description: Result of the given host being blocked
content:
application/json:
schema:
type: object
additionalProperties:
type: boolean
example:
'*.mojang1.ddns.net': false
mojang1.ddns.net: true
'*.ddns.net': false
'*.net': false