openapi: 3.0.0 info: title: traQ API version: 2.6.3 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 description: ログインを行います。リダイレクトパラメーターが存在する場合はログイン後にリダイレクトします parameters: - in: query name: redirect schema: type: string description: リダイレクト先 security: [] requestBody: content: application/json: schema: type: object required: - name - pass properties: name: type: string pass: type: string responses: "204": description: 正常にログインできました。 "302": description: 正常にログインできました。リダイレクトします。 "400": description: ログインできませんでした。リクエスト内容が不正です "401": description: ログインできませんでした。認証情報が間違っています "403": description: ログインできませんでした。アカウントに問題があります /logout: post: tags: - authentication description: ログアウトを行います。リダイレクトパラメーターが存在する場合はログアウト後にリダイレクトします parameters: - in: query name: redirect schema: type: string description: リダイレクト先 security: [] responses: "204": description: 正常にログアウトできました。 "302": description: 正常にログアウトできました。リダイレクトします。 /public/icon/{username}: get: tags: - public 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: 取得できませんでした。指定したユーザーは存在しません。 # /public/emoji.json # /public/emoji.css # /public/emoji/{stampID} /oauth2/authorize: get: tags: - authorization description: OAuth2 認可エンドポイント parameters: - name: response_type in: query schema: type: string - name: client_id in: query 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: type: string security: [] responses: "302": description: 結果に応じてリダイレクトします。 "400": description: リクエストが不正です。 "403": description: リクエストが許可されていません。 post: tags: - authorization description: OAuth2 認可エンドポイント security: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: response_type: type: string 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: type: string responses: "302": description: 結果に応じてリダイレクトします。 "400": description: リクエストが不正です。 "403": description: リクエストが許可されていません。 /oauth2/authorize/decide: post: tags: - authorization description: OAuth2 認可承諾 requestBody: content: application/x-www-form-urlencoded: schema: type: object required: - submit properties: submit: type: string description: 承諾する場合は"approve" responses: "302": description: RedirectURIに結果をリダイレクトします。 "400": description: リクエストが不正です。 "403": description: リクエストが許可されていません。 /oauth2/token: post: tags: - authorization description: OAuth2 トークンエンドポイント security: [] requestBody: content: application/x-www-form-urlencoded: schema: 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 scope: type: string refresh_token: type: string client_secret: type: string responses: "200": description: トークンが正常に発行されました。 content: application/json: schema: 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 "400": description: トークン発行に失敗しました。 "403": description: トークン発行に失敗しました。 # /oauth2/revoke # /metrics /users: get: tags: - user description: 全ユーザーのリストを取得します。 security: - traqOAuth2: - read - manage_bot responses: "200": description: |+ 正常に取得できました。 ユーザーリストを返します。 content: application/json: schema: $ref: "#/components/schemas/UserList" post: tags: - user description: ユーザー登録します requestBody: content: application/json: schema: type: object required: - name - password properties: name: type: string description: ユーザー名(半角英数字とアンダーバー(_)の1文字以上32文字以下) password: type: string format: password description: パスワード responses: "201": description: 正常に登録できました。 "400": description: 登録できませんでした。リクエスト内容が不正です。 "403": description: 登録できませんでした。権限がありません。 /users/me: get: tags: - user description: 自分のユーザー情報を取得します。 security: - traqOAuth2: - read - manage_bot responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/Me" patch: tags: - user description: 自分のユーザー情報を変更します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object properties: displayName: type: string description: 新しい表示名(0-32文字)。変更しない場合は"" twitterId: type: string description: TwitterID responses: "204": description: 正常に変更できました。 "400": description: 正常に変更できませんでした。リクエスト内容が不正です。 /users/me/password: put: tags: - user description: 自分のパスワードを変更します。 requestBody: content: application/json: schema: type: object required: - password - newPassword properties: password: type: string description: 現在のパスワード newPassword: type: string description: 新しいパスワード(10文字以上32文字以下のアスキー文字) responses: "204": description: 正常に変更できました。 "400": description: 正常に変更できませんでした。リクエスト内容が不正です "401": description: 正常に変更できませんでした。現在のパスワードが違います。 /users/me/qr-code: get: tags: - user description: 自分のQRコードを取得します。 responses: "200": description: 正常に取得できました。 content: image/png: schema: type: string format: binary /users/me/icon: get: tags: - user 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 description: 自分のアイコンを更新します。 security: - traqOAuth2: - write requestBody: 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 description: 自分のスタンプ履歴を最大50件取得します。結果は降順で返されます。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: type: object properties: stampId: type: string format: uuid description: スタンプID datetime: type: string format: date-time description: そのスタンプが最後に押された日時 /users/me/groups: get: tags: - user group description: 所属するユーザーグループのIDを取得します security: - traqOAuth2: - read responses: "200": description: 正常に取得できました content: application/json: schema: $ref: "#/components/schemas/UUIDs" /users/me/notification: get: tags: - notification description: 自分が通知を入れているチャンネルのリストを取得します security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。チャンネルIDの配列を返します。 content: application/json: schema: $ref: "#/components/schemas/UUIDs" /users/me/tokens: get: tags: - client 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 description: 指定したトークンの認可を取り消します。 responses: "204": description: 正常に取り消すことができました。 "403": description: 失敗しました。権限がありません。 "404": description: 失敗しました。指定したトークンは存在しません。 /users/me/sessions: get: tags: - sessions description: 自分のログインセッションリストを取得します。 responses: "200": description: セッションリストを返します。 content: application/json: schema: type: array items: type: object properties: id: type: string format: uuid lastIP: type: string lastUserAgent: type: string lastAccess: type: string format: date-time createdAt: type: string format: date-time "403": description: 権限がありません。 delete: tags: - sessions 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 description: 対象のセッションをログアウトします。 responses: "204": description: 成功しました。 "403": description: 権限がありません。 "404": description: 対象のセッションは存在しません。 /users/me/clips: get: tags: - clip description: 全てのクリップを取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: type: object properties: folderId: type: string format: uuid description: フォルダID clipId: type: string format: uuid description: クリップID clippedAt: type: string format: date-time description: クリップ日時 message: $ref: "#/components/schemas/Message" post: tags: - clip description: 新しくメッセージをクリップします。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - messageId properties: messageId: type: string format: uuid description: クリップするメッセージID folderId: type: string format: uuid description: クリップフォルダ名 responses: "201": description: 正常にクリップできました。クリップIDを返します。 content: application/json: schema: type: object properties: id: type: string format: uuid description: クリップID "400": description: 正常にクリップできませんでした。リクエスト内容が不正です。 /users/me/clips/{clipID}: parameters: - $ref: "#/components/parameters/clipIdInPath" get: tags: - clip description: 指定したクリップのメッセージを取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/Message" "404": description: 正常に取得できませんでした。指定したクリップは存在しません。 delete: tags: - clip description: 指定したクリップを削除します。 security: - traqOAuth2: - write responses: "204": description: 正常に削除できました。 "404": description: 正常に削除できませんでした。指定したクリップは存在しません。 /users/me/clips/{clipID}/folder: parameters: - $ref: "#/components/parameters/clipIdInPath" get: tags: - clip description: 指定したクリップのフォルダ情報を取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/ClipsFolder" "404": description: 正常に取得できませんでした。指定したクリップは存在しません。 put: tags: - clip description: 指定したクリップのフォルダを変更します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - folderId properties: folderId: type: string format: uuid description: フォルダID responses: "204": description: 正常に変更できました。 "400": description: 正常に変更できませんでした。指定したフォルダは存在しません。 "404": description: 正常に変更できませんでした。指定したクリップは存在しません。 /users/me/clips/folders: get: tags: - clip description: クリップフォルダ一覧を取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: "#/components/schemas/ClipsFolder" post: tags: - clip description: クリップフォルダを作成します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - name properties: name: type: string description: フォルダ名(30文字以内) responses: "201": description: 正常に作成できました。作成したフォルダ情報を返します。 content: application/json: schema: $ref: "#/components/schemas/ClipsFolder" "400": description: 作成できませんでした。リクエスト内容が不正です。 "409": description: 作成できませんでした。既に存在します。 /users/me/clips/folders/{folderID}: parameters: - name: folderID description: 操作の対象となるクリップフォルダのID in: path required: true schema: type: string format: uuid get: tags: - clip description: フォルダ内のクリップ一覧を取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。クリップしたメッセージのリストを返します。 content: application/json: schema: type: array items: type: object properties: clipId: type: string format: uuid description: クリップID clippedAt: type: string format: date-time description: クリップ日時 message: $ref: "#/components/schemas/Message" "404": description: 取得できませんでした。存在しないフォルダです。 patch: tags: - clip description: クリップフォルダ名を変更します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - name properties: name: type: string description: フォルダ名(30文字以内) responses: "204": description: 正常に変更できました。 "400": description: 正常に変更できませんでした。リクエスト内容が不正です。 "404": description: 正常に変更できませんでした。存在しないフォルダです。 "409": description: 正常に変更できませんでした。既に存在するフォルダです。 delete: tags: - clip description: クリップフォルダを削除します。フォルダ内のクリップは全て削除されます。 security: - traqOAuth2: - write responses: "204": description: 正常に削除できました。 "404": description: 正常に削除できませんでした。存在しないフォルダです。 /users/me/stars: get: tags: - star 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 description: お気に入りチャンネルリストにチャンネルを追加します。 security: - traqOAuth2: - write responses: "204": description: 正常に追加できました。 "404": description: 正常に追加できませんでした。対象のチャンネルが存在しません。 delete: tags: - star description: +| お気に入りチャンネルリストから削除します。 既にお気に入りチャンネルリストに無いチャンネルを指定した場合は無視されます(204)。 security: - traqOAuth2: - write responses: "204": description: 正常に削除されました。 "404": description: 削除に失敗しました。指定されたチャンネルは存在しません。 /users/me/unread/channels: get: tags: - unread description: 未読チャンネル情報のリストを取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: 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: そのチャンネルの最新の未読メッセージの日時 /users/me/unread/channels/{channelID}: parameters: - $ref: "#/components/parameters/channelIdInPath" delete: tags: - unread description: 指定されたチャンネルの未読メッセージを既読にします。存在しないチャンネルIDを指定した場合は、無視されます。 security: - traqOAuth2: - write responses: "204": description: 正常にメッセージを既読にできました。 /users/me/mute: get: tags: - mute description: ミュートしているチャンネルのIDの配列を返します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/UUIDs" /users/me/mute/{channelID}: parameters: - $ref: "#/components/parameters/channelIdInPath" post: tags: - mute description: 指定したチャンネルをミュートします。ただし、強制通知チャンネルはミュートできません。既にミュートしていた場合は204を返します。 security: - traqOAuth2: - write responses: "204": description: 正常にミュートできました。 "403": description: ミュートできませんでした。許可されていません。 "404": description: ミュートできませんでした。指定したチャンネルは存在しません。 delete: tags: - mute description: 指定したチャンネルのミュートを解除します。既に解除されていた場合は204を返します。 security: - traqOAuth2: - write responses: "204": description: 正常にミュートを解除できました。 "404": description: ミュートを解除できませんでした。指定したチャンネルは存在しません。 # /users/me/favorite-stamps # /users/me/favorite-stamps/{stampID} /users/{userID}: parameters: - $ref: "#/components/parameters/userIdInPath" get: tags: - user description: ユーザーの詳細を取得します。 security: - traqOAuth2: - read - manage_bot responses: "200": description: |+ 正常に取得できました。 ユーザー情報を返します。 content: application/json: schema: $ref: "#/components/schemas/UserDetail" "404": description: +| 正常に取得できませんでした。 指定したユーザーは存在しません。 # PATCH /users/{userID} # /users/{userID}/status # /users/{userID}/password /users/{userID}/messages: parameters: - $ref: "#/components/parameters/userIdInPath" get: tags: - message description: DMチャンネルに存在するメッセージを取得します。 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: $ref: "#/components/schemas/MessageList" "400": description: |+ 変更に失敗しました 不正なリクエストです "404": description: |+ 取得に失敗しました。 指定したユーザーは存在しません。 post: tags: - message description: DMチャンネルにメッセージを投稿します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - text properties: text: type: string description: Markdown形式のメッセージ本文 example: Raskって誰? responses: "201": description: |+ 投稿に成功しました。 投稿されたメッセージが返されます。 content: application/json: schema: $ref: "#/components/schemas/Message" "404": description: +| 投稿に失敗しました。 指定したユーザーは存在しません。 /users/{userID}/icon: parameters: - $ref: "#/components/parameters/userIdInPath" get: tags: - user 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: 正常に取得できませんでした。指定したユーザーは存在しません。 # PUT /users/{userID}/icon /users/{userID}/notification: parameters: - $ref: "#/components/parameters/userIdInPath" get: tags: - notification 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 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 description: ユーザーのタグのリストを取得します。 security: - traqOAuth2: - read responses: "200": description: |+ 正常に取得できました。 タグのリストを返します。 content: application/json: schema: $ref: "#/components/schemas/TagList" "404": description: |+ 正常に取得できませんでした。 指定したユーザーは存在しません。 post: tags: - userTag description: ユーザーにタグを追加します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - tag properties: tag: type: string description: 追加するタグ(30文字まで) example: 山田太郎 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 description: タグのロック、アンロックを変更します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - isLocked properties: isLocked: type: boolean description: lockするときはtrue,解除するときはfalse example: true responses: "204": description: |+ 正常に変更できました。 "400": description: |+ 正常に変更できませんでした。 パラメータの形式が不正です。 "403": description: |+ 正常に変更できませんでした。 権限がありません。 "404": description: |+ 正常に変更できませんでした。 指定したユーザー、もしくはタグは存在しません。 delete: tags: - userTag description: ユーザーから指定したタグを削除します。既に存在しないタグを削除しようとした場合は無視されます(204)。 security: - traqOAuth2: - write responses: "204": description: |+ 正常に削除できました。 "403": description: |+ 正常に削除できませんでした。 権限がありません。 "404": description: +| 正常に削除できませんでした。 指定したユーザーは存在しません。 /heartbeat: get: tags: - heartbeat description: チャンネルを現在見ている人・編集している人を取得します。 security: - traqOAuth2: - read parameters: - name: channelId in: query description: 現在いるチャンネルId required: true schema: type: string format: uuid responses: "200": description: |+ 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/HeartbeatRes" post: tags: - heartbeat description: どのチャンネルを見ているか・編集しているかを送信します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - status - channelId properties: status: type: string enum: - none - monitoring - editing description: editing,monitoring,noneでユーザーの状態を指定する example: monitoring channelId: type: string format: uuid description: 現在いるチャンネルId example: xxxxxxxx-xxxx-xxxx-Nxxx-xxxxxxxxxxxx responses: "200": description: 正常に送信できました。 /channels: get: tags: - channel description: |+ (すべての)チャンネルのリストを取得します。 security: - traqOAuth2: - read - manage_bot responses: "200": description: |+ 正常に取得できました。 チャンネルの配列を返します。 content: application/json: schema: $ref: "#/components/schemas/ChannelList" post: tags: - channel description: チャンネルを作成します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - type properties: private: type: boolean description: プライベートチャンネルかどうか member: type: array items: type: string format: uuid description: チャンネルに参加させるuserのuserId name: type: string description: チャンネル名 example: random parent: type: string format: uuid description: 親のチャンネルID example: xxxxxxxx-xxxx-xxxx-Nxxx-xxxxxxxxxxxx responses: "201": description: |+ 正常にチャンネルが作成できました。 作成されたチャンネルを返します。 content: application/json: schema: $ref: "#/components/schemas/Channel" "400": description: +| 正常にチャンネルが作成できませんでした。 親チャンネルが存在しない又は指定されたタイプに対して適切なプロパティが存在しません。 /channels/{channelID}: parameters: - $ref: "#/components/parameters/channelIdInPath" get: tags: - channel description: チャンネルの情報を返します。 security: - traqOAuth2: - read responses: "200": description: |+ 正常に取得ができました。 チャンネルを返します。 content: application/json: schema: $ref: "#/components/schemas/Channel" "404": description: |+ 取得に失敗しました。 指定したチャンネルは存在しません。 patch: tags: - channel description: チャンネルの情報を変更します。 requestBody: content: application/json: schema: type: object properties: name: type: string description: チャンネル名 example: gps visibility: type: boolean description: 変更後のvisibility example: true force: type: boolean description: 強制通知かどうか responses: "204": description: 正常に変更ができました。 "400": description: 失敗しました。リクエスト内容が不正です。 "403": description: 失敗しました。権限がありません。 "404": description: |+ 変更に失敗しました。 指定したチャンネルは存在しません。 delete: tags: - channel description: チャンネルを削除します。 responses: "204": description: 削除に成功しました。 "404": description: +| 削除に失敗しました。 指定したチャンネルは既に存在しません。 /channels/{channelID}/parent: parameters: - $ref: "#/components/parameters/channelIdInPath" put: tags: - channel description: チャンネルの親チャンネルを変更します。 requestBody: content: application/json: schema: type: object required: - parent properties: parent: type: string format: uuid description: 変更後の親チャンネルID responses: "204": description: 変更に成功しました。 "400": description: 変更に失敗しました。リクエスト内容が不正です。 "403": description: 変更に失敗しました。権限がありません。 "404": description: 変更に失敗しました。指定されたチャンネルは存在しません。 "409": description: 変更に失敗しました。チャンネル名が競合しています。 /channels/{channelID}/children: parameters: - $ref: "#/components/parameters/channelIdInPath" post: tags: - channel description: 子チャンネルを作成します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - name properties: name: type: string description: チャンネル名 example: random 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: tags: - pin description: チャンネルのピン留め一覧を取得します。 security: - traqOAuth2: - read responses: "200": description: |+ 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/PinList" /channels/{channelID}/topic: parameters: - $ref: "#/components/parameters/channelIdInPath" get: tags: - channel description: チャンネルの説明を取得します。 security: - traqOAuth2: - read responses: "200": description: +| 正常に取得ができました。 チャンネルトピックを返します。 content: application/json: schema: type: object properties: text: type: string description: チャンネルトピック example: yamadaチャンネルです! "404": description: +| 取得に失敗しました。 指定したチャンネルは存在しません。 put: tags: - channel description: チャンネルの説明を変更します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - text properties: text: type: string description: チャンネルの説明 example: なんでも良いチャンネルです!! responses: "204": description: 正常に更新できました。 "404": description: +| 更新に失敗しました。 指定したチャンネルは存在しません。 /channels/{channelID}/messages: parameters: - $ref: "#/components/parameters/channelIdInPath" get: tags: - message 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: $ref: "#/components/schemas/MessageList" "400": description: |+ 変更に失敗しました 不正なリクエストです "404": description: |+ 取得に失敗しました。 指定したチャンネルは存在しません。 post: tags: - message description: チャンネルにメッセージを投稿します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - text properties: text: type: string description: Markdown形式のメッセージ本文 example: Raskって誰? responses: "201": description: |+ 投稿に成功しました。 投稿されたメッセージが返されます。 content: application/json: schema: $ref: "#/components/schemas/Message" "404": description: +| 投稿に失敗しました。 指定したチャンネルは存在しません。 /channels/{channelID}/notification: parameters: - $ref: "#/components/parameters/channelIdInPath" get: tags: - notification description: 通知を点けているユーザーのIDの配列を取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました content: application/json: schema: $ref: "#/components/schemas/UUIDs" "404": description: 取得に失敗しました。指定したチャンネルは存在しません。 put: tags: - notification description: |+ チャンネルの通知状況を変更します。 リクエストに含めなかったユーザーIDのユーザーの通知状況は変更しません。 また、存在しないユーザーのIDを指定した場合は無視されます。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object properties: on: description: 通知をつける人のユーザーIDの配列 type: array items: type: string format: uuid off: description: 通知をつけない人のユーザーIDの配列 type: array items: type: string format: uuid responses: "204": description: 正常に更新できました。 "404": description: +| 変更に失敗しました。 指定したチャンネルは存在しません。 /channels/{channelID}/bots: parameters: - $ref: "#/components/parameters/channelIdInPath" get: tags: - bot description: チャンネルに参加しているBot一覧を取得します。 security: - traqOAuth2: - read - manage_bot responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: type: object properties: botId: type: string format: uuid description: BotのID botUserId: type: string format: uuid description: BotのユーザーID "404": description: 取得できませんでした。指定したチャンネルは存在しません。 post: tags: - bot description: チャンネルにBotを参加させます。 security: - traqOAuth2: - write - manage_bot requestBody: content: application/json: schema: type: object required: - code properties: code: type: string description: ボットコード responses: "200": description: 正常にBotが参加しました。 content: application/json: schema: type: object properties: botId: type: string format: uuid description: 参加したBotのID "400": description: 参加させることができませんでした。リクエスト内容が不正です。 "404": description: 参加させることができませんでした。指定したチャンネルは存在しません。 /channels/{channelID}/bots/{botID}: parameters: - $ref: "#/components/parameters/channelIdInPath" - $ref: "#/components/parameters/botIdInPath" delete: tags: - bot description: Botをチャンネルから退出させます。 security: - traqOAuth2: - write - manage_bot responses: "204": description: 正常に退出させることができました。 "404": description: 退出させることができませんでした。指定したチャンネル、またはBotは存在しません。 /notification: get: tags: - notification description: 通知ストリーム(Server Sent Events)に接続します。 security: - traqOAuth2: - read responses: "200": description: 接続が完了しました。 /notification/device: post: tags: - notification description: FCMデバイスを登録します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - token properties: token: type: string description: FCMのデバイストークン example: bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1 responses: "201": description: 正常に登録できました。 /messages/reports: get: tags: - message description: メッセージ通報を最大50件取得します。 parameters: - name: p in: query description: ページ番号(ゼロオリジン) schema: type: integer responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: 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: 通報日時 "403": description: 取得できませんでした。権限がありません。 /messages/{messageID}: parameters: - $ref: "#/components/parameters/messageIdInPath" get: tags: - message description: 指定したメッセージを取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/Message" "404": description: 取得できませんでした。指定されたメッセージは存在しません。 put: tags: - message description: 指定したメッセージを編集します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - text properties: text: type: string description: Markdown形式のメッセージ本文 example: Raskって誰? responses: "204": description: 正常に編集できました。 "403": description: 編集できませんでした。指定されたメッセージを編集する権限がありません。 "404": description: 編集できませんでした。指定されたメッセージは存在しません。 delete: tags: - message description: 指定したメッセージを削除します。 security: - traqOAuth2: - write responses: "204": description: 正常に削除できました。 "403": description: 削除できませんでした。指定されたメッセージを削除する権限がありません。 "404": description: 削除できませんでした。指定されたメッセージは存在しません。 /messages/{messageID}/report: parameters: - $ref: "#/components/parameters/messageIdInPath" post: tags: - message description: 指定したメッセージを通報します。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - reason properties: reason: type: string description: 通報理由(100文字以内) responses: "204": description: 通報を受理しました。 "400": description: 通報を受理できませんでした。リクエスト内容が不正です。 "404": description: 通報を受理できませんでした。指定されたメッセージは存在しません。 /messages/{messageID}/stamps: parameters: - $ref: "#/components/parameters/messageIdInPath" get: tags: - stamp description: 指定したメッセージに押されているスタンプを全て取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: "#/components/schemas/MessageStamp" "404": description: 取得できませんでした。指定したメッセージは存在しません。 /messages/{messageID}/stamps/{stampID}: parameters: - $ref: "#/components/parameters/messageIdInPath" - $ref: "#/components/parameters/stampIdInPath" post: tags: - stamp description: 指定したメッセージに指定したスタンプを押します。 security: - traqOAuth2: - write responses: "204": description: 正常にスタンプを押すことができました。 "404": description: スタンプを押すことができませんでした。指定されたスタンプまたはメッセージは存在しません。 delete: tags: - stamp description: 指定したメッセージから指定したスタンプを外します。 security: - traqOAuth2: - write responses: "204": description: 正常にスタンプを外すことができました。 "404": description: スタンプを外すことができませんでした。指定されたスタンプまたはメッセージは存在しません。 /tags/{tagID}: parameters: - $ref: "#/components/parameters/tagIdInPath" get: tags: - userTag description: 指定されたタグの情報を取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: type: object properties: tagId: type: string format: uuid tag: type: string users: $ref: "#/components/schemas/UUIDs" "404": description: 正常に取得できませんでした。指定されたタグIDは存在しません /files: post: tags: - file description: ファイルをアップロードします security: - traqOAuth2: - write requestBody: content: multipart/form-data: schema: required: - file properties: file: type: string description: ファイル本体 format: binary acl_readable: type: string default: all description: ファイルにアクセスすることが可能なユーザーのUUIDの文字列表現をカンマ区切りで連結した文字列、または'all'(デフォルト) responses: "201": description: 正常にファイルがアップロードされました。 content: application/json: schema: $ref: "#/components/schemas/FileInfo" "403": description: ファイルがアップロード出来ませんでした。リクエスト内容が不正です。 "411": description: ファイルがアップロード出来ませんでした。Content-Lengthヘッダーを送信してください。 "413": description: ファイルがアップロード出来ませんでした。ファイルサイズが大きすぎます。 /files/{fileID}: parameters: - $ref: "#/components/parameters/fileIdInPath" get: tags: - file 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: 取得できませんでした。指定されたファイルは存在しません。 delete: tags: - file description: 指定したファイルを削除します。 responses: "204": description: 正常に削除できました。 "403": description: 削除できませんでした。指定されたファイルを削除する権限がありません。 "404": description: 削除できませんでした。指定されたファイルは存在しません。 /files/{fileID}/meta: parameters: - $ref: "#/components/parameters/fileIdInPath" get: tags: - file 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 description: 指定したファイルのサムネイルを取得します security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: image/png: schema: type: string format: binary "403": description: 取得できませんでした。指定されたファイルのサムネイルにアクセスする権限がありません。 "404": description: 取得できませんでした。指定されたファイルのサムネイルは存在しません。 /pins: post: tags: - pin description: チャンネルにメッセージをピン留めします。 security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - messageId properties: messageId: type: string format: uuid description: ピン留めするメッセージID responses: "201": description: 正常にピン留めできました。 content: application/json: schema: type: object properties: id: type: string format: uuid description: ピンID /pins/{pinID}: parameters: - $ref: "#/components/parameters/pinIdInPath" get: tags: - pin description: ピン留めを取得します。 security: - traqOAuth2: - read responses: "200": description: |+ 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/Pin" delete: tags: - pin description: ピン留めを外します。 security: - traqOAuth2: - write responses: "204": description: |+ 正常に外せました。 "404": description: +| 指定したIDのピンは存在しません。 /stamps: get: tags: - stamp description: 全スタンプのリストを取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: "#/components/schemas/Stamp" post: tags: - stamp description: スタンプを新規作成します。 security: - traqOAuth2: - write requestBody: content: multipart/form-data: schema: required: - name - file properties: name: type: string description: スタンプ名(半角英数字と-+_のみを含む32文字以内の文字列) file: type: string format: binary description: 1MBまでのpng, jpeg, gif, svg encoding: file: contentType: image/png, image/jpeg, image/gif, image/svg+xml responses: "201": description: 正常にスタンプが作成されました。 content: application/json: schema: $ref: "#/components/schemas/Stamp" "400": description: 正常にスタンプが作成できませんでした。 /stamps/{stampID}: parameters: - $ref: "#/components/parameters/stampIdInPath" get: tags: - stamp description: スタンプの情報を取得します。 security: - traqOAuth2: - read responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/Stamp" "404": description: 取得できませんでした。指定されたスタンプは存在しません。 patch: tags: - stamp description: スタンプを修正します。 security: - traqOAuth2: - write requestBody: content: multipart/form-data: schema: properties: name: type: string description: スタンプ名(半角英数字と-+_のみを含む32文字以内の文字列) file: type: string format: binary description: 1MBまでのpng, jpeg, gif, svg encoding: file: contentType: image/png, image/jpeg, image/gif, image/svg+xml responses: "204": description: 正常に修正できました。 "403": description: 修正できませんでした。指定されたスタンプを修正する権限がありません。 "404": description: 修正できませんでした。指定されたスタンプは存在しません。 delete: tags: - stamp description: スタンプを削除します。 responses: "204": description: 正常に削除できました。 "403": description: 削除できませんでした。指定されたスタンプを削除する権限がありません。 "404": description: 削除できませんでした。指定されたスタンプは存在しません。 /webhooks: get: tags: - webhook description: 自分が作成したwebhookの一覧を取得します。 security: - traqOAuth2: - read - manage_bot responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: "#/components/schemas/Webhook" post: tags: - webhook description: webhookを作成します。 security: - traqOAuth2: - manage_bot requestBody: content: application/json: schema: type: object required: - name - description - channelId properties: name: type: string description: webhookユーザーの表示名(32文字まで) description: type: string description: webhookの説明 channelId: type: string format: uuid description: デフォルトの投稿先チャンネル(パブリックチャンネルのみ) secret: type: string description: webhookシークレット 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 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 description: webhookを修正します。 security: - traqOAuth2: - manage_bot requestBody: content: application/json: schema: type: object properties: name: type: string description: webhookユーザーの表示名(32文字まで) description: type: string description: webhookの説明 channelId: type: string format: uuid description: デフォルトの投稿先チャンネル(パブリックチャンネルのみ) secret: type: string description: webhookシークレット responses: "204": description: 正常に修正できました。 "400": description: 修正できませんでした。リクエスト内容が不正です。 "403": description: 削除できませんでした。権限がありません。 "404": description: 修正できませんでした。指定したwebhookは存在しません。 delete: tags: - webhook description: webhookを削除します。 security: - traqOAuth2: - manage_bot responses: "204": description: 正常に削除できました。 "403": description: 削除できませんでした。権限がありません。 "404": description: 削除できませんでした。指定したwebhookは存在しません。 post: tags: - webhook 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が設定されている場合は必須 security: [] requestBody: 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 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 description: 指定したwebhookのアイコンを変更します。 security: - traqOAuth2: - manage_bot requestBody: 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}/messages /webhooks/{webhookID}/github: parameters: - $ref: "#/components/parameters/webhookIdInPath" post: tags: - webhook description: Github-Compatibleなwebhookを送信します。 security: [] requestBody: content: application/json: schema: type: object responses: "204": description: 正常に送信できました。 "400": description: 正常に送信できませんでした。リクエスト内容が不正です。 "404": description: 正常に送信できませんでした。指定されたwebhookは存在しません。 /groups: get: tags: - user group description: 全てのユーザーグループを取得します security: - traqOAuth2: - read responses: "200": description: 正常に取得できました content: application/json: schema: type: array items: $ref: "#/components/schemas/UserGroup" post: tags: - user group description: ユーザーグループを作成します security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - name properties: name: type: string description: グループ名(30文字以内) description: type: string description: 説明 responses: "201": description: 正常に作成できました content: application/json: schema: $ref: "#/components/schemas/UserGroup" "400": description: 正常に作成できませんでした。リクエスト内容が不正です "409": description: 正常に作成できませんでした。既に存在するグループ名です /groups/{groupID}: parameters: - $ref: "#/components/parameters/groupIdInPath" get: tags: - user group description: ユーザーグループを取得します security: - traqOAuth2: - read responses: "200": description: 正常に取得できました content: application/json: schema: $ref: "#/components/schemas/UserGroup" "404": description: 正常に取得できませんでした。指定したグループは存在しません。 patch: tags: - user group description: ユーザーグループの情報を変更します security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object properties: name: type: string description: グループ名(30文字以内) description: type: string description: 説明 adminUserId: type: string format: uuid description: 管理ユーザー responses: "204": description: 正常に変更できました "400": description: 正常に変更できませんでした。リクエスト内容が不正です "403": description: 正常に変更できませんでした。権限がありません。 "404": description: 正常に変更できませんでした。指定したグループは存在しません。 "409": description: 正常に変更できませんでした。既に存在するグループ名です delete: tags: - user group description: ユーザーグループを削除します security: - traqOAuth2: - write responses: "204": description: 正常に削除できました "403": description: 正常に削除できませんでした。権限がありません。 "404": description: 正常に削除できませんでした。指定したグループは存在しません。 /groups/{groupID}/members: parameters: - $ref: "#/components/parameters/groupIdInPath" get: tags: - user group description: ユーザーグループのメンバーのIDを取得します security: - traqOAuth2: - read responses: "200": description: 正常に取得できました content: application/json: schema: $ref: "#/components/schemas/UUIDs" "404": description: 正常に取得できませんでした。指定したグループは存在しません。 post: tags: - user group description: ユーザーグループにメンバーを追加します security: - traqOAuth2: - write requestBody: content: application/json: schema: type: object required: - userId properties: userId: type: string format: uuid description: 追加するユーザーのID responses: "204": description: 正常に追加できました "400": description: 正常に追加できませんでした。リクエスト内容が不正です "403": description: 正常に追加できませんでした。権限がありません。 "404": description: 正常に追加できませんでした。指定したグループは存在しません。 /groups/{groupID}/members/{userID}: parameters: - $ref: "#/components/parameters/groupIdInPath" - $ref: "#/components/parameters/userIdInPath" delete: tags: - user group description: ユーザーグループからメンバーを削除します security: - traqOAuth2: - write responses: "204": description: 正常に削除できました "400": description: 正常に追加できませんでした。リクエスト内容が不正です "403": description: 正常に削除できませんでした。権限がありません。 "404": description: 正常に削除できませんでした。指定したグループは存在しません。 /clients: get: tags: - client description: 自分が登録しているクライアントの一覧を取得します。 security: - traqOAuth2: - manage_bot responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: "#/components/schemas/OwnedClientInfo" "403": description: 取得できませんでした。権限がありません。 post: tags: - client description: クライアントを登録します。 security: - traqOAuth2: - manage_bot requestBody: content: application/json: schema: type: object required: - name - description - redirectUri - scopes properties: name: type: string description: クライアント名(1-32文字) description: type: string description: クライアントの説明 redirectUri: type: string format: uri description: リダイレクト先のURI scopes: type: array description: 要求するスコープ(必ず1つ以上) items: type: string 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 description: 指定したクライアントIDのクライアントの情報を取得します。 security: - traqOAuth2: - manage_bot responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/ClientInfo" "404": description: 取得できませんでした。指定されたクライアントは存在しません。 patch: tags: - client description: 指定したクライアントIDのクライアントの情報を変更します。 security: - traqOAuth2: - manage_bot requestBody: content: application/json: schema: type: object properties: name: type: string description: クライアント名(1-32文字) description: type: string description: 説明 redirectUri: type: string format: uri description: リダイレクト先のURI responses: "204": description: 正常に変更できました。 "403": description: 変更できませんでした。権限がありません。 "404": description: 変更できませんでした。指定されたクライアントは存在しません。 delete: tags: - client description: |+ 指定したクライアントIDのクライアントを削除します。 正常に削除された場合、このクライアントを通じての認可は全て取り消されます。 security: - traqOAuth2: - manage_bot responses: "204": description: 正常に削除できました。 "403": description: 削除できませんでした。権限がありません。 "404": description: 削除できませんでした。指定されたクライアントは存在しません。 /clients/{clientID}/detail: parameters: - $ref: "#/components/parameters/clientIdInPath" get: tags: - client description: クライアントの詳細を取得します。 security: - traqOAuth2: - manage_bot responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/OwnedClientInfo" "403": description: 取得できませんでした。権限がありません。 /bots: get: tags: - bot description: 自分が作成したBotの一覧を取得します。 security: - traqOAuth2: - read - manage_bot responses: "200": description: 正常に取得できました。 content: application/json: schema: type: array items: $ref: "#/components/schemas/Bot" post: tags: - bot description: Botを作成します。 security: - traqOAuth2: - manage_bot requestBody: content: application/json: schema: type: object required: - name - displayName - description - postUrl properties: name: type: string description: botユーザーID(16文字まで)。自動的に先頭に"BOT_"が付与されます displayName: type: string description: botユーザーの表示名(32文字まで) description: type: string description: botの説明 postUrl: type: string format: url description: botのPOSTエンドポイント responses: "201": description: 正常に作成できました。 content: application/json: schema: $ref: "#/components/schemas/BotDetail" "400": description: 作成できませんでした。リクエスト内容が不正です。 "409": description: 作成できませんでした。既に名前が使われています。 "403": description: 作成できませんでした。権限がありません。 /bots/{botID}: parameters: - $ref: "#/components/parameters/botIdInPath" get: tags: - bot description: Botを取得します。 security: - traqOAuth2: - read - manage_bot responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/Bot" "404": description: 取得できませんでした。指定したBotは存在しません。 patch: tags: - bot description: Bot情報を変更します。 security: - traqOAuth2: - manage_bot requestBody: content: application/json: schema: 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エンドポイント responses: "204": description: 正常に変更できました。 "400": description: 変更できませんでした。リクエスト内容が不正です。 "403": description: 変更できませんでした。権限がありません。 "404": description: 削除できませんでした。指定したBotは存在しません。 delete: tags: - bot 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 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 description: Botの購読イベントを変更します。 security: - traqOAuth2: - manage_bot requestBody: content: application/json: schema: type: object required: - events properties: events: type: array description: 購読するイベントの配列 items: type: string responses: "204": description: 変更できました。 "400": description: リクエスト内容が不正です。 "403": description: 権限がありません。 "404": description: 指定したBotは存在しません。 # /bots/{botID}/events/logs /bots/{botID}/icon: parameters: - $ref: "#/components/parameters/botIdInPath" get: tags: - bot 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 description: 指定したBotのアイコンを変更します。 security: - traqOAuth2: - manage_bot requestBody: 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: tags: - bot description: Botの状態を変更します。 security: - traqOAuth2: - manage_bot requestBody: content: application/json: schema: type: object required: - state properties: state: type: string description: activeまたはinactive responses: "204": description: 変更できました。 "202": description: Botのアクティベーションを受理しました。PINGリクエストが通り次第有効になります。 "400": description: リクエスト内容が不正です。 "403": description: 権限がありません。 "404": description: 指定したBotは存在しません。 /bots/{botID}/reissue: parameters: - $ref: "#/components/parameters/botIdInPath" post: tags: - bot description: Botの各種トークンを再発行します。 security: - traqOAuth2: - manage_bot responses: "200": description: 再発行しました content: application/json: schema: type: object properties: verificationToken: type: string description: Verification Token accessToken: type: string description: BOTアクセストークン botCode: type: string description: BOTインストールコード "403": description: 権限がありません。 "404": description: 指定したBotは存在しません。 /bots/{botID}/channels: parameters: - $ref: "#/components/parameters/botIdInPath" get: tags: - bot 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 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: リクエスト内容が不正です # /skyway/authenticate 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 clipIdInPath: name: clipID 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 default: "9999-12-31T23:59:99.999999Z" 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 Channel: type: object properties: channelId: type: string format: uuid description: チャンネルUUID name: type: string description: チャンネル名 example: yamada member: type: array items: type: string format: uuid description: privateチャンネルの場合は参加しているメンバー、公開チャンネルの場合は空 parent: type: string format: uuid description: 親の階層のチャンネルUUID topic: type: string description: チャンネルトピック example: yamadaチャンネルです! children: type: array items: type: string format: uuid description: 子のチャンネルUUIDの配列 visibility: type: boolean description: チャンネルの可視状態 force: type: boolean description: 強制通知チャンネルか private: type: boolean description: プライベートチャンネルか dm: type: boolean description: ダイレクトメッセージチャンネルか ChannelList: type: array items: $ref: "#/components/schemas/Channel" 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: type: integer description: アカウントの状態 (0:停止,1:有効,2:一時停止) 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: type: integer description: アカウントの状態 (0:停止,1:有効,2:一時停止) 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: type: integer description: アカウントの状態 (0:停止,1:有効,2:一時停止) 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: グループ更新日時 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" 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" 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: 最後に押した日時 Pin: type: object properties: pinId: type: string format: uuid description: ピンUUID channelId: type: string format: uuid description: チャンネルUUID userId: type: string format: uuid description: ピン留めしたユーザーのUUID dateTime: type: string format: date-time description: ピン留めした日時 message: $ref: "#/components/schemas/Message" PinList: type: array items: $ref: "#/components/schemas/Pin" 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更新日時 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更新日時 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インストールコード 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: アップロード日時 HeartbeatRes: type: object properties: userStatuses: type: array items: type: object properties: userId: type: string format: uuid description: ユーザーUUID status: type: string enum: - monitoring - editing - none description: ユーザー状態 channelId: type: string format: uuid description: チャンネルUUID ClipsFolder: type: object properties: id: type: string format: uuid description: フォルダUUID name: type: string description: フォルダ名 createdAt: type: string format: date-time description: フォルダ作成日時 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: type: string 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: type: string description: 要求スコープの配列 approvedAt: type: string format: date-time description: 承認日時 security: - cookieAuth: []