{ "openapi": "3.0.0", "info": { "version": "1.0.0", "description": "CitizenOS ", "title": "CitizenS API", "termsOfService": "https://app.citizenos.com/en/topics/7abdd244-d45b-40d3-997c-a6290d4e972c", "contact": { "email": "info@citizenos.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "tags": [ { "name": "CitizenOS", "description": "Everything about CitizenOS API" }, { "name": "auth", "description": "User authorization endpoints" }, { "name": "topic", "description": "Topic endpoints" }, { "name": "topicMembers", "description": "Topic Members endpoints" }, { "name": "attachments", "description": "Topic Attachments endpoints" }, { "name": "comments", "description": "Topic Comments endpoints" }, { "name": "mentions", "description": "Topic Mentions endpoints" }, { "name": "vote", "description": "Topic Votes endpoints" }, { "name": "events", "description": "Topic Events endpoints" }, { "name": "activities", "description": "Activities endpoints" }, { "name": "groups", "description": "Groups endpoints" } ], "paths": { "/api/auth/signup": { "post": { "tags": [ "auth" ], "summary": "Create new user", "description": "This can only be done by the logged in user.", "operationId": "createUser", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "example": "user@gmail.com" }, "password": { "type": "string", "example": "anything secure" }, "name": { "type": "string", "example": "John Smith" }, "company": { "type": "string", "example": "CitizenOS" }, "language": { "type": "string", "example": "en" }, "redirectSuccess": { "type": "string", "example": "https://mysite.com/success" } } } } } }, "responses": { "200": { "description": "User created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } }, "data": { "$ref": "#/components/schemas/User" } } } } } }, "400": { "description": "Email address allready in use", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 40001 } } }, "errors": { "type": "object", "properties": { "email": { "type": "string", "example": "The email address is already in use." } } } } } } } } } } }, "/api/auth/login": { "post": { "tags": [ "auth" ], "summary": "User login", "description": "User login endpoint", "operationId": "loginUser", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "example": "user@gmail.com" }, "password": { "type": "string", "example": "anything secure" } } } } } }, "responses": { "200": { "description": "User loged in successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } }, "data": { "$ref": "#/components/schemas/User" } } } } } }, "400": { "description": "Email address allready in use", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 40000 } } }, "errors": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid email" } } } } } } } } } } }, "/api/auth/logout": { "post": { "tags": [ "auth" ], "summary": "User logout", "description": "User logout endpoint", "operationId": "logoutUser", "security": [ { "oAuth2": [ "admin" ] } ], "responses": { "200": { "description": "User logged out successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } } } } } } } } } }, "/api/auth/verify/{code}": { "get": { "tags": [ "auth" ], "summary": "Verify user", "description": "Verify user by verification code sent to email", "operationId": "verifyUser", "parameters": [ { "in": "path", "name": "code", "schema": { "type": "string" }, "required": true, "description": "verification code sent to email" }, { "in": "query", "name": "token", "schema": { "type": "string" }, "required": true, "description": "verification token that contains redirect success path" } ], "responses": { "302": { "description": "Redirect to URI set in token, also authorized cookie is set containing user id" } } } }, "/api/auth/password": { "post": { "tags": [ "auth" ], "summary": "Create new user password", "description": "Create new user password", "operationId": "renewPasswordUser", "security": [ { "oAuth2": [ "admin" ] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "currentPassword": { "type": "string", "example": "password1234" }, "newPassword": { "type": "string", "example": "Password must be at least 6 character long, containing at least 1 digit, 1 lower and upper case character." } } } } } }, "responses": { "200": { "description": "New password saved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } } } } } } }, "400": { "description": "Email address allready in use", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 40000 } } }, "errors": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid email or new password." } } } } } } } } } } }, "/api/auth/password/reset/send": { "post": { "tags": [ "auth" ], "summary": "Request password reset", "description": "Request password reset", "operationId": "requestPasswordResetUser", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "example": "john.smith@gmail.com" } } } } } }, "responses": { "200": { "description": "Password recovery request sent successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 }, "message": { "type": "string", "example": "Success! Please check your email :email to complete your password recovery." } } } } } } } }, "400": { "description": "Email address allready in use", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 40000 } } }, "errors": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid email" } } } } } } } } } } }, "/api/auth/password/reset": { "post": { "tags": [ "auth" ], "summary": "Reset password", "description": "Reset password", "operationId": "passwordReset", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "example": "john.smith@gmail.com" }, "password": { "type": "string", "example": "Password must be at least 6 character long, containing at least 1 digit, 1 lower and upper case character." }, "passwordResetCode": { "type": "string", "example": "Reset code sent on email" } } } } } }, "responses": { "200": { "description": "Password recovery request sent successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } } } } } } }, "400": { "description": "Email address allready in use", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 40000 } } }, "errors": { "type": "object", "properties": { "email": { "type": "string", "example": "Invalid email, password or password reset code." } } } } } } } } } } }, "/api/auth/status": { "get": { "tags": [ "auth" ], "summary": "Request password reset", "description": "Request password reset", "operationId": "authStatus", "responses": { "200": { "description": "Password recovery request sent successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } }, "data": { "$ref": "#/components/schemas/User" } } } } } }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/api/users/:userId/topics": { "post": { "tags": [ "topic" ], "summary": "Create new topic", "description": "Logged in user can create a new topic", "operationId": "createTopic", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "visibility": { "type": "string", "enum": [ "public", "private" ], "default": "private" }, "categories": { "type": "array", "items": { "type": "string" }, "default": [] }, "hashtag": { "type": "string", "example": "banana", "nullable": true }, "endsAt": { "type": "string", "format": "timestamp", "nullable": true, "example": "2018-08-06T04:11:41.568Z" }, "sourcePartnerObjectId": { "type": "string", "description": "related object id on partner", "example": 123 } } } } } }, "responses": { "200": { "description": "New topic created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } }, "data": { "$ref": "#/components/schemas/Topic" } } } } } } } }, "get": { "tags": [ "topic" ], "summary": "All user topics", "description": "Get all topics user belongs to", "operationId": "readTopics", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "query", "name": "include", "schema": { "type": "string" }, "description": "if return objects should include vote, event fields" }, { "in": "query", "name": "creatorId", "schema": { "type": "string" }, "description": "return only topics created by user with creatorId value" }, { "in": "query", "name": "visibility", "schema": { "type": "string" }, "required": true, "description": "logged in users id" } ], "responses": { "200": { "description": "Return all user related topics", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } }, "data": { "type": "object", "properties": { "count": { "type": "integer", "example": 1, "description": "number of returned topics" }, "rows": { "type": "array", "items": { "$ref": "#/components/schemas/Topic" } } } } } } } } } } } }, "/api/users/:userId/topics/:topicId": { "get": { "tags": [ "topic" ], "summary": "Read a topic with users permissions", "description": "Read a topic with logged in users permissions", "operationId": "readTopic", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "requested topics id" }, { "in": "query", "name": "include", "schema": { "type": "string" }, "example": "vote", "description": "To include vote data in response if available" } ], "responses": { "200": { "description": "New topic created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } }, "data": { "$ref": "#/components/schemas/Topic" } } } } } }, "404": { "$ref": "#/components/responses/NotFound" } } }, "put": { "tags": [ "topic" ], "summary": "Update topic", "description": "Update a topic", "operationId": "updateTopic", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "requested topics id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "inProgress", "voting", "followUp", "closed" ] }, "visibility": { "type": "string", "enum": [ "public", "private" ], "default": "private" }, "categories": { "type": "array", "items": { "type": "string" }, "default": [] }, "hashtag": { "type": "string", "example": "banana", "nullable": true }, "endsAt": { "type": "string", "format": "timestamp", "nullable": true, "example": "2018-08-06T04:11:41.568Z" }, "sourcePartnerObjectId": { "type": "string", "description": "related object id on partner", "example": 123 } } } } } }, "responses": { "200": { "description": "Topic updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } } } } } } } } }, "patch": { "tags": [ "topic" ], "summary": "Update topic", "description": "Update a topic", "operationId": "patchTopic", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "requested topics id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "inProgress", "voting", "followUp", "closed" ] }, "visibility": { "type": "string", "enum": [ "public", "private" ], "default": "private" }, "categories": { "type": "array", "items": { "type": "string" }, "default": [] }, "hashtag": { "type": "string", "example": "banana", "nullable": true }, "endsAt": { "type": "string", "format": "timestamp", "nullable": true, "example": "2018-08-06T04:11:41.568Z" }, "sourcePartnerObjectId": { "type": "string", "description": "related object id on partner", "example": 123 } } } } } }, "responses": { "204": { "$ref": "#/components/responses/NoContent" } } }, "delete": { "tags": [ "topic" ], "summary": "Delete topic", "description": "Delete a topic", "operationId": "deleteTopic", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "requested topics id" } ], "responses": { "200": { "$ref": "#/components/responses/Ok" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/api/topics/:topicId": { "get": { "tags": [ "topic" ], "summary": "Read a public topic", "description": "Read a public topic", "operationId": "readTopicUnauth", "parameters": [ { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "requested topics id" }, { "in": "query", "name": "include", "schema": { "type": "string" }, "example": "vote", "description": "To include vote data in response if available" } ], "responses": { "200": { "description": "New topic created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } }, "data": { "$ref": "#/components/schemas/Topic" } } } } } }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/api/users/:userId/topics/:topicId/tokenJoin": { "put": { "tags": [ "topic" ], "summary": "Update topic join token", "description": "Create and update new topic join token", "operationId": "updateTopicTokenJoin", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "requested topics id" } ], "responses": { "201": { "description": "Topics join token updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20100 }, "data": { "type": "object", "properties": { "tokenJoin": { "type": "string", "example": "1234abcd" } } } } } } } } } } } } }, "/api/topics": { "get": { "tags": [ "topic" ], "summary": "Get all public topics", "description": "Get all public topics", "operationId": "readTopicsUnauth", "parameters": [ { "in": "query", "name": "include", "schema": { "type": "string" }, "description": "if return objects should include vote, event fields" }, { "in": "query", "name": "offset", "schema": { "type": "integer", "description": "Offset index of results for paggination purposes" } }, { "in": "query", "name": "limit", "schema": { "type": "integer", "maximum": 500, "default": 26 }, "description": "number of results to return" }, { "in": "query", "name": "statuses", "schema": { "type": "integer" }, "description": "Offset index of results for paggination purposes" }, { "in": "query", "name": "categories", "schema": { "type": "array", "items": { "type": "string" } }, "description": "Array of categories that topics are included in" }, { "in": "query", "name": "sourcePartnerId", "schema": { "type": "string" }, "description": "return only topics created by source partner" }, { "in": "query", "name": "title", "schema": { "type": "string" }, "description": "can be used for search" } ], "responses": { "200": { "description": "Return all user related topics", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } }, "data": { "type": "object", "properties": { "count": { "type": "integer", "example": 1, "description": "number of returned topics" }, "rows": { "type": "array", "items": { "$ref": "#/components/schemas/Topic" } } } } } } } } }, "400": { "$ref": "#/components/responses/NoPermission" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/api/users/:userId/topics/:topicId/members/users": { "post": { "tags": [ "topicMembers" ], "summary": "Create new member Users to a Topic", "description": "You can add User with e-mail or User id. If e-mail does not exist, User is created in the DB with NULL password.", "operationId": "createTopicMemberUser", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "topic id to add new members to" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "email": { "description": "Member email or user id" }, "level": { "type": "string", "enum": [ "read", "edit", "admin", "none" ], "default": "read" } } } } } } }, "responses": { "201": { "$ref": "#/components/responses/Created" } } }, "get": { "tags": [ "topicMembers" ], "summary": "Get member Users of the Topic", "description": "Returns all users of the topic", "operationId": "getTopicMemberUser", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "topic id to return members" } ], "responses": { "200": { "description": "Topic members users data", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer", "example": 1, "description": "returned users count" }, "rows": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "levelUser": { "type": "string", "enum": [ "read", "edit", "admin", "none" ] }, "company": { "type": "string" }, "imageUrl": { "type": "string" } } } } } } } } } } } } }, "/api/users/:userId/topics/:topicId/members/users/:memberId": { "put": { "tags": [ "topicMembers" ], "summary": "Update User membership information", "description": "Update User membership information", "operationId": "updateTopicMemberUser", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "topic id to add new members to" }, { "in": "path", "name": "memberId", "schema": { "type": "string" }, "required": true, "description": "member User id to update" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "level": { "type": "string", "enum": [ "read", "edit", "admin", "none" ] } } } } } }, "responses": { "200": { "$ref": "#/components/responses/Ok" } } }, "delete": { "tags": [ "topicMembers" ], "summary": "Delete User membership information", "description": "Delete User membership information", "operationId": "deleteTopicMemberUser", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "topic id to add new members to" }, { "in": "path", "name": "memberId", "schema": { "type": "string" }, "required": true, "description": "member User id to delete" } ], "responses": { "200": { "$ref": "#/components/responses/Ok" } } } }, "/api/users/:userId/topics/:topicId/members/groups": { "post": { "tags": [ "topicMembers" ], "summary": "Create new member Groups to a Topic", "description": "Add new member groups to a Topic", "operationId": "createTopicMemberGroups", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "topic id to add new members to" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "groupId": { "description": "Group id to add as a member to the topic" }, "level": { "type": "string", "enum": [ "read", "edit", "admin", "none" ], "default": "read" } } } } } } }, "responses": { "201": { "$ref": "#/components/responses/Created" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "get": { "tags": [ "topicMembers" ], "summary": "Get member Users of the Topic", "description": "Returns all users of the topic", "operationId": "getTopicMemberUser", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "topic id to return members" } ], "responses": { "200": { "description": "Topic members users data", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer", "example": 1, "description": "returned groups count" }, "rows": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "level": { "type": "string", "enum": [ "read", "edit", "admin", "none" ] }, "visibility": { "type": "string", "enum": [ "private", "public" ] } } } } } } } } } } } } }, "/api/users/:userId/topics/:topicId/members/groups/:memberId": { "put": { "tags": [ "topicMembers" ], "summary": "Update Group membership information", "description": "Update Group membership information", "operationId": "updateTopicMemberGroup", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "topic id to add new members to" }, { "in": "path", "name": "memberId", "schema": { "type": "string" }, "required": true, "description": "member group id to update" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "level": { "type": "string", "enum": [ "read", "edit", "admin", "none" ] } } } } } }, "responses": { "200": { "$ref": "#/components/responses/Ok" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "delete": { "tags": [ "topicMembers" ], "summary": "Delete Group membership information", "description": "Delete Group membership information", "operationId": "deleteTopicMemberGroup", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "topic id to add new members to" }, { "in": "path", "name": "memberId", "schema": { "type": "string" }, "required": true, "description": "member Group id to delete" } ], "responses": { "200": { "$ref": "#/components/responses/Ok" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/users/:userId/topics/:topicId/members": { "get": { "tags": [ "topicMembers" ], "summary": "Get all members of the Topic'", "description": "Get all member users and groups of the Topic", "operationId": "getTopicMembers", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "userId", "schema": { "type": "string" }, "required": true, "description": "logged in users id" }, { "in": "path", "name": "topicId", "schema": { "type": "string" }, "required": true, "description": "topic id to add new members to" } ], "responses": { "200": { "description": "Return all member users and groups of topic", "content": { "application/json": { "schema": { "type": "object", "properties": { "groups": { "type": "object", "properties": { "count": { "type": "integer", "example": 1, "description": "returned groups count" }, "rows": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "level": { "type": "string", "enum": [ "read", "edit", "admin", "none" ] }, "visibility": { "type": "string", "enum": [ "private", "public" ] } } } } } }, "users": { "type": "object", "properties": { "count": { "type": "integer", "example": 1, "description": "returned users count" }, "rows": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "levelUser": { "type": "string", "enum": [ "read", "edit", "admin", "none" ] }, "company": { "type": "string" }, "imageUrl": { "type": "string" } } } } } } } } } } } } } }, "/api/topics/join/:tokenJoin": { "post": { "tags": [ "topic" ], "summary": "Join authenticated User to Topic with a given token.", "description": "Allows sharing of private join urls for example in forums, on conference screen...", "operationId": "userJoinTopic", "security": [ { "oAuth2": [ "admin" ] } ], "parameters": [ { "in": "path", "name": "tokenJoin", "schema": { "type": "string" }, "required": true, "description": "Join token of the topic to join" } ], "responses": { "200": { "description": "returns topic that user has joined", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "object", "properties": { "code": { "type": "integer", "example": 20000 } } }, "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "example": "c2eb6752-7d88-4153-93ae-fe47aee26573" }, "title": { "type": "string", "example": "My topic title", "nullable": true }, "description": { "type": "string", "format": "html", "example": "