github.com/resonatecoop/user-api@v1.0.0-13.0.20220915120639-05dc9c04014a/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/user/{id}/credits": {
   188        "get": {
   189          "summary": "Get user credits",
   190          "description": "Get user credits.",
   191          "operationId": "ResonateUser_GetUserCredits",
   192          "responses": {
   193            "200": {
   194              "description": "A successful response.",
   195              "schema": {
   196                "$ref": "#/definitions/userUserCreditResponse"
   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            "Users"
   216          ]
   217        }
   218      },
   219      "/api/v1/user/{id}/membership": {
   220        "get": {
   221          "summary": "Get user membership",
   222          "description": "Get user membership.",
   223          "operationId": "ResonateUser_GetUserMembership",
   224          "responses": {
   225            "200": {
   226              "description": "A successful response.",
   227              "schema": {
   228                "$ref": "#/definitions/userUserMembershipResponse"
   229              }
   230            },
   231            "default": {
   232              "description": "An unexpected error response.",
   233              "schema": {
   234                "$ref": "#/definitions/rpcStatus"
   235              }
   236            }
   237          },
   238          "parameters": [
   239            {
   240              "name": "id",
   241              "in": "path",
   242              "required": true,
   243              "type": "string"
   244            }
   245          ],
   246          "tags": [
   247            "Membership"
   248          ]
   249        }
   250      },
   251      "/api/v1/usergroup/{id}": {
   252        "get": {
   253          "summary": "Get a user group",
   254          "description": "Get a usergroup from the server.",
   255          "operationId": "ResonateUser_GetUserGroup",
   256          "responses": {
   257            "200": {
   258              "description": "A successful response.",
   259              "schema": {
   260                "$ref": "#/definitions/userUserGroupPublicResponse"
   261              }
   262            },
   263            "default": {
   264              "description": "An unexpected error response.",
   265              "schema": {
   266                "$ref": "#/definitions/rpcStatus"
   267              }
   268            }
   269          },
   270          "parameters": [
   271            {
   272              "name": "id",
   273              "in": "path",
   274              "required": true,
   275              "type": "string"
   276            }
   277          ],
   278          "tags": [
   279            "Usergroups"
   280          ]
   281        },
   282        "delete": {
   283          "summary": "Delete usergroup",
   284          "description": "Delete a usergroup from the server.",
   285          "operationId": "ResonateUser_DeleteUserGroup",
   286          "responses": {
   287            "200": {
   288              "description": "A successful response.",
   289              "schema": {
   290                "$ref": "#/definitions/userEmpty"
   291              }
   292            },
   293            "default": {
   294              "description": "An unexpected error response.",
   295              "schema": {
   296                "$ref": "#/definitions/rpcStatus"
   297              }
   298            }
   299          },
   300          "parameters": [
   301            {
   302              "name": "id",
   303              "in": "path",
   304              "required": true,
   305              "type": "string"
   306            }
   307          ],
   308          "tags": [
   309            "Usergroups"
   310          ]
   311        },
   312        "patch": {
   313          "summary": "Update a user group",
   314          "description": "Update an existing user group record on the server.",
   315          "operationId": "ResonateUser_UpdateUserGroup",
   316          "responses": {
   317            "200": {
   318              "description": "A successful response.",
   319              "schema": {
   320                "$ref": "#/definitions/userEmpty"
   321              }
   322            },
   323            "default": {
   324              "description": "An unexpected error response.",
   325              "schema": {
   326                "$ref": "#/definitions/rpcStatus"
   327              }
   328            }
   329          },
   330          "parameters": [
   331            {
   332              "name": "id",
   333              "in": "path",
   334              "required": true,
   335              "type": "string"
   336            },
   337            {
   338              "name": "body",
   339              "in": "body",
   340              "required": true,
   341              "schema": {
   342                "$ref": "#/definitions/userUserGroupUpdateRequest"
   343              }
   344            }
   345          ],
   346          "tags": [
   347            "Usergroups"
   348          ]
   349        }
   350      },
   351      "/api/v1/users": {
   352        "get": {
   353          "summary": "List users",
   354          "description": "List all users on the server.",
   355          "operationId": "ResonateUser_ListUsers",
   356          "responses": {
   357            "200": {
   358              "description": "A successful response.",
   359              "schema": {
   360                "$ref": "#/definitions/userUserListResponse"
   361              }
   362            },
   363            "default": {
   364              "description": "An unexpected error response.",
   365              "schema": {
   366                "$ref": "#/definitions/rpcStatus"
   367              }
   368            }
   369          },
   370          "tags": [
   371            "Users"
   372          ]
   373        },
   374        "post": {
   375          "summary": "Add a user",
   376          "description": "Add a user to the server.",
   377          "operationId": "ResonateUser_AddUser",
   378          "responses": {
   379            "200": {
   380              "description": "A successful response.",
   381              "schema": {
   382                "$ref": "#/definitions/userUserRequest"
   383              }
   384            },
   385            "default": {
   386              "description": "An unexpected error response.",
   387              "schema": {
   388                "$ref": "#/definitions/rpcStatus"
   389              }
   390            }
   391          },
   392          "parameters": [
   393            {
   394              "name": "body",
   395              "in": "body",
   396              "required": true,
   397              "schema": {
   398                "$ref": "#/definitions/userUserAddRequest"
   399              }
   400            }
   401          ],
   402          "tags": [
   403            "Users"
   404          ]
   405        }
   406      },
   407      "/api/v1/users/{id}/usergroup": {
   408        "post": {
   409          "summary": "Add a user group",
   410          "description": "Add a user group to the server to user resource with id: id.",
   411          "operationId": "ResonateUser_AddUserGroup",
   412          "responses": {
   413            "200": {
   414              "description": "A successful response.",
   415              "schema": {
   416                "$ref": "#/definitions/userUserRequest"
   417              }
   418            },
   419            "default": {
   420              "description": "An unexpected error response.",
   421              "schema": {
   422                "$ref": "#/definitions/rpcStatus"
   423              }
   424            }
   425          },
   426          "parameters": [
   427            {
   428              "name": "id",
   429              "in": "path",
   430              "required": true,
   431              "type": "string"
   432            },
   433            {
   434              "name": "body",
   435              "in": "body",
   436              "required": true,
   437              "schema": {
   438                "$ref": "#/definitions/userUserGroupCreateRequest"
   439              }
   440            }
   441          ],
   442          "tags": [
   443            "Usergroups"
   444          ]
   445        }
   446      },
   447      "/api/v1/users/{id}/usergroups": {
   448        "get": {
   449          "summary": "Get a list of users groups",
   450          "description": "Get a list of users groups owned by user from server",
   451          "operationId": "ResonateUser_ListUsersUserGroups",
   452          "responses": {
   453            "200": {
   454              "description": "A successful response.",
   455              "schema": {
   456                "$ref": "#/definitions/userUserGroupListResponse"
   457              }
   458            },
   459            "default": {
   460              "description": "An unexpected error response.",
   461              "schema": {
   462                "$ref": "#/definitions/rpcStatus"
   463              }
   464            }
   465          },
   466          "parameters": [
   467            {
   468              "name": "id",
   469              "in": "path",
   470              "required": true,
   471              "type": "string"
   472            }
   473          ],
   474          "tags": [
   475            "Usergroups"
   476          ]
   477        }
   478      }
   479    },
   480    "definitions": {
   481      "protobufAny": {
   482        "type": "object",
   483        "properties": {
   484          "typeUrl": {
   485            "type": "string"
   486          },
   487          "value": {
   488            "type": "string",
   489            "format": "byte"
   490          }
   491        }
   492      },
   493      "rpcStatus": {
   494        "type": "object",
   495        "properties": {
   496          "code": {
   497            "type": "integer",
   498            "format": "int32"
   499          },
   500          "message": {
   501            "type": "string"
   502          },
   503          "details": {
   504            "type": "array",
   505            "items": {
   506              "$ref": "#/definitions/protobufAny"
   507            }
   508          }
   509        }
   510      },
   511      "userEmpty": {
   512        "type": "object"
   513      },
   514      "userLink": {
   515        "type": "object",
   516        "properties": {
   517          "ID": {
   518            "type": "string"
   519          },
   520          "platform": {
   521            "type": "string"
   522          },
   523          "groupType": {
   524            "type": "string"
   525          },
   526          "uri": {
   527            "type": "string"
   528          },
   529          "personalData": {
   530            "type": "boolean"
   531          }
   532        }
   533      },
   534      "userUserAddRequest": {
   535        "type": "object",
   536        "properties": {
   537          "username": {
   538            "type": "string"
   539          },
   540          "fullName": {
   541            "type": "string"
   542          },
   543          "firstName": {
   544            "type": "string"
   545          },
   546          "lastName": {
   547            "type": "string"
   548          },
   549          "member": {
   550            "type": "boolean"
   551          },
   552          "newsletterNotification": {
   553            "type": "boolean"
   554          },
   555          "country": {
   556            "type": "string"
   557          },
   558          "followedGroups": {
   559            "type": "array",
   560            "items": {
   561              "type": "string"
   562            }
   563          },
   564          "roleId": {
   565            "type": "integer",
   566            "format": "int32"
   567          }
   568        }
   569      },
   570      "userUserCreditResponse": {
   571        "type": "object",
   572        "properties": {
   573          "total": {
   574            "type": "string",
   575            "format": "int64"
   576          }
   577        }
   578      },
   579      "userUserGroupCreateRequest": {
   580        "type": "object",
   581        "properties": {
   582          "id": {
   583            "type": "string"
   584          },
   585          "displayName": {
   586            "type": "string"
   587          },
   588          "description": {
   589            "type": "string"
   590          },
   591          "shortBio": {
   592            "type": "string"
   593          },
   594          "avatar": {
   595            "type": "string"
   596          },
   597          "banner": {
   598            "type": "string"
   599          },
   600          "groupType": {
   601            "type": "string"
   602          },
   603          "tags": {
   604            "type": "array",
   605            "items": {
   606              "type": "string"
   607            }
   608          },
   609          "groupEmail": {
   610            "type": "string"
   611          },
   612          "links": {
   613            "type": "array",
   614            "items": {
   615              "type": "string"
   616            }
   617          }
   618        }
   619      },
   620      "userUserGroupListResponse": {
   621        "type": "object",
   622        "properties": {
   623          "usergroup": {
   624            "type": "array",
   625            "items": {
   626              "$ref": "#/definitions/userUserGroupPrivateResponse"
   627            }
   628          }
   629        }
   630      },
   631      "userUserGroupPrivateResponse": {
   632        "type": "object",
   633        "properties": {
   634          "id": {
   635            "type": "string"
   636          },
   637          "displayName": {
   638            "type": "string"
   639          },
   640          "description": {
   641            "type": "string"
   642          },
   643          "shortBio": {
   644            "type": "string"
   645          },
   646          "avatar": {
   647            "type": "string"
   648          },
   649          "banner": {
   650            "type": "string"
   651          },
   652          "ownerId": {
   653            "type": "string"
   654          },
   655          "groupType": {
   656            "type": "string"
   657          },
   658          "groupEmail": {
   659            "type": "string",
   660            "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;"
   661          },
   662          "createdAt": {
   663            "type": "string"
   664          },
   665          "updatedAt": {
   666            "type": "string"
   667          }
   668        }
   669      },
   670      "userUserGroupPublicResponse": {
   671        "type": "object",
   672        "properties": {
   673          "displayName": {
   674            "type": "string"
   675          },
   676          "description": {
   677            "type": "string"
   678          },
   679          "shortBio": {
   680            "type": "string"
   681          },
   682          "avatar": {
   683            "type": "string"
   684          },
   685          "banner": {
   686            "type": "string"
   687          },
   688          "groupType": {
   689            "type": "string"
   690          },
   691          "followers": {
   692            "type": "array",
   693            "items": {
   694              "type": "string"
   695            }
   696          },
   697          "members": {
   698            "type": "array",
   699            "items": {
   700              "type": "string"
   701            }
   702          },
   703          "memberOfGroups": {
   704            "type": "array",
   705            "items": {
   706              "type": "string"
   707            }
   708          },
   709          "links": {
   710            "type": "array",
   711            "items": {
   712              "$ref": "#/definitions/userLink"
   713            }
   714          },
   715          "tags": {
   716            "type": "array",
   717            "items": {
   718              "type": "string"
   719            }
   720          },
   721          "groupEmail": {
   722            "type": "string",
   723            "title": "repeated RelatedUserGroup recommended_artists = 17;\nmap\u003cstring, string\u003e publisher = 21;\nmap\u003cstring, string\u003e pro = 22;"
   724          }
   725        }
   726      },
   727      "userUserGroupUpdateRequest": {
   728        "type": "object",
   729        "properties": {
   730          "id": {
   731            "type": "string"
   732          },
   733          "displayName": {
   734            "type": "string"
   735          },
   736          "description": {
   737            "type": "string"
   738          },
   739          "shortBio": {
   740            "type": "string"
   741          },
   742          "avatar": {
   743            "type": "string"
   744          },
   745          "banner": {
   746            "type": "string"
   747          },
   748          "groupType": {
   749            "type": "string"
   750          },
   751          "groupEmail": {
   752            "type": "string"
   753          },
   754          "ownerId": {
   755            "type": "string"
   756          },
   757          "links": {
   758            "type": "array",
   759            "items": {
   760              "type": "string"
   761            }
   762          },
   763          "tags": {
   764            "type": "array",
   765            "items": {
   766              "type": "string"
   767            }
   768          }
   769        }
   770      },
   771      "userUserListResponse": {
   772        "type": "object",
   773        "properties": {
   774          "user": {
   775            "type": "array",
   776            "items": {
   777              "$ref": "#/definitions/userUserPrivateResponse"
   778            }
   779          }
   780        }
   781      },
   782      "userUserMembershipResponse": {
   783        "type": "object",
   784        "properties": {
   785          "id": {
   786            "type": "string"
   787          },
   788          "start": {
   789            "type": "string"
   790          },
   791          "end": {
   792            "type": "string"
   793          },
   794          "membershipClass": {
   795            "type": "string"
   796          }
   797        }
   798      },
   799      "userUserPrivateResponse": {
   800        "type": "object",
   801        "properties": {
   802          "id": {
   803            "type": "string"
   804          },
   805          "legacyId": {
   806            "type": "integer",
   807            "format": "int32"
   808          },
   809          "username": {
   810            "type": "string"
   811          },
   812          "fullName": {
   813            "type": "string"
   814          },
   815          "firstName": {
   816            "type": "string"
   817          },
   818          "lastName": {
   819            "type": "string"
   820          },
   821          "country": {
   822            "type": "string"
   823          },
   824          "emailConfirmed": {
   825            "type": "boolean"
   826          },
   827          "member": {
   828            "type": "boolean"
   829          },
   830          "roleId": {
   831            "type": "integer",
   832            "format": "int32"
   833          },
   834          "tenantId": {
   835            "type": "integer",
   836            "format": "int32"
   837          },
   838          "newsletterNotification": {
   839            "type": "boolean"
   840          },
   841          "personas": {
   842            "type": "array",
   843            "items": {
   844              "type": "string"
   845            }
   846          },
   847          "ownedGroups": {
   848            "type": "array",
   849            "items": {
   850              "type": "string"
   851            }
   852          },
   853          "followedGroups": {
   854            "type": "array",
   855            "items": {
   856              "type": "string"
   857            }
   858          }
   859        }
   860      },
   861      "userUserPublicResponse": {
   862        "type": "object",
   863        "properties": {
   864          "id": {
   865            "type": "string"
   866          },
   867          "legacyId": {
   868            "type": "integer",
   869            "format": "int32"
   870          },
   871          "username": {
   872            "type": "string"
   873          },
   874          "fullName": {
   875            "type": "string"
   876          },
   877          "firstName": {
   878            "type": "string"
   879          },
   880          "lastName": {
   881            "type": "string"
   882          },
   883          "country": {
   884            "type": "string"
   885          },
   886          "member": {
   887            "type": "boolean"
   888          },
   889          "personas": {
   890            "type": "array",
   891            "items": {
   892              "type": "string"
   893            }
   894          },
   895          "ownedGroups": {
   896            "type": "array",
   897            "items": {
   898              "type": "string"
   899            }
   900          },
   901          "followedGroups": {
   902            "type": "array",
   903            "items": {
   904              "type": "string"
   905            }
   906          },
   907          "roleId": {
   908            "type": "integer",
   909            "format": "int32"
   910          }
   911        }
   912      },
   913      "userUserRequest": {
   914        "type": "object",
   915        "properties": {
   916          "id": {
   917            "type": "string"
   918          }
   919        }
   920      },
   921      "userUserUpdateRequest": {
   922        "type": "object",
   923        "properties": {
   924          "id": {
   925            "type": "string"
   926          },
   927          "username": {
   928            "type": "string"
   929          },
   930          "fullName": {
   931            "type": "string"
   932          },
   933          "firstName": {
   934            "type": "string"
   935          },
   936          "lastName": {
   937            "type": "string"
   938          },
   939          "country": {
   940            "type": "string"
   941          },
   942          "newsletterNotification": {
   943            "type": "boolean"
   944          },
   945          "roleId": {
   946            "type": "integer",
   947            "format": "int32"
   948          }
   949        }
   950      },
   951      "userUserUpdateRestrictedRequest": {
   952        "type": "object",
   953        "properties": {
   954          "id": {
   955            "type": "string"
   956          },
   957          "username": {
   958            "type": "string"
   959          },
   960          "fullName": {
   961            "type": "string"
   962          },
   963          "firstName": {
   964            "type": "string"
   965          },
   966          "lastName": {
   967            "type": "string"
   968          },
   969          "member": {
   970            "type": "boolean"
   971          },
   972          "roleId": {
   973            "type": "integer",
   974            "format": "int32"
   975          },
   976          "tenantId": {
   977            "type": "integer",
   978            "format": "int32"
   979          },
   980          "newsletterNotification": {
   981            "type": "boolean"
   982          }
   983        }
   984      }
   985    },
   986    "securityDefinitions": {
   987      "bearer": {
   988        "type": "apiKey",
   989        "description": "Authentication token, prefixed by Bearer: Bearer \u003ctoken\u003e",
   990        "name": "Authorization",
   991        "in": "header"
   992      }
   993    },
   994    "security": [
   995      {
   996        "bearer": []
   997      }
   998    ],
   999    "externalDocs": {
  1000      "description": "gRPC-gateway resonate-user-api repository",
  1001      "url": "https://github.com/resonatecoop/user-api"
  1002    }
  1003  }