github.com/resonatecoop/user-api@v1.0.0-13.0.20220915120639-05dc9c04014a/third_party/OpenAPI/user/usergroup.swagger.json (about)

     1  {
     2    "swagger": "2.0",
     3    "info": {
     4      "title": "Resonate Service Documentation: User Group",
     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/usergroup": {
    18        "post": {
    19          "summary": "Add a user group",
    20          "description": "Add a user group to the server.",
    21          "operationId": "ResonateUserGroup_AddUserGroup",
    22          "responses": {
    23            "200": {
    24              "description": "A successful response.",
    25              "schema": {
    26                "$ref": "#/definitions/userEmpty"
    27              }
    28            },
    29            "default": {
    30              "description": "An unexpected error response.",
    31              "schema": {
    32                "$ref": "#/definitions/rpcStatus"
    33              }
    34            }
    35          },
    36          "parameters": [
    37            {
    38              "name": "body",
    39              "in": "body",
    40              "required": true,
    41              "schema": {
    42                "$ref": "#/definitions/userUserGroupCreateRequest"
    43              }
    44            }
    45          ],
    46          "tags": [
    47            "Usergroup"
    48          ]
    49        }
    50      },
    51      "/api/v1/usergroup/{id}": {
    52        "get": {
    53          "summary": "Get a user group",
    54          "description": "Get a usergroup from the server.",
    55          "operationId": "ResonateUserGroup_GetUserGroup",
    56          "responses": {
    57            "200": {
    58              "description": "A successful response.",
    59              "schema": {
    60                "$ref": "#/definitions/userUserGroupPublicResponse"
    61              }
    62            },
    63            "default": {
    64              "description": "An unexpected error response.",
    65              "schema": {
    66                "$ref": "#/definitions/rpcStatus"
    67              }
    68            }
    69          },
    70          "parameters": [
    71            {
    72              "name": "id",
    73              "in": "path",
    74              "required": true,
    75              "type": "string"
    76            }
    77          ],
    78          "tags": [
    79            "Usergroup"
    80          ]
    81        },
    82        "delete": {
    83          "summary": "Delete usergroup",
    84          "description": "Delete a usergroup from the server.",
    85          "operationId": "ResonateUserGroup_DeleteUserGroup",
    86          "responses": {
    87            "200": {
    88              "description": "A successful response.",
    89              "schema": {
    90                "$ref": "#/definitions/userEmpty"
    91              }
    92            },
    93            "default": {
    94              "description": "An unexpected error response.",
    95              "schema": {
    96                "$ref": "#/definitions/rpcStatus"
    97              }
    98            }
    99          },
   100          "parameters": [
   101            {
   102              "name": "id",
   103              "in": "path",
   104              "required": true,
   105              "type": "string"
   106            }
   107          ],
   108          "tags": [
   109            "Usergroup"
   110          ]
   111        },
   112        "patch": {
   113          "summary": "Update a user group",
   114          "description": "Update an existing user group record on the server.",
   115          "operationId": "ResonateUserGroup_UpdateUserGroup",
   116          "responses": {
   117            "200": {
   118              "description": "A successful response.",
   119              "schema": {
   120                "$ref": "#/definitions/userEmpty"
   121              }
   122            },
   123            "default": {
   124              "description": "An unexpected error response.",
   125              "schema": {
   126                "$ref": "#/definitions/rpcStatus"
   127              }
   128            }
   129          },
   130          "parameters": [
   131            {
   132              "name": "id",
   133              "in": "path",
   134              "required": true,
   135              "type": "string"
   136            },
   137            {
   138              "name": "body",
   139              "in": "body",
   140              "required": true,
   141              "schema": {
   142                "$ref": "#/definitions/userUserGroupUpdateRequest"
   143              }
   144            }
   145          ],
   146          "tags": [
   147            "Usergroup"
   148          ]
   149        }
   150      },
   151      "/api/v1/usergroups/{id}": {
   152        "get": {
   153          "summary": "List users user groups",
   154          "description": "List all user groups for a specific user on the server.",
   155          "operationId": "ResonateUserGroup_ListUsersGroups",
   156          "responses": {
   157            "200": {
   158              "description": "A successful response.",
   159              "schema": {
   160                "$ref": "#/definitions/userUserGroupListResponse"
   161              }
   162            },
   163            "default": {
   164              "description": "An unexpected error response.",
   165              "schema": {
   166                "$ref": "#/definitions/rpcStatus"
   167              }
   168            }
   169          },
   170          "parameters": [
   171            {
   172              "name": "id",
   173              "in": "path",
   174              "required": true,
   175              "type": "string"
   176            }
   177          ],
   178          "tags": [
   179            "Usergroups"
   180          ]
   181        }
   182      }
   183    },
   184    "definitions": {
   185      "protobufAny": {
   186        "type": "object",
   187        "properties": {
   188          "typeUrl": {
   189            "type": "string"
   190          },
   191          "value": {
   192            "type": "string",
   193            "format": "byte"
   194          }
   195        }
   196      },
   197      "rpcStatus": {
   198        "type": "object",
   199        "properties": {
   200          "code": {
   201            "type": "integer",
   202            "format": "int32"
   203          },
   204          "message": {
   205            "type": "string"
   206          },
   207          "details": {
   208            "type": "array",
   209            "items": {
   210              "$ref": "#/definitions/protobufAny"
   211            }
   212          }
   213        }
   214      },
   215      "userEmpty": {
   216        "type": "object"
   217      },
   218      "userTag": {
   219        "type": "object",
   220        "properties": {
   221          "id": {
   222            "type": "string"
   223          },
   224          "type": {
   225            "type": "string"
   226          },
   227          "name": {
   228            "type": "string"
   229          }
   230        }
   231      },
   232      "userUserGroupCreateRequest": {
   233        "type": "object",
   234        "properties": {
   235          "displayName": {
   236            "type": "string"
   237          },
   238          "description": {
   239            "type": "string"
   240          },
   241          "shortBio": {
   242            "type": "string"
   243          },
   244          "avatar": {
   245            "type": "string"
   246          },
   247          "banner": {
   248            "type": "string"
   249          },
   250          "ownerId": {
   251            "type": "string"
   252          },
   253          "groupType": {
   254            "type": "string"
   255          },
   256          "tags": {
   257            "type": "array",
   258            "items": {
   259              "$ref": "#/definitions/userTag"
   260            }
   261          },
   262          "groupEmail": {
   263            "type": "string"
   264          }
   265        }
   266      },
   267      "userUserGroupListResponse": {
   268        "type": "object",
   269        "properties": {
   270          "usergroup": {
   271            "type": "array",
   272            "items": {
   273              "$ref": "#/definitions/userUserGroupPrivateResponse"
   274            }
   275          }
   276        }
   277      },
   278      "userUserGroupPrivateResponse": {
   279        "type": "object",
   280        "properties": {
   281          "id": {
   282            "type": "string"
   283          },
   284          "displayName": {
   285            "type": "string"
   286          },
   287          "description": {
   288            "type": "string"
   289          },
   290          "shortBio": {
   291            "type": "string"
   292          },
   293          "avatar": {
   294            "type": "string"
   295          },
   296          "banner": {
   297            "type": "string"
   298          },
   299          "ownerId": {
   300            "type": "string"
   301          },
   302          "groupType": {
   303            "type": "string"
   304          },
   305          "groupEmail": {
   306            "type": "string",
   307            "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;"
   308          }
   309        }
   310      },
   311      "userUserGroupPublicResponse": {
   312        "type": "object",
   313        "properties": {
   314          "displayName": {
   315            "type": "string"
   316          },
   317          "description": {
   318            "type": "string"
   319          },
   320          "shortBio": {
   321            "type": "string"
   322          },
   323          "avatar": {
   324            "type": "string"
   325          },
   326          "banner": {
   327            "type": "string"
   328          },
   329          "groupType": {
   330            "type": "string"
   331          },
   332          "followers": {
   333            "type": "array",
   334            "items": {
   335              "type": "string"
   336            }
   337          },
   338          "members": {
   339            "type": "array",
   340            "items": {
   341              "type": "string"
   342            }
   343          },
   344          "memberOfGroups": {
   345            "type": "array",
   346            "items": {
   347              "type": "string"
   348            }
   349          },
   350          "links": {
   351            "type": "array",
   352            "items": {
   353              "type": "string"
   354            }
   355          },
   356          "tags": {
   357            "type": "array",
   358            "items": {
   359              "type": "string"
   360            }
   361          },
   362          "groupEmail": {
   363            "type": "string",
   364            "title": "repeated RelatedUserGroup recommended_artists = 17;\nmap\u003cstring, string\u003e publisher = 21;\nmap\u003cstring, string\u003e pro = 22;"
   365          }
   366        }
   367      },
   368      "userUserGroupUpdateRequest": {
   369        "type": "object",
   370        "properties": {
   371          "id": {
   372            "type": "string"
   373          },
   374          "displayName": {
   375            "type": "string"
   376          },
   377          "description": {
   378            "type": "string"
   379          },
   380          "shortBio": {
   381            "type": "string"
   382          },
   383          "avatar": {
   384            "type": "string"
   385          },
   386          "banner": {
   387            "type": "string"
   388          },
   389          "groupType": {
   390            "type": "string"
   391          },
   392          "groupEmail": {
   393            "type": "string"
   394          },
   395          "ownerId": {
   396            "type": "string"
   397          }
   398        }
   399      }
   400    },
   401    "securityDefinitions": {
   402      "bearer": {
   403        "type": "apiKey",
   404        "description": "Authentication token, prefixed by Bearer: Bearer \u003ctoken\u003e",
   405        "name": "Authorization",
   406        "in": "header"
   407      }
   408    },
   409    "security": [
   410      {
   411        "bearer": []
   412      }
   413    ],
   414    "externalDocs": {
   415      "description": "gRPC-gateway resonate-user-api repository",
   416      "url": "https://github.com/resonatecoop/user-api"
   417    }
   418  }