openapi: 3.0.0 info: title: traQ API description: traQ v2 API version: 2.6.3 license: name: MIT url: 'https://github.com/traPtitech/traQ/blob/master/LICENSE' contact: name: traP url: 'https://github.com/traPtitech/traQ' servers: - url: 'https://q.trap.jp/api/1.0' description: production environment - url: 'https://traq-dev.tokyotech.org/api/1.0' description: staging environment paths: /login: post: tags: - authentication operationId: login description: ログインを行います。リダイレクトパラメーターが存在する場合はログイン後にリダイレクトします parameters: - in: query name: redirect schema: type: string description: リダイレクト先 security: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserLogin' responses: '204': description: 正常にログインできました。 '302': description: 正常にログインできました。リダイレクトします。 '400': description: ログインできませんでした。リクエスト内容が不正です '401': description: ログインできませんでした。認証情報が間違っています '403': description: ログインできませんでした。アカウントに問題があります /logout: post: tags: - authentication operationId: logout description: ログアウトを行います。リダイレクトパラメーターが存在する場合はログアウト後にリダイレクトします parameters: - in: query name: redirect schema: type: string description: リダイレクト先 security: [] responses: '204': description: 正常にログアウトできました。 '302': description: 正常にログアウトできました。リダイレクトします。 '/public/icon/{username}': get: tags: - public operationId: getPublicUserIcon description: 指定したユーザーのアイコン画像を取得します。 parameters: - name: username description: 画像を取得するユーザーのユーザー名 in: path required: true schema: type: string security: [] responses: '200': description: 正常に取得できました。 content: image/jpeg: schema: type: string format: binary image/png: schema: type: string format: binary image/gif: schema: type: string format: binary '404': description: 取得できませんでした。指定したユーザーは存在しません。 /oauth2/authorize: get: tags: - authorization operationId: getOauth2Authorize description: OAuth2 認可エンドポイント parameters: - name: response_type in: query schema: $ref: '#/components/schemas/OAuth2ResponseType' - name: client_id in: query required: true schema: type: string - name: redirect_uri in: query schema: type: string - name: scope in: query schema: type: string - name: state in: query schema: type: string - name: code_challenge in: query schema: type: string - name: code_challenge_method in: query schema: type: string - name: nonce in: query schema: type: string - name: prompt in: query schema: $ref: '#/components/schemas/OAuth2Prompt' security: [] responses: '302': description: 結果に応じてリダイレクトします。 '400': description: リクエストが不正です。 '403': description: リクエストが許可されていません。 post: tags: - authorization operationId: postOauth2Authorize description: OAuth2 認可エンドポイント security: [] requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OAuth2Authorization' responses: '302': description: 結果に応じてリダイレクトします。 '400': description: リクエストが不正です。 '403': description: リクエストが許可されていません。 /oauth2/authorize/decide: post: tags: - authorization operationId: postOauth2AuthorizeDecide description: OAuth2 認可承諾 requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OAuth2Decide' responses: '302': description: RedirectURIに結果をリダイレクトします。 '400': description: リクエストが不正です。 '403': description: リクエストが許可されていません。 /oauth2/token: post: tags: - authorization operationId: postOauth2Token description: OAuth2 トークンエンドポイント security: [] requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PostOAuth2Token' responses: '200': description: トークンが正常に発行されました。 content: application/json: schema: $ref: '#/components/schemas/OAuth2Token' '400': description: トークン発行に失敗しました。 '403': description: トークン発行に失敗しました。 /users: get: tags: - user operationId: getUsers description: 全ユーザーのリストを取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: |- 正常に取得できました。 ユーザーリストを返します。 content: application/json: schema: $ref: '#/components/schemas/UserList' post: tags: - user operationId: registerUser description: ユーザー登録します requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserRegister' responses: '201': description: 正常に登録できました。 '400': description: 登録できませんでした。リクエスト内容が不正です。 '403': description: 登録できませんでした。権限がありません。 /users/me: get: tags: - user operationId: getMe description: 自分のユーザー情報を取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/Me' patch: tags: - user operationId: changeMe description: 自分のユーザー情報を変更します。 security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserData' responses: '204': description: 正常に変更できました。 '400': description: 正常に変更できませんでした。リクエスト内容が不正です。 /users/me/password: put: tags: - user operationId: changePassword description: 自分のパスワードを変更します。 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChangePassword' responses: '204': description: 正常に変更できました。 '400': description: 正常に変更できませんでした。リクエスト内容が不正です '401': description: 正常に変更できませんでした。現在のパスワードが違います。 /users/me/qr-code: get: tags: - user operationId: getQrCode description: 自分のQRコードを取得します。 responses: '200': description: 正常に取得できました。 content: image/png: schema: type: string format: binary /users/me/icon: get: tags: - user operationId: getMyIcon description: 自分のアイコン画像を取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。 content: image/jpeg: schema: type: string format: binary image/png: schema: type: string format: binary image/gif: schema: type: string format: binary put: tags: - user operationId: changeMyIcon description: 自分のアイコンを更新します。 security: - traqOAuth2: - write requestBody: required: true content: multipart/form-data: schema: properties: file: type: string format: binary description: '1MBまでのpng, jpeg, gif' encoding: file: contentType: 'image/png, image/jpeg, image/gif' responses: '200': description: 正常に更新できました。 '400': description: 正常に更新できませんでした。不正なファイルです。 /users/me/stamp-history: get: tags: - stamp operationId: getStampHistory description: 自分のスタンプ履歴を最大50件取得します。結果は降順で返されます。 security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: '#/components/schemas/StampHistory' /users/me/groups: get: tags: - user group operationId: getMyGroups description: 所属するユーザーグループのIDを取得します security: - traqOAuth2: - read responses: '200': description: 正常に取得できました content: application/json: schema: $ref: '#/components/schemas/UUIDs' /users/me/notification: get: tags: - notification operationId: getMySubscribeChannels description: 自分が通知を入れているチャンネルのリストを取得します security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。チャンネルIDの配列を返します。 content: application/json: schema: $ref: '#/components/schemas/UUIDs' /users/me/tokens: get: tags: - client operationId: getTokens description: 自分が許可しているクライアントの一覧とトークン情報を取得します。 responses: '200': description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: '#/components/schemas/AllowedClientInfo' '403': description: 取得できませんでした。権限がありません。 '/users/me/tokens/{oauth2TokenID}': parameters: - $ref: '#/components/parameters/oauth2TokenIdInPath' delete: tags: - client operationId: deleteToken description: 指定したトークンの認可を取り消します。 responses: '204': description: 正常に取り消すことができました。 '403': description: 失敗しました。権限がありません。 '404': description: 失敗しました。指定したトークンは存在しません。 /users/me/sessions: get: tags: - sessions operationId: getSessions description: 自分のログインセッションリストを取得します。 responses: '200': description: セッションリストを返します。 content: application/json: schema: type: array items: $ref: '#/components/schemas/Session' '403': description: 権限がありません。 delete: tags: - sessions operationId: deleteSessions description: 自分のログインセッションを全てログアウトします。 responses: '204': description: 成功しました。 '403': description: 権限がありません。 '/users/me/sessions/{referenceID}': parameters: - name: referenceID description: 操作の対象となるセッションの参照ID in: path required: true schema: type: string delete: tags: - sessions operationId: deleteSession description: 対象のセッションをログアウトします。 responses: '204': description: 成功しました。 '403': description: 権限がありません。 '404': description: 対象のセッションは存在しません。 /users/me/stars: get: tags: - star operationId: getStaredChannels description: お気に入りチャンネルリストを取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。お気に入りチャンネルのIDの配列を返します。 content: application/json: schema: $ref: '#/components/schemas/UUIDs' '/users/me/stars/{channelID}': parameters: - $ref: '#/components/parameters/channelIdInPath' put: tags: - star operationId: starChannel description: お気に入りチャンネルリストにチャンネルを追加します。 security: - traqOAuth2: - write responses: '204': description: 正常に追加できました。 '404': description: 正常に追加できませんでした。対象のチャンネルが存在しません。 delete: tags: - star operationId: unstarChannel description: '+| お気に入りチャンネルリストから削除します。 既にお気に入りチャンネルリストに無いチャンネルを指定した場合は無視されます(204)。' security: - traqOAuth2: - write responses: '204': description: 正常に削除されました。 '404': description: 削除に失敗しました。指定されたチャンネルは存在しません。 /users/me/unread/channels: get: tags: - unread operationId: getUnreadChannels description: 未読チャンネル情報のリストを取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: '#/components/schemas/UnreadChannel' '/users/me/unread/channels/{channelID}': parameters: - $ref: '#/components/parameters/channelIdInPath' delete: tags: - unread operationId: readMessages description: 指定されたチャンネルの未読メッセージを既読にします。存在しないチャンネルIDを指定した場合は、無視されます。 security: - traqOAuth2: - write responses: '204': description: 正常にメッセージを既読にできました。 '/users/{userID}': parameters: - $ref: '#/components/parameters/userIdInPath' get: tags: - user operationId: getUser description: ユーザーの詳細を取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: |- 正常に取得できました。 ユーザー情報を返します。 content: application/json: schema: $ref: '#/components/schemas/UserDetail' '404': description: '+| 正常に取得できませんでした。 指定したユーザーは存在しません。' '/users/{userID}/messages': parameters: - $ref: '#/components/parameters/userIdInPath' get: deprecated: true tags: - message description: このAPIは削除されました responses: '410': description: このAPIは削除されました post: deprecated: true tags: - message description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/users/{userID}/icon': parameters: - $ref: '#/components/parameters/userIdInPath' get: tags: - user operationId: getUserIcon description: ユーザーのアイコン画像を取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。 content: image/jpeg: schema: type: string format: binary image/png: schema: type: string format: binary image/gif: schema: type: string format: binary '404': description: 正常に取得できませんでした。指定したユーザーは存在しません。 '/users/{userID}/notification': parameters: - $ref: '#/components/parameters/userIdInPath' get: tags: - notification operationId: getUserSubscribeChannels description: ユーザーが通知を入れているチャンネルのリストを取得します security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。チャンネルIDの配列を返します。 content: application/json: schema: $ref: '#/components/schemas/UUIDs' '404': description: 取得に失敗しました。指定したユーザーは存在しません。 '/users/{userID}/groups': parameters: - $ref: '#/components/parameters/userIdInPath' get: tags: - user group operationId: getUserGroups description: 所属するユーザーグループのIDを取得します security: - traqOAuth2: - read responses: '200': description: 正常に取得できました content: application/json: schema: $ref: '#/components/schemas/UUIDs' '404': description: 正常に取得できませんでした。指定したユーザーは存在しません。 '/users/{userID}/tags': parameters: - $ref: '#/components/parameters/userIdInPath' get: tags: - userTag operationId: getUserTags description: ユーザーのタグのリストを取得します。 security: - traqOAuth2: - read responses: '200': description: |- 正常に取得できました。 タグのリストを返します。 content: application/json: schema: $ref: '#/components/schemas/TagList' '404': description: |- 正常に取得できませんでした。 指定したユーザーは存在しません。 post: tags: - userTag operationId: addUserTag description: ユーザーにタグを追加します。 security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SetTag' responses: '201': description: 正常に追加できました。 '400': description: |- 正常に追加できませんでした。 パラメータの形式が不正です。 '403': description: |- 正常に追加できませんでした。 権限がありません。 '404': description: '+| 正常に追加できませんでした。 指定したユーザーは存在しません。' '/users/{userID}/tags/{tagID}': parameters: - $ref: '#/components/parameters/userIdInPath' - $ref: '#/components/parameters/tagIdInPath' patch: tags: - userTag operationId: changeLockUserTag description: タグのロック、アンロックを変更します。 security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SetTagLock' responses: '204': description: 正常に変更できました。 '400': description: |- 正常に変更できませんでした。 パラメータの形式が不正です。 '403': description: |- 正常に変更できませんでした。 権限がありません。 '404': description: |- 正常に変更できませんでした。 指定したユーザー、もしくはタグは存在しません。 delete: tags: - userTag operationId: deleteUserTag description: ユーザーから指定したタグを削除します。既に存在しないタグを削除しようとした場合は無視されます(204)。 security: - traqOAuth2: - write responses: '204': description: 正常に削除できました。 '403': description: |- 正常に削除できませんでした。 権限がありません。 '404': description: '+| 正常に削除できませんでした。 指定したユーザーは存在しません。' /heartbeat: get: deprecated: true tags: - heartbeat operationId: getHeartbeat description: このAPIは削除されました responses: '410': description: このAPIは削除されました post: deprecated: true tags: - heartbeat operationId: postHeartbeat description: このAPIは削除されました responses: '410': description: このAPIは削除されました /channels: get: tags: - channel deprecated: true operationId: getChannels description: このAPIは削除されました responses: '410': description: このAPIは削除されました post: tags: - channel operationId: createChannel description: チャンネルを作成します。 security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateChannel' responses: '201': description: |- 正常にチャンネルが作成できました。 作成されたチャンネルを返します。 content: application/json: schema: $ref: '#/components/schemas/Channel' '400': description: '+| 正常にチャンネルが作成できませんでした。 親チャンネルが存在しない又は指定されたタイプに対して適切なプロパティが存在しません。' '/channels/{channelID}': parameters: - $ref: '#/components/parameters/channelIdInPath' get: deprecated: true tags: - channel operationId: getChannel description: このAPIは削除されました responses: '410': description: このAPIは削除されました patch: deprecated: true tags: - channel operationId: editChannel description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/channels/{channelID}/parent': parameters: - $ref: '#/components/parameters/channelIdInPath' put: deprecated: true tags: - channel operationId: changeChannelParent description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/channels/{channelID}/children': parameters: - $ref: '#/components/parameters/channelIdInPath' post: tags: - channel operationId: createChannelChild description: 子チャンネルを作成します。 security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateChannelChild' responses: '201': description: 正常にチャンネルが作成できました。作成されたチャンネルを返します。 content: application/json: schema: $ref: '#/components/schemas/Channel' '400': description: チャンネルが作成できませんでした。リクエスト内容が不正です。 '403': description: チャンネルが作成できませんでした。権限がありません。 '404': description: チャンネルが作成できませんでした。指定したチャンネルは存在しません。 '409': description: チャンネルが作成できませんでした。指定したチャンネル名のチャンネルは既に存在します。 '/channels/{channelID}/pins': parameters: - $ref: '#/components/parameters/channelIdInPath' get: deprecated: true tags: - pin operationId: getPinnedMessages description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/channels/{channelID}/topic': parameters: - $ref: '#/components/parameters/channelIdInPath' get: tags: - channel operationId: getChannelTopic description: チャンネルの説明を取得します。 security: - traqOAuth2: - read responses: '200': description: '+| 正常に取得ができました。 チャンネルトピックを返します。' content: application/json: schema: $ref: '#/components/schemas/ChannelTopic' '404': description: '+| 取得に失敗しました。 指定したチャンネルは存在しません。' put: tags: - channel operationId: changeChannelTopic description: チャンネルの説明を変更します。 security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SetChannelTopic' responses: '204': description: 正常に更新できました。 '404': description: '+| 更新に失敗しました。 指定したチャンネルは存在しません。' '/channels/{channelID}/stats': parameters: - $ref: '#/components/parameters/channelIdInPath' get: tags: - channel operationId: getChannelStats description: チャンネルの統計情報を取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得ができました。 content: application/json: schema: $ref: '#/components/schemas/ChannelStats' '404': description: '+| 取得に失敗しました。 指定したチャンネルは存在しません。' '/channels/{channelID}/viewers': parameters: - $ref: '#/components/parameters/channelIdInPath' get: tags: - channel operationId: getChannelViewers description: 現在のチャンネル閲覧者のリストを取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得ができました。 content: application/json: schema: $ref: '#/components/schemas/ChannelViewers' '404': description: '+| 取得に失敗しました。 指定したチャンネルは存在しません。' '/channels/{channelID}/messages': parameters: - $ref: '#/components/parameters/channelIdInPath' get: deprecated: true tags: - message description: このAPIは削除されました responses: '410': description: このAPIは削除されました post: deprecated: true tags: - message description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/channels/{channelID}/events': parameters: - $ref: '#/components/parameters/channelIdInPath' get: tags: - channel operationId: getChannelEvents description: チャンネルイベントのリストを取得します。 security: - traqOAuth2: - read parameters: - $ref: '#/components/parameters/limitInQuery' - $ref: '#/components/parameters/offsetInQuery' - $ref: '#/components/parameters/sinceInQuery' - $ref: '#/components/parameters/untilInQuery' - $ref: '#/components/parameters/inclusiveInQuery' - $ref: '#/components/parameters/orderInQuery' responses: '200': description: 正常に取得ができました。イベントの配列を返します。 headers: X-TRAQ-MORE: $ref: '#/components/headers/X-TRAQ-MORE' content: application/json: schema: type: array items: $ref: '#/components/schemas/ChannelEvent' '400': description: |- 変更に失敗しました 不正なリクエストです '404': description: '+| 取得に失敗しました。 指定したチャンネルは存在しません。' '/channels/{channelID}/notification': parameters: - $ref: '#/components/parameters/channelIdInPath' get: tags: - notification operationId: getSubscribers description: 通知を点けているユーザーのIDの配列を取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得できました content: application/json: schema: $ref: '#/components/schemas/UUIDs' '404': description: 取得に失敗しました。指定したチャンネルは存在しません。 put: tags: - notification operationId: changeSubscribers description: |- チャンネルの通知状況を変更します。 リクエストに含めなかったユーザーIDのユーザーの通知状況は変更しません。 また、存在しないユーザーのIDを指定した場合は無視されます。 security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NotificationUsers' responses: '204': description: 正常に更新できました。 '404': description: '+| 変更に失敗しました。 指定したチャンネルは存在しません。' '/channels/{channelID}/bots': parameters: - $ref: '#/components/parameters/channelIdInPath' get: tags: - bot operationId: getChannelBots description: チャンネルに参加しているBot一覧を取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: '#/components/schemas/ChannelBot' '404': description: 取得できませんでした。指定したチャンネルは存在しません。 post: deprecated: true tags: - bot operationId: addChannelBot description: チャンネルにBotを参加させます。 security: - traqOAuth2: - write - manage_bot requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostBotChannel' responses: '200': description: 正常にBotが参加しました。 content: application/json: schema: $ref: '#/components/schemas/BotIdObject' '400': description: 参加させることができませんでした。リクエスト内容が不正です。 '404': description: 参加させることができませんでした。指定したチャンネルは存在しません。 '/channels/{channelID}/bots/{botID}': parameters: - $ref: '#/components/parameters/channelIdInPath' - $ref: '#/components/parameters/botIdInPath' delete: deprecated: true tags: - bot operationId: removeChannelBot description: Botをチャンネルから退出させます。 security: - traqOAuth2: - write - manage_bot responses: '204': description: 正常に退出させることができました。 '404': description: 退出させることができませんでした。指定したチャンネル、またはBotは存在しません。 '/channels/{channelID}/webrtc/state': parameters: - $ref: '#/components/parameters/channelIdInPath' get: deprecated: true tags: - webrtc operationId: getChannelWebRTCState description: このAPIは削除されました responses: '410': description: このAPIは削除されました /notification: get: deprecated: true tags: - notification operationId: connectNotification description: このAPIは削除されました responses: '410': description: このAPIは削除されました /notification/device: post: tags: - notification operationId: registerNotificationDevice description: FCMデバイスを登録します。 security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FCMToken' responses: '201': description: 正常に登録できました。 /messages/reports: get: deprecated: true tags: - message description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/messages/{messageID}': parameters: - $ref: '#/components/parameters/messageIdInPath' get: deprecated: true tags: - message description: このAPIは削除されました responses: '410': description: このAPIは削除されました put: deprecated: true tags: - message description: このAPIは削除されました responses: '410': description: このAPIは削除されました delete: deprecated: true tags: - message description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/messages/{messageID}/report': parameters: - $ref: '#/components/parameters/messageIdInPath' post: deprecated: true tags: - message description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/messages/{messageID}/stamps': parameters: - $ref: '#/components/parameters/messageIdInPath' get: deprecated: true tags: - stamp description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/messages/{messageID}/stamps/{stampID}': parameters: - $ref: '#/components/parameters/messageIdInPath' - $ref: '#/components/parameters/stampIdInPath' post: deprecated: true tags: - stamp description: このAPIは削除されました responses: '410': description: このAPIは削除されました delete: deprecated: true tags: - stamp description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/tags/{tagID}': parameters: - $ref: '#/components/parameters/tagIdInPath' get: tags: - userTag operationId: getTag description: 指定されたタグの情報を取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/TagUsers' '404': description: 正常に取得できませんでした。指定されたタグIDは存在しません /files: post: deprecated: true tags: - file operationId: uploadFile description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/files/{fileID}': parameters: - $ref: '#/components/parameters/fileIdInPath' get: tags: - file operationId: getFile description: 指定したファイルの中身を取得します。 security: - traqOAuth2: - read parameters: - name: dl description: ファイルをダウンロードする場合に1を指定する in: query required: false schema: type: integer responses: '200': description: |- 正常に取得できました。 fileのbinaryを返します。 application/octet-streamで返すことになっていますが、ファイルの形式によっては変わります。 content: application/octet-stream: schema: type: string format: binary '403': description: 取得できませんでした。指定されたファイルにアクセスする権限がありません。 '404': description: 取得できませんでした。指定されたファイルは存在しません。 '/files/{fileID}/meta': parameters: - $ref: '#/components/parameters/fileIdInPath' get: tags: - file operationId: getFileMeta description: 指定したファイルのメタデータを取得します security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/FileInfo' '403': description: 取得できませんでした。指定されたファイルにアクセスする権限がありません。 '404': description: 取得できませんでした。指定されたファイルは存在しません。 '/files/{fileID}/thumbnail': parameters: - $ref: '#/components/parameters/fileIdInPath' get: tags: - file operationId: getFileThumbnail description: 指定したファイルのサムネイルを取得します security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。 content: image/png: schema: type: string format: binary '403': description: 取得できませんでした。指定されたファイルのサムネイルにアクセスする権限がありません。 '404': description: 取得できませんでした。指定されたファイルのサムネイルは存在しません。 /pins: post: deprecated: true tags: - pin operationId: pinMessage description: このAPIは削除されました responses: '410': description: このAPIは削除されました '/pins/{pinID}': parameters: - $ref: '#/components/parameters/pinIdInPath' get: deprecated: true tags: - pin operationId: getPinnedMessage description: このAPIは削除されました responses: '410': description: このAPIは削除されました delete: deprecated: true tags: - pin operationId: unpinMessage description: このAPIは削除されました responses: '410': description: このAPIは削除されました /stamps: get: tags: - stamp operationId: getStamps description: 全スタンプのリストを取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: '#/components/schemas/Stamp' post: tags: - stamp operationId: createStamp description: スタンプを新規作成します。 security: - traqOAuth2: - write requestBody: required: true content: multipart/form-data: schema: required: - name - file properties: name: type: string description: スタンプ名(半角英数字と-+_のみを含む32文字以内の文字列) file: type: string format: binary description: '1MBまでのpng, jpeg, gif' encoding: file: contentType: 'image/png, image/jpeg, image/gif' responses: '201': description: 正常にスタンプが作成されました。 content: application/json: schema: $ref: '#/components/schemas/Stamp' '400': description: 正常にスタンプが作成できませんでした。 '/stamps/{stampID}': parameters: - $ref: '#/components/parameters/stampIdInPath' get: tags: - stamp operationId: getStamp description: スタンプの情報を取得します。 security: - traqOAuth2: - read responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/Stamp' '404': description: 取得できませんでした。指定されたスタンプは存在しません。 patch: tags: - stamp operationId: editStamp description: スタンプを修正します。 security: - traqOAuth2: - write requestBody: required: true content: multipart/form-data: schema: properties: name: type: string description: スタンプ名(半角英数字と-+_のみを含む32文字以内の文字列) file: type: string format: binary description: '1MBまでのpng, jpeg, gif' encoding: file: contentType: 'image/png, image/jpeg, image/gif' responses: '204': description: 正常に修正できました。 '403': description: 修正できませんでした。指定されたスタンプを修正する権限がありません。 '404': description: 修正できませんでした。指定されたスタンプは存在しません。 delete: tags: - stamp operationId: deleteStamp description: スタンプを削除します。 responses: '204': description: 正常に削除できました。 '403': description: 削除できませんでした。指定されたスタンプを削除する権限がありません。 '404': description: 削除できませんでした。指定されたスタンプは存在しません。 /webhooks: get: tags: - webhook operationId: getWebhooks description: 自分が作成したwebhookの一覧を取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: '#/components/schemas/Webhook' post: tags: - webhook operationId: createWebhooks description: webhookを作成します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostWebhook' responses: '201': description: 正常に作成できました。 content: application/json: schema: $ref: '#/components/schemas/Webhook' '400': description: 作成できませんでした。リクエスト内容が不正です。 '403': description: 作成できませんでした。権限がありません。 '/webhooks/{webhookID}': parameters: - $ref: '#/components/parameters/webhookIdInPath' get: tags: - webhook operationId: getWebhook description: webhookの詳細を取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/Webhook' '403': description: 取得できませんでした。権限がありません。 '404': description: 取得できませんでした。指定したwebhookは存在しません。 patch: tags: - webhook operationId: editWebhook description: webhookを修正します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchWebhook' responses: '204': description: 正常に修正できました。 '400': description: 修正できませんでした。リクエスト内容が不正です。 '403': description: 削除できませんでした。権限がありません。 '404': description: 修正できませんでした。指定したwebhookは存在しません。 delete: tags: - webhook operationId: deleteWebhook description: webhookを削除します。 security: - traqOAuth2: - manage_bot responses: '204': description: 正常に削除できました。 '403': description: 削除できませんでした。権限がありません。 '404': description: 削除できませんでした。指定したwebhookは存在しません。 post: tags: - webhook operationId: postWebhook description: webhookを送信します。 parameters: - in: header name: X-TRAQ-Channel-Id schema: type: string format: uuid description: 投稿先のチャンネルID(変更する場合) - in: header name: X-TRAQ-Signature schema: type: string description: リクエストボディシグネチャ。Secretが設定されている場合は必須 - name: embed description: メンション・チャンネルリンクを自動埋め込みする場合に1を指定する in: query required: false schema: type: integer security: [] requestBody: required: true content: text/plain: schema: type: string description: メッセージ文字列 responses: '204': description: 正常に送信できました。 '400': description: 正常に送信できませんでした。リクエスト内容が不正です。 '404': description: 正常に送信できませんでした。指定されたwebhookは存在しません。 '/webhooks/{webhookID}/icon': parameters: - $ref: '#/components/parameters/webhookIdInPath' get: tags: - webhook operationId: getWebhookIcon description: 指定したWebhookのアイコンを取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: image/jpeg: schema: type: string format: binary image/png: schema: type: string format: binary image/gif: schema: type: string format: binary '404': description: 取得できませんでした。指定したWebhookは存在しません。 put: tags: - webhook operationId: changeWebhookIcon description: 指定したwebhookのアイコンを変更します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: multipart/form-data: schema: properties: file: type: string format: binary description: 'webhookユーザーのアイコン(1MBまでのpng, jpeg, gif)' encoding: file: contentType: 'image/png, image/jpeg, image/gif' responses: '204': description: 正常に変更できました。 '400': description: 変更できませんでした。リクエスト内容が不正です。 '403': description: 変更できませんでした。権限がありません。 '404': description: 修正できませんでした。指定したwebhookは存在しません。 '/webhooks/{webhookID}/github': parameters: - $ref: '#/components/parameters/webhookIdInPath' post: deprecated: true tags: - webhook operationId: postGitHubWebhook description: このAPIは削除されました responses: '410': description: このAPIは削除されました /groups: get: deprecated: true tags: - user group operationId: getGroups description: 全てのユーザーグループを取得します security: - traqOAuth2: - read responses: '200': description: 正常に取得できました content: application/json: schema: type: array items: $ref: '#/components/schemas/UserGroup' post: deprecated: true tags: - user group operationId: createGroup description: ユーザーグループを作成します security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostUserGroup' responses: '201': description: 正常に作成できました content: application/json: schema: $ref: '#/components/schemas/UserGroup' '400': description: 正常に作成できませんでした。リクエスト内容が不正です '409': description: 正常に作成できませんでした。既に存在するグループ名です '/groups/{groupID}': parameters: - $ref: '#/components/parameters/groupIdInPath' get: deprecated: true tags: - user group operationId: getGroup description: ユーザーグループを取得します security: - traqOAuth2: - read responses: '200': description: 正常に取得できました content: application/json: schema: $ref: '#/components/schemas/UserGroup' '404': description: 正常に取得できませんでした。指定したグループは存在しません。 patch: deprecated: true tags: - user group operationId: editGroup description: ユーザーグループの情報を変更します security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchUserGroup' responses: '204': description: 正常に変更できました '400': description: 正常に変更できませんでした。リクエスト内容が不正です '403': description: 正常に変更できませんでした。権限がありません。 '404': description: 正常に変更できませんでした。指定したグループは存在しません。 '409': description: 正常に変更できませんでした。既に存在するグループ名です delete: deprecated: true tags: - user group operationId: deleteGroup description: ユーザーグループを削除します security: - traqOAuth2: - write responses: '204': description: 正常に削除できました '403': description: 正常に削除できませんでした。権限がありません。 '404': description: 正常に削除できませんでした。指定したグループは存在しません。 '/groups/{groupID}/members': parameters: - $ref: '#/components/parameters/groupIdInPath' get: deprecated: true tags: - user group operationId: getGroupMembers description: ユーザーグループのメンバーのIDを取得します security: - traqOAuth2: - read responses: '200': description: 正常に取得できました content: application/json: schema: $ref: '#/components/schemas/UUIDs' '404': description: 正常に取得できませんでした。指定したグループは存在しません。 post: deprecated: true tags: - user group operationId: addGroupMember description: ユーザーグループにメンバーを追加します security: - traqOAuth2: - write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddUserGroup' responses: '204': description: 正常に追加できました '400': description: 正常に追加できませんでした。リクエスト内容が不正です '403': description: 正常に追加できませんでした。権限がありません。 '404': description: 正常に追加できませんでした。指定したグループは存在しません。 '/groups/{groupID}/members/{userID}': parameters: - $ref: '#/components/parameters/groupIdInPath' - $ref: '#/components/parameters/userIdInPath' delete: deprecated: true tags: - user group operationId: deleteGroupMember description: ユーザーグループからメンバーを削除します security: - traqOAuth2: - write responses: '204': description: 正常に削除できました '400': description: 正常に追加できませんでした。リクエスト内容が不正です '403': description: 正常に削除できませんでした。権限がありません。 '404': description: 正常に削除できませんでした。指定したグループは存在しません。 /clients: get: tags: - client operationId: getClients description: 自分が登録しているクライアントの一覧を取得します。 security: - traqOAuth2: - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: '#/components/schemas/OwnedClientInfo' '403': description: 取得できませんでした。権限がありません。 post: tags: - client operationId: createClient description: クライアントを登録します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostClient' responses: '200': description: 正常に登録できました。クライアント情報を返します。 content: application/json: schema: $ref: '#/components/schemas/OwnedClientInfo' '400': description: 登録できませんでした。リクエスト内容が不正です。 '403': description: 登録できませんでした。権限がありません。 '/clients/{clientID}': parameters: - $ref: '#/components/parameters/clientIdInPath' get: tags: - client operationId: getClient description: 指定したクライアントIDのクライアントの情報を取得します。 security: - traqOAuth2: - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/ClientInfo' '404': description: 取得できませんでした。指定されたクライアントは存在しません。 patch: tags: - client operationId: patchClient description: 指定したクライアントIDのクライアントの情報を変更します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchClient' responses: '204': description: 正常に変更できました。 '403': description: 変更できませんでした。権限がありません。 '404': description: 変更できませんでした。指定されたクライアントは存在しません。 delete: tags: - client operationId: deleteClient description: |- 指定したクライアントIDのクライアントを削除します。 正常に削除された場合、このクライアントを通じての認可は全て取り消されます。 security: - traqOAuth2: - manage_bot responses: '204': description: 正常に削除できました。 '403': description: 削除できませんでした。権限がありません。 '404': description: 削除できませんでした。指定されたクライアントは存在しません。 '/clients/{clientID}/detail': parameters: - $ref: '#/components/parameters/clientIdInPath' get: tags: - client operationId: getClientDetail description: クライアントの詳細を取得します。 security: - traqOAuth2: - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/OwnedClientInfo' '403': description: 取得できませんでした。権限がありません。 /bots: get: tags: - bot operationId: getBots description: 自分が作成したBotの一覧を取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: '#/components/schemas/Bot' post: tags: - bot operationId: createBots description: Botを作成します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostBot' responses: '201': description: 正常に作成できました。 content: application/json: schema: $ref: '#/components/schemas/BotDetail' '400': description: 作成できませんでした。リクエスト内容が不正です。 '403': description: 作成できませんでした。権限がありません。 '409': description: 作成できませんでした。既に名前が使われています。 '/bots/{botID}': parameters: - $ref: '#/components/parameters/botIdInPath' get: tags: - bot operationId: getBot description: Botを取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/Bot' '404': description: 取得できませんでした。指定したBotは存在しません。 patch: tags: - bot operationId: editBot description: Bot情報を変更します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchBot' responses: '204': description: 正常に変更できました。 '400': description: 変更できませんでした。リクエスト内容が不正です。 '403': description: 変更できませんでした。権限がありません。 '404': description: 削除できませんでした。指定したBotは存在しません。 delete: tags: - bot operationId: deleteBot description: Botを削除します。 security: - traqOAuth2: - manage_bot responses: '204': description: 正常に削除できました。 '403': description: 削除できませんでした。権限がありません。 '404': description: 削除できませんでした。指定したBotは存在しません。 '/bots/{botID}/detail': parameters: - $ref: '#/components/parameters/botIdInPath' get: tags: - bot operationId: getBotDetail description: Botの詳細を取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/BotDetail' '403': description: 取得できませんでした。権限がありません。 '404': description: 取得できませんでした。指定したBotは存在しません。 '/bots/{botID}/events': parameters: - $ref: '#/components/parameters/botIdInPath' put: tags: - bot operationId: changeBotEvents description: Botの購読イベントを変更します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PutBotEvents' responses: '204': description: 変更できました。 '400': description: リクエスト内容が不正です。 '403': description: 権限がありません。 '404': description: 指定したBotは存在しません。 '/bots/{botID}/icon': parameters: - $ref: '#/components/parameters/botIdInPath' get: tags: - bot operationId: getBotIcon description: 指定したBotのアイコンを取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: image/jpeg: schema: type: string format: binary image/png: schema: type: string format: binary image/gif: schema: type: string format: binary '404': description: 取得できませんでした。指定したBotは存在しません。 put: tags: - bot operationId: changeBotIcon description: 指定したBotのアイコンを変更します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: multipart/form-data: schema: properties: file: type: string format: binary description: 'Botユーザーのアイコン(1MBまでのpng, jpeg, gif)' encoding: file: contentType: 'image/png, image/jpeg, image/gif' responses: '204': description: 正常に変更できました。 '400': description: 変更できませんでした。リクエスト内容が不正です。 '403': description: 変更できませんでした。権限がありません。 '404': description: 修正できませんでした。指定したBotは存在しません。 '/bots/{botID}/state': parameters: - $ref: '#/components/parameters/botIdInPath' put: deprecated: true tags: - bot operationId: changeBotState description: Botの状態を変更します。 security: - traqOAuth2: - manage_bot requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PutBotState' responses: '202': description: Botのアクティベーションを受理しました。PINGリクエストが通り次第有効になります。 '204': description: 変更できました。 '400': description: リクエスト内容が不正です。 '403': description: 権限がありません。 '404': description: 指定したBotは存在しません。 '/bots/{botID}/reissue': parameters: - $ref: '#/components/parameters/botIdInPath' post: deprecated: true tags: - bot operationId: reissueBotTokens description: Botの各種トークンを再発行します。 security: - traqOAuth2: - manage_bot responses: '200': description: 再発行しました content: application/json: schema: $ref: '#/components/schemas/BotTokens' '403': description: 権限がありません。 '404': description: 指定したBotは存在しません。 '/bots/{botID}/channels': parameters: - $ref: '#/components/parameters/botIdInPath' get: tags: - bot operationId: getBotChannels description: Botが参加しているチャンネルのUUIDの配列を取得します。 security: - traqOAuth2: - read - manage_bot responses: '200': description: 正常に取得できました。 content: application/json: schema: $ref: '#/components/schemas/UUIDs' '403': description: 権限がありません。 '404': description: 指定したBotは存在しません。 /activity/latest-messages: get: tags: - activity operationId: getActivities description: 各チャンネルの最新のメッセージ1件をメッセージ作成日時の降順で取得します。 security: - traqOAuth2: - read parameters: - in: query name: limit schema: type: integer default: 50 description: 取得する件数 1-50 example: 50 - in: query name: subscribe schema: type: boolean default: true description: 購読チャンネルのみを取得する example: false responses: '200': description: 正常に取得ができました content: application/json: schema: $ref: '#/components/schemas/MessageList' '400': description: リクエスト内容が不正です /webrtc/state: get: deprecated: true tags: - webrtc operationId: getWebRTCState description: このAPIは削除されました responses: '410': description: このAPIは削除されました put: deprecated: true tags: - webrtc operationId: putWebRTCState description: このAPIは削除されました responses: '410': description: このAPIは削除されました components: securitySchemes: cookieAuth: type: apiKey in: cookie name: r_session traqOAuth2: type: oauth2 flows: authorizationCode: authorizationUrl: /api/1.0/oauth2/authorize tokenUrl: /api/1.0/oauth2/token scopes: read: 読み取りスコープ write: 書き込みスコープ manage_bot: bot関連読み書きスコープ parameters: channelIdInPath: name: channelID description: 操作の対象となるチャンネルのID in: path required: true schema: type: string format: uuid userIdInPath: name: userID description: 操作の対象となるユーザーID in: path required: true schema: type: string format: uuid groupIdInPath: name: groupID description: 操作の対象となるユーザーグループID in: path required: true schema: type: string format: uuid messageIdInPath: name: messageID in: path required: true description: 操作の対象となるメッセージID schema: type: string format: uuid stampIdInPath: name: stampID description: 操作の対象となるスタンプID in: path required: true schema: type: string format: uuid tagIdInPath: name: tagID description: 操作の対象となるタグID in: path required: true schema: type: string format: uuid fileIdInPath: name: fileID description: 操作の対象となるファイルID in: path required: true schema: type: string pinIdInPath: name: pinID description: 操作の対象となるピン留めID in: path required: true schema: type: string webhookIdInPath: name: webhookID description: 操作の対象となるWebhookのID in: path required: true schema: type: string format: uuid botIdInPath: name: botID description: 操作の対象となるBotのID in: path required: true schema: type: string format: uuid clientIdInPath: name: clientID description: 操作の対象となるclientのID in: path required: true schema: type: string format: uuid oauth2TokenIdInPath: name: oauth2TokenID description: 操作の対象となるTokenのID in: path required: true schema: type: string format: uuid limitInQuery: in: query name: limit schema: type: integer default: 0 description: 取得する件数 1-200 example: 50 offsetInQuery: in: query name: offset schema: type: integer default: 0 description: 取得するオフセット example: 150 sinceInQuery: in: query name: since schema: type: string format: date-time default: '0000-01-01T00:00:00.000000Z' description: 取得する時間範囲の開始日時 example: '2016-10-12T11:00:00.000000Z' untilInQuery: in: query name: until schema: type: string format: date-time description: 取得する時間範囲の終了日時 example: '2016-10-12T11:00:00.0000000Z' inclusiveInQuery: in: query name: inclusive schema: type: boolean default: false description: 範囲の端を含めるかどうか orderInQuery: in: query name: order schema: type: string enum: - asc - desc default: desc description: 昇順か降順か headers: X-TRAQ-MORE: schema: type: boolean description: 指定した範囲に要素がさらに存在するかどうか schemas: UUIDs: type: array description: UUIDの配列 items: type: string format: uuid OAuth2ResponseType: type: string enum: - code - token - none OAuth2Prompt: type: string enum: - none OAuth2Authorization: type: object required: - client_id properties: response_type: $ref: '#/components/schemas/OAuth2ResponseType' client_id: type: string redirect_uri: type: string scope: type: string state: type: string code_challenge: type: string code_challenge_method: type: string nonce: type: string prompt: $ref: '#/components/schemas/OAuth2Prompt' OAuth2Token: type: object required: - access_token - token_type properties: access_token: type: string token_type: type: string expires_in: type: integer refresh_token: type: string scope: type: string id_token: type: string PostOAuth2Token: type: object required: - grant_type properties: grant_type: type: string code: type: string redirect_uri: type: string client_id: type: string code_verifier: type: string username: type: string password: type: string format: password scope: type: string refresh_token: type: string client_secret: type: string OAuth2Decide: type: object required: - submit properties: submit: type: string description: '承諾する場合は"approve"' UserLogin: type: object required: - name - pass properties: name: type: string pass: type: string format: password UserRegister: type: object required: - name - password properties: name: type: string description: ユーザー名(半角英数字とアンダーバー(_)の1文字以上32文字以下) password: type: string format: password description: パスワード UserData: type: object properties: displayName: type: string description: '新しい表示名(0-32文字)。変更しない場合は""' twitterId: type: string description: TwitterID ChangePassword: type: object required: - password - newPassword properties: password: type: string format: password description: 現在のパスワード newPassword: type: string format: password description: 新しいパスワード(10文字以上32文字以下のアスキー文字) Session: type: object properties: id: type: string format: uuid createdAt: type: string format: date-time Channel: type: object properties: channelId: type: string format: uuid description: チャンネルUUID name: type: string description: チャンネル名 example: yamada member: $ref: '#/components/schemas/UUIDs' parent: type: string format: uuid description: 親の階層のチャンネルUUID topic: type: string description: チャンネルトピック example: yamadaチャンネルです! children: $ref: '#/components/schemas/UUIDs' visibility: type: boolean description: チャンネルの可視状態 force: type: boolean description: 強制通知チャンネルか private: type: boolean description: プライベートチャンネルか dm: type: boolean description: ダイレクトメッセージチャンネルか ChannelList: type: array items: $ref: '#/components/schemas/Channel' UnreadChannel: type: object properties: channelId: type: string format: uuid description: チャンネルID count: type: integer description: そのチャンネルの未読メッセージ数 noticeable: type: boolean description: 自分にメンションされたメッセージを含んでいるかどうか since: type: string format: date-time description: そのチャンネルの最古の未読メッセージの日時 updatedAt: type: string format: date-time description: そのチャンネルの最新の未読メッセージの日時 CreateChannel: type: object required: - type properties: name: type: string description: チャンネル名 example: random parent: type: string format: uuid description: 親のチャンネルID CreateChannelChild: type: object required: - name properties: name: type: string description: チャンネル名 example: random PatchChannel: type: object properties: name: type: string description: チャンネル名 example: gps visibility: type: boolean description: 変更後のvisibility example: true force: type: boolean description: 強制通知かどうか PutParentChannel: type: object required: - parent properties: parent: type: string format: uuid description: 変更後の親チャンネルID ChannelTopic: type: object properties: text: type: string description: チャンネルトピック example: yamadaチャンネルです! SetChannelTopic: type: object required: - text properties: text: type: string description: チャンネルの説明 example: 'なんでも良いチャンネルです!!' UserStatus: type: integer enum: - 0 - 1 - 2 description: 'アカウントの状態 (0:停止,1:有効,2:一時停止)' User: type: object properties: userId: type: string format: uuid description: ユーザーUUID name: type: string description: traQ ID displayName: type: string description: 表示名 iconFileId: type: string format: uuid description: アイコンファイルUUID bot: type: boolean description: BOTかどうか twitterId: type: string description: ツイッターID lastOnline: type: string format: date-time description: 最終オンライン日時(オンラインに1度もなってない場合はnull) isOnline: type: boolean description: 現在オンラインかどうか suspended: type: boolean description: アカウントが停止中かどうか accountStatus: $ref: '#/components/schemas/UserStatus' Me: type: object properties: userId: type: string format: uuid description: ユーザーUUID name: type: string description: traQ ID displayName: type: string description: 表示名 iconFileId: type: string format: uuid description: アイコンファイルUUID bot: type: boolean description: BOTかどうか twitterId: type: string description: ツイッターID lastOnline: type: string format: date-time description: 最終オンライン日時(オンラインに1度もなってない場合はnull) isOnline: type: boolean description: 現在オンラインかどうか suspended: type: boolean description: アカウントが停止中かどうか accountStatus: $ref: '#/components/schemas/UserStatus' role: type: string description: ユーザーロール permissions: type: array items: type: string description: 所有している権限の配列 UserList: type: array items: $ref: '#/components/schemas/User' UserDetail: type: object properties: userId: type: string format: uuid description: ユーザーUUID name: type: string description: traQ ID displayName: type: string description: 表示名 iconFileId: type: string format: uuid description: アイコンファイルUUID bot: type: boolean description: BOTかどうか twitterId: type: string description: ツイッターID lastOnline: type: string format: date-time description: 最終オンライン日時(オンラインに1度もなってない場合はnull) isOnline: type: boolean description: 現在オンラインかどうか suspended: type: boolean description: アカウントが停止中かどうか accountStatus: $ref: '#/components/schemas/UserStatus' tagList: $ref: '#/components/schemas/TagList' UserGroup: type: object properties: groupId: type: string format: uuid description: グループUUID name: type: string description: グループ名 description: type: string description: グループ説明 type: type: string description: グループタイプ adminUserId: type: string format: uuid description: グループ管理者UUID members: $ref: '#/components/schemas/UUIDs' createdAt: type: string format: date-time description: グループ作成日時 updatedAt: type: string format: date-time description: グループ更新日時 PostUserGroup: type: object required: - name properties: name: type: string maxLength: 30 description: グループ名 description: type: string description: 説明 PatchUserGroup: type: object properties: name: type: string maxLength: 30 description: グループ名 description: type: string description: 説明 adminUserId: type: string format: uuid description: 管理ユーザー AddUserGroup: type: object required: - userId properties: userId: type: string format: uuid description: 追加するユーザーのID Tag: type: object properties: tagId: type: string format: uuid description: タグUUID tag: type: string description: タグ文字列 isLocked: type: boolean description: タグがロックされているかどうか createdAt: type: string format: date-time description: タグ付与日時 updatedAt: type: string format: date-time description: タグ更新日時 TagList: type: array items: $ref: '#/components/schemas/Tag' SetTag: type: object required: - tag properties: tag: type: string maxLength: 30 description: 追加するタグ example: 山田太郎 SetTagLock: type: object required: - isLocked properties: isLocked: type: boolean description: 'lockするときはtrue,解除するときはfalse' example: true TagUsers: type: object properties: tagId: type: string format: uuid tag: type: string users: $ref: '#/components/schemas/UUIDs' Message: type: object properties: messageId: type: string format: uuid description: メッセージUUID userId: type: string format: uuid description: 投稿者UUID parentChannelId: type: string description: 投稿先チャンネルUUID content: type: string description: メッセージ本体 createdAt: type: string format: date-time description: メッセージ投稿日時 updatedAt: type: string format: date-time description: メッセージ更新日時 pin: type: boolean description: ピン留めされているかどうか reported: type: boolean description: 自分が通報しているかどうか stampList: type: array description: メッセージスタンプ配列 items: $ref: '#/components/schemas/MessageStamp' MessageList: type: array items: $ref: '#/components/schemas/Message' SendMessage: type: object required: - text properties: text: type: string description: Markdown形式のメッセージ本文 example: Raskって誰? MessageStamp: type: object properties: userId: type: string format: uuid description: ユーザーUUID stampId: type: string format: uuid description: スタンプUUID count: type: integer description: 押された個数 createdAt: type: string format: date-time description: 最初に押した日時 updatedAt: type: string format: date-time description: 最後に押した日時 MessageStampPost: type: object required: - count properties: count: type: integer description: 押す個数(1-100)、100より大きい場合は100として受け取ります minimum: 1 default: 1 example: 1 NotificationUsers: type: object properties: 'on': $ref: '#/components/schemas/UUIDs' 'off': $ref: '#/components/schemas/UUIDs' FCMToken: type: object required: - token properties: token: type: string description: FCMのデバイストークン example: 'bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1' Webhook: type: object properties: webhookId: type: string format: uuid description: Webhook UUID botUserId: type: string format: uuid description: WebhookユーザーのUUID displayName: type: string description: Webhookユーザー表示名 description: type: string description: Webhook説明 secure: type: boolean description: Secure Webhookかどうか channelId: type: string format: uuid description: デフォルト投稿先チャンネルUUID creatorId: type: string format: uuid description: Webhook作成者UUID createdAt: type: string format: date-time description: Webhook作成日時 updatedAt: type: string format: date-time description: Webhook更新日時 PostWebhook: type: object required: - name - description - channelId properties: name: type: string maxLength: 32 description: webhookユーザーの表示名 description: type: string description: webhookの説明 channelId: type: string format: uuid description: デフォルトの投稿先チャンネル(パブリックチャンネルのみ) secret: type: string description: webhookシークレット PatchWebhook: type: object properties: name: type: string maxLength: 32 description: webhookユーザーの表示名 description: type: string description: webhookの説明 channelId: type: string format: uuid description: デフォルトの投稿先チャンネル(パブリックチャンネルのみ) secret: type: string description: webhookシークレット creatorId: type: string format: uuid description: 移譲先のユーザーUUID Bot: type: object properties: botId: type: string format: uuid description: BOT UUID botUserId: type: string format: uuid description: BOTユーザーUUID description: type: string description: BOT説明 subscribeEvents: type: array items: type: string description: BOTが購読しているイベントの配列 state: type: integer description: BOT状態 creatorId: type: string format: uuid description: BOT作成者UUID createdAt: type: string format: date-time description: BOT作成日時 updatedAt: type: string format: date-time description: BOT更新日時 ChannelBot: type: object properties: botId: type: string format: uuid description: BotのID botUserId: type: string format: uuid description: BotのユーザーID PostBotChannel: type: object required: - code properties: code: type: string description: ボットコード BotIdObject: type: object properties: botId: type: string format: uuid description: 参加したBotのID PostBot: type: object required: - name - displayName - description - postUrl properties: name: type: string maxLength: 16 description: 'botユーザーID。自動的に先頭に"BOT_"が付与されます' displayName: type: string maxLength: 32 description: botユーザーの表示名 description: type: string description: botの説明 postUrl: type: string format: url description: botのPOSTエンドポイント PatchBot: type: object properties: displayName: type: string description: Bot表示名 description: type: string description: Bot説明 privileged: type: boolean description: privileged属性 webhookUrl: type: string format: url description: BotのPOSTエンドポイント creatorId: type: string format: uuid description: 移譲先のユーザーUUID PutBotState: type: object required: - state properties: state: type: string description: activeまたはinactive BotTokens: type: object properties: verificationToken: type: string description: Verification Token accessToken: type: string description: BOTアクセストークン botCode: type: string description: BOTインストールコード BotDetail: type: object properties: botId: type: string format: uuid description: BOT UUID botUserId: type: string format: uuid description: BOTユーザーUUID description: type: string description: BOT説明 subscribeEvents: type: array items: type: string description: BOTが購読しているイベントの配列 state: type: integer description: BOT状態 creatorId: type: string format: uuid description: BOT作成者UUID createdAt: type: string format: date-time description: BOT作成日時 updatedAt: type: string format: date-time description: BOT更新日時 verificationCode: type: string example: NT672c7bgpfwdiMTyDXoeKiudlMazu description: BOT認証コード accessToken: type: string example: NT672c7bgpfwdiMTyDXoeKiudlMazu description: BOTアクセストークン postUrl: type: string format: uri description: BOTサーバーエンドポイント example: 'https://example.com/bot' privileged: type: boolean description: 権限昇格されているかどうか botCode: type: string example: NT672c7bgpfwdiMTyDXoeKiudlMazu description: BOTインストールコード PutBotEvents: type: object required: - events properties: events: type: array description: 購読するイベントの配列 items: type: string StampHistory: type: object properties: stampId: type: string format: uuid description: スタンプID datetime: type: string format: date-time description: そのスタンプが最後に押された日時 Stamp: type: object properties: id: type: string format: uuid description: スタンプUUID name: type: string description: スタンプ名 creatorId: type: string format: uuid description: スタンプ作成者UUID fileId: type: string format: uuid description: スタンプファイルUUID createdAt: type: string format: date-time description: スタンプ作成日時 updatedAt: type: string format: date-time description: スタンプ更新日時 FileInfo: type: object properties: fileId: type: string format: uuid description: ファイルUUID name: type: string description: ファイル名 mime: type: string description: MIMEタイプ size: type: integer description: ファイルサイズ md5: type: string description: MD5ハッシュ hasThumb: type: boolean description: サムネイルがあるかどうか thumbWidth: type: integer description: サムネイル幅 thumbHeight: type: integer description: サムネイル高さ datetime: type: string format: date-time description: アップロード日時 HeartbeatStatus: type: string enum: - none - monitoring - editing description: 'editing,monitoring,noneのユーザーの状態' example: monitoring Heartbeat: type: object required: - status - channelId properties: status: $ref: '#/components/schemas/HeartbeatStatus' channelId: type: string format: uuid description: 現在いるチャンネルId HeartbeatRes: type: object properties: userStatuses: type: array items: type: object properties: userId: type: string format: uuid description: ユーザーUUID status: $ref: '#/components/schemas/HeartbeatStatus' channelId: type: string format: uuid description: チャンネルUUID Report: type: object properties: id: type: string format: uuid description: 通報ID messageId: type: string format: uuid description: 通報対象のメッセージID reporter: type: string format: uuid description: 通報者ID reason: type: string description: 通報内容 createdAt: type: string format: date-time description: 通報日時 ReportMessage: type: object required: - reason properties: reason: type: string maxLength: 100 description: 通報理由 ClientScope: type: string enum: - read - write - manage_bot ClientInfo: type: object properties: clientId: type: string description: クライアントID name: type: string description: クライアント名 description: type: string description: クライアント説明 creatorId: type: string format: uuid description: クライアント作成者UUID OwnedClientInfo: type: object properties: clientId: type: string description: クライアントID name: type: string description: クライアント名 description: type: string description: クライアント説明 creatorId: type: string format: uuid description: クライアント作成者UUID scopes: type: array items: $ref: '#/components/schemas/ClientScope' description: 要求スコープの配列 redirectUri: type: string format: uri description: OAuth2リダイレクトURL secret: type: string description: クライアントSecret AllowedClientInfo: type: object properties: tokenId: type: string format: uuid description: OAuth2アクセストークンUUID clientId: type: string description: クライアントID name: type: string description: クライアント名 description: type: string description: クライアント説明 creatorId: type: string format: uuid description: クライアント作成者UUID scopes: type: array items: $ref: '#/components/schemas/ClientScope' description: 要求スコープの配列 approvedAt: type: string format: date-time description: 承認日時 PostClient: type: object required: - name - description - redirectUri - scopes properties: name: type: string minLength: 1 maxLength: 32 description: クライアント名 description: type: string description: クライアントの説明 redirectUri: type: string format: uri description: リダイレクト先のURI scopes: type: array minItems: 1 description: 要求するスコープ items: $ref: '#/components/schemas/ClientScope' PatchClient: type: object properties: name: type: string minLength: 1 maxLength: 32 description: クライアント名 description: type: string description: 説明 redirectUri: type: string format: uri description: リダイレクト先のURI ChannelEvent: type: object properties: type: type: string description: イベントタイプ enum: - TopicChanged - SubscribersChanged - PinAdded - PinRemoved - NameChanged - ParentChanged - VisibilityChanged - ForcedNotificationChanged - ChildCreated detail: oneOf: - $ref: '#/components/schemas/TopicChangedEvent' - $ref: '#/components/schemas/SubscribersChangedEvent' - $ref: '#/components/schemas/PinAddedEvent' - $ref: '#/components/schemas/PinRemovedEvent' - $ref: '#/components/schemas/NameChangedEvent' - $ref: '#/components/schemas/ParentChangedEvent' - $ref: '#/components/schemas/VisibilityChangedEvent' - $ref: '#/components/schemas/ForcedNotificationChangedEvent' - $ref: '#/components/schemas/ChildCreatedEvent' description: イベント詳細 date_time: type: string format: date-time description: イベント発生日 TopicChangedEvent: type: object properties: userId: type: string format: uuid description: 変更者UUID before: type: string description: 変更前トピック after: type: string description: 変更後トピック description: TopicChanged SubscribersChangedEvent: type: object properties: userId: type: string format: uuid description: 変更者UUID 'on': $ref: '#/components/schemas/UUIDs' 'off': $ref: '#/components/schemas/UUIDs' description: SubscribersChanged PinAddedEvent: type: object properties: userId: type: string format: uuid description: 変更者UUID messageId: type: string format: uuid description: メッセージUUID description: PinAdded PinRemovedEvent: type: object properties: userId: type: string format: uuid description: 変更者UUID messageId: type: string format: uuid description: メッセージUUID description: PinRemoved NameChangedEvent: type: object properties: userId: type: string format: uuid description: 変更者UUID before: type: string description: 変更前名前 after: type: string description: 変更後名前 description: NameChanged ParentChangedEvent: type: object properties: userId: type: string format: uuid description: 変更者UUID before: type: string format: uuid description: 変更前親チャンネルUUID after: type: string format: uuid description: 変更後親チャンネルUUID description: ParentChanged VisibilityChangedEvent: type: object properties: userId: type: string format: uuid description: 作成者UUID visibility: type: boolean description: 可視状態 description: VisibilityChanged ForcedNotificationChangedEvent: type: object properties: userId: type: string format: uuid description: 作成者UUID force: type: boolean description: 強制状態 description: ForcedNotificationChanged ChildCreatedEvent: type: object properties: userId: type: string format: uuid description: 作成者UUID channelId: type: string format: uuid description: チャンネルUUID description: ChildCreated ChannelStats: type: object properties: totalMessageCount: type: number format: int32 description: チャンネルの総投稿メッセージ数(削除されたものも含む) datetime: type: string format: date-time description: 統計情報日時 ChannelViewer: type: object properties: userId: type: string format: uuid description: ユーザーのUUID state: type: string enum: - none - monitoring - editing description: 閲覧状態 ChannelViewers: type: array items: $ref: '#/components/schemas/ChannelViewer' security: - cookieAuth: []