github.com/litesolutions/justifay-api@v1.0.0-2.0.20220707114139-46f28a909481/third_party/OpenAPI/user/user.swagger.json (about) 1 { 2 "swagger": "2.0", 3 "info": { 4 "title": "Resonate Service Documentation: User", 5 "version": "2.0.2" 6 }, 7 "schemes": [ 8 "https" 9 ], 10 "consumes": [ 11 "application/json" 12 ], 13 "produces": [ 14 "application/json" 15 ], 16 "paths": { 17 "/api/v1/restricted/user/{id}": { 18 "get": { 19 "summary": "Get a user's restricted information", 20 "description": "Get user profile from the server including private information.", 21 "operationId": "ResonateUser_GetUserRestricted", 22 "responses": { 23 "200": { 24 "description": "A successful response.", 25 "schema": { 26 "$ref": "#/definitions/userUserPrivateResponse" 27 } 28 }, 29 "default": { 30 "description": "An unexpected error response.", 31 "schema": { 32 "$ref": "#/definitions/rpcStatus" 33 } 34 } 35 }, 36 "parameters": [ 37 { 38 "name": "id", 39 "in": "path", 40 "required": true, 41 "type": "string" 42 } 43 ], 44 "tags": [ 45 "Users" 46 ] 47 }, 48 "delete": { 49 "summary": "Delete user", 50 "description": "Delete a user from the server.", 51 "operationId": "ResonateUser_DeleteUser", 52 "responses": { 53 "200": { 54 "description": "A successful response.", 55 "schema": { 56 "$ref": "#/definitions/userEmpty" 57 } 58 }, 59 "default": { 60 "description": "An unexpected error response.", 61 "schema": { 62 "$ref": "#/definitions/rpcStatus" 63 } 64 } 65 }, 66 "parameters": [ 67 { 68 "name": "id", 69 "in": "path", 70 "required": true, 71 "type": "string" 72 } 73 ], 74 "tags": [ 75 "Users" 76 ] 77 }, 78 "patch": { 79 "summary": "Update a user record for admins", 80 "description": "Update an existing user record on the server including restricted information.", 81 "operationId": "ResonateUser_UpdateUserRestricted", 82 "responses": { 83 "200": { 84 "description": "A successful response.", 85 "schema": { 86 "$ref": "#/definitions/userEmpty" 87 } 88 }, 89 "default": { 90 "description": "An unexpected error response.", 91 "schema": { 92 "$ref": "#/definitions/rpcStatus" 93 } 94 } 95 }, 96 "parameters": [ 97 { 98 "name": "id", 99 "in": "path", 100 "required": true, 101 "type": "string" 102 }, 103 { 104 "name": "body", 105 "in": "body", 106 "required": true, 107 "schema": { 108 "$ref": "#/definitions/userUserUpdateRestrictedRequest" 109 } 110 } 111 ], 112 "tags": [ 113 "Users" 114 ] 115 } 116 }, 117 "/api/v1/user/{id}": { 118 "get": { 119 "summary": "Get a user", 120 "description": "Get a user's public information from the server.", 121 "operationId": "ResonateUser_GetUser", 122 "responses": { 123 "200": { 124 "description": "A successful response.", 125 "schema": { 126 "$ref": "#/definitions/userUserPublicResponse" 127 } 128 }, 129 "default": { 130 "description": "An unexpected error response.", 131 "schema": { 132 "$ref": "#/definitions/rpcStatus" 133 } 134 } 135 }, 136 "parameters": [ 137 { 138 "name": "id", 139 "in": "path", 140 "required": true, 141 "type": "string" 142 } 143 ], 144 "tags": [ 145 "Users" 146 ] 147 }, 148 "patch": { 149 "summary": "Update a user", 150 "description": "Update an existing user record on the server.", 151 "operationId": "ResonateUser_UpdateUser", 152 "responses": { 153 "200": { 154 "description": "A successful response.", 155 "schema": { 156 "$ref": "#/definitions/userEmpty" 157 } 158 }, 159 "default": { 160 "description": "An unexpected error response.", 161 "schema": { 162 "$ref": "#/definitions/rpcStatus" 163 } 164 } 165 }, 166 "parameters": [ 167 { 168 "name": "id", 169 "in": "path", 170 "required": true, 171 "type": "string" 172 }, 173 { 174 "name": "body", 175 "in": "body", 176 "required": true, 177 "schema": { 178 "$ref": "#/definitions/userUserUpdateRequest" 179 } 180 } 181 ], 182 "tags": [ 183 "Users" 184 ] 185 } 186 }, 187 "/api/v1/usergroup/{id}": { 188 "get": { 189 "summary": "Get a user group", 190 "description": "Get a usergroup from the server.", 191 "operationId": "ResonateUser_GetUserGroup", 192 "responses": { 193 "200": { 194 "description": "A successful response.", 195 "schema": { 196 "$ref": "#/definitions/userUserGroupPublicResponse" 197 } 198 }, 199 "default": { 200 "description": "An unexpected error response.", 201 "schema": { 202 "$ref": "#/definitions/rpcStatus" 203 } 204 } 205 }, 206 "parameters": [ 207 { 208 "name": "id", 209 "in": "path", 210 "required": true, 211 "type": "string" 212 } 213 ], 214 "tags": [ 215 "Usergroups" 216 ] 217 }, 218 "delete": { 219 "summary": "Delete usergroup", 220 "description": "Delete a usergroup from the server.", 221 "operationId": "ResonateUser_DeleteUserGroup", 222 "responses": { 223 "200": { 224 "description": "A successful response.", 225 "schema": { 226 "$ref": "#/definitions/userEmpty" 227 } 228 }, 229 "default": { 230 "description": "An unexpected error response.", 231 "schema": { 232 "$ref": "#/definitions/rpcStatus" 233 } 234 } 235 }, 236 "parameters": [ 237 { 238 "name": "id", 239 "in": "path", 240 "required": true, 241 "type": "string" 242 } 243 ], 244 "tags": [ 245 "Usergroups" 246 ] 247 }, 248 "patch": { 249 "summary": "Update a user group", 250 "description": "Update an existing user group record on the server.", 251 "operationId": "ResonateUser_UpdateUserGroup", 252 "responses": { 253 "200": { 254 "description": "A successful response.", 255 "schema": { 256 "$ref": "#/definitions/userEmpty" 257 } 258 }, 259 "default": { 260 "description": "An unexpected error response.", 261 "schema": { 262 "$ref": "#/definitions/rpcStatus" 263 } 264 } 265 }, 266 "parameters": [ 267 { 268 "name": "id", 269 "in": "path", 270 "required": true, 271 "type": "string" 272 }, 273 { 274 "name": "body", 275 "in": "body", 276 "required": true, 277 "schema": { 278 "$ref": "#/definitions/userUserGroupUpdateRequest" 279 } 280 } 281 ], 282 "tags": [ 283 "Usergroups" 284 ] 285 } 286 }, 287 "/api/v1/users": { 288 "get": { 289 "summary": "List users", 290 "description": "List all users on the server.", 291 "operationId": "ResonateUser_ListUsers", 292 "responses": { 293 "200": { 294 "description": "A successful response.", 295 "schema": { 296 "$ref": "#/definitions/userUserListResponse" 297 } 298 }, 299 "default": { 300 "description": "An unexpected error response.", 301 "schema": { 302 "$ref": "#/definitions/rpcStatus" 303 } 304 } 305 }, 306 "tags": [ 307 "Users" 308 ] 309 }, 310 "post": { 311 "summary": "Add a user", 312 "description": "Add a user to the server.", 313 "operationId": "ResonateUser_AddUser", 314 "responses": { 315 "200": { 316 "description": "A successful response.", 317 "schema": { 318 "$ref": "#/definitions/userUserRequest" 319 } 320 }, 321 "default": { 322 "description": "An unexpected error response.", 323 "schema": { 324 "$ref": "#/definitions/rpcStatus" 325 } 326 } 327 }, 328 "parameters": [ 329 { 330 "name": "body", 331 "in": "body", 332 "required": true, 333 "schema": { 334 "$ref": "#/definitions/userUserAddRequest" 335 } 336 } 337 ], 338 "tags": [ 339 "Users" 340 ] 341 } 342 }, 343 "/api/v1/users/{id}/usergroup": { 344 "post": { 345 "summary": "Add a user group", 346 "description": "Add a user group to the server to user resource with id: id.", 347 "operationId": "ResonateUser_AddUserGroup", 348 "responses": { 349 "200": { 350 "description": "A successful response.", 351 "schema": { 352 "$ref": "#/definitions/userUserRequest" 353 } 354 }, 355 "default": { 356 "description": "An unexpected error response.", 357 "schema": { 358 "$ref": "#/definitions/rpcStatus" 359 } 360 } 361 }, 362 "parameters": [ 363 { 364 "name": "id", 365 "in": "path", 366 "required": true, 367 "type": "string" 368 }, 369 { 370 "name": "body", 371 "in": "body", 372 "required": true, 373 "schema": { 374 "$ref": "#/definitions/userUserGroupCreateRequest" 375 } 376 } 377 ], 378 "tags": [ 379 "Usergroups" 380 ] 381 } 382 }, 383 "/api/v1/users/{id}/usergroups": { 384 "get": { 385 "summary": "Get a list of users groups", 386 "description": "Get a list of users groups owned by user from server", 387 "operationId": "ResonateUser_ListUsersUserGroups", 388 "responses": { 389 "200": { 390 "description": "A successful response.", 391 "schema": { 392 "$ref": "#/definitions/userUserGroupListResponse" 393 } 394 }, 395 "default": { 396 "description": "An unexpected error response.", 397 "schema": { 398 "$ref": "#/definitions/rpcStatus" 399 } 400 } 401 }, 402 "parameters": [ 403 { 404 "name": "id", 405 "in": "path", 406 "required": true, 407 "type": "string" 408 } 409 ], 410 "tags": [ 411 "Usergroups" 412 ] 413 } 414 } 415 }, 416 "definitions": { 417 "protobufAny": { 418 "type": "object", 419 "properties": { 420 "typeUrl": { 421 "type": "string" 422 }, 423 "value": { 424 "type": "string", 425 "format": "byte" 426 } 427 } 428 }, 429 "rpcStatus": { 430 "type": "object", 431 "properties": { 432 "code": { 433 "type": "integer", 434 "format": "int32" 435 }, 436 "message": { 437 "type": "string" 438 }, 439 "details": { 440 "type": "array", 441 "items": { 442 "$ref": "#/definitions/protobufAny" 443 } 444 } 445 } 446 }, 447 "userEmpty": { 448 "type": "object" 449 }, 450 "userLink": { 451 "type": "object", 452 "properties": { 453 "ID": { 454 "type": "string" 455 }, 456 "platform": { 457 "type": "string" 458 }, 459 "groupType": { 460 "type": "string" 461 }, 462 "uri": { 463 "type": "string" 464 }, 465 "personalData": { 466 "type": "boolean" 467 } 468 } 469 }, 470 "userUserAddRequest": { 471 "type": "object", 472 "properties": { 473 "username": { 474 "type": "string" 475 }, 476 "fullName": { 477 "type": "string" 478 }, 479 "firstName": { 480 "type": "string" 481 }, 482 "lastName": { 483 "type": "string" 484 }, 485 "member": { 486 "type": "boolean" 487 }, 488 "newsletterNotification": { 489 "type": "boolean" 490 }, 491 "country": { 492 "type": "string" 493 }, 494 "followedGroups": { 495 "type": "array", 496 "items": { 497 "type": "string" 498 } 499 }, 500 "roleId": { 501 "type": "integer", 502 "format": "int32" 503 } 504 } 505 }, 506 "userUserGroupCreateRequest": { 507 "type": "object", 508 "properties": { 509 "id": { 510 "type": "string" 511 }, 512 "displayName": { 513 "type": "string" 514 }, 515 "description": { 516 "type": "string" 517 }, 518 "shortBio": { 519 "type": "string" 520 }, 521 "avatar": { 522 "type": "string" 523 }, 524 "banner": { 525 "type": "string" 526 }, 527 "groupType": { 528 "type": "string" 529 }, 530 "tags": { 531 "type": "array", 532 "items": { 533 "type": "string" 534 } 535 }, 536 "groupEmail": { 537 "type": "string" 538 }, 539 "links": { 540 "type": "array", 541 "items": { 542 "type": "string" 543 } 544 } 545 } 546 }, 547 "userUserGroupListResponse": { 548 "type": "object", 549 "properties": { 550 "usergroup": { 551 "type": "array", 552 "items": { 553 "$ref": "#/definitions/userUserGroupPrivateResponse" 554 } 555 } 556 } 557 }, 558 "userUserGroupPrivateResponse": { 559 "type": "object", 560 "properties": { 561 "id": { 562 "type": "string" 563 }, 564 "displayName": { 565 "type": "string" 566 }, 567 "description": { 568 "type": "string" 569 }, 570 "shortBio": { 571 "type": "string" 572 }, 573 "avatar": { 574 "type": "string" 575 }, 576 "banner": { 577 "type": "string" 578 }, 579 "ownerId": { 580 "type": "string" 581 }, 582 "groupType": { 583 "type": "string" 584 }, 585 "groupEmail": { 586 "type": "string", 587 "title": "repeated string followers = 9;\nrepeated string members = 10;\nrepeated string memberOfGroups = 11;\nrepeated string links = 12;\nrepeated string tags = 13;\n StreetAddress address = 13;\nPrivacy privacy = 14;\nrepeated RelatedUserGroup recommended_artists = 15;\nmap\u003cstring, string\u003e publisher = 16;\nmap\u003cstring, string\u003e pro = 17;" 588 }, 589 "createdAt": { 590 "type": "string" 591 }, 592 "updatedAt": { 593 "type": "string" 594 } 595 } 596 }, 597 "userUserGroupPublicResponse": { 598 "type": "object", 599 "properties": { 600 "displayName": { 601 "type": "string" 602 }, 603 "description": { 604 "type": "string" 605 }, 606 "shortBio": { 607 "type": "string" 608 }, 609 "avatar": { 610 "type": "string" 611 }, 612 "banner": { 613 "type": "string" 614 }, 615 "groupType": { 616 "type": "string" 617 }, 618 "followers": { 619 "type": "array", 620 "items": { 621 "type": "string" 622 } 623 }, 624 "members": { 625 "type": "array", 626 "items": { 627 "type": "string" 628 } 629 }, 630 "memberOfGroups": { 631 "type": "array", 632 "items": { 633 "type": "string" 634 } 635 }, 636 "links": { 637 "type": "array", 638 "items": { 639 "$ref": "#/definitions/userLink" 640 } 641 }, 642 "tags": { 643 "type": "array", 644 "items": { 645 "type": "string" 646 } 647 }, 648 "groupEmail": { 649 "type": "string", 650 "title": "repeated RelatedUserGroup recommended_artists = 17;\nmap\u003cstring, string\u003e publisher = 21;\nmap\u003cstring, string\u003e pro = 22;" 651 } 652 } 653 }, 654 "userUserGroupUpdateRequest": { 655 "type": "object", 656 "properties": { 657 "id": { 658 "type": "string" 659 }, 660 "displayName": { 661 "type": "string" 662 }, 663 "description": { 664 "type": "string" 665 }, 666 "shortBio": { 667 "type": "string" 668 }, 669 "avatar": { 670 "type": "string" 671 }, 672 "banner": { 673 "type": "string" 674 }, 675 "groupType": { 676 "type": "string" 677 }, 678 "groupEmail": { 679 "type": "string" 680 }, 681 "ownerId": { 682 "type": "string" 683 }, 684 "links": { 685 "type": "array", 686 "items": { 687 "type": "string" 688 } 689 }, 690 "tags": { 691 "type": "array", 692 "items": { 693 "type": "string" 694 } 695 } 696 } 697 }, 698 "userUserListResponse": { 699 "type": "object", 700 "properties": { 701 "user": { 702 "type": "array", 703 "items": { 704 "$ref": "#/definitions/userUserPrivateResponse" 705 } 706 } 707 } 708 }, 709 "userUserPrivateResponse": { 710 "type": "object", 711 "properties": { 712 "id": { 713 "type": "string" 714 }, 715 "username": { 716 "type": "string" 717 }, 718 "fullName": { 719 "type": "string" 720 }, 721 "firstName": { 722 "type": "string" 723 }, 724 "lastName": { 725 "type": "string" 726 }, 727 "country": { 728 "type": "string" 729 }, 730 "emailConfirmed": { 731 "type": "boolean" 732 }, 733 "member": { 734 "type": "boolean" 735 }, 736 "roleId": { 737 "type": "integer", 738 "format": "int32" 739 }, 740 "tenantId": { 741 "type": "integer", 742 "format": "int32" 743 }, 744 "newsletterNotification": { 745 "type": "boolean" 746 }, 747 "personas": { 748 "type": "array", 749 "items": { 750 "type": "string" 751 } 752 }, 753 "ownedGroups": { 754 "type": "array", 755 "items": { 756 "type": "string" 757 } 758 }, 759 "followedGroups": { 760 "type": "array", 761 "items": { 762 "type": "string" 763 } 764 } 765 } 766 }, 767 "userUserPublicResponse": { 768 "type": "object", 769 "properties": { 770 "id": { 771 "type": "string" 772 }, 773 "username": { 774 "type": "string" 775 }, 776 "fullName": { 777 "type": "string" 778 }, 779 "firstName": { 780 "type": "string" 781 }, 782 "lastName": { 783 "type": "string" 784 }, 785 "country": { 786 "type": "string" 787 }, 788 "member": { 789 "type": "boolean" 790 }, 791 "personas": { 792 "type": "array", 793 "items": { 794 "type": "string" 795 } 796 }, 797 "ownedGroups": { 798 "type": "array", 799 "items": { 800 "type": "string" 801 } 802 }, 803 "followedGroups": { 804 "type": "array", 805 "items": { 806 "type": "string" 807 } 808 }, 809 "roleId": { 810 "type": "integer", 811 "format": "int32" 812 } 813 } 814 }, 815 "userUserRequest": { 816 "type": "object", 817 "properties": { 818 "id": { 819 "type": "string" 820 } 821 } 822 }, 823 "userUserUpdateRequest": { 824 "type": "object", 825 "properties": { 826 "id": { 827 "type": "string" 828 }, 829 "username": { 830 "type": "string" 831 }, 832 "fullName": { 833 "type": "string" 834 }, 835 "firstName": { 836 "type": "string" 837 }, 838 "lastName": { 839 "type": "string" 840 }, 841 "country": { 842 "type": "string" 843 }, 844 "newsletterNotification": { 845 "type": "boolean" 846 }, 847 "roleId": { 848 "type": "integer", 849 "format": "int32" 850 } 851 } 852 }, 853 "userUserUpdateRestrictedRequest": { 854 "type": "object", 855 "properties": { 856 "id": { 857 "type": "string" 858 }, 859 "username": { 860 "type": "string" 861 }, 862 "fullName": { 863 "type": "string" 864 }, 865 "firstName": { 866 "type": "string" 867 }, 868 "lastName": { 869 "type": "string" 870 }, 871 "member": { 872 "type": "boolean" 873 }, 874 "roleId": { 875 "type": "integer", 876 "format": "int32" 877 }, 878 "tenantId": { 879 "type": "integer", 880 "format": "int32" 881 }, 882 "newsletterNotification": { 883 "type": "boolean" 884 } 885 } 886 } 887 }, 888 "securityDefinitions": { 889 "bearer": { 890 "type": "apiKey", 891 "description": "Authentication token, prefixed by Bearer: Bearer \u003ctoken\u003e", 892 "name": "Authorization", 893 "in": "header" 894 } 895 }, 896 "security": [ 897 { 898 "bearer": [] 899 } 900 ], 901 "externalDocs": { 902 "description": "gRPC-gateway resonate-user-api repository", 903 "url": "https://github.com/resonatecoop/user-api" 904 } 905 }