{ "openapi": "3.0.0", "info": { "title": "esa API v1", "description": "チームのナレッジ共有サービス[esa.io](https://esa.io/)のAPI v1の仕様書", "version": "1.0.0", "termsOfService": "https://docs.esa.io/posts/5", "x-logo": { "url": "https://img.esa.io/uploads/production/attachments/3/2018/11/13/2/fe8f24a1-a23d-4c96-951c-f6f4433d1399.png", "altText": "esa" } }, "paths": { "/teams": { "get": { "summary": "所属するチーム一覧を取得する", "operationId": "getTeams", "tags": ["team", "esa"], "parameters": [ { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedTeams" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}": { "get": { "summary": "所属するチームを取得する", "operationId": "getTeam", "tags": ["team", "esa"], "parameters": [{ "$ref": "#/components/parameters/teamName" }], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/categories/batch_move": { "post": { "summary": "カテゴリを一括移動する", "description": "指定されたカテゴリを配下のカテゴリを含めて一括で変更します。", "operationId": "batchMoveCategory", "tags": ["category", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [{ "$ref": "#/components/parameters/teamName" }], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchMoveOptions" } } }, "required": true }, "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchMoveResult" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/comments": { "get": { "summary": "コメント一覧を取得する", "description": "チーム全体のコメント一覧を作成日の降順で返却します。", "operationId": "getComments", "tags": ["comment", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedComments" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/comments/{comment_id}": { "get": { "summary": "コメントを取得する", "description": "指定されたコメントを取得します。", "operationId": "getComment", "tags": ["comment", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/commentId" }, { "name": "include", "in": "query", "description": "`stargazers`を指定するとStarの配列を含んだレスポンスを返します。", "schema": { "type": "string", "enum": ["stargazers"] } } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "patch": { "summary": "コメントを更新する", "description": "指定されたコメントを更新します。", "operationId": "updateComment", "tags": ["comment", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/commentId" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/updateCommentBody" } } }, "required": true }, "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "delete": { "summary": "コメントを削除する", "description": "指定されたコメントを削除します。", "operationId": "deleteComment", "tags": ["comment", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/commentId" } ], "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/comments/{comment_id}/star": { "post": { "summary": "コメントをStarする", "description": "指定されたコメントにStarをします。", "operationId": "starComment", "tags": ["star", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/commentId" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewStar" } } }, "required": true }, "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "delete": { "summary": "コメントのStarを取り消す", "description": "指定されたコメントへのStarを取り消します。", "operationId": "unstarComment", "tags": ["star", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/commentId" } ], "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/comments/{comment_id}/stargazers": { "get": { "summary": "コメントのStarを取得する", "description": "指定されたコメントにStarをしたユーザ一覧を取得します。", "operationId": "getCommentStargazers", "tags": ["star", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/commentId" }, { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedStargazers" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/emojis": { "get": { "summary": "絵文字一覧を取得する", "description": "チームで利用可能な絵文字を取得します。URIクエリ文字列を含めない場合、チーム固有の絵文字だけを取得します。", "operationId": "getEmojis", "tags": ["emoji", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "name": "include", "in": "query", "description": "`all`を指定すると、チーム固有の絵文字だけではなく、すべての絵文字を返します。", "schema": { "type": "string", "enum": ["all"], "example": "all" } } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmojiList" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "post": { "summary": "絵文字を登録する", "description": "新しい絵文字を登録します。", "operationId": "createEmoji", "tags": ["emoji", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [{ "$ref": "#/components/parameters/teamName" }], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEmojiBody" } }, "multipart/form-data": { "schema": { "$ref": "#/components/schemas/CreateEmojiBody" } } }, "required": true }, "responses": { "201": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatedEmoji" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/emojis/{code}": { "delete": { "summary": "絵文字を削除する", "description": "登録したチーム固有の絵文字を削除します。", "operationId": "deleteEmoji", "tags": ["emoji", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "name": "code", "in": "path", "description": "絵文字コード", "schema": { "type": "string", "example": "team_emoji" }, "required": true } ], "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/invitations": { "get": { "summary": "招待中のメンバー一覧を取得する", "description": "招待中のメンバーの一覧を取得します。\n\nこのAPIは**team**の**owner**だけがご利用可能です。", "operationId": "getInvitations", "tags": ["invitation", "esa"], "parameters": [{ "$ref": "#/components/parameters/teamName" }], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvitationList" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "post": { "summary": "Emailで招待する", "description": "招待したいメンバーへ個別の招待URLを発行し、指定したEメールアドレスへ送信します。\n\nこのAPIは**team**の**owner**だけがご利用可能です。", "operationId": "invite", "tags": ["invitation", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [{ "$ref": "#/components/parameters/teamName" }], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InviteBody" } } }, "required": true }, "responses": { "201": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvitationList" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/invitations/{code}": { "delete": { "summary": "招待を取り下げる", "description": "招待中のメンバーの招待を削除します。招待時に送信されたメールに記載された招待用のURLは無効となります。\nこのAPIは**team**の**owner**だけがご利用可能です。", "operationId": "disinvite", "tags": ["invitation", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "name": "code", "in": "path", "description": "招待時の識別子を指定します", "required": true, "schema": { "type": "string", "example": "mee93383edf699b525e01842d34078e28" } } ], "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/members": { "get": { "summary": "メンバーを取得する", "operationId": "getMembers", "tags": ["member", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "name": "sort", "in": "query", "schema": { "type": "string", "enum": ["posts_count", "joined", "last_accessed"], "description": "設定可能な値:\n\n- `posts_count`: チーム内での記事の作成数 (default)\n- `joined`: チームへ参加日時\n- `last_accessed`: 最終アクセス日時" } }, { "$ref": "#/components/parameters/order" }, { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedMembers" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/members/{screen_name}": { "delete": { "summary": "メンバーを削除する", "description": "指定した screen_name のメンバーをチームから削除します。\n\n- チームの owner である必要があります\n- APIで自分自身をチームから削除することはできません。", "operationId": "deleteMember", "tags": ["member", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "name": "screen_name", "description": "削除するメンバーのscreen_name", "in": "path", "required": true, "schema": { "type": "string", "example": "alice" } } ], "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/posts": { "get": { "summary": "記事一覧を取得する", "operationId": "getPosts", "tags": ["post", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "name": "q", "in": "query", "description": "記事を絞り込むための条件を指定します", "schema": { "type": "string" } }, { "$ref": "#/components/parameters/includeCommentsAndStargazers" }, { "name": "sort", "in": "query", "description": "記事の並び順を指定します\n\n- 設定可能な値\n - `updated` (default)\n - 記事の更新日時\n - `created`\n - 記事の作成日時\n - `number`\n - 記事番号\n - `stars`\n - 記事へのStarの数\n - `watches`\n - 記事へのWatchの数\n - `comments`\n - 記事へのCommentの数\n - `best_match`\n - 総合的な記事のスコア", "schema": { "type": "string", "enum": [ "updated", "created", "number", "stars", "watches", "comments", "best_match" ] } }, { "$ref": "#/components/parameters/order" }, { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedPosts" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "post": { "summary": "記事を投稿する", "operationId": "createPost", "tags": ["post", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [{ "$ref": "#/components/parameters/teamName" }], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePostBody" } } } }, "responses": { "201": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/posts/{post_number}": { "get": { "summary": "記事を取得する", "description": "指定された記事を取得します。", "operationId": "getPost", "tags": ["post", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" }, { "$ref": "#/components/parameters/includeCommentsAndStargazers" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "patch": { "summary": "記事を編集する", "description": "指定された記事を編集します。", "operationId": "updatePost", "tags": ["post", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePostBody" } } }, "required": true }, "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "delete": { "summary": "記事を削除する", "description": "指定された記事を削除します。", "operationId": "deletePost", "tags": ["post", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" } ], "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/posts/{post_number}/comments": { "get": { "summary": "記事のコメント一覧を取得する", "description": "記事のコメント一覧を更新日の降順で返却します。", "operationId": "getPostComments", "tags": ["comment", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" }, { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedComments" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "post": { "summary": "コメントを投稿する", "description": "記事に新しいコメントを作成します。", "operationId": "createComment", "tags": ["comment", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" }, { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCommentBody" } } }, "required": true }, "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/posts/{post_number}/star": { "post": { "summary": "記事をStarする", "description": "指定された記事にStarをします。", "operationId": "starPost", "tags": ["star", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewStar" } } }, "required": true }, "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "delete": { "summary": "記事のStarを取り消す", "description": "指定された記事へのStarを取り消します。", "operationId": "unstarPost", "tags": ["star", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" } ], "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/posts/{post_number}/stargazers": { "get": { "summary": "記事のStarを取得する", "description": "指定された記事にStarをしたユーザ一覧を取得します。", "operationId": "getPostStargazers", "tags": ["star", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" }, { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedStargazers" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/posts/{post_number}/watch": { "post": { "summary": "記事をWatchする", "description": "指定された記事にWatchをします。", "operationId": "watchPost", "tags": ["watch", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" } ], "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } }, "delete": { "summary": "記事のWatchを取り消す", "description": "指定された記事へのWatchを取り消します。", "operationId": "unwachPost", "tags": ["watch", "esa"], "security": [ { "OAuth2": ["write"] }, { "AccessTokenHeader": ["write"] }, { "AccessTokenQueryParam": ["write"] } ], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" } ], "responses": { "204": { "description": "成功", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/posts/{post_number}/watchers": { "get": { "summary": "Watchしたユーザー一覧を取得する", "description": "指定された記事にWatchをしたユーザ一覧を取得します。", "operationId": "getWatchers", "tags": ["watch", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/postNumber" }, { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedWatchers" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/stats": { "get": { "summary": "チームの統計情報を取得する", "operationId": "getTeamStats", "tags": ["team", "esa"], "parameters": [{ "$ref": "#/components/parameters/teamName" }], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamStats" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/teams/{team_name}/tags": { "get": { "summary": "タグ一覧をタグ付けされた記事数の降順で取得する", "operationId": "getTags", "tags": ["tag", "esa"], "parameters": [ { "$ref": "#/components/parameters/teamName" }, { "$ref": "#/components/parameters/paginationPage" }, { "$ref": "#/components/parameters/paginationPerPage" } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedTags" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } }, "/user": { "get": { "summary": "認証中のユーザーを取得する", "description": "現在のアクセストークンで認証中のユーザーの情報を取得します。", "operationId": "getAuthenticatedUser", "tags": ["user", "esa"], "parameters": [ { "name": "include", "description": "teams を指定すると所属するチームの配列を含んだレスポンスを返します。", "in": "query", "schema": { "type": "string", "enum": ["teams"] } } ], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticatedUser" } } }, "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" } } } } } } }, "components": { "schemas": { "AuthenticatedUser": { "title": "AuthenticatedUser", "description": "現在のアクセストークンで認証中のユーザの情報を表します。", "type": "object", "properties": { "id": { "type": "integer", "description": "サービス内で一意なユーザIDです", "example": 1 }, "name": { "type": "string", "description": "ユーザの名前です", "example": "Atsuo Fukaya" }, "screen_name": { "type": "string", "description": "ユーザのスクリーンネームです", "example": "fukayatsu" }, "created_at": { "type": "string", "description": "ユーザの作成日時です", "format": "date-time", "example": "2014-05-10T11:50:07+09:00" }, "updated_at": { "type": "string", "description": "ユーザの更新日時です", "format": "date-time", "example": "2016-04-17T12:35:16+09:00" }, "icon": { "type": "string", "description": "ユーザのアイコンのURLです", "format": "url", "example": "https://img.esa.io/uploads/production/users/1/icon/thumb_m_402685a258cf2a33c1d6c13a89adec92.png" }, "email": { "type": "string", "description": "ユーザのemailアドレスです", "format": "email", "example": "fukayatsu@esa.io" }, "teams": { "type": "array", "description": "所属するチームです", "items": { "$ref": "#/components/schemas/Team" } } }, "required": [ "id", "name", "screen_name", "created_at", "updated_at", "icon", "email" ] }, "BatchMoveOptions": { "title": "BatchMoveOptions", "description": "", "type": "object", "properties": { "from": { "type": "string", "description": "変更元のカテゴリです", "example": "/foo/bar/" }, "to": { "type": "string", "description": "変更先のカテゴリです", "example": "/baz/" } }, "required": ["from", "to"] }, "BatchMoveResult": { "title": "BatchMoveResult", "description": "", "type": "object", "properties": { "from": { "type": "string", "description": "変更元のカテゴリです", "example": "/foo/bar/" }, "to": { "type": "string", "description": "変更先のカテゴリです", "example": "/baz/" }, "count": { "type": "integer", "description": "サブカテゴリを含む変更されたカテゴリの数を表します", "example": 3 } }, "required": ["from", "to", "count"] }, "Comment": { "title": "Comment", "description": "ユーザが作成したコメントを表します。", "type": "object", "properties": { "id": { "type": "integer", "description": "コメントを一意に識別するIDです" }, "body_md": { "type": "string", "description": "Markdownで書かれたコメントの本文です" }, "body_html": { "type": "string", "description": "HTMLに変換されたコメントの本文です" }, "created_at": { "type": "string", "format": "date-time", "description": "コメントが作成された日時です" }, "updated_at": { "type": "string", "format": "date-time", "description": "コメントが更新された日時です" }, "post_number": { "type": "integer", "description": "" }, "url": { "type": "string", "format": "url", "description": "コメントのpermalinkです" }, "created_by": { "allOf": [{ "$ref": "#/components/schemas/User" }], "description": "コメントを作成したユーザです" }, "stargazers_count": { "type": "integer", "description": "コメントにStarをしている人数を表します" }, "star": { "type": "boolean", "description": "ユーザーがコメントをStarしているかどうかを表します" }, "stargazers": { "type": "array", "description": "コメントにStarをしたユーザ一覧です", "items": { "$ref": "#/components/schemas/Stargazer" } } }, "required": [ "id", "body_md", "body_html", "created_at", "updated_at", "post_number", "url", "created_by", "stargazers_count", "star" ] }, "CreateCommentBody": { "title": "CreateCommentBody", "type": "object", "properties": { "comment": { "$ref": "#/components/schemas/NewComment" } }, "required": ["comment"] }, "CreateEmojiBody": { "title": "CreateEmojiBody", "description": "新たに登録する絵文字を表します。", "type": "object", "properties": { "emoji": { "$ref": "#/components/schemas/NewEmoji" } }, "required": ["emoji"] }, "CreatePostBody": { "title": "CreatePostBody", "description": "新たに投稿する記事を含んだリクエストボディです。", "type": "object", "properties": { "post": { "$ref": "#/components/schemas/NewPost" } }, "required": ["post"] }, "CreatedEmoji": { "title": "CreatedEmoji", "description": "新たに登録された絵文字を表します", "type": "object", "properties": { "code": { "type": "string", "description": "絵文字を入力する際に使うコードです", "example": "team_emoji" } }, "required": ["code"] }, "EditPost": { "title": "EditPost", "type": "object", "properties": { "name": { "type": "string", "description": "記事のタイトル\n\n- タイトル自体に`#`を含めたい場合は`#`, `/`を含めたい場合は`/`へそれぞれ置換処理をお願いします。", "example": "hi!" }, "body_md": { "type": "string", "description": "Markdownで書かれた記事の本文です", "example": "# Getting Started" }, "tags": { "type": "array", "description": "記事に紐付けられたタグです。", "items": { "type": "string" }, "example": ["api", "dev"] }, "category": { "type": "string", "nullable": true, "description": "記事が属するカテゴリです\n\n設定されていない場合は`null`になります", "example": "日報/2015/05/09" }, "wip": { "type": "boolean", "description": "記事がWIP(Working In Progress)状態かどうかを表します。", "example": false, "default": true }, "message": { "type": "string", "description": "記事更新時の変更メモです。", "example": "Add Getting Started section" }, "created_by": { "type": "string", "description": "記事の投稿者\n\n- チームメンバーのscreen_nameもしくは \"esa_bot\" を指定することで記事の **作成者** を上書きすることができます。\n- このパラメータは **team の owner** だけ が使用することができます。", "example": "esa_bot" }, "updated_by": { "type": "string", "description": "記事の更新者\n\n- チームメンバーのscreen_nameもしくは \"esa_bot\" を指定することで記事の **更新者** を上書きすることができます。\n- このパラメータは **team の owner** だけ が使用することができます。", "example": "esa_bot" }, "original_revision": { "title": "OriginalRevision", "type": "object", "description": "リクエストに正常な `post.body_md` パラメータと `post.original_revision.*` パラメータが存在する場合、記事更新時に3 way mergeが行われます。original_revisionパラメータが存在しない場合は、変更は常に後勝ちになります。\n\n> [release_note/2014/12/23/記事保存時の自動マージ - docs.esa.io](https://docs.esa.io/posts/35)", "properties": { "body_md": { "type": "string", "description": "変更前の記事の本文です", "example": "# Getting Started" }, "number": { "type": "integer", "description": "変更前の記事のrevision_numberを指定します", "example": 1 }, "user": { "type": "string", "description": "変更前の記事の最終更新者のscreen_nameを指定します", "example": "esa_bot" } }, "required": ["body_md", "number", "user"] } } }, "Emoji": { "title": "Emoji", "description": "絵文字を表します", "type": "object", "properties": { "code": { "type": "string", "description": "絵文字を入力する際に使うコードです", "example": "grinning" }, "aliases": { "type": "array", "description": "絵文字に対するエイリアスコードです", "items": { "type": "string" }, "example": ["grinning"] }, "category": { "type": "string", "description": "絵文字のカテゴリです\n\nカスタム絵文字は`Custom`です。", "example": "People" }, "url": { "type": "string", "format": "url", "description": "絵文字の画像URLです", "example": "https://assets.esa.io/images/emoji/unicode/1f600.png" } }, "required": ["code", "aliases", "category", "url"] }, "EmojiList": { "title": "EmojiList", "description": "絵文字のリストを表します", "type": "object", "properties": { "emojis": { "type": "array", "items": { "$ref": "#/components/schemas/Emoji" } } }, "required": ["emojis"] }, "Invitation": { "title": "Invitation", "description": "Emailによる招待を表します。", "type": "object", "properties": { "email": { "type": "string", "format": "email", "description": "招待したEメールアドレスです", "example": "foo@example.com" }, "code": { "type": "string", "description": "招待の識別子です\n\n削除時に利用します", "example": "mee93383edf699b525e01842d34078e28" }, "expires_at": { "type": "string", "format": "date-time", "description": "招待の有効期限です", "example": "2017-08-17T12:00:41+09:00" }, "url": { "type": "string", "format": "url", "description": "招待されたメンバーがチームへ参加する際に使うURLです", "example": "https://docs.esa.io/team/invitations/mee93383edf699b525e01842d34078e28/join" } }, "required": ["email", "code", "expires_at", "url"] }, "InvitationList": { "title": "InvitationList", "description": "Emailによる招待のリストを表します", "type": "object", "properties": { "invitations": { "type": "array", "items": { "$ref": "#/components/schemas/Invitation" } } }, "required": ["invitations"] }, "InviteBody": { "title": "InviteBody", "description": "招待したいメンバーのEメールアドレスを表します", "type": "object", "properties": { "member": { "title": "EmailsToInvite", "type": "object", "properties": { "emails": { "type": "array", "description": "招待したいメンバーのEメールアドレスです", "items": { "type": "string", "format": "email" }, "example": ["foo@example.com", "bar@example.com"] } }, "required": ["emails"] } }, "required": ["member"] }, "Member": { "title": "Member", "description": "チームのメンバーを表します。", "type": "object", "properties": { "myself": { "type": "boolean", "description": "自分自身であるかどうかのフラグです。", "example": true }, "name": { "type": "string", "description": "メンバーの名前です", "example": "Atsuo Fukaya" }, "screen_name": { "type": "string", "description": "メンバーのスクリーンネームです", "example": "fukayatsu" }, "icon": { "type": "string", "format": "url", "description": "メンバーのアイコンのURLです", "example": "https://img.esa.io/uploads/production/users/1/icon/thumb_m_402685a258cf2a33c1d6c13a89adec92.png" }, "role": { "type": "string", "enum": ["owner", "member"], "description": "メンバーのロール(owner, member)です。", "example": "owner" }, "posts_count": { "type": "integer", "description": "チーム内でメンバーが作成した記事数です", "example": 222 }, "joined_at": { "type": "string", "format": "date-time", "description": "チームにメンバーが参加した日時です", "example": "2014-07-01T08:10:55+09:00" }, "last_accessed_at": { "type": "string", "format": "date-time", "description": "チームにメンバーがアクセスした最後の日時です", "example": "2019-12-27T16:23:23+09:00" }, "email": { "type": "string", "format": "email", "description": "メンバーのemailです。このフィールドは team の owner だけが取得可能です", "example": "fukayatsu@esa.io" } }, "required": [ "myself", "name", "screen_name", "icon", "role", "posts_count", "joined_at", "last_accessed_at" ] }, "NewComment": { "title": "NewComment", "type": "object", "properties": { "body_md": { "type": "string" }, "user": { "type": "string", "description": "コメントの投稿者\n\n- チームメンバーのscreen_nameもしくは \"esa_bot\" を指定することでコメントの投稿者を上書きすることができます。\n- このパラメータは **team の owner** だけ が使用することができます。", "example": "esa_bot" } }, "required": ["body_md"] }, "NewEmoji": { "title": "NewEmoji", "type": "object", "properties": { "code": { "type": "string", "description": "登録したい絵文字のコードです。絵文字を入力する際の両端の**:**を含めずに指定して下さい。", "example": "team_emoji" }, "origin_code": { "type": "string", "description": "既に登録されている絵文字に対するエイリアス絵文字を作成する際に指定して下さい。" }, "image": { "type": "string", "format": "binary", "description": "絵文字の画像データです。\n\n- BASE64でencodeしたStringを指定して下さい。\n- 新しい絵文字を作成する場合に指定して下さい。エイリアス絵文字を作成する際には不要です。\n- 画像の条件\n - 64KB以下\n - 128px x 128px以上\n - GIF or PNG", "example": "BASE64 String" } }, "required": ["code"] }, "NewPost": { "title": "NewPost", "description": "新たに投稿する記事を表します。", "type": "object", "properties": { "name": { "type": "string", "description": "記事のタイトル\n\n- タイトル自体に`#`を含めたい場合は`#`, `/`を含めたい場合は`/`へそれぞれ置換処理をお願いします。", "example": "hi!" }, "body_md": { "type": "string", "description": "Markdownで書かれた記事の本文です", "example": "# Getting Started" }, "tags": { "type": "array", "description": "記事に紐付けられたタグです。", "items": { "type": "string" }, "example": ["api", "dev"] }, "category": { "type": "string", "nullable": true, "description": "記事が属するカテゴリです\n\n設定されていない場合は`null`になります", "example": "日報/2015/05/09" }, "wip": { "type": "boolean", "description": "記事がWIP(Working In Progress)状態かどうかを表します。", "example": false, "default": true }, "message": { "type": "string", "description": "記事更新時の変更メモです。", "example": "Add Getting Started section" }, "user": { "type": "string", "description": "記事の投稿者\n\n- チームメンバーのscreen_nameもしくは \"esa_bot\" を指定することで記事の投稿者を上書きすることができます。\n- このパラメータは **team の owner** だけ が使用することができます。", "example": "esa_bot" }, "template_post_id": { "type": "integer", "description": "チーム内のテンプレート記事のID(URLのこの部分: /posts/**{id}**)を指定すると、そのテンプレートが適用された**name**と**body**を持つ記事を作成することが出来ます。", "example": 2 } }, "required": ["name"] }, "NewStar": { "title": "NewStar", "description": "新たにStarする内容を表します。", "type": "object", "properties": { "body": { "type": "string", "description": "引用Starの本文です。", "example": "foo bar" } } }, "PaginatedComments": { "title": "PaginatedComments", "type": "object", "properties": { "comments": { "type": "array", "description": "Commentのリスト", "items": { "$ref": "#/components/schemas/Comment" } }, "prev_page": { "type": "integer", "nullable": true, "description": "1つ前のpage番号。存在しない場合はnull", "example": null }, "next_page": { "type": "integer", "nullable": true, "description": "1つ先のpage番号。存在しない場合はnull", "example": 2 }, "total_count": { "type": "integer", "description": "リソースの総数", "example": 30 }, "page": { "type": "integer", "description": "現在のページ番号", "example": 1 }, "per_page": { "type": "integer", "description": "1ページあたりに含まれる要素数", "example": 20 }, "max_per_page": { "type": "integer", "description": "per_pageに指定可能な数の最大値", "example": 100 } }, "required": [ "comments", "prev_page", "next_page", "total_count", "page", "per_page", "max_per_page" ] }, "PaginatedMembers": { "title": "PaginatedMembers", "type": "object", "properties": { "members": { "type": "array", "description": "Memberのリスト", "items": { "$ref": "#/components/schemas/Member" } }, "prev_page": { "type": "integer", "nullable": true, "description": "1つ前のpage番号。存在しない場合はnull", "example": null }, "next_page": { "type": "integer", "nullable": true, "description": "1つ先のpage番号。存在しない場合はnull", "example": 2 }, "total_count": { "type": "integer", "description": "リソースの総数", "example": 30 }, "page": { "type": "integer", "description": "現在のページ番号", "example": 1 }, "per_page": { "type": "integer", "description": "1ページあたりに含まれる要素数", "example": 20 }, "max_per_page": { "type": "integer", "description": "per_pageに指定可能な数の最大値", "example": 100 } }, "required": [ "members", "prev_page", "next_page", "total_count", "page", "per_page", "max_per_page" ] }, "PaginatedPosts": { "title": "PaginatedPosts", "type": "object", "properties": { "posts": { "type": "array", "description": "Postのリスト", "items": { "$ref": "#/components/schemas/Post" } }, "prev_page": { "type": "integer", "nullable": true, "description": "1つ前のpage番号。存在しない場合はnull", "example": null }, "next_page": { "type": "integer", "nullable": true, "description": "1つ先のpage番号。存在しない場合はnull", "example": 2 }, "total_count": { "type": "integer", "description": "リソースの総数", "example": 30 }, "page": { "type": "integer", "description": "現在のページ番号", "example": 1 }, "per_page": { "type": "integer", "description": "1ページあたりに含まれる要素数", "example": 20 }, "max_per_page": { "type": "integer", "description": "per_pageに指定可能な数の最大値", "example": 100 } }, "required": [ "posts", "prev_page", "next_page", "total_count", "page", "per_page", "max_per_page" ] }, "PaginatedStargazers": { "title": "PaginatedStargazers", "type": "object", "properties": { "stargazers": { "type": "array", "description": "Stargazerのリスト", "items": { "$ref": "#/components/schemas/Stargazer" } }, "prev_page": { "type": "integer", "nullable": true, "description": "1つ前のpage番号。存在しない場合はnull", "example": null }, "next_page": { "type": "integer", "nullable": true, "description": "1つ先のpage番号。存在しない場合はnull", "example": 2 }, "total_count": { "type": "integer", "description": "リソースの総数", "example": 30 }, "page": { "type": "integer", "description": "現在のページ番号", "example": 1 }, "per_page": { "type": "integer", "description": "1ページあたりに含まれる要素数", "example": 20 }, "max_per_page": { "type": "integer", "description": "per_pageに指定可能な数の最大値", "example": 100 } }, "required": [ "stargazers", "prev_page", "next_page", "total_count", "page", "per_page", "max_per_page" ] }, "PaginatedTags": { "title": "PaginatedTags", "type": "object", "properties": { "tags": { "type": "array", "description": "Tagのリスト", "items": { "$ref": "#/components/schemas/Tag" } }, "prev_page": { "type": "integer", "nullable": true, "description": "1つ前のpage番号。存在しない場合はnull", "example": null }, "next_page": { "type": "integer", "nullable": true, "description": "1つ先のpage番号。存在しない場合はnull", "example": 2 }, "total_count": { "type": "integer", "description": "リソースの総数", "example": 30 }, "page": { "type": "integer", "description": "現在のページ番号", "example": 1 }, "per_page": { "type": "integer", "description": "1ページあたりに含まれる要素数", "example": 20 }, "max_per_page": { "type": "integer", "description": "per_pageに指定可能な数の最大値", "example": 100 } }, "required": [ "tags", "prev_page", "next_page", "total_count", "page", "per_page", "max_per_page" ] }, "PaginatedTeams": { "title": "PaginatedTeams", "type": "object", "properties": { "teams": { "type": "array", "description": "Teamのリスト", "items": { "$ref": "#/components/schemas/Team" } }, "prev_page": { "type": "integer", "nullable": true, "description": "1つ前のpage番号。存在しない場合はnull", "example": null }, "next_page": { "type": "integer", "nullable": true, "description": "1つ先のpage番号。存在しない場合はnull", "example": 2 }, "total_count": { "type": "integer", "description": "リソースの総数", "example": 30 }, "page": { "type": "integer", "description": "現在のページ番号", "example": 1 }, "per_page": { "type": "integer", "description": "1ページあたりに含まれる要素数", "example": 20 }, "max_per_page": { "type": "integer", "description": "per_pageに指定可能な数の最大値", "example": 100 } }, "required": [ "teams", "prev_page", "next_page", "total_count", "page", "per_page", "max_per_page" ] }, "PaginatedWatchers": { "title": "PaginatedWatchers", "type": "object", "properties": { "watchers": { "type": "array", "description": "Watcherのリスト", "items": { "$ref": "#/components/schemas/Watcher" } }, "prev_page": { "type": "integer", "nullable": true, "description": "1つ前のpage番号。存在しない場合はnull", "example": null }, "next_page": { "type": "integer", "nullable": true, "description": "1つ先のpage番号。存在しない場合はnull", "example": 2 }, "total_count": { "type": "integer", "description": "リソースの総数", "example": 30 }, "page": { "type": "integer", "description": "現在のページ番号", "example": 1 }, "per_page": { "type": "integer", "description": "1ページあたりに含まれる要素数", "example": 20 }, "max_per_page": { "type": "integer", "description": "per_pageに指定可能な数の最大値", "example": 100 } }, "required": [ "watchers", "prev_page", "next_page", "total_count", "page", "per_page", "max_per_page" ] }, "Post": { "title": "Post", "description": "ユーザが作成した記事を表します。", "type": "object", "properties": { "number": { "type": "integer", "description": "チーム内で記事を特定するためのIDです", "example": 123 }, "name": { "type": "string", "description": "記事名です。タグやカテゴリー部分は含みません。", "example": "hi!" }, "full_name": { "type": "string", "description": "カテゴリとタグを含む、記事名です。", "example": "日報/2015/05/09/hi! #api #dev" }, "wip": { "type": "boolean", "description": "記事がWIP(Working In Progress)状態かどうかを表します。", "example": true }, "body_md": { "type": "string", "description": "Markdownで書かれた記事の本文です", "example": "# Getting Started" }, "body_html": { "type": "string", "description": "HTMLに変換された記事の本文です。", "example": "

Getting Started

" }, "created_at": { "type": "string", "format": "date-time", "description": "記事が作成された日時です", "example": "2014-05-10T12:08:55+09:00" }, "message": { "type": "string", "description": "記事更新時の変更メモです。", "example": "Add Getting Started section" }, "url": { "type": "string", "format": "url", "description": "記事のURLです。", "example": "https://docs.esa.io/posts/1" }, "updated_at": { "type": "string", "format": "date-time", "description": "記事が更新された日時です。", "example": "2014-05-11T19:21:00+09:00" }, "tags": { "type": "array", "description": "記事に紐付けられたタグです。", "items": { "type": "string" }, "example": ["api", "dev"] }, "category": { "type": "string", "nullable": true, "description": "記事が属するカテゴリです\n\n設定されていない場合は`null`になります", "example": "日報/2015/05/09" }, "revision_number": { "type": "integer", "description": "記事のリビジョン番号です。", "example": 47 }, "created_by": { "allOf": [{ "$ref": "#/components/schemas/User" }], "description": "記事を作成したユーザを表します。" }, "updated_by": { "allOf": [{ "$ref": "#/components/schemas/User" }], "description": "記事を最後に更新したユーザを表します。" }, "kind": { "type": "string", "enum": ["stock", "flow"], "description": "記事の種別を表します", "example": "flow" }, "comments_count": { "type": "integer", "description": "記事へのコメント数を表します", "example": 1 }, "tasks_count": { "type": "integer", "description": "記事中のタスクの総数を表します", "example": 1 }, "done_tasks_count": { "type": "integer", "description": "記事中の完了済みのタスクの総数を表します", "example": 1 }, "stargazers_count": { "type": "integer", "description": "記事にStarをしている人数を表します", "example": 1 }, "watchers_count": { "type": "integer", "description": "記事をWatchしている人数を表します", "example": 1 }, "star": { "type": "boolean", "description": "ユーザーが記事をStarしているかどうかを表します", "example": true }, "watch": { "type": "boolean", "description": "ユーザーが記事をWatchしているかどうかを表します", "example": true }, "sharing_urls": { "title": "SharingUrls", "type": "object", "description": "外部公開のURLです。外部公開が有効になっていない場合`null`になります。", "nullable": true, "properties": { "html": { "type": "string", "description": "HTMLページのURLです。", "example": "https://esa-pages.io/p/sharing/11666/posts/2/1c6cad6275b311d53dbe.html" }, "slides": { "type": "string", "description": "スライドページのURLです。", "example": "https://esa-pages.io/p/sharing/11666/posts/2/1c6cad6275b311d53dbe-slides.html" } }, "required": ["html", "slides"] }, "comments": { "type": "array", "description": "記事のコメント一覧を更新日の降順で返却します。", "items": { "$ref": "#/components/schemas/Comment" } }, "stargazers": { "type": "array", "description": "指定された記事にStarをしたユーザ一覧です", "items": { "$ref": "#/components/schemas/Stargazer" } } }, "required": [ "number", "name", "full_name", "wip", "body_md", "body_html", "created_at", "message", "kind", "comments_count", "tasks_count", "done_tasks_count", "url", "updated_at", "tags", "category", "revision_number", "created_by", "updated_by", "stargazers_count", "watchers_count", "star", "watch", "sharing_urls" ] }, "Stargazer": { "title": "Stargazer", "description": "記事にStarをしている人", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "description": "Starをした日時です。", "example": "2016-05-05T11:40:54+09:00" }, "body": { "type": "string", "nullable": true, "description": "引用Starの本文です。", "example": null }, "user": { "allOf": [{ "$ref": "#/components/schemas/User" }], "description": "Starをしたユーザです。" } }, "required": ["created_at", "body", "user"] }, "Tag": { "title": "Tag", "description": "記事のタグ", "type": "object", "properties": { "name": { "type": "string", "description": "タグ名です。", "example": "markdown" }, "posts_count": { "type": "integer", "description": "タグ付けされた記事数です。", "example": 1 } }, "required": ["name", "posts_count"] }, "Team": { "title": "Team", "description": "esa上で所属しているチームを表します。", "type": "object", "properties": { "name": { "type": "string", "description": "チームを特定するための一意なIDです。サブドメインになります。", "example": "docs" }, "privacy": { "type": "string", "enum": ["closed", "open"], "description": "チームの公開範囲です。closed: \"チームメンバーだけが情報にアクセスできます。open: \"ShipItされた記事はインターネット上に公開されます。\"", "example": "closed" }, "description": { "type": "string", "description": "チームの説明です。登録がない場合には空文字列(\"\")になります。", "example": "esa.io official documents" }, "icon": { "type": "string", "format": "url", "description": "チームのアイコンです。", "example": "https://img.esa.io/uploads/production/teams/105/icon/thumb_m_0537ab827c4b0c18b60af6cdd94f239c.png" }, "url": { "type": "string", "format": "url", "description": "チームのURLです。", "example": "https://docs.esa.io/" } }, "required": ["name", "privacy", "description", "icon", "url"] }, "TeamStats": { "title": "TeamStats", "description": "チームの統計情報を表します。", "type": "object", "properties": { "members": { "type": "integer", "description": "チーム内のメンバーの総数です", "example": 20 }, "posts": { "type": "integer", "description": "チーム内の記事の総数です", "example": 1959 }, "posts_wip": { "type": "integer", "description": "チーム内の記事(wip)の総数です", "example": 59 }, "posts_shipped": { "type": "integer", "description": "チーム内の記事(shipped)の総数です", "example": 1900 }, "comments": { "type": "integer", "description": "チーム内の記事につけられたコメントの総数です", "example": 2695 }, "stars": { "type": "integer", "description": "チーム内の記事につけられたスターの総数です", "example": 3115 }, "daily_active_users": { "type": "integer", "description": "過去24時間以内に記事の新規投稿/更新・コメント・Star等の活動を行ったメンバー数です。", "example": 8 }, "weekly_active_users": { "type": "integer", "description": "過去7日間以内にに記事の新規投稿/更新・コメント・Star等の活動を行ったメンバー数です。", "example": 14 }, "monthly_active_users": { "type": "integer", "description": "過去30日間以内にに記事の新規投稿/更新・コメント・Star等の活動を行ったメンバー数です。", "example": 15 } }, "required": [ "members", "posts", "posts_wip", "posts_shipped", "comments", "stars", "daily_active_users", "weekly_active_users", "monthly_active_users" ] }, "updateCommentBody": { "title": "updateCommentBody", "type": "object", "properties": { "comment": { "title": "EditComment", "type": "object", "properties": { "body_md": { "type": "string" }, "user": { "type": "string", "description": "コメントの投稿者\n\n- チームメンバーのscreen_nameもしくは \"esa_bot\" を指定することでコメントの投稿者を上書きすることができます。\n- このパラメータは **team の owner** だけ が使用することができます。", "example": "esa_bot" } } } }, "required": ["comment"] }, "UpdatePostBody": { "title": "UpdatePostBody", "description": "記事の更新内容を表します。", "type": "object", "properties": { "post": { "$ref": "#/components/schemas/EditPost" } }, "required": ["post"] }, "User": { "title": "User", "description": "記事を作成したユーザ、記事を最後に更新したユーザ、コメントを作成したユーザ、スターをしたユーザなどを表します。", "type": "object", "properties": { "myself": { "type": "boolean", "description": "自分自身であるかどうかのフラグです。", "example": true }, "name": { "type": "string", "description": "ユーザ名です。", "example": "Atsuo Fukaya" }, "screen_name": { "type": "string", "description": "ユーザを一意に識別するIDです。", "example": "fukayatsu" }, "icon": { "type": "string", "format": "url", "description": "ユーザのアイコンのURLです。", "example": "http://img.esa.io/uploads/production/users/1/icon/thumb_m_402685a258cf2a33c1d6c13a89adec92.png" } }, "required": ["myself", "name", "screen_name", "icon"] }, "Watcher": { "title": "Watcher", "description": "記事をWatchしているユーザーを表します。", "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "description": "Watchをした日時です。", "example": "2014-05-10T12:08:55+09:00" }, "user": { "allOf": [{ "$ref": "#/components/schemas/User" }], "description": "Watchをしたユーザです。" } }, "required": ["created_at", "user"] } }, "responses": {}, "parameters": { "paginationPage": { "name": "page", "in": "query", "description": "ページ番号", "schema": { "type": "integer", "example": 1 } }, "paginationPerPage": { "name": "per_page", "in": "query", "description": "1ページあたりに含まれる要素数", "schema": { "type": "integer", "example": 100 } }, "commentId": { "name": "comment_id", "in": "path", "description": "コメントID", "required": true, "schema": { "type": "integer", "example": 1 } }, "includeCommentsAndStargazers": { "name": "include", "in": "query", "description": "- `comments` を指定するとコメントの配列を含んだレスポンスを返します。\n- `comments,comments.stargazers`を指定するとコメントとコメントに対するStarの配列を含んだレスポンスを返します。\n- `stargazers` を指定するとStarの配列を含んだレスポンスを返します。\n- `stargazers,comments` のように `,` で区切ることで複数指定できます", "schema": { "type": "array", "items": { "type": "string", "enum": ["comments", "comments.stargazers", "stargazers"] } }, "style": "form", "explode": false }, "order": { "name": "order", "in": "query", "schema": { "type": "string", "enum": ["asc", "desc"] }, "description": "設定可能な値:\n\n- `desc`: 降順 (default)\n- `asc`: 昇順" }, "postNumber": { "name": "post_number", "in": "path", "description": "記事ID", "required": true, "schema": { "type": "integer", "example": 1 } }, "teamName": { "name": "team_name", "in": "path", "description": "チーム名", "required": true, "schema": { "type": "string", "example": "docs" } } }, "examples": {}, "requestBodies": {}, "headers": { "X-RateLimit-Limit": { "description": "ユーザ毎に15分間に75リクエストまで受け付けます。", "schema": { "type": "integer" }, "required": true, "example": 75 }, "X-RateLimit-Remaining": { "description": "残りのリクエスト数", "schema": { "type": "integer" }, "required": true, "example": 73 }, "X-RateLimit-Reset": { "description": "利用制限が解除される日時のUnixタイムスタンプ", "schema": { "type": "integer" }, "required": true, "example": 1491543000 } }, "securitySchemes": { "OAuth2": { "type": "oauth2", "description": "", "flows": { "authorizationCode": { "authorizationUrl": "https://api.esa.io/oauth/authorize", "tokenUrl": "https://api.esa.io/oauth/token", "scopes": { "read": "Read your profile (include email address). Read resources in your teams (Posts, Comments, Members, etc)", "write": "Write resources in your teams (Posts, Comments, Members, etc)" } } } }, "AccessTokenHeader": { "type": "http", "scheme": "bearer", "description": "アクセストークンは、以下のようにリクエストヘッダに含められます。\n\n```\nAuthorization: Bearer 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\n```" }, "AccessTokenQueryParam": { "type": "apiKey", "in": "query", "name": "access_token", "description": "また、URIクエリ文字列として指定することも可能です。\n\n```\napi.esa.io/v1/teams?access_token=1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\n```" } }, "links": {}, "callbacks": {} }, "tags": [ { "name": "esa", "description": "", "x-displayName": " ", "x-traitTag": true }, { "name": "category", "description": "記事のカテゴリの管理を行うAPIです。", "x-displayName": "カテゴリ" }, { "name": "comment", "description": "記事のコメントの投稿や取得などを行うAPIです。", "x-displayName": "コメント" }, { "name": "emoji", "description": "絵文字の管理を行うAPIです。", "x-displayName": "絵文字" }, { "name": "invitation", "description": "メンバーの招待を行うAPIです。", "x-displayName": "招待" }, { "name": "member", "description": "メンバーの管理を行うAPIです。", "x-displayName": "メンバー" }, { "name": "post", "description": "記事の投稿や取得などを行うAPIです。", "x-displayName": "記事" }, { "name": "star", "description": "記事やコメントのStarに関するAPIです。", "x-displayName": "Star" }, { "name": "tag", "description": "記事のタグに関するAPIです。", "x-displayName": "タグ" }, { "name": "team", "description": "所属するチームに関するAPIです。", "x-displayName": "チーム" }, { "name": "user", "description": "認証中のユーザーを参照するAPIです。", "x-displayName": "ユーザー" }, { "name": "watch", "description": "記事のWatchに関するAPIです。", "x-displayName": "Watch" } ], "servers": [{ "url": "https://api.esa.io/v1" }], "externalDocs": { "description": "esa API v1公式ドキュメント", "url": "https://docs.esa.io/posts/102" }, "security": [ { "AccessTokenHeader": ["read"] }, { "AccessTokenQueryParam": ["read"] }, { "OAuth2": ["read"] } ] }