· 3 years ago · Sep 22, 2022, 02:40 PM
1{
2 "swagger":"2.0",
3 "info":{
4 "version":"v1",
5 "title":"Cubash API"
6 },
7 "host":"api.cubash.com",
8 "schemes":[ "https" ],
9 "paths":{
10 "/v1/display-names/validate":{
11 "get":{
12 "tags":[
13 "DisplayNames"
14 ],
15 "summary":"Validate a display name for a new user.",
16 "consumes":[
17
18 ],
19 "produces":[
20 "application/json",
21 "text/json"
22 ],
23 "parameters":[
24 {
25 "name":"displayName",
26 "in":"query",
27 "description":"The display name.",
28 "required":true,
29 "type":"string"
30 },
31 {
32 "name":"birthdate",
33 "in":"query",
34 "description":"The new user's birthdate",
35 "required":true,
36 "type":"string"
37 }
38 ],
39 "responses":{
40 "200":{
41 "description":"OK",
42 "schema":{
43 "$ref":"#/definitions/Roblox.Web.WebAPI.ApiEmptyResponseModel"
44 }
45 },
46 "400":{
47 "description":"1: Display name is too short\r\n2: Display name is too long\r\n3: Display name contains invalid characters\r\n4: Display name has been moderated\r\n6: Request must contain a birthdate"
48 },
49 "429":{
50 "description":"5: Display name updates for this user have been throttled"
51 }
52 },
53 "properties":{
54 "internal":false,
55 "metricIds":[
56 "DisplayNames:ValidateNewUserDisplayName"
57 ]
58 }
59 }
60 },
61 "/v1/users/{userId}":{
62 "get":{
63 "tags":[
64 "Users"
65 ],
66 "summary":"Gets detailed user information by id.",
67 "consumes":[
68
69 ],
70 "produces":[
71 "application/json",
72 "text/json"
73 ],
74 "parameters":[
75 {
76 "name":"userId",
77 "in":"path",
78 "description":"The user id.",
79 "required":true,
80 "type":"integer",
81 "format":"int64"
82 }
83 ],
84 "responses":{
85 "200":{
86 "description":"OK",
87 "schema":{
88 "$ref":"#/definitions/Roblox.Users.Api.GetUserResponse"
89 }
90 },
91 "404":{
92 "description":"3: The user id is invalid."
93 }
94 },
95 "properties":{
96 "internal":false,
97 "metricIds":[
98 "Users:GetUser"
99 ]
100 }
101 }
102 },
103 "/v1/users/{userId}/display-names/validate":{
104 "get":{
105 "tags":[
106 "DisplayNames"
107 ],
108 "summary":"Validate a display name for an existing user.",
109 "consumes":[
110
111 ],
112 "produces":[
113 "application/json",
114 "text/json"
115 ],
116 "parameters":[
117 {
118 "name":"userId",
119 "in":"path",
120 "description":"The user id.",
121 "required":true,
122 "type":"integer",
123 "format":"int64"
124 },
125 {
126 "name":"displayName",
127 "in":"query",
128 "description":"The display name.",
129 "required":true,
130 "type":"string"
131 }
132 ],
133 "responses":{
134 "200":{
135 "description":"OK",
136 "schema":{
137 "$ref":"#/definitions/Roblox.Web.WebAPI.ApiEmptyResponseModel"
138 }
139 },
140 "400":{
141 "description":"1: Display name is too short\r\n2: Display name is too long\r\n3: Display name contains invalid characters\r\n4: Display name has been moderated\r\n6: Request must contain a birthdate"
142 },
143 "401":{
144 "description":"0: Authorization has been denied for this request."
145 },
146 "403":{
147 "description":"7: The user id is invalid."
148 },
149 "429":{
150 "description":"5: Display name updates for this user have been throttled"
151 }
152 },
153 "properties":{
154 "internal":false,
155 "metricIds":[
156 "DisplayNames:ValidateExistingUserDisplayName"
157 ]
158 }
159 }
160 },
161 "/v1/users/{userId}/username-history":{
162 "get":{
163 "tags":[
164 "Usernames"
165 ],
166 "summary":"Retrieves the username history for a particular user.",
167 "consumes":[
168
169 ],
170 "produces":[
171 "application/json",
172 "text/json"
173 ],
174 "parameters":[
175 {
176 "name":"userId",
177 "in":"path",
178 "description":"",
179 "required":true,
180 "type":"integer",
181 "format":"int64"
182 },
183 {
184 "name":"limit",
185 "in":"query",
186 "description":"The amount of results per request.",
187 "required":false,
188 "type":"integer",
189 "format":"int32",
190 "default":10,
191 "enum":[
192 10,
193 25,
194 50,
195 100
196 ]
197 },
198 {
199 "name":"cursor",
200 "in":"query",
201 "description":"The paging cursor for the previous or next page.",
202 "required":false,
203 "type":"string"
204 },
205 {
206 "name":"sortOrder",
207 "in":"query",
208 "description":"The order the results are sorted in.",
209 "required":false,
210 "type":"string",
211 "default":"Asc",
212 "enum":[
213 "Asc",
214 "Desc"
215 ]
216 }
217 ],
218 "responses":{
219 "200":{
220 "description":"OK",
221 "schema":{
222 "$ref":"#/definitions/Roblox.Web.WebAPI.Models.ApiPageResponse[Roblox.Users.Api.UsernameHistoryResponse]"
223 }
224 },
225 "400":{
226 "description":"3: The user id is invalid."
227 }
228 },
229 "properties":{
230 "internal":false,
231 "metricIds":[
232 "Usernames:GetUsernameHistory"
233 ]
234 }
235 }
236 },
237 "/v1/users/authenticated":{
238 "get":{
239 "tags":[
240 "Users"
241 ],
242 "summary":"Gets the minimal authenticated user.",
243 "consumes":[
244
245 ],
246 "produces":[
247 "application/json",
248 "text/json"
249 ],
250 "parameters":[
251
252 ],
253 "responses":{
254 "200":{
255 "description":"OK",
256 "schema":{
257 "$ref":"#/definitions/Roblox.Users.Api.AuthenticatedUserResponse"
258 }
259 },
260 "401":{
261 "description":"0: Authorization has been denied for this request."
262 }
263 },
264 "properties":{
265 "internal":false,
266 "metricIds":[
267 "Users:GetAuthenticatedUser"
268 ]
269 }
270 }
271 },
272 "/v1/users/authenticated/age-bracket":{
273 "get":{
274 "tags":[
275 "Users"
276 ],
277 "summary":"Gets the age bracket of the authenticated user.",
278 "consumes":[
279
280 ],
281 "produces":[
282 "application/json",
283 "text/json"
284 ],
285 "parameters":[
286
287 ],
288 "responses":{
289 "200":{
290 "description":"OK",
291 "schema":{
292 "$ref":"#/definitions/Roblox.Users.Api.UserAgeBracketResponse"
293 }
294 },
295 "401":{
296 "description":"0: Authorization has been denied for this request."
297 }
298 },
299 "properties":{
300 "internal":false,
301 "metricIds":[
302 "Users:GetAuthenticatedUserAgeBracket"
303 ]
304 }
305 }
306 },
307 "/v1/users/authenticated/country-code":{
308 "get":{
309 "tags":[
310 "Users"
311 ],
312 "summary":"Gets the country code of the authenticated user.",
313 "consumes":[
314
315 ],
316 "produces":[
317 "application/json",
318 "text/json"
319 ],
320 "parameters":[
321
322 ],
323 "responses":{
324 "200":{
325 "description":"OK",
326 "schema":{
327 "$ref":"#/definitions/Roblox.Users.Api.UserCountryCodeResponse"
328 }
329 },
330 "401":{
331 "description":"0: Authorization has been denied for this request."
332 }
333 },
334 "properties":{
335 "internal":false,
336 "metricIds":[
337 "Users:GetAuthenticatedUserCountryCode"
338 ]
339 }
340 }
341 },
342 "/v1/users/authenticated/roles":{
343 "get":{
344 "tags":[
345 "Users"
346 ],
347 "summary":"Gets the (public) roles of the authenticated user, such as \"Soothsayer\" and \"BetaTester\".",
348 "consumes":[
349
350 ],
351 "produces":[
352 "application/json",
353 "text/json"
354 ],
355 "parameters":[
356
357 ],
358 "responses":{
359 "200":{
360 "description":"OK",
361 "schema":{
362 "$ref":"#/definitions/Roblox.Users.Api.UserRolesResponse"
363 }
364 },
365 "401":{
366 "description":"0: Authorization has been denied for this request."
367 }
368 },
369 "properties":{
370 "internal":false,
371 "metricIds":[
372 "Users:GetAuthenticatedUserPublicRoles"
373 ]
374 }
375 }
376 },
377 "/v1/users/search":{
378 "get":{
379 "tags":[
380 "UserSearch"
381 ],
382 "summary":"Searches for users by keyword.",
383 "consumes":[
384
385 ],
386 "produces":[
387 "application/json",
388 "text/json"
389 ],
390 "parameters":[
391 {
392 "name":"keyword",
393 "in":"query",
394 "description":"The search keyword.",
395 "required":true,
396 "type":"string"
397 },
398 {
399 "name":"limit",
400 "in":"query",
401 "description":"The amount of results per request.",
402 "required":false,
403 "type":"integer",
404 "format":"int32",
405 "default":10,
406 "enum":[
407 10,
408 25,
409 50,
410 100
411 ]
412 },
413 {
414 "name":"cursor",
415 "in":"query",
416 "description":"The paging cursor for the previous or next page.",
417 "required":false,
418 "type":"string"
419 }
420 ],
421 "responses":{
422 "200":{
423 "description":"OK",
424 "schema":{
425 "$ref":"#/definitions/Roblox.Web.WebAPI.Models.ApiPageResponse[Roblox.Users.Api.UserSearchResponse]"
426 }
427 },
428 "400":{
429 "description":"5: The keyword was filtered.\r\n6: The keyword is too short."
430 },
431 "429":{
432 "description":"4: Too many requests."
433 }
434 },
435 "properties":{
436 "internal":false,
437 "metricIds":[
438 "UserSearch:SearchUsers"
439 ]
440 }
441 }
442 },
443 "/v1/usernames/users":{
444 "post":{
445 "tags":[
446 "Users"
447 ],
448 "summary":"Get users by usernames.",
449 "description":"This endpoint will also check previous usernames.\r\nDoes not require X-CSRF-Token protection because this is essentially a get request but as a POST to avoid URI limits.",
450 "consumes":[
451 "application/json",
452 "text/json",
453 "application/x-www-form-urlencoded"
454 ],
455 "produces":[
456 "application/json",
457 "text/json"
458 ],
459 "parameters":[
460 {
461 "name":"request",
462 "in":"body",
463 "description":"The {Roblox.Users.Api.MultiGetByUsernameRequest}.",
464 "required":true,
465 "schema":{
466 "$ref":"#/definitions/Roblox.Users.Api.MultiGetByUsernameRequest"
467 }
468 }
469 ],
470 "responses":{
471 "200":{
472 "description":"OK",
473 "schema":{
474 "$ref":"#/definitions/Roblox.Web.WebAPI.Models.ApiArrayResponse[Roblox.Users.Api.MultiGetUserByNameResponse]"
475 }
476 },
477 "400":{
478 "description":"2: Too many usernames."
479 }
480 },
481 "properties":{
482 "internal":false,
483 "metricIds":[
484 "Users:MultiGetUsersByUsernames"
485 ]
486 }
487 }
488 },
489 "/v1/users":{
490 "post":{
491 "tags":[
492 "Users"
493 ],
494 "summary":"Get users by ids.",
495 "description":"Does not require X-CSRF-Token protection because this is essentially a get request but as a POST to avoid URI limits.",
496 "consumes":[
497 "application/json",
498 "text/json",
499 "application/x-www-form-urlencoded"
500 ],
501 "produces":[
502 "application/json",
503 "text/json"
504 ],
505 "parameters":[
506 {
507 "name":"request",
508 "in":"body",
509 "description":"The {Roblox.Users.Api.MultiGetByUserIdRequest}.",
510 "required":true,
511 "schema":{
512 "$ref":"#/definitions/Roblox.Users.Api.MultiGetByUserIdRequest"
513 }
514 }
515 ],
516 "responses":{
517 "200":{
518 "description":"OK",
519 "schema":{
520 "$ref":"#/definitions/Roblox.Web.WebAPI.Models.ApiArrayResponse[Roblox.Users.Api.VerifiedBadgeUserResponse]"
521 }
522 },
523 "400":{
524 "description":"1: Too many ids."
525 }
526 },
527 "properties":{
528 "internal":false,
529 "metricIds":[
530 "Users:MultiGetUsersByIds"
531 ]
532 }
533 }
534 },
535 "/v1/users/{userId}/display-names":{
536 "patch":{
537 "tags":[
538 "DisplayNames"
539 ],
540 "summary":"Set the display name for the authorized user.",
541 "consumes":[
542 "application/json",
543 "text/json",
544 "application/x-www-form-urlencoded"
545 ],
546 "produces":[
547 "application/json",
548 "text/json"
549 ],
550 "parameters":[
551 {
552 "name":"userId",
553 "in":"path",
554 "description":"the user id",
555 "required":true,
556 "type":"integer",
557 "format":"int64"
558 },
559 {
560 "name":"request",
561 "in":"body",
562 "description":"{Roblox.Users.Api.SetDisplayNameRequest}",
563 "required":true,
564 "schema":{
565 "$ref":"#/definitions/Roblox.Users.Api.SetDisplayNameRequest"
566 }
567 }
568 ],
569 "responses":{
570 "200":{
571 "description":"OK",
572 "schema":{
573 "$ref":"#/definitions/Roblox.Web.WebAPI.ApiEmptyResponseModel"
574 }
575 },
576 "400":{
577 "description":"1: Display name is too short\r\n2: Display name is too long\r\n3: Display name contains invalid characters\r\n4: Display name has been moderated"
578 },
579 "401":{
580 "description":"0: Authorization has been denied for this request."
581 },
582 "403":{
583 "description":"0: Token Validation Failed\r\n7: The user id is invalid."
584 },
585 "429":{
586 "description":"5: Display name updates for this user have been throttled"
587 }
588 },
589 "properties":{
590 "internal":false,
591 "metricIds":[
592 "DisplayNames:SetDisplayName"
593 ]
594 }
595 }
596 }
597 },
598 "definitions":{
599 "Roblox.Web.WebAPI.ApiEmptyResponseModel":{
600 "type":"object",
601 "properties":{
602
603 }
604 },
605 "Roblox.Users.Api.SetDisplayNameRequest":{
606 "description":"Request model for changing a display name.",
607 "type":"object",
608 "properties":{
609 "newDisplayName":{
610 "description":"The users new display name.",
611 "type":"string"
612 }
613 }
614 },
615 "Roblox.Paging.ExclusiveStartKeyCursor[System.Nullable[System.Int64]]":{
616 "type":"object",
617 "properties":{
618 "key":{
619 "format":"int64",
620 "type":"integer"
621 },
622 "sortOrder":{
623 "enum":[
624 "Asc",
625 "Desc"
626 ],
627 "type":"string"
628 },
629 "pagingDirection":{
630 "enum":[
631 "Forward",
632 "Backward"
633 ],
634 "type":"string"
635 },
636 "pageNumber":{
637 "format":"int32",
638 "type":"integer"
639 },
640 "discriminator":{
641 "type":"string"
642 },
643 "count":{
644 "format":"int32",
645 "type":"integer"
646 }
647 }
648 },
649 "Roblox.Web.WebAPI.Models.ApiPageResponse[Roblox.Users.Api.UsernameHistoryResponse]":{
650 "type":"object",
651 "properties":{
652 "previousPageCursor":{
653 "type":"string"
654 },
655 "nextPageCursor":{
656 "type":"string"
657 },
658 "data":{
659 "type":"array",
660 "items":{
661 "$ref":"#/definitions/Roblox.Users.Api.UsernameHistoryResponse"
662 }
663 }
664 }
665 },
666 "Roblox.Users.Api.UsernameHistoryResponse":{
667 "type":"object",
668 "properties":{
669 "name":{
670 "description":"A past username belonging to a particular userId",
671 "type":"string"
672 }
673 }
674 },
675 "System.Threading.CancellationToken":{
676 "type":"object",
677 "properties":{
678 "IsCancellationRequested":{
679 "type":"boolean",
680 "readOnly":true
681 },
682 "CanBeCanceled":{
683 "type":"boolean",
684 "readOnly":true
685 },
686 "WaitHandle":{
687 "$ref":"#/definitions/System.Threading.WaitHandle",
688 "readOnly":true
689 }
690 }
691 },
692 "System.Threading.WaitHandle":{
693 "type":"object",
694 "properties":{
695 "Handle":{
696 "type":"object"
697 },
698 "SafeWaitHandle":{
699 "$ref":"#/definitions/Microsoft.Win32.SafeHandles.SafeWaitHandle"
700 }
701 }
702 },
703 "Microsoft.Win32.SafeHandles.SafeWaitHandle":{
704 "type":"object",
705 "properties":{
706 "IsInvalid":{
707 "type":"boolean",
708 "readOnly":true
709 },
710 "IsClosed":{
711 "type":"boolean",
712 "readOnly":true
713 }
714 }
715 },
716 "Roblox.Users.Api.AuthenticatedUserResponse":{
717 "description":"A response model representing absolute minimal authenticating user information.\r\nNo new attributes should be added to this response since it is in the critical path of app launch and we want to minimize dependencies.",
718 "type":"object",
719 "properties":{
720 "id":{
721 "format":"int64",
722 "description":"The user Id.",
723 "type":"integer"
724 },
725 "name":{
726 "description":"The user name.",
727 "type":"string"
728 },
729 "displayName":{
730 "description":"The user DisplayName.",
731 "type":"string"
732 }
733 }
734 },
735 "Roblox.Users.Api.UserAgeBracketResponse":{
736 "description":"A user age bracket response model.",
737 "type":"object",
738 "properties":{
739 "ageBracket":{
740 "description":"The age bracket of the user.",
741 "enum":[
742 "Age13OrOver",
743 "AgeUnder13"
744 ],
745 "type":"string"
746 }
747 }
748 },
749 "Roblox.Users.Api.UserCountryCodeResponse":{
750 "description":"A user country code response model.",
751 "type":"object",
752 "properties":{
753 "countryCode":{
754 "description":"The country code of the user.",
755 "type":"string"
756 }
757 }
758 },
759 "Roblox.Users.Api.UserRolesResponse":{
760 "description":"A user roles response model.",
761 "type":"object",
762 "properties":{
763 "roles":{
764 "description":"The roles of the user.",
765 "type":"array",
766 "items":{
767 "type":"string"
768 }
769 }
770 }
771 },
772 "Roblox.Users.Api.GetUserResponse":{
773 "description":"A response model representing user information.",
774 "type":"object",
775 "properties":{
776 "description":{
777 "description":"The user description.",
778 "type":"string"
779 },
780 "created":{
781 "format":"date-time",
782 "description":"When the user signed up.",
783 "type":"string"
784 },
785 "isBanned":{
786 "description":"Whether or not the user is banned",
787 "type":"boolean"
788 },
789 "externalAppDisplayName":{
790 "description":"Unused, legacy attribute. For now always null to not disturb existing client code that might rely on its existence.",
791 "type":"string"
792 },
793 "hasVerifiedBadge":{
794 "description":"The user's verified badge status.",
795 "type":"boolean"
796 },
797 "id":{
798 "format":"int64",
799 "description":"The user Id.",
800 "type":"integer"
801 },
802 "name":{
803 "description":"The user name.",
804 "type":"string"
805 },
806 "displayName":{
807 "description":"The user DisplayName.",
808 "type":"string"
809 }
810 }
811 },
812 "Roblox.Users.Api.MultiGetByUserIdRequest":{
813 "description":"Request model for getting users by ids.",
814 "type":"object",
815 "properties":{
816 "userIds":{
817 "description":"The user ids.",
818 "type":"array",
819 "items":{
820 "format":"int64",
821 "type":"integer"
822 }
823 },
824 "excludeBannedUsers":{
825 "description":"Whether or not the response should exclude banned users",
826 "type":"boolean"
827 }
828 }
829 },
830 "Roblox.Web.WebAPI.Models.ApiArrayResponse[Roblox.Users.Api.VerifiedBadgeUserResponse]":{
831 "type":"object",
832 "properties":{
833 "data":{
834 "type":"array",
835 "items":{
836 "$ref":"#/definitions/Roblox.Users.Api.VerifiedBadgeUserResponse"
837 }
838 }
839 }
840 },
841 "Roblox.Users.Api.VerifiedBadgeUserResponse":{
842 "description":"A response model specific to multi-get user.",
843 "type":"object",
844 "properties":{
845 "hasVerifiedBadge":{
846 "description":"The user's verified badge status.",
847 "type":"boolean"
848 },
849 "id":{
850 "format":"int64",
851 "description":"The user Id.",
852 "type":"integer"
853 },
854 "name":{
855 "description":"The user name.",
856 "type":"string"
857 },
858 "displayName":{
859 "description":"The user DisplayName.",
860 "type":"string"
861 }
862 }
863 },
864 "Roblox.Users.Api.MultiGetByUsernameRequest":{
865 "description":"Request model for getting users by usernames.",
866 "type":"object",
867 "properties":{
868 "usernames":{
869 "description":"The usernames.",
870 "type":"array",
871 "items":{
872 "type":"string"
873 }
874 },
875 "excludeBannedUsers":{
876 "description":"Whether or not the response should exclude banned users",
877 "type":"boolean"
878 }
879 }
880 },
881 "Roblox.Web.WebAPI.Models.ApiArrayResponse[Roblox.Users.Api.MultiGetUserByNameResponse]":{
882 "type":"object",
883 "properties":{
884 "data":{
885 "type":"array",
886 "items":{
887 "$ref":"#/definitions/Roblox.Users.Api.MultiGetUserByNameResponse"
888 }
889 }
890 }
891 },
892 "Roblox.Users.Api.MultiGetUserByNameResponse":{
893 "description":"A response model specific to multi-get user by name.",
894 "type":"object",
895 "properties":{
896 "requestedUsername":{
897 "description":"The username the user was requested with.",
898 "type":"string"
899 },
900 "hasVerifiedBadge":{
901 "description":"The user's verified badge status.",
902 "type":"boolean"
903 },
904 "id":{
905 "format":"int64",
906 "description":"The user Id.",
907 "type":"integer"
908 },
909 "name":{
910 "description":"The user name.",
911 "type":"string"
912 },
913 "displayName":{
914 "description":"The user DisplayName.",
915 "type":"string"
916 }
917 }
918 },
919 "Roblox.Paging.StartIndexCursor":{
920 "type":"object",
921 "properties":{
922 "startIndex":{
923 "format":"int64",
924 "type":"integer"
925 },
926 "discriminator":{
927 "type":"string"
928 },
929 "count":{
930 "format":"int32",
931 "type":"integer"
932 }
933 }
934 },
935 "Roblox.Web.WebAPI.Models.ApiPageResponse[Roblox.Users.Api.UserSearchResponse]":{
936 "type":"object",
937 "properties":{
938 "previousPageCursor":{
939 "type":"string"
940 },
941 "nextPageCursor":{
942 "type":"string"
943 },
944 "data":{
945 "type":"array",
946 "items":{
947 "$ref":"#/definitions/Roblox.Users.Api.UserSearchResponse"
948 }
949 }
950 }
951 },
952 "Roblox.Users.Api.UserSearchResponse":{
953 "description":"A user response model specific to getting a user from user search.",
954 "type":"object",
955 "properties":{
956 "previousUsernames":{
957 "description":"Previous usernames for a user.",
958 "type":"array",
959 "items":{
960 "type":"string"
961 }
962 },
963 "hasVerifiedBadge":{
964 "description":"The user's verified badge status.",
965 "type":"boolean"
966 },
967 "id":{
968 "format":"int64",
969 "description":"The user Id.",
970 "type":"integer"
971 },
972 "name":{
973 "description":"The user name.",
974 "type":"string"
975 },
976 "displayName":{
977 "description":"The user DisplayName.",
978 "type":"string"
979 }
980 }
981 }
982 }
983}