openapi: "3.0.0" info: description: | [Annofab](https://annofab.com) のWeb APIです。 キャッシュが有効になって[大幅に高速化された v2 はこちら](/docs/api/v2/) です。 APIベースURL: https://annofab.com/api/v1
例) /projects というAPIを使う場合、 https://annofab.com/api/v1/projects をリクエストします。 ■APIの変更ポリシー **現在、APIは開発途上版です。予告なく互換性のない変更がある可能性をご了承ください。** ご要望の実現、あるいは、セキュリティやパフォーマンスの改善などを実現するにあたり、互換性のない変更が必要になる場合があります。 その場合、開発途上版では開発リソースを改善に集中するため、古いバージョンを共存させずに互換性のない変更を行う場合があります。 ■機能の要望や不具合報告 「こんな機能が欲しい」というご要望や、「APIが予期せぬ動作をする」といった不具合報告などは、[こちらのお問い合わせフォーム](https://docs.google.com/forms/d/e/1FAIpQLSePryikS_wo_H11pxL2ewUe2d0ud0jxZlBQwH2rVVfcifKyQw/viewform)からご連絡ください。 # SDKとツール * [annofab-api-python-client](https://github.com/kurusugawa-computer/annofab-api-python-client):AnnofabのPython SDKです。 * [annofab-cli](https://github.com/kurusugawa-computer/annofab-cli):AnnofabのCLIです。 # API Convention ## 用語 * **属性○○○を必須**とは、「JSONに属性キー○○○を含め、かつ、その値が`null`以外」であること * **属性○○○を未指定**とは、「JSONに属性キー○○○を含めない」または「属性○○○のキーはあるが値は`null`」のどちらかであること ## 更新系APIのリクエストボディに必須の属性 * 更新系APIとは、HTTPメソッドが **PUT** または **POST** のAPIです。 * 更新系APIでは、更新対象の「リソースの最終更新日」を必須とする場合があります。 * これは、複数ユーザーからのAPIリクエストのデータ競合を避けるための、一般的なAPI設計慣習によるものです。 * ここで「リソースの最終更新日」とは、`last_updated_datetime` または `updated_datetime` という名前の属性です。 * 一部のAPIでは、操作対象リソースと別のリソースの最終更新日を必要とします。 その場合は、`last_***_update_datetime` のような名前です(***には別リソースが入ります)。 * **新規作成のとき**は、リクエストボディの「リソースの最終更新日」を未指定にします。 * リソースがすでに作成されているときは、新規作成リクエストは失敗します。 * **存在するリソースを更新または削除するとき**は、リクエストボディの「リソースの最終更新日」に、そのリソースの現在の`updated_datetime`を指定します。 * 更新しようとしたリソースが存在しないとき、またはすでに更新されているときは、更新リクエストは失敗します。 * 「リソースの最終更新日」以外の属性については、新規作成/更新それぞれで必須が異なる場合、API個別に特筆されています。 ## APIのリクエストボディに指定する _type 属性について * 一部のAPIではリクエストボディに `_type` 属性を指定することができます。 * `_type` 属性を指定する場合は、`_type` 属性で指定された型にデコードします。 例えば、`_type` 属性に `ByDirectory` を指定すると `TaskGenerateRuleByDirectory` にデコードされ、`Polyline` を指定すると `InspectionDataPolyline` にデコードされます。 リクエストボディが誤っている場合はエラーになります。 * 必須でない `_type` 属性を指定しない場合は、リクエストボディで指定された `_type` 以外の属性からデコードすべき型を推論します。適切な型が見つからない場合はエラーになります。 * `_type` 属性は「推論が失敗して別の型にデコードされる」ことを防ぐために指定することを推奨します。 ## APIに指定するID/名前の制約 * APIで使用する各データのIDに使用できる文字種は次の通りです。 * 半角英数字 * `_` (アンダースコア) * `-` (ハイフン) * `.` (ドット) * 特に制限がない限り、IDはUUID version4形式とすることを推奨します。 * 例) `b048c6b3-b36f-4c8d-97ea-96828a50a44c` * 各データのIDは、以下のように特定のデータに対して一意な値である必要があります。 ID/名前 | 一意制約 ---|--- 組織名 | Annofab内で一意 組織ID | Annofab内で一意 ユーザーID | Annofab内で一意 アカウントID | Annofab内で一意 プロジェクトID | Annofab内で一意 タスクID(プレフィックス含む) | プロジェクト内で一意 入力データID | プロジェクト内で一意 アノテーションID | フレーム内(タスクID、入力データIDの組み合わせ)で一意 検査ID | プロジェクト内で一意 補助情報ID | プロジェクト内で一意 WebhookID | プロジェクト内で一意 作業ガイド画像ID | プロジェクト内で一意 ラベルID | プロジェクト内で一意 属性ID | プロジェクト内で一意 選択肢ID | 属性内で一意 ジョブID | プロジェクト内で一意 入力データセットID | 組織内で一意 プラグインID | 組織内で一意 ## 検索結果の集約を表す AggregationResult いくつかの検索系 API の検索結果レスポンスは、`AggregationResult` というデータ構造のフィールドを持っています。 `AggregationResult` は、検索対象リソースをある観点で集約した結果を表します。 このような集約は、「検索結果を属性 XXX の件数別に分類」などするために使われます。 例えば、タスクを検索する API には、以下のような「タスクの現在担当者での集約 `account_id_count`」などの `AggregationResult` がいくつか含まれています。 ```json { "list": [ ... ], "aggregations": [ { "_type": "CountResult", "name": "account_id_count", "field": "account_id", "docCount": 15, "items": [ {"key":"c5eee002", "count":9, "aggregations":[], "_type":"..."}, {"key":"9f110e48", "count":5, "aggregations":[], "_type":"..."}, {"key":"b25dfeb3", "count":1, "aggregations":[], "_type":"..."} ] } ] } ``` 上記例 `account_id_count` は、タスクのフィールド `account_id` でタスクを分類したところ「`account_id` が `c5eee002` であるタスクが9件、`9f110e48` であるタスクが5件、`b25dfeb3` であるタスクが1件」だったという結果を表しています。 また、AggregationResultの集約の件数は、合計で10000件以下に制限されており、それを超える件数がある場合は上位10000件が取得されます。もし、省略された部分を取得したい場合は、検索条件を縛って結果に上る集約の数を減らしてください。 version: 0.186.0 title: Annofab Web API x-logo: url: "https://annofab.com/resource/images/logo_landscape.png" href: "https://annofab.com/" contact: url: "https://annofab.com/docs/forms/trouble-shooting.html" servers: - url: https://annofab.com/api/v1 tags: - name: af-annotation x-displayName: Annotation description: アノテーションに対する操作 - name: af-annotation-specs x-displayName: Annotation Specs description: アノテーション仕様に対する操作 - name: af-comment x-displayName: Comment description: コメントに対する操作 - name: af-input x-displayName: Input description: | 入力データに対する操作 入力データは、Annofabにファイルをアップロードして利用します。 プライベートストレージにあるファイルを補助情報として利用することも可能です(ただし[問い合わせ](https://annofab.com/docs/forms/contact-sales.html)が必要です)。 - name: af-inspection x-displayName: Inspection description: 検査コメントに対する操作 - name: af-instruction x-displayName: Instruction description: 作業ガイドに対する操作 - name: af-job x-displayName: Job description: バッチ処理ジョブに対する操作 - name: af-login x-displayName: Login description: ログイン関連の操作 - name: af-my x-displayName: My description: 自身のリソースに対する操作 - name: af-organization x-displayName: Organization description: 組織に対する操作 - name: af-organization-input x-displayName: Organization Input description: | 入力データセットと入力データに対する操作 **入力データセットに関するAPIは開発中のため、予告なく変更されることがあります。** **入力データセット**とは、プロジェクトが用いる入力データの集合です。入力データセットは組織に所属します。 現時点では入力データセットはプロジェクトを新規作成するごとに一つずつ作成されるようになっています。 将来的にプロジェクトの新規作成時に同じ組織の別のプロジェクトの入力データセットを指定して入力データを共有できるようにする機能のリリースを予定しています。 - name: af-organization-member x-displayName: Organization Member description: 組織メンバーに対する操作 - name: af-organization-plugin x-displayName: Organization Plugin description: | 組織で使用するプラグインに対する操作 **このAPIは Annofab に許可された組織だけで使用できます。またアルファ版につき、予告なく変更されることがあります。** - name: af-usage-status x-displayName: Organization Usage Status description: 利用状況に対する操作 - name: af-project x-displayName: Project description: プロジェクトに対する操作 - name: af-project-member x-displayName: Project Member description: プロジェクトメンバーに対する操作 - name: af-statistics x-displayName: Statistics description: 統計に関する操作 - name: af-supplementary x-displayName: Supplementary description: | 補助情報に対する操作です。 補助情報とは、アノテーションする対象となる[入力データ](#tag/af-input)では*ありません*が、 アノテーションするときに何らかの手がかりや文脈を与えるデータのことです。 例えば、次のようなものです。 * 現在の写真に対する、過去の写真 * 光学写真に対する、暗視写真 * 前方を撮影した写真に対する、左側面・右側面・後方の写真 * 写真や動画を撮影した日時、緯度経度、撮影者などのメタデータ(テキスト) 補助情報は入力データに紐付けられています。 補助情報は、Annofabにファイルをアップロードして利用します。 プライベートストレージにあるファイルを補助情報として利用することも可能です(ただし[問い合わせ](https://annofab.com/docs/forms/contact-sales.html)が必要です)。 - name: af-task x-displayName: Task description: タスクに対する操作 - name: af-webhook x-displayName: Webhook description: Webhookに対する操作 - name: x-annotation-zip x-displayName: Annotation ZIP description: | Annofabで作成したアノテーションは、元となった入力データ(画像や動画など)に対応する形で1ファイルのJSONとなります。 これらのJSONはZIP形式で圧縮され、一括で取得できます。 アノテーションZIPには、SimpleアノテーションとFullアノテーションの2種類があります。ただし、Fullアノテーションは非推奨です。 ## Simple Annotation ZIP [getAnnotationArchive](#operation/getAnnotationArchive) APIで取得できます。 ### ZIPファイル内の構造 ``` SimpleアノテーションZIP/ ├── {タスクID}/ │   ├── {入力データID}.json アノテーションのデータ │   ├── {入力データID}/ │   │   ├── {アノテーションデータID} 塗りつぶしのPNG画像 ``` ### アノテーションJSONデータの構造 ## Full Annotation ZIP Fullアノテーションに含まれるアノテーションJSONは、画像やアノテーションやアノテーション作成者など管理用の詳細情報が付随しています。 [getArchiveFullWithProId](#operation/getArchiveFullWithProId) APIで取得できます。 **Fullアノテーションは非推奨です。** ### ZIPファイル内の構造 ``` FullアノテーションZIP/ ├── {タスクID}/ │   ├── {入力データID}.json アノテーションのデータ │   ├── {入力データID}/ │   │   ├── {アノテーションデータID} 塗りつぶしのPNG画像 ``` ### アノテーションJSONデータの構造 - name: x-data-types x-displayName: Data Types description: | # Task # TaskHistory # TaskHistoryEvent # Inspection # InputDataType # Comment # TaskStatus # TaskPhase # AnnotationId # InputData # ProjectJobType # OrganizationJobType # GraphType # AnnotationQuery # ArrayOfLabelStatistics アノテーションラベルごとに以下の項目を集計したデータです。 * 受入が完了したアノテーション数 * 受入が完了していないアノテーション数 # AnnotationType # UserDefinedAnnotationTypeDefinition x-tagGroups: - name: API tags: - af-annotation - af-annotation-specs - af-comment - af-input - af-inspection - af-instruction - af-job - af-login - af-my - af-organization - af-organization-input - af-organization-member - af-organization-plugin - af-usage-status - af-project - af-project-member - af-statistics - af-supplementary - af-task - af-webhook - name: Appendix tags: - x-annotation-zip - x-data-types components: securitySchemes: EveryoneRequestBody: $ref: "swagger-api-components.yaml#/components/securitySchemes/EveryoneRequestBody" EveryoneQueryParameter: $ref: "swagger-api-components.yaml#/components/securitySchemes/EveryoneQueryParameter" Everyone: $ref: "swagger-api-components.yaml#/components/securitySchemes/Everyone" AnnofabAdminOnly: $ref: "swagger-api-components.yaml#/components/securitySchemes/AnnofabAdminOnly" AllProjectMember: $ref: "swagger-api-components.yaml#/components/securitySchemes/AllProjectMember" ProjectAccepter: $ref: "swagger-api-components.yaml#/components/securitySchemes/ProjectAccepter" ProjectDataUser: $ref: "swagger-api-components.yaml#/components/securitySchemes/ProjectDataUser" ProjectAccepterOrDataUser: $ref: "swagger-api-components.yaml#/components/securitySchemes/ProjectAccepterOrDataUser" ProjectOwner: $ref: "swagger-api-components.yaml#/components/securitySchemes/ProjectOwner" AllOrganizationMember: $ref: "swagger-api-components.yaml#/components/securitySchemes/AllOrganizationMember" OrganizationAdministrator: $ref: "swagger-api-components.yaml#/components/securitySchemes/OrganizationAdministrator" OrganizationOwner: $ref: "swagger-api-components.yaml#/components/securitySchemes/OrganizationOwner" paths: /login: post: tags: - af-login summary: ログイン description: | ログインして、APIの認証に必要なトークンを取得します。 なりすましなどの悪用を防ぐため、トークンは他人に教えたり外部に公開しないでください。 security: - EveryoneRequestBody: [] operationId: login requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/LoginRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/LoginResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /logout: post: tags: - af-login summary: ログアウト description: ログアウトします。 security: - EveryoneRequestBody: [] operationId: logout requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Token" responses: "200": $ref: "swagger-api-components.yaml#/components/responses/SuccessMessage" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /login-respond-to-auth-challenge: post: tags: - af-login summary: MFAコードによるログイン description: MFAコードによるログインを行います。 security: - EveryoneRequestBody: [] operationId: loginRespondToAuthChallenge requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/LoginRespondToAuthChallengeRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/LoginSucceedResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /refresh-token: post: tags: - af-login summary: トークンの再発行 description: | トークンを再発行します。 IDトークンやアクセストークンの有効期限が切れた場合に使います。 リフレッシュトークンの有効期限が切れた場合は、本APIでは再発行できません。代わりに、[login API](#operation/login)を実行してください。 security: - EveryoneRequestBody: [] operationId: refreshToken requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/RefreshTokenRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Token" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorRefreshTokenExpired" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /plugin-token: post: tags: - af-login summary: プラグイン用トークン発行 description: | プラグイン用のトークンを発行します。 ここで発行されるアクセストークンは、プラグインの種別に応じた範囲のAPIアクセスに使用することができます。 現時点ではカスタムアノテーションエディタ用のプラグインのみに対応しています。 #### authorization_code を使う場合 (PluginTokenRequestAuthorizationCode) 1. プラグイン: PKCE (RFC 7636) の code_challenge_method=S256 の場合に準ずる形で `code_verifier` `code_challenge` を生成 1. プラグイン: `https://annofab.com/project/{project_id}/authorize-plugin?plugin_type={plugin_type}&code_challenge={code_challenge}` へリダイレクト - `plugin_type` はカスタムアノテーションエディタの場合は `AnnotationEditor` を、カスタムアノテーション仕様の場合は `AnnotationSpecs` を指定 1. Annofab: リクエストやユーザー権限の確認後、プラグインの auth_redirect_url に設定されたURLへクエリパラメータ `code` つきでリダイレクト 1. プラグイン: 本APIに上記 code および1で生成した code_verifier を渡し、access_token と refresh_token を得る code付きでカスタムエディタにリダイレクトする際のURLは、タスク一覧等からのリダイレクトに使うURLとは別に設定し、projectIdやtaskIdは含まれません。 Annofabへリダイレクトする前に `location.href` などを保存しておき、トークン取得後にURL書き換えやリダイレクトを行うことを推奨します。 この手順で取得したaccess_tokenを使って他のAPIをリクエストする際には `Authorization: Bearer ` としてBearer付きでアクセスしてください。 #### refresh_token を使う場合 (PluginTokenRequestRefreshToken) 1. プラグイン: 前回のトークン発行時に access_token と共に発行される refresh_token を記憶しておく 1. プラグイン: 本APIに上記 refresh_token を渡し、 access_token と refresh_token を得る security: - EveryoneRequestBody: [] operationId: requestPluginToken requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PluginTokenRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PluginTokenResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /issue-project-token: post: tags: - af-login summary: プロジェクトトークン発行 description: | プロジェクトゲストトークン発行の前段となるプロジェクトトークンを発行します。 ここで発行されるトークンは、[issueProjectGuestUserToken](#operation/issueProjectGuestUserToken)で利用します。 security: - ProjectOwner: [] operationId: issueProjectToken requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/IssueProjectTokenRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectToken" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /list-project-token: post: tags: - af-login summary: プロジェクトトークン一覧の取得 description: | [issueProjectToken](#operation/issueProjectToken)で発行されたトークン列を取得します。 security: - ProjectOwner: [] operationId: listProjectToken requestBody: required: true content: application/json: schema: title: "listProjectTokenRequest" type: object required: - project_id properties: project_id: type: string description: 一覧を取得する対象プロジェクト responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/ProjectToken" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /revoke-project-token: post: tags: - af-login summary: プロジェクトトークン無効化 description: | 発行済のプロジェクトトークンを無効化します。 security: - ProjectOwner: [] operationId: revokeProjectToken requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/RevokeProjectTokenRequest" responses: "200": description: 正常時、無効化したトークンの情報を返す content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectToken" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /issue-project-guest-token: post: tags: - af-login summary: プロジェクトゲストユーザートークン発行 description: | プロジェクトゲスト用のトークンを発行します。 このAPIが返すトークンを利用することで、Annofabにユーザー登録を行わず、対象のプロジェクトの一部操作が可能となります。 security: - EveryoneRequestBody: [] operationId: issueProjectGuestUserToken requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/IssueProjectGuestUserTokenRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectGuestUserTokenResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /my/account: get: tags: - af-my summary: 自分のアカウント取得 description: | 自分のアカウント情報を取得します。 security: - Everyone: [] operationId: getMyAccount responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/MyAccount" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-my summary: 自分のアカウント情報更新 description: | 自分のアカウント情報を更新します。 security: - Everyone: [] operationId: putMyAccount requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutMyAccountRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/MyAccount" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /my/project-members: get: tags: - af-my summary: 自分のプロジェクトメンバー情報一括取得 description: | 自分が所属するプロジェクトのメンバー情報を一括で取得します。 security: - Everyone: [] operationId: getMyProjectMembers responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/ProjectMember" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" /my/messages: get: tags: - af-my summary: 自分に届いている通知メッセージの一括取得 description: | 自分に届いている通知メッセージを、メッセージの作成日時が新しい順で、一括取得します。 自身に届いている通知メッセージが上限(10000件)を超える場合、上限を超えた分の通知メッセージは取得できません。 また、上限を超える場合、開封済みの通知メッセージの数は、取得可能な通知メッセージ中の集計値となります。詳細はレスポンスの項目を参照ください。 security: - Everyone: [] operationId: getMyNotificationMessages parameters: - name: page in: query description: | 表示するページ番号 required: false schema: type: integer minimum: 1 default: 1 - name: limit in: query description: | 1ページあたりの取得するデータ件数 required: false schema: type: integer minimum: 1 maximum: 200 default: 20 responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/MyNotificationList" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /my/unread-messages-count: get: tags: - af-my summary: 自分に届いている通知メッセージの未読件数を取得 description: | 自分に届いている通知メッセージの未読件数を取得します。 security: - Everyone: [] operationId: getMyNotificationUnreadMessagesCount responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/MyNotificationUnreadMessagesCount" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /my/messages/{message_id}: get: tags: - af-my summary: 自分に届いているメッセージの取得 description: | 自分に届いているメッセージを取得します。 security: - Everyone: [] operationId: getMyNotificationMessage parameters: - name: message_id in: path description: | 通知メッセージID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/NotificationMessageId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/MyNotificationMessage" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /my/messages/{message_id}/opened: put: tags: - af-my summary: 通知メッセージのステータス更新 description: | 通知メッセージのステータスを更新します。 自分に届いた通知メッセージのみ更新できます。 security: - Everyone: [] operationId: putMyNotificationMessageOpened parameters: - name: message_id in: path description: | 通知メッセージID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/NotificationMessageId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutMyNotificationMessageOpenedRequest" responses: "200": description: 正常 "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations: post: tags: - af-organization summary: 組織の作成 description: | 組織を作成します。 既に存在する組織名をリクエストボディに指定すると、400エラーが発生します。 security: - Everyone: [] operationId: createNewOrganization requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationRegistrationRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Organization" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /my/organizations: get: tags: - af-my summary: 所属組織の一括取得 description: | 自分が所属している組織を一括で取得します。 security: - AllOrganizationMember: [] operationId: getMyOrganizations responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/MyOrganizationList" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}: get: tags: - af-organization summary: 組織の取得 description: | 組織を取得します。 security: - AllOrganizationMember: [] operationId: getOrganization parameters: - name: organization_name in: path description: 組織名 required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Organization" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-organization summary: 組織の更新 description: | 組織を更新します。 security: - OrganizationOwner: [] operationId: putOrganization parameters: - name: organization_name in: path description: 組織名 required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutOrganizationRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Organization" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: 先に更新されているため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorAlreadyUpdated" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" delete: tags: - af-organization summary: 組織の削除 description: | 組織を完全に削除します。 組織内のプロジェクトが1件も存在しない場合のみ削除できます。 組織を削除したい場合は全てのプロジェクトを削除してください。 **削除された組織は元に戻せません。ご注意ください。** security: - OrganizationOwner: [] operationId: deleteOrganization parameters: - name: organization_name in: path description: 組織名 required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Organization" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: プロジェクトが存在する組織を削除しようとした content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/projects: get: tags: - af-organization summary: 組織配下プロジェクトの一括取得 description: | 指定した組織のプロジェクトを一括で取得します。 APIにアクセスしたユーザー(`Authorization`ヘッダーに格納されているIDトークンを発行したユーザー)の組織内ロールによって取得するプロジェクトが変化します * `組織オーナー` - 組織配下のプロジェクトすべて取得可能 * `組織管理者` - 組織配下のプロジェクトすべて取得可能 * `組織貢献者` - 組織配下のプロジェクトのうちアクセスしたユーザーが所属しているプロジェクトのみ取得可能 security: - AllOrganizationMember: [] operationId: getProjectsOfOrganization parameters: - name: organization_name in: path description: 組織名 required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" - name: page in: query description: | 表示するページ番号 required: false schema: type: integer minimum: 1 default: 1 - name: limit in: query description: | 1ページあたりの取得するデータ件数 required: false schema: type: integer minimum: 0 default: 30 maximum: 200 - name: account_id in: query description: | 指定したアカウントIDをメンバーに持つプロジェクトで絞り込む。 APIにアクセスしたユーザー(`Authorization`ヘッダーに格納されているIDトークンを発行したユーザー)の組織内ロールが`組織貢献者`の場合、**アクセスしたユーザーと指定したアカウントIDのユーザーがどちらも所属しているプロジェクトのみ**が取得されます。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/AccountId" - name: except_account_id in: query description: | 指定したアカウントIDをメンバーに持たないプロジェクトで絞り込む。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/AccountId" - name: title in: query description: | プロジェクトタイトルでの部分一致検索。大文字小文字は区別しません。 required: false schema: type: string minLength: 1 - name: status in: query description: | 指定した状態のプロジェクトで絞り込む。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectStatus" - name: plugin_id in: query description: | 指定したプラグインIDを使用しているプロジェクトで絞り込む。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/PluginId" - name: input_data_type in: query description: | 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#section/InputDataType)を参照してください。 schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataType" - name: sort_by in: query description: | `date` を指定することでプロジェクトの最新のタスク更新時間の順にソートして出力する。 未指定時はプロジェクト名でソートする。 required: false schema: type: string example: date responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectList" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/members: get: tags: - af-organization-member summary: 組織メンバー一括取得 description: | 組織メンバーを一括で取得します。 ただし、組織から脱退したメンバーは取得できません。 security: - AllOrganizationMember: [] operationId: getOrganizationMembers parameters: - name: organization_name in: path description: 組織名 required: true schema: type: string responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationMemberList" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/members/{user_id}: get: tags: - af-organization-member summary: 組織メンバー取得 description: | 組織メンバーを取得します。 security: - AllOrganizationMember: [] operationId: getOrganizationMember parameters: - name: organization_name in: path description: 組織名 required: true schema: type: string - name: user_id in: path description: ユーザーID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/UserId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationMember" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" delete: tags: - af-organization-member summary: 組織メンバーの削除 description: | 組織メンバーを削除します。削除された組織メンバーの`status`は`inactive`になります。 security: - OrganizationAdministrator: [] operationId: deleteOrganizationMember parameters: - name: organization_name in: path description: 組織名 required: true schema: type: string - name: user_id in: path description: ユーザーID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/UserId" responses: "200": description: 正常。削除したメンバーを返します content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationMember" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/members/{user_id}/role: put: tags: - af-organization-member summary: 組織メンバーのロール更新 description: | 組織メンバーのロールを変更します。 security: - OrganizationOwner: [] operationId: updateOrganizationMemberRole parameters: - name: organization_name in: path description: 組織名 required: true schema: type: string - name: user_id in: path description: ユーザーID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/UserId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutOrganizationMemberRoleRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationMember" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": $ref: "swagger-api-components.yaml#/components/responses/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/members/{user_id}/invitation: post: tags: - af-organization-member summary: ユーザーを組織に招待 description: | 指定したユーザーを組織に招待します。招待されたユーザーにはメールが届きます。メールに記載されたURLにアクセスすることで組織に参加することができます。 security: - OrganizationAdministrator: [] operationId: inviteOrganizationMember parameters: - name: organization_name in: path description: 組織名 required: true schema: type: string - name: user_id in: path description: ユーザーID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/UserId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InviteOrganizationMemberRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationMember" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/members/{user_id}/invitation/accept: post: tags: - af-organization-member summary: 組織への招待の受諾 description: | 組織への招待を受諾し、組織へのメンバー登録を完了します。 security: - EveryoneRequestBody: [] operationId: acceptOrganizationInvitation parameters: - name: organization_name in: path description: 組織名 required: true schema: type: string - name: user_id in: path description: ユーザーID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/UserId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/AcceptOrganizationInvitationRequest" responses: "200": $ref: "swagger-api-components.yaml#/components/responses/SuccessMessage" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/activity: get: tags: - af-organization summary: 組織の活動状況の取得 description: | Annofabストレージの使用量など、組織の活動状況を取得します。 security: - AllOrganizationMember: [] operationId: getOrganizationActivity parameters: - name: organization_name in: path description: 組織名 required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationActivity" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/plugins: get: operationId: getOrganizationPlugins summary: プラグインの一括取得 description: | プラグインを一括で取得します。 **この API は Annofab に許可された組織だけで使用できます。またアルファ版につき、予告なく変更されることがあります。** tags: - af-organization-plugin security: - AllOrganizationMember: [] parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationPluginList" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/plugins/{plugin_id}: get: operationId: getOrganizationPlugin summary: プラグインの取得 description: | プラグインを取得します。 **この API は Annofab に許可された組織だけで使用できます。またアルファ版につき、予告なく変更されることがあります。** tags: - af-organization-plugin security: - AllOrganizationMember: [] parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: plugin_id in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/PluginId" description: プラグインID responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationPlugin" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: operationId: putOrganizationPlugin summary: プラグインの作成/更新 description: | プラグインを作成または更新します。 **この API は Annofab に許可された組織だけで使用できます。またアルファ版につき、予告なく変更されることがあります。** tags: - af-organization-plugin security: - OrganizationAdministrator: [] - OrganizationOwner: [] parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: plugin_id in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/PluginId" description: プラグインID requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutOrganizationPluginRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationPlugin" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": $ref: "swagger-api-components.yaml#/components/responses/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" delete: operationId: deleteOrganizationPlugin summary: プラグインの削除 description: | プラグインを削除します。 **この API は Annofab に許可された組織だけで使用できます。またアルファ版につき、予告なく変更されることがあります。** tags: - af-organization-plugin security: - OrganizationAdministrator: [] - OrganizationOwner: [] parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: plugin_id in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/PluginId" description: プラグインID responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationPlugin" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/input_data_set: get: operationId: getInputDataSetList summary: 入力データセットの一括取得 description: | 入力データセットを一括で取得します。 tags: - af-organization-input security: - OrganizationAdministrator: [] - OrganizationOwner: [] parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/InputDataSet" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/input_data_set/{input_data_set_id}: get: operationId: getInputDataSet summary: 入力データセット情報取得 description: | 入力データセットを取得します。 組織オーナーまたは組織管理者でない場合は、自身が所属するプロジェクトの入力データセットのみが取得できます。 tags: - af-organization-input security: - AllOrganizationMember: [] parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: input_data_set_id in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataSetId" description: 入力データセットID responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataSet" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: operationId: putInputDataSet summary: 入力データセットの作成/更新 description: | 入力データセットを作成または更新します。 tags: - af-organization-input security: - OrganizationAdministrator: [] - OrganizationOwner: [] parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: input_data_set_id in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataSetId" description: 入力データセットID requestBody: content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutInputDataSetRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataSet" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": $ref: "swagger-api-components.yaml#/components/responses/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/input_data_set/{input_data_set_id}/inputs: get: tags: - af-organization-input summary: 入力データセット内の入力データの一括取得 description: | 入力データセットに含まれる入力データを一括で取得します。 組織オーナーまたは組織管理者でない場合は自身が所属するプロジェクトの入力データセット内の入力データのみが取得できます。 security: - AllOrganizationMember: [] operationId: getOrganizationInputDataList parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: input_data_set_id in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataSetId" description: 入力データセットID - name: input_data_id in: query description: 入力データIDでの部分一致検索で使用。 required: false schema: type: string minLength: 1 - name: input_data_name in: query description: 入力データ名での部分一致検索で使用。 required: false schema: type: string minLength: 1 - name: input_data_path in: query description: 入力データパスでの部分一致検索で使用。 required: false schema: type: string minLength: 1 - name: task_id in: query description: 入力データが紐づくタスクIDの部分一致検索で使用。条件に合致した先頭100件のタスクに使われている入力データを検索します。 required: false schema: type: string minLength: 1 - name: from in: query description: 指定した日時以降に更新された入力データを取得します。日時のフォーマットはISO 8601 拡張形式です。 required: false schema: type: string format: date-time - name: to in: query description: 指定した日時以前に更新された入力データを取得します。日時のフォーマットはISO 8601 拡張形式です。 required: false schema: type: string format: date-time - name: page in: query description: 検索結果のうち、取得したいページの番号(1始まり) required: false schema: type: integer minimum: 1 default: 1 - name: limit in: query description: 1ページあたりの取得するデータ件数 required: false schema: type: integer minimum: 0 maximum: 200 default: 30 responses: "200": description: 指定された条件にあてはまる入力データを返します。条件にあてはまる入力データが多数に及ぶことがあるので、すべての結果を得るにはページングしてください。 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataList" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/input_data_set/{input_data_set_id}/inputs/{input_data_id}: get: tags: - af-organization-input summary: 入力データセット内の入力データの取得 description: | 入力データセットに含まれる入力データを取得します。 組織オーナーまたは組織管理者でない場合は自身が所属するプロジェクトの入力データセット内の入力データのみが取得できます。 security: - AllOrganizationMember: [] operationId: getOrganizationInputData parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: input_data_set_id in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataSetId" description: 入力データセットID - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputData" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" delete: tags: - af-organization-input summary: 入力データセット内の入力データの削除 description: | 入力データセットに含まれる入力データ情報を削除します。 security: - OrganizationAdministrator: [] - ProjectOwner: [] operationId: deleteOrganizationInputData parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: input_data_set_id in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataSetId" description: 入力データセットID - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputData" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/usage-status: get: tags: - af-usage-status summary: 利用状況の一覧を取得 description: 利用状況の一覧を取得します。 security: - OrganizationAdministrator: [] operationId: getOrganizationUsageStatusList parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: from in: query description: 指定した年月以降の利用状況を取得します。省略した場合はtoで指定した年月の1年前です。年月のフォーマットは YYYY-MM です。指定年月は閉区間となります。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/YearMonth" - name: to in: query description: 指定した年月以前の利用状況を取得します。省略した場合はJSTでの現在の年月です。年月のフォーマットは YYYY-MM です。指定年月は閉区間となります。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/YearMonth" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/UsageStatus" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/usage-status/{year_month}: get: tags: - af-usage-status summary: 利用状況を取得 description: 指定した月の利用状況を取得します。 security: - OrganizationAdministrator: [] operationId: getOrganizationUsageStatus parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: year_month in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/YearMonth" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/UsageStatusByDay" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/usage-status-detail/{year_month}: get: tags: - af-usage-status summary: 利用状況の詳細情報を取得 description: 指定した月の利用状況の詳細情報を取得します。 security: - OrganizationAdministrator: [] operationId: getOrganizationUsageStatusDetail parameters: - name: organization_name in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" description: 組織名 - name: year_month in: path required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/YearMonth" responses: "201": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/UsageStatusCsvFileUrl" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /my/projects: get: tags: - af-my summary: 所属プロジェクトの一括取得 description: | 自分が所属しているプロジェクトを一括で取得します。 security: - Everyone: [] operationId: getMyProjects parameters: - name: page in: query description: | 表示するページ番号 required: false schema: type: integer minimum: 1 default: 1 - name: limit in: query description: | 1ページあたりの取得するデータ件数 required: false schema: type: integer minimum: 0 default: 30 maximum: 200 - name: organization_id in: query description: | 指定した組織に属するプロジェクトに絞り込む。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationId" - name: title in: query description: | プロジェクトタイトルでの部分一致検索。大文字小文字は区別しません。 required: false schema: type: string minLength: 1 - name: status in: query description: | 指定した状態のプロジェクトで絞り込む。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectStatus" - name: input_data_type in: query description: | 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#section/InputDataType)を参照してください。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataType" - name: sort_by in: query description: | `date` を指定することでプロジェクトの最新のタスク更新時間の順にソートして出力する。 未指定時はプロジェクト名でソートする。 required: false schema: type: string example: date responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectContainer" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}: get: tags: - af-project summary: プロジェクト取得 description: | プロジェクトを取得します。 security: - AllProjectMember: [] operationId: getProject parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Project" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-project summary: プロジェクト作成/更新 description: | プロジェクトを新規作成または更新します。 ### 新規作成する場合 ユーザーは、作成するプロジェクトをひもづける組織の [OrganizationAdministrator](#section/Authentication/OrganizationAdministrator) である必要があります。 ### 更新する場合 ユーザーは、更新するプロジェクトの [ProjectOwner](#section/Authentication/ProjectOwner) である必要があります。 また所属組織を変更する場合は、新しくひもづける組織の [OrganizationAdministrator](#section/Authentication/OrganizationAdministrator) である必要があります。 なお、プロジェクト状態を「停止中」にした場合、アノテーションZIPやタスク進捗状況などの集計情報は自動更新されなくなります。 所属組織が変更された場合バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`move-project`)。 APIの制限事項は、以下の通りです。 * `status`を`initializing`に変更できません。 * `status`が`initializing`のときは、所属組織を変更できません。 security: - OrganizationAdministrator: [] ProjectOwner: [] operationId: putProject parameters: - name: project_id in: path description: | プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: v in: query description: | APIの戻り型のバージョンを指定します。 値と戻り型の対応は以下です。 - "1":Project - "2":PutProjectResponse required: false schema: type: string default: "1" example: "2" requestBody: content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutProjectRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Project" "202": description: 組織変更実施時 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutProjectResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: 現在のプロジェクトやタスクの状態ではできない操作をしようとした、またはジョブの同時実行制限による失敗(所属組織を変更した場合) content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" delete: tags: - af-project summary: プロジェクト削除 description: | プロジェクトを完全に削除します。 アノテーション仕様、タスク、入力データ、アノテーションなど、プロジェクト配下のリソースがすべて削除されます。 **削除されたプロジェクトは元に戻せません。** 完了したプロジェクトは削除せず、プロジェクトの状態を「停止中」に変更するのを推奨します。 本APIを実行すると、バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`delete-project`)。 security: - ProjectOwner: [] operationId: deleteProject parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "202": description: バッチにてプロジェクトの削除開始 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/DeleteProjectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: 停止中ではないプロジェクトを削除しようとした、またはジョブの同時実行制限による失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/organization: get: tags: - af-project summary: プロジェクトの所属組織取得 description: | プロジェクトが所属する組織を取得します。 security: - AllProjectMember: [] operationId: getOrganizationOfProject parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Organization" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/copy: post: tags: - af-project summary: プロジェクトのコピー description: | プロジェクトをコピーします。 以下のデータがコピーされます。 * プロジェクト設定 * プロジェクトメンバー * アノテーション仕様 オプションを指定することで、以下のデータもコピーできます。 |コピー対象のデータ|同時にコピーする必要があるデータ| |:--|:--| |入力データ|| |タスク|入力データ| |アノテーション|入力データ、タスク| |補助情報|入力データ| |作業ガイド|| |Webhook|| このAPIを利用するには、以下のロールが必要です。 * コピー元プロジェクトのプロジェクトオーナーロール * コピー元プロジェクトが所属している組織の組織管理者または組織オーナーロール 本APIを実行すると、バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`copy-project`)。 security: - OrganizationAdministrator: [] ProjectOwner: [] operationId: initiateProjectCopy parameters: - name: project_id in: path description: コピー元となるプロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectCopyRequest" responses: "202": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectCopyResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: ジョブの同時実行制限による失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/rawdata/inputs: get: tags: - af-project summary: 入力データ情報全件ファイルの取得 description: | 入力データ全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 入力データ全件ファイルは、すべての入力データが記載されたJSONファイルです。SON構造は、[InputData](#section/InputData)の配列です。 ただしInputData中のurlは常にnullです。 毎日AM02:00(JST)頃に更新されます。 [postProjectInputsUpdate](#operation/postProjectInputsUpdate) APIを利用すれば、手動で入力データ全件ファイルを更新できます。 security: - ProjectDataUser: [] operationId: getProjectInputsUrl parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "201": $ref: "swagger-api-components.yaml#/components/responses/FileRedirectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" post: tags: - af-project summary: 入力データ全件ファイルの更新開始 description: | 入力データ全件ファイルの更新を開始します。 ファイルの更新には、データ量に応じて数分~数十分程度かかります。 本APIを実行すると、バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`gen-inputs-list`)。 入力データ全件ファイルについては、[getProjectInputsUrl](#operation/getProjectInputsUrl) APIを参照ください。 security: - ProjectDataUser: [] operationId: postProjectInputsUpdate parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "202": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectInputsUpdateResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: ジョブの同時実行制限による失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/rawdata/tasks: get: tags: - af-project summary: タスク全件ファイルの取得 description: | タスク全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 タスク全件ファイルは、すべてのタスクが記載されたJSONファイルです。JSON構造は、[Task](#section/Task)の配列です。 毎日AM02:00(JST)頃に更新されます。 [postProjectTasksUpdate](#operation/postProjectTasksUpdate) APIを利用すれば、手動でタスク全件ファイルを更新できます。 security: - ProjectDataUser: [] operationId: getProjectTasksUrl parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "201": $ref: "swagger-api-components.yaml#/components/responses/FileRedirectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" post: tags: - af-project summary: タスク全件ファイルの更新開始 description: | タスク全件ファイルの更新を開始します。 ファイルの更新には、データ量に応じて数分~数十分程度かかります。 本APIを実行すると、バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`gen-tasks-list`)。 タスク全件ファイルについては、[getProjectTasksUrl](#operation/getProjectTasksUrl) APIを参照ください。 security: - ProjectDataUser: [] operationId: postProjectTasksUpdate parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "202": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PostProjectTasksUpdateResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: ジョブの同時実行制限による失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/rawdata/inspections: get: deprecated: true tags: - af-project summary: 検査コメント全件ファイルの取得 description: | 検査コメント全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 検査コメント全件ファイルには、すべての検査コメントが記載されたファイルです。 JSON構造は、[Inspection](#section/Inspection)の配列です。 毎日AM02:00(JST)頃に更新されます。 security: - ProjectDataUser: [] operationId: getProjectInspectionsUrl parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "201": $ref: "swagger-api-components.yaml#/components/responses/FileRedirectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/rawdata/comments: get: tags: - af-project summary: コメント全件ファイルの取得 description: | コメント全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 コメント全件ファイルは、すべてのコメントが記載されたJSONファイルです。 JSON構造は、[Comment](#section/Comment)の配列です。 毎日AM02:00(JST)頃に更新されます。 security: - ProjectDataUser: [] operationId: getProjectCommentsUrl parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "201": $ref: "swagger-api-components.yaml#/components/responses/FileRedirectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/rawdata/task_history_events: get: deprecated: true tags: - af-project summary: プロジェクトのタスク履歴イベント全件ファイルの取得 description: | タスク履歴イベント全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 タスク履歴イベント全件ファイルは、すべてのタスク履歴イベント情報が記載されたJSONファイルです。 JSON構造は、[TaskHistoryEvent](#section/TaskHistoryEvent)の配列です。 毎日AM02:00(JST)頃に更新されます。 security: - ProjectDataUser: [] operationId: getProjectTaskHistoryEventsUrl parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "201": $ref: "swagger-api-components.yaml#/components/responses/FileRedirectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/rawdata/task_histories: get: tags: - af-project summary: プロジェクトのタスク履歴全件ファイルの取得 description: | タスク履歴全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 タスク履歴イベント全件ファイルは、すべてのタスク履歴情報が記載されたJSONファイルです。JSON構造は、キーがタスクID、値が[TaskHistory](#section/TaskHistory)の配列となるマップです。 毎日AM02:00(JST)頃に更新されます。 security: - ProjectDataUser: [] operationId: getProjectTaskHistoriesUrl parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "201": $ref: "swagger-api-components.yaml#/components/responses/FileRedirectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /my/projects/{project_id}/member: get: tags: - af-my summary: 自分のプロジェクトメンバー取得 description: | 自分のプロジェクトメンバー情報を取得します。 security: - AllProjectMember: [] operationId: getMyMemberInProject parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectMember" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/members: get: tags: - af-project-member summary: プロジェクトメンバー一括取得 description: | プロジェクトメンバを一括で取得します。 security: - AllProjectMember: [] operationId: getProjectMembers parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: include_inactive_member in: query description: 脱退したプロジェクトメンバーも取得する時に、キーのみ指定します(値は無視されます)。 required: false allowEmptyValue: true schema: type: string responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectMemberList" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/members/{user_id}: get: tags: - af-project-member summary: プロジェクトメンバー取得 description: | プロジェクトメンバーを取得します。 security: - AllProjectMember: [] operationId: getProjectMember parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: user_id in: path description: ユーザーID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/UserId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectMember" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-project-member summary: プロジェクトメンバー追加/更新 description: | プロジェクトにメンバーを新規に追加、または存在するメンバーの設定を変更します。 security: - ProjectOwner: [] operationId: putProjectMember parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: user_id in: path description: ユーザーID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/UserId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectMemberRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectMember" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": $ref: "swagger-api-components.yaml#/components/responses/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/statistics/dates: get: tags: - af-statistics summary: 統計情報の期間の取得 description: | 統計情報が存在する期間を取得します。 たとえば、プロジェクトの状態が以下のように変化したとします。 1. 2022/01/01にプロジェクトを作成した。 2. 2022/02/01にプロジェクトの状態を停止中にした。 3. 2022/03/01にプロジェクトの状態を進行中にした。 4. 2022/04/01にプロジェクトの状態を停止中にした。 このAPIを実行すると、以下のJSONが取得されます。 ``` [ {"from":"2022-01-01", "to":"2022-02-01"}, {"from":"2022-03-01", "to":"2022-04-01"} ] ``` プロジェクトを停止中にすると統計情報は記録されないので、統計情報が存在する期間は複数になります。 security: - AllProjectMember: [] operationId: getStatisticsAvailableDates parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ArrayOfDateRanges" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/statistics/tasks/daily: get: tags: - af-statistics summary: フェーズ別タスク数の取得 description: | タスクのフェーズごと、タスクのステータスごとのタスク数などを取得します。 取得期間は最大3か月です。 security: - AllProjectMember: [] operationId: getTaskDailyStatistics parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: from in: query description: 取得する統計の区間の開始日 - `YYYY-MM-DD` required: true schema: type: string - name: to in: query description: 取得する統計の区間の終了日 - `YYYY-MM-DD` 。この日は含まれます。 required: true schema: type: string responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ArrayOfProjectTaskStatisticsHistory" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/statistics/accounts/daily: get: tags: - af-statistics summary: メンバー別作業時間の取得 description: | プロジェクトメンバーごとの作業時間やタスクの提出回数を取得します。 * 作業時間 * 教師付フェーズのタスクを提出した回数、または検査/受入フェーズのタスクを合格/差戻にした回数 * 教師付フェーズを担当して提出したタスクが差し戻された回数、または受入フェーズを担当して合格にしたタスクが受入完了状態を取り消された回数 取得期間は最大3か月です。 security: - AllProjectMember: [ ] operationId: getAccountDailyStatistics parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: from in: query description: 取得する統計の区間の開始日 - `YYYY-MM-DD` required: true schema: type: string - name: to in: query description: 取得する統計の区間の終了日 - `YYYY-MM-DD` 。この日は含まれます。 required: true schema: type: string responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ArrayOfProjectAccountStatistics" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/statistics/inspections/daily: get: tags: - af-statistics summary: ラベル別検査コメント数の取得 description: | ラベルごとの検査コメント数を取得します。 取得期間は最大3か月です。 security: - AllProjectMember: [ ] operationId: getInspectionDailyStatistics parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: from in: query description: 取得する統計の区間の開始日 - `YYYY-MM-DD` required: true schema: type: string - name: to in: query description: 取得する統計の区間の終了日 - `YYYY-MM-DD` 。この日は含まれます。 required: true schema: type: string responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ArrayOfInspectionStatistics" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/statistics/task-phases/daily: get: tags: - af-statistics summary: フェーズ別作業時間の取得 description: | フェーズごとの累積作業時間を取得します。 取得期間は最大3か月です。 security: - AllProjectMember: [ ] operationId: getPhaseDailyStatistics parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: from in: query description: 取得する統計の区間の開始日 - `YYYY-MM-DD` required: true schema: type: string - name: to in: query description: 取得する統計の区間の終了日 - `YYYY-MM-DD` 。この日は含まれます。 required: true schema: type: string responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ArrayOfTaskPhaseStatistics" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/statistics/labels: get: tags: - af-statistics summary: ラベル別アノテーション数の取得 description: | [ラベル別アノテーション数集計データ](#section/ArrayOfLabelStatistics) を取得するための認証済み一時URLを取得します。 security: - AllProjectMember: [] operationId: getLabelStatistics parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "201": $ref: "swagger-api-components.yaml#/components/responses/FileRedirectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/statistics/worktimes/daily: get: tags: - af-statistics summary: 単位あたり作業時間の取得 description: | プロジェクトの単位あたり作業時間情報を取得します。 以下の作業時間情報を取得できます。 * タスク1個あたりの作業時間情報 * 画像1枚あたりの作業時間情報(画像プロジェクトのみ) * 動画1分あたりの作業時間情報(動画プロジェクトのみ) 取得期間は最大3か月です。 security: - AllProjectMember: [ ] operationId: getWorktimeDailyStatistics parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: from in: query description: 取得する統計の区間の開始日 - `YYYY-MM-DD` required: true schema: type: string - name: to in: query description: 取得する統計の区間の終了日 - `YYYY-MM-DD` 。この日は含まれます。 required: true schema: type: string responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/WorktimeStatisticsByProject" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/statistics/worktimes-by-account/{account_id}/daily: get: tags: - af-statistics summary: メンバーの単位あたり作業時間の取得 description: | プロジェクトメンバーの単位あたり作業時間情報を取得します。 以下の作業時間情報を取得できます。 * タスク1個あたりの作業時間情報 * 画像1枚あたりの作業時間情報(画像プロジェクトのみ) * 動画1分あたりの作業時間情報(動画プロジェクトのみ) 取得期間は最大3か月です。 security: - AllProjectMember: [ ] operationId: getWorktimeDailyStatisticsByAccount parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: account_id in: path description: アカウントID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/AccountId" - name: from in: query description: 取得する統計の区間の開始日 - `YYYY-MM-DD` required: true schema: type: string - name: to in: query description: 取得する統計の区間の終了日 - `YYYY-MM-DD` 。この日は含まれます。 required: true schema: type: string responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/WorktimeStatisticsByAccount" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/statistics/markers: get: tags: - af-statistics summary: 統計グラフマーカー一括取得 description: | 統計グラフマーカーをすべて取得します。 security: - AllProjectMember: [] operationId: getMarkers parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Markers" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-statistics summary: 統計グラフマーカー更新 description: | 統計グラフマーカーを更新します。 security: - ProjectOwner: [] operationId: putMarkers parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutMarkersRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Markers" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": $ref: "swagger-api-components.yaml#/components/responses/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /organizations/{organization_name}/jobs: get: tags: - af-job summary: 組織のバックグラウンドジョブ情報取得 description: | 組織のバックグラウンドジョブの情報を取得します。 バックグラウンドジョブ情報は、完了(失敗含む)から14日経過後に自動で削除されます。 security: - AllOrganizationMember: [] operationId: getOrganizationJob parameters: - name: organization_name in: path description: 組織名 required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" - name: type in: query description: 取得するジョブの種別。[詳細はこちら](#section/OrganizationJobType)。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationJobType" - name: limit in: query description: | 1ページあたりの取得するデータ件数。 未指定時は30件取得。 required: false schema: type: integer minimum: 0 maximum: 200 default: 30 - name: exclusive_start_created_datetime in: query description: 作成日時が、指定した日付より古いジョブを取得します。 required: false schema: type: string format: date-time responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationJobInfoContainer" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/jobs: get: tags: - af-job summary: プロジェクトのバックグラウンドジョブ情報取得 description: | プロジェクトのバックグラウンドジョブの情報を取得します。 バックグラウンドジョブ情報は、完了(失敗含む)から14日経過後に自動で削除されます。 security: - AllProjectMember: [] operationId: getProjectJob parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: type in: query description: 取得するジョブの種別。[詳細はこちら](#section/ProjectJobType)。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectJobType" - name: limit in: query description: | 1ページあたりの取得するデータ件数。 未指定時は30件取得。 required: false schema: type: integer minimum: 0 maximum: 200 default: 30 - name: exclusive_start_created_datetime in: query description: 作成日時が、指定した日付より古いジョブを取得します。 required: false schema: type: string format: date-time responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectJobInfoContainer" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/jobs/{job_type}/{job_id}: delete: tags: - af-job summary: プロジェクトのバックグラウンドジョブ情報削除 description: | プロジェクトのバックグラウンドジョブ情報を削除します。 なお、バックグラウンドジョブ情報は、完了(失敗含む)から14日経過後に自動で削除されます。 security: - ProjectOwner: [] operationId: deleteProjectJob parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: job_type in: path description: このパラメータは互換性のために残されています。 この値は無視され、動作に影響を与えません。 required: true schema: type: string - name: job_id in: path description: ジョブID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/JobId" responses: "200": description: 正常 "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/webhooks: get: tags: - af-webhook summary: Webhookの一括取得 description: | Webhookをすべて取得します。 security: - ProjectOwner: [] operationId: getWebhooks parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/Webhook" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/webhooks/{webhook_id}: put: tags: - af-webhook summary: Webhookの作成/更新 description: | Webhookを新規作成/更新します。 Webhookが送信するHTTPリクエストのボディには、以下のプレースホルダーを含めることができます。 * `task-completed` * {{PROJECT_ID}} : プロジェクトID * {{TASK_ID}} : タスクID * {{PROJECT_TITLE}} : プロジェクトタイトル * {{COMPLETE_DATETIME}} : タスク受入完了日時 * 例 : 2019-05-08T10:00:00.000+09:00 * {{LAST_ACCOUNT}} : 最終作業者のアカウントID * `annotation-archive-updated` * {{PROJECT_ID}} : プロジェクトID * {{PROJECT_TITLE}} : プロジェクトタイトル * {{COMPLETE_DATETIME}} : アノテーションZIP作成完了日時 * 例 : 2019-05-08T10:00:00.000+09:00 * `input-data-zip-registered` * {{PROJECT_ID}} : プロジェクトID * {{PROJECT_TITLE}} : プロジェクトタイトル * {{COMPLETE_DATETIME}} : 入力データZIP登録完了日時 * 例 : 2019-05-08T10:00:00.000+09:00 * {{ZIP_NAME}} : ZIPファイル名 * 例 : input_data.zip * `project-copy-completed` * {{PROJECT_ID}} : プロジェクトID * {{DEST_PROJECT_ID}} : コピー先プロジェクトID * {{DEST_PROJECT_TITLE}} : コピー先プロジェクトタイトル * {{COMPLETE_DATETIME}} : プロジェクトコピー完了日時 * 例 : 2019-05-08T10:00:00.000+09:00 Webhookが起動されると、ジョブ種別が`invoke-hook`のバックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます。 security: - ProjectOwner: [] operationId: putWebhook parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: webhook_id in: path description: | WebhookID。[値の制約についてはこちら。](#section/API-Convention/APIID) required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/WebhookId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutWebhookRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Webhook" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" delete: tags: - af-webhook summary: Webhookの削除 description: | Webhookを削除します。 security: - ProjectOwner: [] operationId: deleteWebhook parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: webhook_id in: path description: WebhookID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/WebhookId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Webhook" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/webhooks/{webhook_id}/test: post: tags: - af-webhook summary: Webhookのテスト実行 description: | Webhookが実際にHTTPリクエストを送信します。 Webhookが送信するHTTPリクエストのボディに含まれるプレースホルダーは、このAPIで指定されたプレースホルダーの値に置き換えられます。 security: - ProjectOwner: [] operationId: testWebhook parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: webhook_id in: path description: WebhookID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/WebhookId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/WebhookTestRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/WebhookTestResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/annotation-specs: get: tags: - af-annotation-specs summary: アノテーション仕様取得 description: | アノテーション仕様を取得します。 security: - AllProjectMember: [] operationId: getAnnotationSpecs parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: history_id in: query description: | アノテーション仕様の履歴ID。過去のアノテーション仕様を取得する場合は、[getAnnotationSpecsHistories](#operation/getAnnotationSpecsHistories) APIで取得した `history_id` の値を指定してください。 未指定時は最新のアノテーション仕様を取得します。 required: false schema: type: string example: "1234567890" - name: v in: query description: | 取得するアノテーション仕様のフォーマットバージョンを指定します。`v=1`及び`v=2`は将来廃止する予定なので、非推奨です。 required: false schema: type: string enum: - "1" - "2" - "3" default: "1" example: "3" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/AnnotationSpecs" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-annotation-specs summary: アノテーション仕様更新 description: | アノテーション仕様を更新します。 security: - ProjectOwner: [] operationId: putAnnotationSpecs parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: v in: query description: | レスポンスに含まれるアノテーション仕様のフォーマットバージョンを指定します。`v=1`及び`v=2`は将来廃止する予定なので、非推奨です。 required: false schema: type: string enum: - "1" - "2" - "3" default: "2" example: "3" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/AnnotationSpecsRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/AnnotationSpecs" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": $ref: "swagger-api-components.yaml#/components/responses/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/annotation-specs-histories: get: tags: - af-annotation-specs summary: アノテーション仕様履歴一括取得 description: | アノテーション仕様のすべての更新履歴を取得します。 security: - AllProjectMember: [] operationId: getAnnotationSpecsHistories parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/AnnotationSpecsHistory" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/tasks: get: tags: - af-task summary: タスクの一括取得 description: | タスクを一括で取得します。 security: - AllProjectMember: [] operationId: getTasks parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: page in: query description: 検索結果のうち、取得したいページの番号(1始まり) required: false schema: type: integer minimum: 1 default: 1 - name: limit in: query description: 1ページあたりの取得するデータ件数 required: false schema: type: integer minimum: 1 maximum: 200 default: 30 - name: task_id in: query description: タスクIDでの部分一致検索で使用。大文字小文字は区別しません required: false schema: type: string minLength: 1 maxLength: 300 - name: input_data_ids in: query description: 指定された入力データIDを使用しているタスクを絞り込みます。カンマ区切りで複数の入力データIDを指定可能です。大文字小文字は区別しません required: false schema: type: string minLength: 1 - name: phase in: query description: 絞り込み条件となるフェーズ名 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskPhase" - name: phase_stage in: query description: 絞り込み条件となるステージ required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskPhaseStage" - name: status in: query description: 絞り込み条件となる状態名 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskStatus" - name: account_id in: query description: 絞り込み条件となる作業中のアカウントID required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/AccountId" - name: no_user in: query description: 未割り当てのタスクを絞り込む時に、キーのみ指定します(値は無視されます)。 required: false allowEmptyValue: true schema: type: string - name: previous_account_id in: query description: そのタスクをこれまでに担当したことのあるユーザー(現在の担当者含む)のアカウントID required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/AccountId" - name: previous_phase in: query description: そのタスクがこれまでに遷移したことのあるフェーズ名(現在のフェーズ含む) required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskPhase" - name: previous_phase_stage in: query description: そのタスクがこれまでに遷移したことのあるステージ(現在のステージ含む) required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskPhaseStage" - name: rejected_only in: query description: 差し戻されたタスクだけを絞り込む時に、キーのみ指定します(値は無視されます)。 required: false allowEmptyValue: true schema: type: string - name: auto_accepted_only in: query description: 「抜取検査の対象外となり、自動受入されたタスク」だけを絞り込む時に、キーのみ指定します(値は無視されます)。 required: false allowEmptyValue: true schema: type: string - name: metadata in: query example: priority:>=1 assignable:true description: | メタデータからタスクを検索できます。 例えば、 `priority` (数値) や `assignable` (真偽値) といったメタデータを個々のタスクに登録していたとします。 その場合、次のように検索できます。 ``` // priorityが5のタスクを検索 priority:5 // priorityが5以外のタスクを検索 -priority:5 // priorityが1より大きいタスクを検索 priority:>1 // priorityが1以上のタスクを検索 priority:>=1 // priorityが100未満のタスクを検索 priority:<100 // priorityが100以下のタスクを検索 priority:<=100 // priorityが1~100のタスクを検索 (複数の検索条件は半角スペースで区切ります) priority:>=1 priority:<=100 // priorityが1以上、且つ、assignableがtrueのタスクを検索 priority:>=1 assignable:true ``` (注意) これらの例は、説明の都合上「URLエンコード」を施していません。実際には、URLエンコードを施してください。 required: false schema: type: string - name: sort in: query description: | ソート順の指定。以下のキーを使用できます。 * `task_id` * `updated_datetime` * `number_of_rejections` * `phase` * `phase_stage` * `account_id` * `metadata.{メタデータのキー}` * キーの先頭に`-`を付けると、降順でソートされます。 * `,`でキーを区切ると、複数のキーでソートされます。先頭のキーから順に優先順位が割り振られます。 required: false example: metadata.priority,-updated_datetime schema: type: string - name: annotation in: query description: | アノテーションの絞り込み条件をJSON形式([AnnotationQuery](#section/AnnotationQuery))で指定したもの。指定した条件に合致するアノテーションを持つタスクを絞り込む際に指定する。 required: false example: '{"label_id":"b048c6b3-b36f-4c8d-97ea-96828a50a44c"}' schema: type: string responses: "200": description: 指定された条件にあてはまるタスクを返します。条件にあてはまるタスクが多数に及ぶことがあるので、すべての結果を得るにはページングしてください。 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskList" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" post: tags: - af-task summary: タスク一括更新 description: | タスクを一括更新します。 リクエストボディは、1個以上の「操作」オブジェクトを含むJSON配列になります。 操作オブジェクトには、現在「削除」の1通りのみがあります。 これら操作オブジェクトを複数含めることで、1リクエストで複数の削除ができます。 複数の操作のうち、1つでも失敗するとAPIのレスポンス全体としては失敗になります。 成功した部分までは反映されます。 security: - ProjectOwner: [] operationId: batchUpdateTasks parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" requestBody: required: true content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/BatchTaskRequestItem" responses: "200": description: | 正常。レスポンスには更新されたタスクが含まれます。 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/Task" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": # TODO Error定義構造化(KRSANNOFAC-1502) description: 停止中プロジェクトに対する操作のため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Errors" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/generate-tasks: post: tags: - af-task summary: タスク一括作成 description: | タスク作成ルールに基づいて、タスクを一括で作成します。 タスク作成ルールは、以下の3つです。 * `ByCount`:1つのタスクに割り当てる入力データの個数を指定してタスクを生成します。この作成ルールは、画像を同じ枚数均等にタスクに割り振りたい場合に便利です。 * `ByDirectory`:入力データ名をファイルパスに見立て、ディレクトリ単位でタスクを生成します。この作成ルールは、動画などから切り出した画像をディレクトリ別に格納し、その動画(ディレクトリ)の単位でタスクを作りたい場合に便利です。 * `ByInputDataCsv`:入力データを各タスクに割り振ったCSVへのS3パスを指定してタスクを生成できます。この作成ルールは、特定のデータの組み合わせを持ったタスクを作成したい場合に便利です。 本APIを実行すると、バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`gen-tasks`)。 **注意:** タスクに割り当てることができる入力データの個数は最大200です。 #### ByDirectory: ディレクトリ単位でのタスク一括生成の使い方 例えば、次のような `input_data_name` の入力データが登録されているとします。 * a.zip/dir1/image1.png * a.zip/dir1/image2.png * a.zip/dir1/subdir/image3.png * a.zip/dir1/subdir/image4.png * a.zip/dir1/subdir/image5.png * b.zip/dir2/subdir1/image6.png * b.zip/dir2/subdir1/image7.png * b.zip/dir2/subdir1/image8.png * b.zip/dir2/subdir2/image9.png * b.zip/dir2/subdir2/image10.png ここで、`input_data_name_prefix`フィールド に `a.zip` を指定すると、次の2タスクが生成されます。 1. タスク: `{task_id_prefix}_a.zip_dir1` * a.zip/dir1/image1.png * a.zip/dir1/image2.png 2. タスク: `{task_id_prefix}_a.zip_dir1_subdir` * a.zip/dir1/subdir/image3.png * a.zip/dir1/subdir/image4.png * a.zip/dir1/subdir/image5.png 次に、`input_data_name_prefix` に `b.zip/dir2` を指定すると、次の2タスクが生成されます。 1. タスク: `{task_id_prefix}_b.zip_dir2_subdir1` * b.zip/dir2/subdir1/image6.png * b.zip/dir2/subdir1/image7.png * b.zip/dir2/subdir1/image8.png 2. タスク: `{task_id_prefix}_b.zip_dir2_subdir2` * b.zip/dir2/subdir2/image9.png * b.zip/dir2/subdir2/image10.png `input_data_name_prefix` が未指定の時は、全ディレクトリごとにタスクが作成されます。つまり次のように4つのタスクが生成されます。 1. タスク: `{task_id_prefix}_a.zip_dir1` * a.zip/dir1/image1.png * a.zip/dir1/image2.png 2. タスク: `{task_id_prefix}_a.zip_dir1_subdir` * a.zip/dir1/subdir/image3.png * a.zip/dir1/subdir/image4.png * a.zip/dir1/subdir/image5.png 3. タスク: `{task_id_prefix}_b.zip_dir2_subdir1` * b.zip/dir2/subdir1/image6.png * b.zip/dir2/subdir1/image7.png * b.zip/dir2/subdir1/image8.png 4. タスク: `{task_id_prefix}_b.zip_dir2_subdir2` * b.zip/dir2/subdir2/image9.png * b.zip/dir2/subdir2/image10.png タスクに割り当てられる「ディレクトリ内の入力データ」の順序は、名前の昇順となります。 **注意:** `ByDirectory`では、入力データ名がファイルパス形式になっていない入力データはタスクの作成対象になりません。 例えば、`foo/bar.png` はタスクの作成対象になりますが、ディレクトリを含まない`bar.png` や、最後がディレクトリになっている`foo/bar.png/` は対象になりません。 **注意:** `ByDirectory`では、入力データ名のディレクトリ部分がタスクIDの一部として利用されます。そのため、入力データ名のディレクトリ部分は、タスクIDとして利用できる文字で構成されている必要があります。[値の制約についてはこちら。](#section/API-Convention/APIID) 入力データ名のディレクトリ部分にタスクIDとして利用できない文字が含まれている場合、タスクの生成は失敗します。 **注意:** `ByDirectory`では、一つのディレクトリに200ファイルより多くの入力データがある場合、複数のタスクに分かれます。 例えば、`foo/` の中に201ファイルがある場合、fooから2つのタスクが作成されます。1つ目は最初の200ファイルを割り当て、2つ目は最後の1ファイルのタスクに分かれます。 分かれたタスクは、 `{上述のタスクIDの付与則}_連番` の形式でタスクIDが付与されます。連番は、対象の入力データ数の桁数まで0埋めされます。 **注意:** 動画プロジェクトの場合、ディレクトリに含まれる動画の入力データは1つに制限してください。 これが守られない場合、作成されたタスクで動画を再生できない場合があります。 #### ByInputDataCsv: CSVによるタスク一括生成の使い方 以下のように「タスクID,入力データ名,入力データID」を1行毎に指定したCSVを作成します。 ``` task_1,a001.jpg,ca0cb2f9-fec5-49b4-98df-dc34490f9785 task_1,a002.jpg,5ac1987e-ca7c-42a0-9c19-b5b23a41836b task_1,centinel.jpg,81d6407b-2172-4fa8-8525-2e43c49267ee task_2,b001.jpg,4f2ae4d0-7a38-4f9a-be6f-170ba76aba73 task_2,b002.jpg,45ac5852-f20c-4938-9ee9-cc0274401df7 task_2,centinel.jpg,81d6407b-2172-4fa8-8525-2e43c49267ee task_3,c001.jpg,3260c7a0-4820-424d-a26e-db7e91dbc139 task_3,centinel.jpg,81d6407b-2172-4fa8-8525-2e43c49267ee ``` CSVのエンコーディングは UTF-8(BOM付き)、UTF-8(BOMなし)、UTF-16(BOM付きLE) のいずれかのみ対応しています。 リクエストボディの`csv_data_path`には、[createTempPath](#operation/createTempPath) APIで取得したS3パスを指定してください。[createTempPath](#operation/createTempPath) APIで取得したURLに、事前にCSVファイルをアップロードする必要があります。 security: - ProjectOwner: [] operationId: initiateTasksGeneration parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskGenerateRequest" responses: "202": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskGenerateResponse" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: 停止中プロジェクトに対する操作のため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/tasks/{task_id}: get: tags: - af-task summary: タスク取得 description: | タスクを取得します。 security: - AllProjectMember: [] operationId: getTask parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Task" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-task summary: タスク作成/更新 description: | タスクを作成または更新します。 大量のタスクを一括で生成する場合は、[initiateTasksGeneration](#operation/initiateTasksGeneration) APIの使用を検討してください。 security: - ProjectOwner: [] operationId: putTask parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: | タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Task" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: 停止中プロジェクトに対する操作のため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" delete: tags: - af-task summary: タスク削除 description: | タスクを削除します。 security: - ProjectOwner: [] operationId: deleteTask parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" responses: "200": description: 正常。削除したタスクを返します content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Task" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/assign-tasks: post: tags: - af-task summary: タスク割当 description: | 自分自身またはメンバーにタスクを割り当てます。 security: - AllProjectMember: [] operationId: assignTasks parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskAssignRequest" responses: "200": description: 正常。割り当てられたタスクを返します。 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/Task" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: プロジェクトが停止中のため、タスクの割当ができない。 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/tasks/metadata: patch: tags: - af-task summary: タスクメタデータの一括更新 description: | 複数のタスクのメタデータを一括で更新します。 security: - ProjectDataUser: [] operationId: patchTasksMetadata parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PatchTasksMetadataRequest" responses: "200": $ref: "swagger-api-components.yaml#/components/responses/SuccessMessage" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: 停止中プロジェクトに対する操作のため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/tasks/{task_id}/operate: post: tags: - af-task summary: タスク状態変更 description: | タスクのステータスやフェーズ、担当者を変更できます。 ユースケースごとのリクエストボディのサンプルを、以下に記載します。 ### タスクのステータスを作業中に変更 ``` {"status": "working", "account_id": "{現在の担当者のアカウントID}", "last_updated_datetime": "2018-08-14T19:01:51.775+09:00"} ``` APIの制約は以下の通りです。 * API実行者は、現在のタスクの担当者 * 現在のタスクのステータスが`not_started`, `break`, `on_hold` のいずれか ### タスクのステータスを休憩中に変更 ``` {"status": "break", "account_id": "{現在の担当者のアカウントID}", "last_updated_datetime": "2018-08-14T19:01:51.775+09:00"} ``` APIの制約は以下の通りです。 * API実行者は、現在のタスクの担当者 * 現在のタスクのステータスが`working` ### タスクのステータスを保留中に変更 ``` {"status": "on_hold", "account_id": "{現在の担当者のアカウントID}", "last_updated_datetime": "2018-08-14T19:01:51.775+09:00"} ``` APIの制約は以下の通りです。 * API実行者は、現在のタスクの担当者 * 現在のタスクのステータスが`working` ### タスクの提出 ``` {"status": "complete", "account_id": "{現在の担当者のアカウントID}", "last_updated_datetime": "2018-08-14T19:01:51.775+09:00"} ``` APIの制約は以下の通りです。 * API実行者は、現在のタスクの担当者 * 現在のタスクのステータスが`working` ### タスクの提出取り消し ``` {"status": "cancelled", "account_id": "{タスクを提出したユーザーのアカウントID}", "last_updated_datetime": "2018-08-14T19:01:51.775+09:00"} ``` APIの制約は以下の通りです。 * API実行者は、タスクを提出したユーザー * 現在のタスクのステータスが`not_started` * 現在のタスクのフェーズが`inspection`または`acceptance` * タスクの提出後に、検査/受入(抜取含む)等の作業が一切行われていない ### タスクの差し戻し ``` {"status": "rejected", "account_id": "{現在の担当者のアカウントID}", "last_updated_datetime": "2018-08-14T19:01:51.775+09:00"} ``` APIの制約は以下の通りです。 * API実行者は、現在のタスクの担当者 * 現在のタスクのステータスが`working` * 現在のタスクのフェーズが`inspection`または`acceptance` ### タスクの強制差し戻し ``` {"status": "rejected", "force": true, "last_updated_datetime": "2018-08-14T19:01:51.775+09:00"} ``` 「強制差し戻し」は、通常の「差し戻し」と比較して以下の点が異なります。 * 現在のタスクのステータスやフェーズに関わらず、タスクを差し戻せる * 検査コメントを付与しなくても、タスクを指し戻せる * 抜取検査・抜取受入のスキップ判定に影響を及ぼさない APIの制約は以下の通りです。 * API実行者は、プロジェクトオーナーロールを持つ ### タスクの受入取り消し ``` {"status": "not_started", "account_id": "{受入取り消し後の担当者のアカウントID}", "last_updated_datetime": "2018-08-14T19:01:51.775+09:00"} ``` APIの制約は以下の通りです。 * API実行者は、プロジェクトオーナーロールを持つ * 現在のタスクのステータスが`completed` * 現在のタスクのフェーズが`acceptance` ### タスクの担当者の変更 ``` {"status": "not_started", "account_id": "{担当させるユーザーのアカウントID}", "last_updated_datetime": "2018-08-14T19:01:51.775+09:00"} ``` タスクに担当者を割り当てない場合は、`account_id`を未指定にしてください。 このAPIは、メンバー1人に割り当てられるタスク数の上限を無視して、担当者を変更できます。 APIの制約は以下の通りです。 * API実行者は、プロジェクトオーナーまたはチェッカーロールを持つ security: - AllProjectMember: [] operationId: operateTask parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskOperation" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Task" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: 指定された現在の状態が実際の現在の状態と食い違っている content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/tasks/{task_id}/histories: get: tags: - af-task summary: タスク履歴一括取得 description: | タスクの作業履歴をすべて取得します。 security: - AllProjectMember: [] operationId: getTaskHistories parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/TaskHistory" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/annotations: get: tags: - af-annotation summary: アノテーション一括取得 description: アノテーションを一括で取得します。 security: - AllProjectMember: [] operationId: getAnnotationList parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: page in: query description: 検索結果のうち、取得したいページの番号(1始まり) required: false schema: type: integer minimum: 1 default: 1 - name: limit in: query description: 1ページあたりの取得するデータ件数 required: false schema: type: integer minimum: 0 maximum: 200 default: 30 - name: aggregate_by_task_and_input in: query description: | `true`を指定すると、「タスクIDと入力データIDの組」ごとに検索結果を集計します。 required: false schema: type: boolean default: false - name: no_aggregate_label_and_input in: query description: | `true`を指定すると、ラベルIDによるアノテーション検索数の集約結果、および属性IDによるアノテーション検索数の集約結果を取得しません。 このパラメーターを`true`に指定することで集約計算は行われなくなるので、アノテーションの検索が速くなる可能性があります。 required: false schema: type: boolean default: false - name: query in: query description: | 絞り込み条件([AnnotationQuery](#section/AnnotationQuery))をJSON形式で表した文字列。 required: false example: '{"label_id":"b048c6b3-b36f-4c8d-97ea-96828a50a44c"}' schema: type: string - name: sort in: query description: | ソート順の指定。 以下のキーを使用できます。 * `task_id` * `input_data_id` * `detail.annotation_id` * `detail.account_id` * `detail.label_id` * `detail.data_holding_type` * `detail.created_datetime` * `detail.updated_datetime` キーの先頭に`-`を付けると、降順でソートされます。 `,`でキーを区切ると、複数のキーでソートされます。先頭のキーから順に優先順位が割り振られます。 required: false example: task_id,input_data_id,detail.annotation_id,-detail.updated_datetime schema: type: string - name: v in: query description: | レスポンスに含まれるアノテーションのフォーマットバージョンを指定します。 未指定の場合や"2"以外が指定された場合は"1"が指定されたものとして扱います。 required: false schema: type: string enum: - "1" - "2" default: "1" example: "2" responses: "200": description: 指定された条件にあてはまるアノテーションを返します。条件にあてはまるアノテーションが多数に及ぶことがあるので、すべての結果を得るにはページングしてください。 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/AnnotationList" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" post: tags: - af-annotation summary: アノテーション一括更新 description: | 複数のアノテーションを一括更新します。 リクエストボディは、1個以上の「操作」オブジェクトを含むJSON配列になります。 操作オブジェクトには、「更新」と「削除」の2通りがあり、それぞれJSONオブジェクト構造が異なります。 これら操作オブジェクトを複数含めることで、1つのリクエストで複数の更新や削除ができます。 APIの制約は以下の通りです。 * アノテーションラベルの以下の変更はできない * 異なるアノテーションの種類のラベルへの変更 * 「全体」アノテーションラベルの変更 * 「塗りつぶしv2」アノテーションラベルの変更 * 受入完了タスクのアノテーションは、プロジェクトオーナーロールを持つユーザーのみ更新/削除できる。 複数の操作のうち、1つでも失敗するとAPIのレスポンス全体としては失敗になります。 成功した部分までは反映されます。 security: - ProjectAccepter: [] operationId: batchUpdateAnnotations parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: v in: query description: | レスポンスに含まれるアノテーションのフォーマットバージョンを指定します。 未指定の場合や"2"以外が指定された場合は"1"が指定されたものとして扱います。 required: false schema: type: string enum: - "1" - "2" default: "1" example: "2" requestBody: required: true content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/BatchAnnotationRequestItem" responses: "200": description: | 正常。レスポンスには、更新されたアノテーションが含まれます。 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/SingleAnnotation" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": # TODO Error定義構造化(KRSANNOFAC-1502) description: 停止中プロジェクトに対する操作、または、先に更新されているため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Errors" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/tasks/{task_id}/inputs/{input_data_id}/annotation: get: tags: - af-annotation summary: アノテーションの取得 description: | アノテーションを取得します。 security: - AllProjectMember: [] operationId: getEditorAnnotation parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" - name: task_history_id in: query description: | 過去のフェーズのアノテーションを取得する場合、タスク履歴IDを指定します。未指定時は最新のアノテーションを取得します。 過去のアノテーションデータは最後に保存してから30日前のデータまで取得できます。 30日より前のデータを取得しようとした場合はアノテーションデータは空リストとなります。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskHistoryId" - name: v in: query description: | レスポンスに含まれるアノテーションのフォーマットバージョンを指定します。 未指定の場合や"2"以外が指定された場合は"1"が指定されたものとして扱います。 required: false schema: type: string enum: - "1" - "2" default: "1" example: "2" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/AnnotationOutput" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-annotation summary: アノテーション更新 description: | アノテーションを更新します。 APIを実行できるユーザーは、以下の通りです。 * 過去に誰にも割り当てられていないタスク:プロジェクトオーナーロールを持つユーザー * 過去に誰かに割り当てられたことがあるタスク:タスクの現在の担当者 ただし、`is_protected`は、プロジェクトオーナーロールを持つユーザーのみ変更可能です。 security: - AllProjectMember: [] operationId: putAnnotation parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" - name: v in: query description: | レスポンスに含まれるアノテーションのフォーマットバージョンを指定します。 未指定の場合や"2"以外が指定された場合は"1"が指定されたものとして扱います。 required: false schema: type: string enum: - "1" - "2" default: "1" example: "2" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/AnnotationInput" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/AnnotationOutput" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": # TODO Error定義構造化(KRSANNOFAC-1502) description: 停止中プロジェクトに対する操作、または、先に更新されているため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Errors" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/tasks/{task_id}/inputs/{input_data_id}/annotation/simple: get: tags: - af-annotation summary: Simpleアノテーションの取得 description: | Simpleアノテーションを取得します。 [getAnnotationArchive](#operation/getAnnotationArchive) APIでダウンロードできるSimpleアノテーションZIPの一部を、取得することができます。 **注意:** このAPIでは、塗りつぶし画像をダウンロードするためのURLを取得できません。 security: - AllProjectMember: [] operationId: getAnnotation parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/SimpleAnnotation" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/archive/full: get: tags: - af-annotation summary: FullアノテーションZIP取得 description: | FullアノテーションZIPをダウンロードするための、認証済み一時URLを取得します。 取得したURLは1時間で失効します。 アノテーションZIPの更新中に、このAPIを実行すると409エラーが発生します。 FullアノテーションZIPのデータ構造については、[Full Annotation ZIP](#section/Full-Annotation-ZIP)を参照ください。 security: - ProjectDataUser: [] operationId: getArchiveFullWithProId deprecated: true parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "201": $ref: "swagger-api-components.yaml#/components/responses/FileRedirectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: アノテーションZIPを更新中のため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/archive/simple: get: tags: - af-annotation summary: SimpleアノテーションZIP取得 description: | SimpleアノテーションZIPをダウンロードするための、認証済み一時URLを取得します。 取得したURLは1時間で失効します。 アノテーションZIPの更新中に、このAPIを実行すると409エラーが発生します。 SimpleアノテーションZIPのデータ構造については、[Simple Annotation ZIP](#section/Simple-Annotation-ZIP)を参照ください。 security: - ProjectDataUser: [] operationId: getAnnotationArchive parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "201": $ref: "swagger-api-components.yaml#/components/responses/FileRedirectResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: アノテーションZIPを更新中のため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/archive/update: post: tags: - af-annotation summary: アノテーションZIP更新開始 description: | アノテーションZIPの更新を開始します。 アノテーションZIPの更新は、データ量によっては数十分以上かかる場合もあります。 アノテーションZIPは毎日AM03:00(JST)頃に自動更新されますが、本APIを用いると、自動更新を待たずにアノテーションZIPの更新を要求できます。 本APIを実行すると、バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`gen-annotation`)。 security: - ProjectDataUser: [] operationId: postAnnotationArchiveUpdate parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "202": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PostAnnotationArchiveUpdateResponse" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: ジョブの同時実行制限による失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/tasks/{task_id}/inputs/{input_data_id}/inspections: get: deprecated: true tags: - af-inspection summary: 検査コメント一括取得 description: | 指定されたタスクで、指定された入力データにつけられた検査コメントをすべて取得します。 security: - AllProjectMember: [] operationId: getInspections parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/Inspection" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" post: deprecated: true tags: - af-inspection summary: 検査コメント一括更新 description: | 検査コメントを一括更新します。 タスクの現在の担当者でない場合、またはタスクの状態が「作業中」でない場合は409エラーになります。 リクエストボディは、1個以上の「操作」オブジェクトを含むJSON配列になります。 操作オブジェクトには、「更新(作成含む)」と「削除」の2通りがあり、それぞれJSONオブジェクト構造が異なります。 これら操作オブジェクトを複数含めることで、1リクエストで複数の更新や削除ができます。 既に作成済みの検査コメントのうち、リクエストボディの配列に含まれないものは更新されません。 複数の操作のうち、1つでも失敗するとAPIのレスポンス全体としては失敗になります。 成功した部分までは反映されます。 security: - AllProjectMember: [] operationId: batchUpdateInspections parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" requestBody: required: true content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/BatchInspectionRequestItem" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/Inspection" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": # TODO Error定義構造化(KRSANNOFAC-1502) description: 停止中プロジェクトに対する操作、または、先に更新されているため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Errors" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/tasks/{task_id}/inputs/{input_data_id}/comments: get: tags: - af-comment summary: コメント一括取得 description: | 指定されたタスクで、指定された入力データにつけられたコメントをすべて取得します。 security: - AllProjectMember: [ ] operationId: getComments parameters: - name: v in: query description: | 2 を指定した場合、検査コメントのデータも含めたコメントデータを返します。 パラメーターの指定がない、あるいは値が 2 以外の場合は検査コメントを除いたコメントデータを返します。 required: false schema: type: string example: "2" - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/Comment" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" post: tags: - af-comment summary: コメント一括更新 description: | コメントを一括更新します。 タスクの現在の担当者でない場合、またはタスクの状態が「作業中」でない場合は409エラーになります。 リクエストボディは、1個以上の「操作」オブジェクトを含むJSON配列になります。 操作オブジェクトには、「更新(作成含む)」と「削除」の2通りがあり、それぞれJSONオブジェクト構造が異なります。 これら操作オブジェクトを複数含めることで、1リクエストで複数の更新や削除ができます。 既に作成済みのコメントのうち、リクエストボディの配列に含まれないものは更新されません。 複数の操作のうち、1つでも失敗するとAPIのレスポンス全体としては失敗になります。 成功した部分までは反映されます。 security: - AllProjectMember: [ ] operationId: batchUpdateComments parameters: - name: v in: query description: | 2 を指定した場合、検査コメントのデータも含めたコメントデータを返します。 パラメーターの指定がない、あるいは値が 2 以外の場合は検査コメントを除いたコメントデータを返します。 required: false schema: type: string example: "2" - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: task_id in: path description: タスクID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/TaskId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" requestBody: required: true content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/BatchCommentRequestItem" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/Comment" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": # TODO Error定義構造化(KRSANNOFAC-1502) description: 停止中プロジェクトに対する操作、または、先に更新されているため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Errors" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/inputs: get: tags: - af-input summary: 入力データの一括取得 description: | 入力データを一括で取得します。 security: - AllProjectMember: [] operationId: getInputDataList parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: input_data_id in: query description: 入力データIDでの部分一致検索で使用。大文字小文字は区別しません。 required: false schema: type: string minLength: 1 maxLength: 300 - name: input_data_name in: query description: 入力データ名での部分一致検索で使用。大文字小文字は区別しません。 required: false schema: type: string minLength: 1 maxLength: 300 - name: input_data_path in: query description: 入力データパスでの部分一致検索で使用。 required: false schema: type: string minLength: 1 maxLength: 300 - name: task_id in: query description: 入力データが紐づくタスクIDの部分一致検索で使用。大文字小文字は区別しません。条件に合致した先頭100件のタスクに使われている入力データを検索します。 required: false schema: type: string minLength: 1 maxLength: 300 - name: from in: query description: 指定した日時以降に更新された入力データを取得します。日時のフォーマットはISO 8601 拡張形式です。 required: false schema: type: string format: date-time - name: to in: query description: 指定した日時以前に更新された入力データを取得します。日時のフォーマットはISO 8601 拡張形式です。 required: false schema: type: string format: date-time - name: page in: query description: 検索結果のうち、取得したいページの番号(1始まり) required: false schema: type: integer minimum: 1 default: 1 - name: limit in: query description: 1ページあたりの取得するデータ件数 required: false schema: type: integer minimum: 0 maximum: 200 default: 30 responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataList" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" post: tags: - af-input summary: 入力データの一括更新 description: | 入力データを一括更新します。 リクエストボディは、1個以上の「操作」オブジェクトを含むJSON配列になります。 操作オブジェクトには、現在「削除」しかありません。 これら操作オブジェクトを複数含めることで、1個のリクエストで複数の削除ができます。 複数の操作のうち、1つでも失敗するとAPIのレスポンス全体としては失敗になります。 成功した部分までは反映されます。 security: - ProjectOwner: [] operationId: batchUpdateInputs parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" requestBody: required: true content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/BatchInputDataRequestItem" responses: "200": description: 正常。レスポンスには、更新された入力データが含まれます。 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/InputData" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": # TODO Error定義構造化(KRSANNOFAC-1502) description: 停止中プロジェクトに対する操作のため失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Errors" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/inputs/{input_data_id}: get: tags: - af-input summary: 入力データの取得 description: | 入力データを取得します。 security: - AllProjectMember: [] operationId: getInputData parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputData" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-input summary: | 入力データの作成/更新 description: | 入力データを作成または更新します。 Annofabにファイルをアップロードして入力データを作成する場合は、事前に[createTempPath](#operation/createTempPath) APIを実行してください。 ### 画像のリサイズ Annofabにアップロードした画像は、自動的に「長辺4096px以内」になるよう縮小されます。 アノテーションの座標値は、縮小前の画像サイズに対応する値に復元されます。 ### ZIPファイルで入力データをまとめて作成する 複数のファイルをZIPで圧縮してAnnofabにアップロードすると、入力データをまとめて作成できます。 パスパラメータの`input_data_id`は無視されるため、任意の値を指定してください。 リクエストボディの`input_data_name`には、入力データ名のプレフィックスを指定してください。 ZIPファイルを入力データとして登録すると、バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`gen-inputs`)。 ZIPファイルでの入力データ登録には以下の制限があります。 * アップロードできるZIPファイルのサイズは、最大5GBです。 * ファイル名の文字コードはUTF-8エンコーディングのみ対応しています。 #### 画像ファイル・動画ファイルから入力データを作成する 画像ファイル・動画ファイルを圧縮したZIPファイルをアップロードすることで、入力データとして登録できます。 なお、ZIPファイルに次のようなファイルが含まれていた場合、該当ファイルは入力データとして登録されません。 * プロジェクトがサポートしていないファイル * 画像プロジェクトの場合:jpeg, png, gif以外のファイル * 動画プロジェクトの場合:m3u8, ts, mp4, webm, ogg以外のファイル * ファイル名が`.`(ドット)から始まるファイル * フォルダ名が`.`(ドット)から始まるフォルダ以下のファイル 以下に、画像ファイルを登録する際のサンプルを記載します。 ``` foo.zip/ ├── image1.jpg ├── image2.jpg ``` このフォルダ構成のZIPファイルをアップロードして、リクエストボディの`input_data_name`に`bar.zip`を指定した場合、入力データ名が`bar.zip/image1.jpg`,`bar.zip/image2.jpg`の2つの入力データが生成されます。 #### ストリーミング形式の動画を入力データとして登録する ストリーミング形式の動画をAnnofabにアップロードして、入力データとして登録できます。 ただし、ZIPで圧縮する必要があります。ZIPファイルには、m3u8ファイルとtsファイルの両方を含めてください。 m3u8ファイルに記述された相対パスでtsファイルは、参照可能である必要があります。 以下に、フォルダ構成のサンプルを記載します。 ``` hoge.zip/ ├── hoge.ts ├── fuga/ │   ├── foo.m3u8 (hoge.ts, fuga/foo1.ts, fuga/foo2.tsを参照) │   ├── foo1.ts │   ├── foo2.ts │   └── lib ├── piyo1/ │   ├── piyo2 │   │   ├── bar.ts │   ├── bar.m3u8 (hoge.ts, piyo1/piyo2/bar.tsを参照) ``` #### 3次元点群の入力データを作成する KITTI形式、およびAnnofab 点群形式(KITTIベース)でのデータ登録に対応しています。 ZIPファイルの形式など、詳細は[Annofabのユーザーマニュアル](https://annofab.readme.io/docs)に記載予定です。 ### 注意事項 * `input_data_path`のスキーマが`https`の場合、`input_data_name`もしくは`input_data_path`の末尾にファイルの拡張子を含むようにしてください。 Annofabは拡張子からファイル形式を識別します。`input_data_name`と`input_data_path`の両方に拡張子が含まれている場合は、`input_data_name`の拡張子がファイル形式の識別に使われます。 security: - ProjectOwner: [] operationId: putInputData parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: input_data_id in: path description: | 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputData" "202": description: zipファイルを受領、バッチにて登録開始。 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectJobInfo" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": description: 先に更新されているため、またはジョブの同時実行制御(zipファイルをアップロードした場合)により失敗 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/ErrorAlreadyUpdated" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" delete: tags: - af-input summary: 入力データの削除 description: | 入力データを削除します。 security: - ProjectOwner: [] operationId: deleteInputData parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" responses: "200": description: 正常。削除した入力データを返します content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InputData" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "403": $ref: "swagger-api-components.yaml#/components/responses/ErrorForbiddenResource" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/inputs/{input_data_id}/supplementary-data: get: tags: - af-supplementary summary: 補助情報一括取得 description: | 入力データに紐付けられた補助情報をすべて取得します。 security: - AllProjectMember: [] operationId: getSupplementaryDataList parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/SupplementaryData" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/inputs/{input_data_id}/supplementary-data/{supplementary_data_id}: put: tags: - af-supplementary summary: 補助情報作成/更新 description: | 補助情報を作成または更新します。 security: - ProjectOwner: [] operationId: putSupplementaryData parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" - name: supplementary_data_id in: path description: 補助情報ID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/SupplementaryDataId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/SupplementaryDataRequest" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/SupplementaryData" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": $ref: "swagger-api-components.yaml#/components/responses/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" delete: tags: - af-supplementary summary: 補助情報削除 description: | 補助情報を削除します。 security: - ProjectOwner: [] operationId: deleteSupplementaryData parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: input_data_id in: path description: 入力データID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" - name: supplementary_data_id in: path description: 補助情報ID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/SupplementaryDataId" responses: "200": description: 正常 "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/create-temp-path: post: tags: - af-input summary: アップロード先URLの取得 description: | Annofabにファイルをアップロードするのに必要な情報を取得します。 このAPIは、Annofabにファイルをアップロードして、入力データや補助情報を作成する際に使用します。 Annofabにファイルをアップロードして入力データを作成する手順は、以下の通りです。 1. APIを実行して、ファイルのアップロードに必要な情報を取得する。 ``` $ curl --request POST 'https://annofab.com/api/v1/projects/{project_id}/create-temp-path' { "url": "https://s3..amazonaws.com///?param1=...¶m2=...", "path": "s3:////" } ``` 2. 手順1で取得した`url`に対して、HTTP PUTメソッドで、ファイルをアップロードする。 ``` $ curl --request PUT --header 'Content-Type: {CONTENT_TYPE_HERE}' --data-binary @/hoge.zip 'https://{手順1で取得したurl}' ``` 3. 手順1で取得した`path`を、[putInputData](#operation/putInputData) APIのリクエストボディ`input_data_path`に指定して、putInputData APIを実行する。 ``` $ curl --request PUT --header 'Content-Type: text/json' \ --data '{"input_data_name":"{input_data_name}", "input_data_path":"{手順1で取得したpath}" }' \ 'https://annofab.com/api/v1/projects/{project_id}/inputs/{input_data_id}' ``` #### 注意事項 * 手順2を実行してから24時間以内に、手順3の操作を完了させてください。手順2でアップロードしたファイルは、24時間経過すると削除されます。 security: - AllProjectMember: [] operationId: createTempPath parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "200": description: | 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/DataPath" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/instruction: get: tags: - af-instruction summary: 作業ガイドの取得 description: | 作業ガイドのHTMLを取得します。 security: - AllProjectMember: [] operationId: getInstruction parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: history_id in: query description: | [getInstructionHistory](#operation/getInstructionHistory) APIで取得した、作業ガイドの履歴ID required: true schema: type: string example: "ed55914c-9f04-470e-8af2-373c8def3e8b" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/Instruction" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" put: tags: - af-instruction summary: 作業ガイドの更新 description: | 作業ガイドのHTMLを更新します。 security: - ProjectOwner: [] - ProjectAccepter: [] operationId: putInstruction parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" requestBody: required: true content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/PutInstructionRequest" responses: "200": description: 作業ガイドの更新が成功した。 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InstructionHistory" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "409": $ref: "swagger-api-components.yaml#/components/responses/ErrorStateMismatch" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/instruction-history: get: tags: - af-instruction summary: 作業ガイドの編集履歴の取得 description: | 作業ガイドの編集履歴を取得します。 取得される編集履歴は日付の新しい順にソートされます。 security: - AllProjectMember: [] operationId: getInstructionHistory parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: limit in: query description: 取得する編集履歴の件数 required: false schema: type: integer default: 30 minimum: 0 maximum: 200 responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/InstructionHistory" "400": $ref: "swagger-api-components.yaml#/components/responses/ErrorInvalidRequest" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/instruction-images: get: tags: - af-instruction summary: 作業ガイドの画像一覧の取得 description: | 作業ガイドの画像一覧を取得します。 security: - AllProjectMember: [] operationId: getInstructionImages parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" responses: "200": description: 正常 content: application/json: schema: type: array items: $ref: "swagger-api-components.yaml#/components/schemas/InstructionImage" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/instruction-images/{image_id}: delete: tags: - af-instruction summary: 作業ガイドの画像削除 description: | 作業ガイドの画像を削除します。 security: - ProjectOwner: [] - ProjectAccepter: [] operationId: deleteInstructionImage parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: image_id in: path description: 作業ガイド画像ID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InstructionImageId" responses: "200": description: 正常 "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" /projects/{project_id}/instruction-images/{image_id}/put-url: get: tags: - af-instruction summary: 作業ガイドの画像登録・更新用URL取得 description: | プロジェクトの作業ガイドの画像を登録するためのput先URLを取得します。 作業ガイド画像の登録/更新方法は以下の通りです。 1. APIを実行して、ファイルアップロード用のURLを取得する。 ``` $ curl -X GET -H 'Content-Type: {CONTENT_TYPE_HERE}' 'https://annofab.com/api/v1/projects/{project_id}/instruction-images/{image_id}/put-url' ``` 2. 手順1で取得したファイルアップロード用のURLに対して、登録/更新する作業ガイド画像ファイル(`hoge.jpg`)をPUTする。 ``` $ curl -X PUT -H 'Content-Type: {CONTENT_TYPE_HERE}' --data-binary @/hoge.jpg '{ファイルアップロード用のURL}' ``` security: - ProjectOwner: [] - ProjectAccepter: [] operationId: getInstructionImageUrlForPut parameters: - name: project_id in: path description: プロジェクトID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: image_id in: path description: 作業ガイド画像ID required: true schema: $ref: "swagger-api-components.yaml#/components/schemas/InstructionImageId" responses: "200": description: 正常 content: application/json: schema: $ref: "swagger-api-components.yaml#/components/schemas/InstructionImagePath" "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" "404": $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance"