diff --git a/annofabapi/dataclass/annotation_specs.py b/annofabapi/dataclass/annotation_specs.py index 5e82e2de..920ee092 100644 --- a/annofabapi/dataclass/annotation_specs.py +++ b/annofabapi/dataclass/annotation_specs.py @@ -124,7 +124,7 @@ class InternationalizationMessage(DataClassJsonMixin): """ """ messages: list[InternationalizationMessageMessages] - """言語コードとメッセージ(テキスト)のリスト。 * アノテーションエディタなどでは、Annofabの表示言語(各ユーザーが個人設定で選んだ言語)のメッセージが使われます * 以下の名前は、[Simple Annotation](#section/Simple-Annotation-ZIP) では `en-US` のメッセージが使われます * ラベル名 * 属性名 * 選択肢名 * いずれの場合でも、表示しようとした言語が `messages` に含まれない場合、 `default_lang` に指定した言語のメッセージが使われます """ + """言語コードとメッセージ(テキスト)のリスト。 * アノテーションエディタなどでは、Annofabの表示言語(各ユーザーが個人設定で選んだ言語)のメッセージが使われます * 以下の名前は、[Simple Annotation](#tag/x-annotation-zip/Simple-Annotation-ZIP) では `en-US` のメッセージが使われます * ラベル名 * 属性名 * 選択肢名 * いずれの場合でも、表示しようとした言語が `messages` に含まれない場合、 `default_lang` に指定した言語のメッセージが使われます """ default_lang: str """希望された言語のメッセージが存在しない場合に、フォールバック先として使われる言語コード""" @@ -610,7 +610,7 @@ class LabelV3(DataClassJsonMixin): """""" field_values: dict[str, AnnotationTypeFieldValue] - """KeyがフィールドIdであるDictionaryです。 カスタムの[組織プラグイン](#operation/putOrganizationPlugin)で利用される[UserDefinedAnnotationTypeDefinition](#section/UserDefinedAnnotationTypeDefinition).`field_definitions`で定義されます。 """ + """KeyがフィールドIdであるDictionaryです。 カスタムの[組織プラグイン](#operation/putOrganizationPlugin)で利用される[UserDefinedAnnotationTypeDefinition](#tag/x-data-types/UserDefinedAnnotationTypeDefinition).`field_definitions`で定義されます。 """ additional_data_definitions: list[str] """ラベルに所属する属性のID""" diff --git a/annofabapi/generated_api.py b/annofabapi/generated_api.py index e09aaaa9..a8fb3026 100644 --- a/annofabapi/generated_api.py +++ b/annofabapi/generated_api.py @@ -100,7 +100,7 @@ def get_annotation_archive(self, project_id: str, **kwargs) -> tuple[Any, reques authorizations: ProjectDataUser - SimpleアノテーションZIPをダウンロードするための、認証済み一時URLを取得します。 取得したURLは1時間で失効します。 アノテーションZIPの更新中に、このAPIを実行すると409エラーが発生します。 SimpleアノテーションZIPのデータ構造については、[Simple Annotation ZIP](#section/Simple-Annotation-ZIP)を参照ください。 + SimpleアノテーションZIPをダウンロードするための、認証済み一時URLを取得します。 取得したURLは1時間で失効します。 アノテーションZIPの更新中に、このAPIを実行すると409エラーが発生します。 SimpleアノテーションZIPのデータ構造については、[Simple Annotation ZIP](#tag/x-annotation-zip/Simple-Annotation-ZIP)を参照ください。 Args: project_id (str): プロジェクトID (required) @@ -133,7 +133,7 @@ def get_annotation_list(self, project_id: str, query_params: Optional[dict[str, limit (int): 1ページあたりの取得するデータ件数 aggregate_by_task_and_input (bool): `true`を指定すると、「タスクIDと入力データIDの組」ごとに検索結果を集計します。 no_aggregate_label_and_input (bool): `true`を指定すると、ラベルIDによるアノテーション検索数の集約結果、および属性IDによるアノテーション検索数の集約結果を取得しません。 このパラメーターを`true`に指定することで集約計算は行われなくなるので、アノテーションの検索が速くなる可能性があります。 - query (str): 絞り込み条件([AnnotationQuery](#section/AnnotationQuery))をJSON形式で表した文字列。 + query (str): 絞り込み条件([AnnotationQuery](#tag/x-data-types/AnnotationQuery))をJSON形式で表した文字列。 sort (str): ソート順の指定。 以下のキーを使用できます。 * `task_id` * `input_data_id` * `detail.annotation_id` * `detail.account_id` * `detail.label_id` * `detail.data_holding_type` * `detail.created_datetime` * `detail.updated_datetime` キーの先頭に`-`を付けると、降順でソートされます。 `,`でキーを区切ると、複数のキーでソートされます。先頭のキーから順に優先順位が割り振られます。 v (str): レスポンスに含まれるアノテーションのフォーマットバージョンを指定します。 未指定の場合や\"2\"以外が指定された場合は\"1\"が指定されたものとして扱います。 @@ -185,7 +185,7 @@ def get_archive_full_with_pro_id(self, project_id: str, **kwargs) -> tuple[Any, authorizations: ProjectDataUser - FullアノテーションZIPをダウンロードするための、認証済み一時URLを取得します。 取得したURLは1時間で失効します。 アノテーションZIPの更新中に、このAPIを実行すると409エラーが発生します。 FullアノテーションZIPのデータ構造については、[Full Annotation ZIP](#section/Full-Annotation-ZIP)を参照ください。 + FullアノテーションZIPをダウンロードするための、認証済み一時URLを取得します。 取得したURLは1時間で失効します。 アノテーションZIPの更新中に、このAPIを実行すると409エラーが発生します。 FullアノテーションZIPのデータ構造については、[Full Annotation ZIP](#tag/x-annotation-zip/Full-Annotation-ZIP)を参照ください。 Args: project_id (str): プロジェクトID (required) @@ -235,6 +235,37 @@ def get_editor_annotation( keyword_params.update(**kwargs) return self._request_wrapper(http_method, url_path, **keyword_params) + def get_editor_annotations_in_bulk( + self, project_id: str, task_id: str, query_params: Optional[dict[str, Any]] = None, **kwargs + ) -> tuple[Any, requests.Response]: + """アノテーションのバルク取得 + https://annofab.com/docs/api/#operation/getEditorAnnotationsInBulk + + + authorizations: AllProjectMember + + + アノテーションをバルク取得します。 このAPIは、[getEditorAnnotation](#operation/getEditorAnnotation) APIと似た機能を持ちますが、`input_data_id`を複数指定できる点が異なります。 + + Args: + project_id (str): プロジェクトID (required) + task_id (str): タスクID (required) + query_params (dict[str, Any]): Query Parameters + input_data_id (list[str]): 入力データID (required) + + Returns: + tuple[GetEditorAnnotationsInBulkResponse, requests.Response] + + + """ + url_path = f"/projects/{project_id}/tasks/{task_id}/annotations-in-bulk" + http_method = "GET" + keyword_params: dict[str, Any] = { + "query_params": query_params, + } + keyword_params.update(**kwargs) + return self._request_wrapper(http_method, url_path, **keyword_params) + def post_annotation_archive_update(self, project_id: str, **kwargs) -> tuple[Any, requests.Response]: """アノテーションZIP更新開始 https://annofab.com/docs/api/#operation/postAnnotationArchiveUpdate @@ -608,6 +639,34 @@ def get_input_data(self, project_id: str, input_data_id: str, **kwargs) -> tuple keyword_params.update(**kwargs) return self._request_wrapper(http_method, url_path, **keyword_params) + def get_input_data_in_bulk(self, project_id: str, query_params: Optional[dict[str, Any]] = None, **kwargs) -> tuple[Any, requests.Response]: + """入力データのバルク取得 + https://annofab.com/docs/api/#operation/getInputDataInBulk + + + authorizations: AllProjectMember + + + 入力データをバルク取得します。 このAPIは、[getInputData](#operation/getInputData) APIと似た機能を持ちますが、`input_data_id`を複数指定できる点が異なります。 + + Args: + project_id (str): プロジェクトID (required) + query_params (dict[str, Any]): Query Parameters + input_data_id (list[str]): 入力データIDのカンマ区切りリスト (required) + + Returns: + tuple[GetInputDataInBulkResponse, requests.Response] + + + """ + url_path = f"/projects/{project_id}/input-data-in-bulk" + http_method = "GET" + keyword_params: dict[str, Any] = { + "query_params": query_params, + } + keyword_params.update(**kwargs) + return self._request_wrapper(http_method, url_path, **keyword_params) + def get_input_data_list(self, project_id: str, query_params: Optional[dict[str, Any]] = None, **kwargs) -> tuple[Any, requests.Response]: """入力データの一括取得 https://annofab.com/docs/api/#operation/getInputDataList @@ -946,7 +1005,7 @@ def get_organization_job(self, organization_name: str, query_params: Optional[di Args: organization_name (str): 組織名 (required) query_params (dict[str, Any]): Query Parameters - type (str): 取得するジョブの種別。[詳細はこちら](#section/OrganizationJobType)。 + type (str): 取得するジョブの種別。[詳細はこちら](#tag/x-data-types/OrganizationJobType)。 limit (int): 1ページあたりの取得するデータ件数。 未指定時は30件取得。 exclusive_start_created_datetime (str): 作成日時が、指定した日付より古いジョブを取得します。 @@ -976,7 +1035,7 @@ def get_project_job(self, project_id: str, query_params: Optional[dict[str, Any] Args: project_id (str): プロジェクトID (required) query_params (dict[str, Any]): Query Parameters - type (ProjectJobType): 取得するジョブの種別。[詳細はこちら](#section/ProjectJobType)。 + type (ProjectJobType): 取得するジョブの種別。[詳細はこちら](#tag/x-data-types/ProjectJobType)。 limit (int): 1ページあたりの取得するデータ件数。 未指定時は30件取得。 exclusive_start_created_datetime (str): 作成日時が、指定した日付より古いジョブを取得します。 @@ -1003,7 +1062,7 @@ def get_my_account(self, **kwargs) -> tuple[Any, requests.Response]: https://annofab.com/docs/api/#operation/getMyAccount - authorizations: Everyone + authorizations: AnnofabUser 自分のアカウント情報を取得します。 @@ -1050,7 +1109,7 @@ def get_my_notification_message(self, message_id: str, **kwargs) -> tuple[Any, r https://annofab.com/docs/api/#operation/getMyNotificationMessage - authorizations: Everyone + authorizations: AnnofabUser 自分に届いているメッセージを取得します。 @@ -1074,7 +1133,7 @@ def get_my_notification_messages(self, query_params: Optional[dict[str, Any]] = https://annofab.com/docs/api/#operation/getMyNotificationMessages - authorizations: Everyone + authorizations: AnnofabUser 自分に届いている通知メッセージを、メッセージの作成日時が新しい順で、一括取得します。 自身に届いている通知メッセージが上限(10000件)を超える場合、上限を超えた分の通知メッセージは取得できません。 また、上限を超える場合、開封済みの通知メッセージの数は、取得可能な通知メッセージ中の集計値となります。詳細はレスポンスの項目を参照ください。 @@ -1102,7 +1161,7 @@ def get_my_notification_unread_messages_count(self, **kwargs) -> tuple[Any, requ https://annofab.com/docs/api/#operation/getMyNotificationUnreadMessagesCount - authorizations: Everyone + authorizations: AnnofabUser 自分に届いている通知メッセージの未読件数を取得します。 @@ -1148,7 +1207,7 @@ def get_my_project_members(self, **kwargs) -> tuple[Any, requests.Response]: https://annofab.com/docs/api/#operation/getMyProjectMembers - authorizations: Everyone + authorizations: AnnofabUser 自分が所属するプロジェクトのメンバー情報を一括で取得します。 @@ -1171,7 +1230,7 @@ def get_my_projects(self, query_params: Optional[dict[str, Any]] = None, **kwarg https://annofab.com/docs/api/#operation/getMyProjects - authorizations: Everyone + authorizations: AnnofabUser 自分が所属しているプロジェクトを一括で取得します。 @@ -1183,7 +1242,7 @@ def get_my_projects(self, query_params: Optional[dict[str, Any]] = None, **kwarg organization_id (str): 指定した組織に属するプロジェクトに絞り込む。 title (str): プロジェクトタイトルでの部分一致検索。大文字小文字は区別しません。 status (ProjectStatus): 指定した状態のプロジェクトで絞り込む。 - input_data_type (InputDataType): 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#section/InputDataType)を参照してください。 + input_data_type (InputDataType): 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#tag/x-data-types/InputDataType)を参照してください。 sort_by (str): `date` を指定することでプロジェクトの最新のタスク更新時間の順にソートして出力する。 未指定時はプロジェクト名でソートする。 Returns: @@ -1204,7 +1263,7 @@ def get_personal_access_tokens(self, **kwargs) -> tuple[Any, requests.Response]: https://annofab.com/docs/api/#operation/getPersonalAccessTokens - authorizations: Everyone + authorizations: AnnofabUser 自分が発行したパーソナルアクセストークンの一覧を取得します。 @@ -1227,7 +1286,7 @@ def issue_personal_access_token(self, request_body: Optional[Any] = None, **kwar https://annofab.com/docs/api/#operation/issuePersonalAccessToken - authorizations: Everyone + authorizations: AnnofabUser パーソナルアクセストークンを発行します。 @@ -1254,7 +1313,7 @@ def put_my_account(self, request_body: Optional[Any] = None, **kwargs) -> tuple[ https://annofab.com/docs/api/#operation/putMyAccount - authorizations: Everyone + authorizations: AnnofabUser 自分のアカウント情報を更新します。 @@ -1281,7 +1340,7 @@ def put_my_notification_message_opened(self, message_id: str, request_body: Opti https://annofab.com/docs/api/#operation/putMyNotificationMessageOpened - authorizations: Everyone + authorizations: AnnofabUser 通知メッセージのステータスを更新します。 自分に届いた通知メッセージのみ更新できます。 @@ -1309,7 +1368,7 @@ def revoke_personal_access_token(self, request_body: Optional[Any] = None, **kwa https://annofab.com/docs/api/#operation/revokePersonalAccessToken - authorizations: Everyone + authorizations: AnnofabUser 発行済のパーソナルアクセストークンを無効化します。 @@ -1341,7 +1400,7 @@ def create_new_organization(self, request_body: Optional[Any] = None, **kwargs) https://annofab.com/docs/api/#operation/createNewOrganization - authorizations: Everyone + authorizations: AnnofabUser 組織を作成します。 既に存在する組織名をリクエストボディに指定すると、400エラーが発生します。 @@ -1457,7 +1516,7 @@ def get_projects_of_organization( title (str): プロジェクトタイトルでの部分一致検索。大文字小文字は区別しません。 status (ProjectStatus): 指定した状態のプロジェクトで絞り込む。 plugin_id (str): 指定したプラグインIDを使用しているプロジェクトで絞り込む。 - input_data_type (InputDataType): 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#section/InputDataType)を参照してください。 + input_data_type (InputDataType): 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#tag/x-data-types/InputDataType)を参照してください。 sort_by (str): `date` を指定することでプロジェクトの最新のタスク更新時間の順にソートして出力する。 未指定時はプロジェクト名でソートする。 Returns: @@ -1596,7 +1655,7 @@ def accept_organization_invitation( https://annofab.com/docs/api/#operation/acceptOrganizationInvitation - authorizations: EveryoneRequestBody + authorizations: AnnofabUser 組織への招待を受諾し、組織へのメンバー登録を完了します。 @@ -1951,7 +2010,7 @@ def get_project_comments_url(self, project_id: str, **kwargs) -> tuple[Any, requ authorizations: ProjectDataUser - コメント全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 コメント全件ファイルは、すべてのコメントが記載されたJSONファイルです。 JSON構造は、[Comment](#section/Comment)の配列です。 毎日AM02:00(JST)頃に更新されます。 + コメント全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 コメント全件ファイルは、すべてのコメントが記載されたJSONファイルです。 JSON構造は、[Comment](#tag/x-data-types/Comment)の配列です。 毎日AM02:00(JST)頃に更新されます。 Args: project_id (str): プロジェクトID (required) @@ -1975,7 +2034,7 @@ def get_project_inputs_url(self, project_id: str, **kwargs) -> tuple[Any, reques authorizations: ProjectDataUser - 入力データ全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 入力データ全件ファイルは、すべての入力データが記載されたJSONファイルです。SON構造は、[InputData](#section/InputData)の配列です。 ただしInputData中のurlは常にnullです。 毎日AM02:00(JST)頃に更新されます。 [postProjectInputsUpdate](#operation/postProjectInputsUpdate) APIを利用すれば、手動で入力データ全件ファイルを更新できます。 + 入力データ全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 入力データ全件ファイルは、すべての入力データが記載されたJSONファイルです。SON構造は、[InputData](#tag/x-data-types/InputData)の配列です。 ただしInputData中のurlは常にnullです。 毎日AM02:00(JST)頃に更新されます。 [postProjectInputsUpdate](#operation/postProjectInputsUpdate) APIを利用すれば、手動で入力データ全件ファイルを更新できます。 Args: project_id (str): プロジェクトID (required) @@ -2000,7 +2059,7 @@ def get_project_inspections_url(self, project_id: str, **kwargs) -> tuple[Any, r authorizations: ProjectDataUser - 検査コメント全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 検査コメント全件ファイルには、すべての検査コメントが記載されたファイルです。 JSON構造は、[Inspection](#section/Inspection)の配列です。 毎日AM02:00(JST)頃に更新されます。 + 検査コメント全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 検査コメント全件ファイルには、すべての検査コメントが記載されたファイルです。 JSON構造は、[Inspection](#tag/x-data-types/Inspection)の配列です。 毎日AM02:00(JST)頃に更新されます。 Args: project_id (str): プロジェクトID (required) @@ -2025,7 +2084,7 @@ def get_project_task_histories_url(self, project_id: str, **kwargs) -> tuple[Any authorizations: ProjectDataUser - タスク履歴全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 タスク履歴イベント全件ファイルは、すべてのタスク履歴情報が記載されたJSONファイルです。JSON構造は、キーがタスクID、値が[TaskHistory](#section/TaskHistory)の配列となるマップです。 毎日AM02:00(JST)頃に更新されます。 + タスク履歴全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 タスク履歴イベント全件ファイルは、すべてのタスク履歴情報が記載されたJSONファイルです。JSON構造は、キーがタスクID、値が[TaskHistory](#tag/x-data-types/TaskHistory)の配列となるマップです。 毎日AM02:00(JST)頃に更新されます。 Args: project_id (str): プロジェクトID (required) @@ -2050,7 +2109,7 @@ def get_project_task_history_events_url(self, project_id: str, **kwargs) -> tupl authorizations: ProjectDataUser - タスク履歴イベント全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 タスク履歴イベント全件ファイルは、すべてのタスク履歴イベント情報が記載されたJSONファイルです。 JSON構造は、[TaskHistoryEvent](#section/TaskHistoryEvent)の配列です。 毎日AM02:00(JST)頃に更新されます。 + タスク履歴イベント全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 タスク履歴イベント全件ファイルは、すべてのタスク履歴イベント情報が記載されたJSONファイルです。 JSON構造は、[TaskHistoryEvent](#tag/x-data-types/TaskHistoryEvent)の配列です。 毎日AM02:00(JST)頃に更新されます。 Args: project_id (str): プロジェクトID (required) @@ -2075,7 +2134,7 @@ def get_project_tasks_url(self, project_id: str, **kwargs) -> tuple[Any, request authorizations: ProjectDataUser - タスク全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 タスク全件ファイルは、すべてのタスクが記載されたJSONファイルです。JSON構造は、[Task](#section/Task)の配列です。 毎日AM02:00(JST)頃に更新されます。 [postProjectTasksUpdate](#operation/postProjectTasksUpdate) APIを利用すれば、手動でタスク全件ファイルを更新できます。 + タスク全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 タスク全件ファイルは、すべてのタスクが記載されたJSONファイルです。JSON構造は、[Task](#tag/x-data-types/Task)の配列です。 毎日AM02:00(JST)頃に更新されます。 [postProjectTasksUpdate](#operation/postProjectTasksUpdate) APIを利用すれば、手動でタスク全件ファイルを更新できます。 Args: project_id (str): プロジェクトID (required) @@ -2177,12 +2236,12 @@ def put_project( authorizations: OrganizationAdministratorProjectOwner - プロジェクトを新規作成または更新します。 ### 新規作成する場合 ユーザーは、作成するプロジェクトをひもづける組織の [OrganizationAdministrator](#section/Authentication/OrganizationAdministrator) である必要があります。 ### 更新する場合 ユーザーは、更新するプロジェクトの [ProjectOwner](#section/Authentication/ProjectOwner) である必要があります。 また所属組織を変更する場合は、新しくひもづける組織の [OrganizationAdministrator](#section/Authentication/OrganizationAdministrator) である必要があります。 なお、プロジェクト状態を「停止中」にした場合、アノテーションZIPやタスク進捗状況などの集計情報は自動更新されなくなります。 所属組織が変更された場合バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`move-project`)。 APIの制限事項は、以下の通りです。 * `status`を`initializing`に変更できません。 * `status`が`initializing`のときは、所属組織を変更できません。 + プロジェクトを新規作成または更新します。 ### 新規作成する場合 ユーザーは、作成するプロジェクトをひもづける組織の `組織管理者` である必要があります。 ### 更新する場合 ユーザーは、更新するプロジェクトの `プロジェクトオーナー` である必要があります。 また所属組織を変更する場合は、新しくひもづける組織の `組織管理者` である必要があります。 なお、プロジェクト状態を「停止中」にした場合、アノテーションZIPやタスク進捗状況などの集計情報は自動更新されなくなります。 所属組織が変更された場合バックグラウンドジョブが登録されます。ジョブは [getProjectJob](#operation/getProjectJob) APIで確認できます(ジョブ種別は`move-project`)。 APIの制限事項は、以下の通りです。 * `status`を`initializing`に変更できません。 * `status`が`initializing`のときは、所属組織を変更できません。 Args: project_id (str): プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) (required) query_params (dict[str, Any]): Query Parameters - v (str): APIの戻り型のバージョンを指定します。 値と戻り型の対応は以下です。 - \"1\":Project - \"2\":PutProjectResponse + v (str): **所属組織を変更したとき**のレスポンスのフォーマットバージョンを指定します。 - \"1\":ステータスコードは200で、スキーマは`Project` - \"2\":ステータスコードは202で、スキーマは`PutProjectResponse`。`PutProjectResponse`には、登録されたジョブが含まれます。 request_body (Any): Request Body put_project_request (PutProjectRequest): @@ -2454,7 +2513,7 @@ def get_label_statistics(self, project_id: str, **kwargs) -> tuple[Any, requests authorizations: AllProjectMember - [ラベル別アノテーション数集計データ](#section/ArrayOfLabelStatistics) を取得するための認証済み一時URLを取得します。 + [ラベル別アノテーション数集計データ](#tag/x-data-types/ArrayOfLabelStatistics) を取得するための認証済み一時URLを取得します。 Args: project_id (str): プロジェクトID (required) @@ -2698,6 +2757,36 @@ def delete_supplementary_data(self, project_id: str, input_data_id: str, supplem keyword_params.update(**kwargs) return self._request_wrapper(http_method, url_path, **keyword_params) + def get_supplementary_data_in_bulk( + self, project_id: str, query_params: Optional[dict[str, Any]] = None, **kwargs + ) -> tuple[Any, requests.Response]: + """補助情報のバルク取得 + https://annofab.com/docs/api/#operation/getSupplementaryDataInBulk + + + authorizations: AllProjectMember + + + 補助情報をバルク取得します。 このAPIは、[getSupplementaryDataList](#operation/getSupplementaryDataList) APIと似た機能を持ちますが、`input_data_id`を複数指定できる点が異なります。 + + Args: + project_id (str): プロジェクトID (required) + query_params (dict[str, Any]): Query Parameters + input_data_id (list[str]): 入力データIDのカンマ区切りリスト (required) + + Returns: + tuple[GetSupplementaryDataInBulkResponse, requests.Response] + + + """ + url_path = f"/projects/{project_id}/supplementary-data-in-bulk" + http_method = "GET" + keyword_params: dict[str, Any] = { + "query_params": query_params, + } + keyword_params.update(**kwargs) + return self._request_wrapper(http_method, url_path, **keyword_params) + def get_supplementary_data_list(self, project_id: str, input_data_id: str, **kwargs) -> tuple[Any, requests.Response]: """補助情報一括取得 https://annofab.com/docs/api/#operation/getSupplementaryDataList @@ -2920,7 +3009,7 @@ def get_tasks(self, project_id: str, query_params: Optional[dict[str, Any]] = No auto_accepted_only (str): 「抜取検査の対象外となり、自動受入されたタスク」だけを絞り込む時に、キーのみ指定します(値は無視されます)。 metadata (str): メタデータからタスクを検索できます。 例えば、 `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エンコードを施してください。 sort (str): ソート順の指定。以下のキーを使用できます。 * `task_id` * `updated_datetime` * `number_of_rejections` * `phase` * `phase_stage` * `account_id` * `metadata.{メタデータのキー}` * キーの先頭に`-`を付けると、降順でソートされます。 * `,`でキーを区切ると、複数のキーでソートされます。先頭のキーから順に優先順位が割り振られます。 - annotation (str): アノテーションの絞り込み条件をJSON形式([AnnotationQuery](#section/AnnotationQuery))で指定したもの。指定した条件に合致するアノテーションを持つタスクを絞り込む際に指定する。 + annotation (str): アノテーションの絞り込み条件をJSON形式([AnnotationQuery](#tag/x-data-types/AnnotationQuery))で指定したもの。指定した条件に合致するアノテーションを持つタスクを絞り込む際に指定する。 Returns: tuple[TaskList, requests.Response] @@ -2935,6 +3024,34 @@ def get_tasks(self, project_id: str, query_params: Optional[dict[str, Any]] = No keyword_params.update(**kwargs) return self._request_wrapper(http_method, url_path, **keyword_params) + def get_tasks_in_bulk(self, project_id: str, query_params: Optional[dict[str, Any]] = None, **kwargs) -> tuple[Any, requests.Response]: + """タスクのバルク取得 + https://annofab.com/docs/api/#operation/getTasksInBulk + + + authorizations: AllProjectMember + + + タスクをバルク取得します。 このAPIは、[getTask](#operation/getTask) APIと似た機能を持ちますが、`task_id`を複数指定できる点が異なります。 + + Args: + project_id (str): プロジェクトID (required) + query_params (dict[str, Any]): Query Parameters + task_id (list[str]): タスクIDのカンマ区切りリスト (required) + + Returns: + tuple[GetTasksInBulkResponse, requests.Response] + + + """ + url_path = f"/projects/{project_id}/tasks-in-bulk" + http_method = "GET" + keyword_params: dict[str, Any] = { + "query_params": query_params, + } + keyword_params.update(**kwargs) + return self._request_wrapper(http_method, url_path, **keyword_params) + def initiate_tasks_generation(self, project_id: str, request_body: Optional[Any] = None, **kwargs) -> tuple[Any, requests.Response]: """タスク一括作成 https://annofab.com/docs/api/#operation/initiateTasksGeneration diff --git a/annofabapi/generated_api2.py b/annofabapi/generated_api2.py index d913d684..bbb63264 100644 --- a/annofabapi/generated_api2.py +++ b/annofabapi/generated_api2.py @@ -46,7 +46,7 @@ def get_annotation_specs_v2(self, project_id: str, query_params: Optional[dict[s project_id (str): プロジェクトID (required) query_params (dict[str, Any]): Query Parameters cache (str): CACHE TIMESTAMP - history_id (str): 過去のアノテーション仕様を取得する場合、[アノテーション仕様履歴取得](#operation/getAnnotationSpecsHistories)APIで取得した `history_id` の値を指定します。 未指定時は最新のアノテーション仕様を取得します。 + history_id (str): 過去のアノテーション仕様を取得する場合、[アノテーション仕様履歴取得](/docs/api/#operation/getAnnotationSpecsHistories)APIで取得した `history_id` の値を指定します。 未指定時は最新のアノテーション仕様を取得します。 v (str): 取得するアノテーション仕様のフォーマットバージョンを指定します。 Returns: @@ -373,7 +373,7 @@ def get_account_daily_statistics_v2( authorizations: SignedCookieKeyPairIdSignedCookieSignatureSignedCookiePolicy - 指定した期間の [ユーザー別タスク集計データ](/docs/api/#section/ArrayOfProjectAccountStatistics) を取得できるAPI。取得期間は最大3か月です。 + 指定した期間の [ユーザー別タスク集計データ](/docs/api/#tag/x-data-types/ArrayOfProjectAccountStatistics) を取得できるAPI。取得期間は最大3か月です。 Args: project_id (str): プロジェクトID (required) @@ -404,7 +404,7 @@ def get_inspection_daily_statistics_v2( authorizations: SignedCookieKeyPairIdSignedCookieSignatureSignedCookiePolicy - 指定した期間の [検査コメント集計データ](/docs/api/#section/ArrayOfInspectionStatistics) を取得できるAPI。取得期間は最大3か月です。 + 指定した期間の [検査コメント集計データ](/docs/api/#tag/x-data-types/ArrayOfInspectionStatistics) を取得できるAPI。取得期間は最大3か月です。 Args: project_id (str): プロジェクトID (required) @@ -463,7 +463,7 @@ def get_phase_daily_statistics_v2( authorizations: SignedCookieKeyPairIdSignedCookieSignatureSignedCookiePolicy - 指定した期間の [フェーズ別タスク集計データ](/docs/api/#section/ArrayOfTaskPhaseStatistics) を取得できるAPI。取得期間は最大3か月です。 + 指定した期間の [フェーズ別タスク集計データ](/docs/api/#tag/x-data-types/ArrayOfTaskPhaseStatistics) を取得できるAPI。取得期間は最大3か月です。 Args: project_id (str): プロジェクトID (required) @@ -492,7 +492,7 @@ def get_task_daily_statistics_v2(self, project_id: str, query_params: Optional[d authorizations: SignedCookieKeyPairIdSignedCookieSignatureSignedCookiePolicy - 指定した期間の [タスク集計データ](/docs/api/#section/ArrayOfProjectTaskStatisticsHistory) を取得できるAPI。取得期間は最大3か月です。 + 指定した期間の [タスク集計データ](/docs/api/#tag/x-data-types/ArrayOfProjectTaskStatisticsHistory) を取得できるAPI。取得期間は最大3か月です。 Args: project_id (str): プロジェクトID (required) @@ -688,38 +688,3 @@ def get_user_project_members_v2(self, account_id: str, query_params: Optional[di } keyword_params.update(**kwargs) return self._request_wrapper(http_method, url_path, **keyword_params) - - def get_user_projects_v2(self, account_id: str, query_params: Optional[dict[str, Any]] = None, **kwargs) -> tuple[Any, requests.Response]: - """自分のプロジェクトメンバー情報検索 - https://annofab.com/docs/api/#operation/getUserProjectsV2 - - - authorizations: SignedCookieKeyPairIdSignedCookieSignatureSignedCookiePolicy - - - 指定したユーザーが所属するプロジェクトを検索します。 本 API は `cache` クエリパラメータが同じであれば結果がキャッシュされ、以降は高速にレスポンスが返ります。 - - Args: - account_id (str): アカウントID (required) - query_params (dict[str, Any]): Query Parameters - page (int): 表示するページ番号 - limit (int): 1ページあたりの取得するデータ件数 - organization_id (str): 指定した組織に属するプロジェクトに絞り込む。未指定時は全プロジェクト。 - title (str): プロジェクトタイトルでの部分一致検索。1文字以上あれば使用します。利便性のため、大文字小文字は区別しません。 - status (ProjectStatus): 指定した状態のプロジェクトで絞り込む。未指定時は全プロジェクト。 - input_data_type (InputDataType): 指定した入力データ種別でプロジェクトを絞り込む。未指定時は全プロジェクト - sort_by (str): `date` を指定することでプロジェクトの最新のタスク更新時間の順にソートして出力する。 未指定時はプロジェクト名でソートする。 - cache (str): CACHE TIMESTAMP - - Returns: - tuple[ProjectList, requests.Response] - - - """ - url_path = f"/users/{account_id}/projects" - http_method = "GET" - keyword_params: dict[str, Any] = { - "query_params": query_params, - } - keyword_params.update(**kwargs) - return self._request_wrapper(http_method, url_path, **keyword_params) diff --git a/annofabapi/models.py b/annofabapi/models.py index ab2980b8..61d2a5c1 100644 --- a/annofabapi/models.py +++ b/annofabapi/models.py @@ -1865,6 +1865,21 @@ class AnnotationTypeFieldMinWarnRule(Enum): """ +AnnotationsByInputDataIdIdentifier = dict[str, Any] +""" +アノテーションの所属先 + +Keys of dict + +* project_id: str + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) +* task_id: str + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) +* input_data_id: str + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) + +""" + class AssigneeRuleOfResubmittedTask(Enum): """ @@ -2893,6 +2908,58 @@ class DefaultAnnotationType(Enum): """ +GetEditorAnnotationsInBulkResponse = dict[str, Any] +""" +複数の入力データにわたるアノテーション取得時のレスポンス + +Keys of dict + +* success: list[AnnotationV2Output] + 取得に成功したアノテーション +* failure: list[AnnotationsByInputDataIdIdentifier] + 取得に失敗したアノテーションの所属先 + +""" + +GetInputDataInBulkResponse = dict[str, Any] +""" +複数の入力データ取得時のレスポンス + +Keys of dict + +* success: list[InputData] + 取得に成功した入力データ +* failure: list[InputDataIdentifier] + 取得に失敗した入力データのIDとそのプロジェクトID + +""" + +GetSupplementaryDataInBulkResponse = dict[str, Any] +""" +複数の入力データにわたる補助情報取得時のレスポンス + +Keys of dict + +* success: list[SupplementaryData] + 取得に成功した補助情報 +* failure: list[SupplementaryDataByInputDataIdIdentifier] + 取得に失敗した補助情報の所属先 + +""" + +GetTasksInBulkResponse = dict[str, Any] +""" +複数のタスク取得時のレスポンス + +Keys of dict + +* success: list[Task] + 取得に成功したタスク +* failure: list[TaskIdentifier] + 取得に失敗したタスクのIDとそのプロジェクトID + +""" + GlobalIdpNameDeterminant = dict[str, Any] """ Annofab全体で利用するIDプロバイダー名を元に外部IDプロバイダーを特定する決定因子 @@ -3006,6 +3073,19 @@ class GraphType(Enum): * system_metadata: SystemMetadata +""" + +InputDataIdentifier = dict[str, Any] +""" +入力データを指定するための情報 + +Keys of dict + +* project_id: str + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) +* input_data_id: str + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) + """ InputDataList = dict[str, Any] @@ -3375,7 +3455,7 @@ class InspectionSummary(Enum): Keys of dict * messages: list[InternationalizationMessageMessages] - 言語コードとメッセージ(テキスト)のリスト。 * アノテーションエディタなどでは、Annofabの表示言語(各ユーザーが個人設定で選んだ言語)のメッセージが使われます * 以下の名前は、[Simple Annotation](#section/Simple-Annotation-ZIP) では `en-US` のメッセージが使われます * ラベル名 * 属性名 * 選択肢名 * いずれの場合でも、表示しようとした言語が `messages` に含まれない場合、 `default_lang` に指定した言語のメッセージが使われます + 言語コードとメッセージ(テキスト)のリスト。 * アノテーションエディタなどでは、Annofabの表示言語(各ユーザーが個人設定で選んだ言語)のメッセージが使われます * 以下の名前は、[Simple Annotation](#tag/x-annotation-zip/Simple-Annotation-ZIP) では `en-US` のメッセージが使われます * ラベル名 * 属性名 * 選択肢名 * いずれの場合でも、表示しようとした言語が `messages` に含まれない場合、 `default_lang` に指定した言語のメッセージが使われます * default_lang: str 希望された言語のメッセージが存在しない場合に、フォールバック先として使われる言語コード @@ -3755,7 +3835,7 @@ class KeyLayout(Enum): * annotation_type: AnnotationType * field_values: dict(str, AnnotationTypeFieldValue) - KeyがフィールドIdであるDictionaryです。 カスタムの[組織プラグイン](#operation/putOrganizationPlugin)で利用される[UserDefinedAnnotationTypeDefinition](#section/UserDefinedAnnotationTypeDefinition).`field_definitions`で定義されます。 + KeyがフィールドIdであるDictionaryです。 カスタムの[組織プラグイン](#operation/putOrganizationPlugin)で利用される[UserDefinedAnnotationTypeDefinition](#tag/x-data-types/UserDefinedAnnotationTypeDefinition).`field_definitions`で定義されます。 * additional_data_definitions: list[str] ラベルに所属する属性のID * color: Color @@ -4181,12 +4261,8 @@ class Lang(Enum): Keys of dict -* input: str - * members: str -* statistics: str - * organization: str @@ -4593,7 +4669,7 @@ class OrganizationMemberStatus(Enum): * annotation_types: list[AnnotationType] プラグインを使用したプロジェクトで選択可能なアノテーション種別のリストです。 同じ種別を重複して設定することはできません。 * user_defined_annotation_type_definitions: dict(str, UserDefinedAnnotationTypeDefinition) - Keyが[アノテーションの種類(AnnotationType)](#section/AnnotationType)であるDictionaryです。 + Keyが[アノテーションの種類(AnnotationType)](#tag/x-data-types/AnnotationType)であるDictionaryです。 """ @@ -4646,7 +4722,7 @@ class OrganizationMemberStatus(Enum): * annotation_types: list[AnnotationType] プラグインを使用したプロジェクトで選択可能なアノテーション種別のリストです。 同じ種別を重複して設定することはできません。 * user_defined_annotation_type_definitions: dict(str, UserDefinedAnnotationTypeDefinition) - Keyが[アノテーションの種類(AnnotationType)](#section/AnnotationType)であるDictionaryです。 + Keyが[アノテーションの種類(AnnotationType)](#tag/x-data-types/AnnotationType)であるDictionaryです。 * compatible_input_data_types: list[InputDataType] プラグインが対応している入力データです。 プラグイン種別がカスタムアノテーションエディタ、またはカスタムアノテーション仕様の場合のみ有効です。 * type: str @@ -4663,7 +4739,7 @@ class OrganizationMemberStatus(Enum): * plugin_compatibility: OrganizationPluginCompatibility * url: str - 「カスタムタスク割当API」のURLです。 プラグイン種別がカスタムタスク割当の場合のみ有効です。 #### カスタムタスク割当APIについて。 * 独自のアルゴリズムで作業者にタスクを割当するAPIです。 * Annofabから提供されるものではなく、第三者 (ユーザー様) が用意します。 * 作業者がタスク一覧やアノテーションエディタのタスク取得ボタンを押すと、指定したURLに複数の情報 (※1) と共にHTTPリクエスト (POST) が送られます。 * カスタムタスク割当APIでは、Annofabで提供しているAPI (※2) を使用して作業者にタスクを割当してください。 * タスクの割当に成功した場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: 割当した単一の[タスク](https://annofab.com/docs/api/#section/Task) * ステータスコード: 200 * 作業者に割当できるタスクがない場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: `{\"errors\": [{\"error_code\": \"MISSING_RESOURCE\"}]}` * ステータスコード: 404 * 作業者の認証トークンの期限が切れている場合があります。その場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: `{\"errors\": [{\"error_code\": \"EXPIRED_TOKEN\"}]}` * ステータスコード: 401 #### Preflightリクエストについて。 * Annofabからカスタムタスク割当APIへCross-OriginなHTTPリクエストを送信するより前に、ブラウザの仕様により「Preflightリクエスト」と呼ばれるHTTPリクエストが送られます。 * カスタムタスク割当を利用するためには、カスタムタスク割当APIとは別に「Preflightリクエスト対応API」を用意する必要があります。 * 以下の要件を満たす「Preflightリクエスト対応API」を用意してください。 * URL: カスタムタスク割当APIと同じURL * HTTPメソッド: OPTIONS * レスポンスヘッダ: * `Access-Control-Allow-Origin: https://annofab.com` * `Access-Control-Allow-Headers: Content-Type` * レスポンスボディ: 空(から) * ステータスコード: 200 ※1 以下の情報が送られます。 * HTTPボディ (JSON形式) * `authorization_token` : タスク割当専用の認証トークン。AnnofabのAPIを利用する際に使用します。 * `project_id` : タスクの割当リクエストが行われたプロジェクトのID。 * `phase` : 作業者が割当を要求したタスクフェーズ。このフェーズのタスクを割当してください。 ※2 例えば以下のAPIがあります。(詳しい情報はAPIドキュメントを参照してください) * `getMyAccount` : 作業者のアカウント情報を取得できます。 * `getTasks` : プロジェクトのタスクを取得できます。 * `assignTasks` : 作業者にタスクを割当することができます。 + 「カスタムタスク割当API」のURLです。 プラグイン種別がカスタムタスク割当の場合のみ有効です。 #### カスタムタスク割当APIについて。 * 独自のアルゴリズムで作業者にタスクを割当するAPIです。 * Annofabから提供されるものではなく、第三者 (ユーザー様) が用意します。 * 作業者がタスク一覧やアノテーションエディタのタスク取得ボタンを押すと、指定したURLに複数の情報 (※1) と共にHTTPリクエスト (POST) が送られます。 * カスタムタスク割当APIでは、Annofabで提供しているAPI (※2) を使用して作業者にタスクを割当してください。 * タスクの割当に成功した場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: 割当した単一の[タスク](https://annofab.com/docs/api/#tag/x-data-types/Task) * ステータスコード: 200 * 作業者に割当できるタスクがない場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: `{\"errors\": [{\"error_code\": \"MISSING_RESOURCE\"}]}` * ステータスコード: 404 * 作業者の認証トークンの期限が切れている場合があります。その場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: `{\"errors\": [{\"error_code\": \"EXPIRED_TOKEN\"}]}` * ステータスコード: 401 #### Preflightリクエストについて。 * Annofabからカスタムタスク割当APIへCross-OriginなHTTPリクエストを送信するより前に、ブラウザの仕様により「Preflightリクエスト」と呼ばれるHTTPリクエストが送られます。 * カスタムタスク割当を利用するためには、カスタムタスク割当APIとは別に「Preflightリクエスト対応API」を用意する必要があります。 * 以下の要件を満たす「Preflightリクエスト対応API」を用意してください。 * URL: カスタムタスク割当APIと同じURL * HTTPメソッド: OPTIONS * レスポンスヘッダ: * `Access-Control-Allow-Origin: https://annofab.com` * `Access-Control-Allow-Headers: Content-Type` * レスポンスボディ: 空(から) * ステータスコード: 200 ※1 以下の情報が送られます。 * HTTPボディ (JSON形式) * `authorization_token` : タスク割当専用の認証トークン。AnnofabのAPIを利用する際に使用します。 * `project_id` : タスクの割当リクエストが行われたプロジェクトのID。 * `phase` : 作業者が割当を要求したタスクフェーズ。このフェーズのタスクを割当してください。 ※2 例えば以下のAPIがあります。(詳しい情報はAPIドキュメントを参照してください) * `getMyAccount` : 作業者のアカウント情報を取得できます。 * `getTasks` : プロジェクトのタスクを取得できます。 * `assignTasks` : 作業者にタスクを割当することができます。 * type: str `TaskAssignment` [詳しくはこちら](#section/API-Convention/API-_type) @@ -5455,7 +5531,7 @@ class ProjectStatus(Enum): * annotations: dict(str, AnnotationThumbnailDetail) アノテーションIDをキーとしたサムネイル情報 * annotation_updated_datetime: str - サムネイルの元になったアノテーションの更新日時。 [putEditorAnnotation](#operation/putEditorAnnotation) API や [getEditorAnnotation](#operation/getEditorAnnotation) API のレスポンスに含まれる `updated_datetime` を指定します。 + サムネイルの元になったアノテーションの更新日時。 [putAnnotation](#operation/putAnnotation) API や [getEditorAnnotation](#operation/getEditorAnnotation) API のレスポンスに含まれる `updated_datetime` を指定します。 """ @@ -5981,6 +6057,19 @@ class ProjectStatus(Enum): """ +SupplementaryDataByInputDataIdIdentifier = dict[str, Any] +""" +補助情報の所属先 + +Keys of dict + +* project_id: str + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) +* input_data_id: str + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) + +""" + SupplementaryDataRequest = dict[str, Any] """ @@ -6411,6 +6500,19 @@ class TaskAssignmentType(Enum): """ +TaskIdentifier = dict[str, Any] +""" +タスクを指定するための情報 + +Keys of dict + +* project_id: str + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) +* task_id: str + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) + +""" + TaskInputValidation = dict[str, Any] """ タスクの提出操作に対する入力データID別のバリデーション結果です。 @@ -6699,8 +6801,6 @@ class TaskStatus(Enum): * members: str -* projects: str - * organizations: str diff --git a/annofabapi/pydantic_models/annotations_by_input_data_id_identifier.py b/annofabapi/pydantic_models/annotations_by_input_data_id_identifier.py new file mode 100644 index 00000000..87f6f58e --- /dev/null +++ b/annofabapi/pydantic_models/annotations_by_input_data_id_identifier.py @@ -0,0 +1,82 @@ +""" + + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class AnnotationsByInputDataIdIdentifier(BaseModel): + """ + アノテーションの所属先 + """ + + project_id: StrictStr = Field(description="プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) ") + task_id: StrictStr = Field(description="タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) ") + input_data_id: StrictStr = Field(description="入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) ") + __properties: ClassVar[List[str]] = ["project_id", "task_id", "input_data_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnnotationsByInputDataIdIdentifier from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnnotationsByInputDataIdIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"project_id": obj.get("project_id"), "task_id": obj.get("task_id"), "input_data_id": obj.get("input_data_id")}) + return _obj diff --git a/annofabapi/pydantic_models/get_editor_annotations_in_bulk_response.py b/annofabapi/pydantic_models/get_editor_annotations_in_bulk_response.py new file mode 100644 index 00000000..29007fe1 --- /dev/null +++ b/annofabapi/pydantic_models/get_editor_annotations_in_bulk_response.py @@ -0,0 +1,105 @@ +""" + + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from annofabapi.pydantic_models.annotation_v2_output import AnnotationV2Output +from annofabapi.pydantic_models.annotations_by_input_data_id_identifier import AnnotationsByInputDataIdIdentifier + + +class GetEditorAnnotationsInBulkResponse(BaseModel): + """ + 複数の入力データにわたるアノテーション取得時のレスポンス + """ + + success: List[AnnotationV2Output] = Field(description="取得に成功したアノテーション") + failure: List[AnnotationsByInputDataIdIdentifier] = Field(description="取得に失敗したアノテーションの所属先") + __properties: ClassVar[List[str]] = ["success", "failure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetEditorAnnotationsInBulkResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in success (list) + _items = [] + if self.success: + for _item_success in self.success: + if _item_success: + _items.append(_item_success.to_dict()) + _dict["success"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in failure (list) + _items = [] + if self.failure: + for _item_failure in self.failure: + if _item_failure: + _items.append(_item_failure.to_dict()) + _dict["failure"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetEditorAnnotationsInBulkResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "success": [AnnotationV2Output.from_dict(_item) for _item in obj["success"]] if obj.get("success") is not None else None, + "failure": [AnnotationsByInputDataIdIdentifier.from_dict(_item) for _item in obj["failure"]] + if obj.get("failure") is not None + else None, + } + ) + return _obj diff --git a/annofabapi/pydantic_models/get_input_data_in_bulk_response.py b/annofabapi/pydantic_models/get_input_data_in_bulk_response.py new file mode 100644 index 00000000..273f026c --- /dev/null +++ b/annofabapi/pydantic_models/get_input_data_in_bulk_response.py @@ -0,0 +1,103 @@ +""" + + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from annofabapi.pydantic_models.input_data import InputData +from annofabapi.pydantic_models.input_data_identifier import InputDataIdentifier + + +class GetInputDataInBulkResponse(BaseModel): + """ + 複数の入力データ取得時のレスポンス + """ + + success: List[InputData] = Field(description="取得に成功した入力データ") + failure: List[InputDataIdentifier] = Field(description="取得に失敗した入力データのIDとそのプロジェクトID") + __properties: ClassVar[List[str]] = ["success", "failure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetInputDataInBulkResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in success (list) + _items = [] + if self.success: + for _item_success in self.success: + if _item_success: + _items.append(_item_success.to_dict()) + _dict["success"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in failure (list) + _items = [] + if self.failure: + for _item_failure in self.failure: + if _item_failure: + _items.append(_item_failure.to_dict()) + _dict["failure"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetInputDataInBulkResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "success": [InputData.from_dict(_item) for _item in obj["success"]] if obj.get("success") is not None else None, + "failure": [InputDataIdentifier.from_dict(_item) for _item in obj["failure"]] if obj.get("failure") is not None else None, + } + ) + return _obj diff --git a/annofabapi/pydantic_models/get_supplementary_data_in_bulk_response.py b/annofabapi/pydantic_models/get_supplementary_data_in_bulk_response.py new file mode 100644 index 00000000..c6c6811b --- /dev/null +++ b/annofabapi/pydantic_models/get_supplementary_data_in_bulk_response.py @@ -0,0 +1,105 @@ +""" + + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from annofabapi.pydantic_models.supplementary_data import SupplementaryData +from annofabapi.pydantic_models.supplementary_data_by_input_data_id_identifier import SupplementaryDataByInputDataIdIdentifier + + +class GetSupplementaryDataInBulkResponse(BaseModel): + """ + 複数の入力データにわたる補助情報取得時のレスポンス + """ + + success: List[SupplementaryData] = Field(description="取得に成功した補助情報") + failure: List[SupplementaryDataByInputDataIdIdentifier] = Field(description="取得に失敗した補助情報の所属先") + __properties: ClassVar[List[str]] = ["success", "failure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetSupplementaryDataInBulkResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in success (list) + _items = [] + if self.success: + for _item_success in self.success: + if _item_success: + _items.append(_item_success.to_dict()) + _dict["success"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in failure (list) + _items = [] + if self.failure: + for _item_failure in self.failure: + if _item_failure: + _items.append(_item_failure.to_dict()) + _dict["failure"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetSupplementaryDataInBulkResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "success": [SupplementaryData.from_dict(_item) for _item in obj["success"]] if obj.get("success") is not None else None, + "failure": [SupplementaryDataByInputDataIdIdentifier.from_dict(_item) for _item in obj["failure"]] + if obj.get("failure") is not None + else None, + } + ) + return _obj diff --git a/annofabapi/pydantic_models/get_tasks_in_bulk_response.py b/annofabapi/pydantic_models/get_tasks_in_bulk_response.py new file mode 100644 index 00000000..a6ecd6c1 --- /dev/null +++ b/annofabapi/pydantic_models/get_tasks_in_bulk_response.py @@ -0,0 +1,103 @@ +""" + + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from annofabapi.pydantic_models.task import Task +from annofabapi.pydantic_models.task_identifier import TaskIdentifier + + +class GetTasksInBulkResponse(BaseModel): + """ + 複数のタスク取得時のレスポンス + """ + + success: List[Task] = Field(description="取得に成功したタスク") + failure: List[TaskIdentifier] = Field(description="取得に失敗したタスクのIDとそのプロジェクトID") + __properties: ClassVar[List[str]] = ["success", "failure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTasksInBulkResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in success (list) + _items = [] + if self.success: + for _item_success in self.success: + if _item_success: + _items.append(_item_success.to_dict()) + _dict["success"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in failure (list) + _items = [] + if self.failure: + for _item_failure in self.failure: + if _item_failure: + _items.append(_item_failure.to_dict()) + _dict["failure"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetTasksInBulkResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "success": [Task.from_dict(_item) for _item in obj["success"]] if obj.get("success") is not None else None, + "failure": [TaskIdentifier.from_dict(_item) for _item in obj["failure"]] if obj.get("failure") is not None else None, + } + ) + return _obj diff --git a/annofabapi/pydantic_models/input_data_identifier.py b/annofabapi/pydantic_models/input_data_identifier.py new file mode 100644 index 00000000..0407c0cb --- /dev/null +++ b/annofabapi/pydantic_models/input_data_identifier.py @@ -0,0 +1,81 @@ +""" + + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class InputDataIdentifier(BaseModel): + """ + 入力データを指定するための情報 + """ + + project_id: StrictStr = Field(description="プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) ") + input_data_id: StrictStr = Field(description="入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) ") + __properties: ClassVar[List[str]] = ["project_id", "input_data_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InputDataIdentifier from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InputDataIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"project_id": obj.get("project_id"), "input_data_id": obj.get("input_data_id")}) + return _obj diff --git a/annofabapi/pydantic_models/internationalization_message.py b/annofabapi/pydantic_models/internationalization_message.py index 74608f4b..ccf732d6 100644 --- a/annofabapi/pydantic_models/internationalization_message.py +++ b/annofabapi/pydantic_models/internationalization_message.py @@ -28,7 +28,7 @@ class InternationalizationMessage(BaseModel): """ messages: List[InternationalizationMessageMessagesInner] = Field( - description="言語コードとメッセージ(テキスト)のリスト。 * アノテーションエディタなどでは、Annofabの表示言語(各ユーザーが個人設定で選んだ言語)のメッセージが使われます * 以下の名前は、[Simple Annotation](#section/Simple-Annotation-ZIP) では `en-US` のメッセージが使われます * ラベル名 * 属性名 * 選択肢名 * いずれの場合でも、表示しようとした言語が `messages` に含まれない場合、 `default_lang` に指定した言語のメッセージが使われます " + description="言語コードとメッセージ(テキスト)のリスト。 * アノテーションエディタなどでは、Annofabの表示言語(各ユーザーが個人設定で選んだ言語)のメッセージが使われます * 以下の名前は、[Simple Annotation](#tag/x-annotation-zip/Simple-Annotation-ZIP) では `en-US` のメッセージが使われます * ラベル名 * 属性名 * 選択肢名 * いずれの場合でも、表示しようとした言語が `messages` に含まれない場合、 `default_lang` に指定した言語のメッセージが使われます " ) default_lang: StrictStr = Field(description="希望された言語のメッセージが存在しない場合に、フォールバック先として使われる言語コード") __properties: ClassVar[List[str]] = ["messages", "default_lang"] diff --git a/annofabapi/pydantic_models/label_v3.py b/annofabapi/pydantic_models/label_v3.py index 18a0a39d..ab5c3730 100644 --- a/annofabapi/pydantic_models/label_v3.py +++ b/annofabapi/pydantic_models/label_v3.py @@ -36,7 +36,7 @@ class LabelV3(BaseModel): keybind: List[Keybind] = Field(description="ショートカットキー") annotation_type: AnnotationType field_values: Dict[str, AnnotationTypeFieldValue] = Field( - description="KeyがフィールドIdであるDictionaryです。 カスタムの[組織プラグイン](#operation/putOrganizationPlugin)で利用される[UserDefinedAnnotationTypeDefinition](#section/UserDefinedAnnotationTypeDefinition).`field_definitions`で定義されます。 " + description="KeyがフィールドIdであるDictionaryです。 カスタムの[組織プラグイン](#operation/putOrganizationPlugin)で利用される[UserDefinedAnnotationTypeDefinition](#tag/x-data-types/UserDefinedAnnotationTypeDefinition).`field_definitions`で定義されます。 " ) additional_data_definitions: List[StrictStr] = Field(description="ラベルに所属する属性のID") color: Color diff --git a/annofabapi/pydantic_models/organization_cache_record.py b/annofabapi/pydantic_models/organization_cache_record.py index 9966cb14..a75649cb 100644 --- a/annofabapi/pydantic_models/organization_cache_record.py +++ b/annofabapi/pydantic_models/organization_cache_record.py @@ -25,11 +25,9 @@ class OrganizationCacheRecord(BaseModel): OrganizationCacheRecord """ - input: Optional[StrictStr] = None members: Optional[StrictStr] = None - statistics: Optional[StrictStr] = None organization: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["input", "members", "statistics", "organization"] + __properties: ClassVar[List[str]] = ["members", "organization"] model_config = ConfigDict( populate_by_name=True, @@ -79,7 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"input": obj.get("input"), "members": obj.get("members"), "statistics": obj.get("statistics"), "organization": obj.get("organization")} - ) + _obj = cls.model_validate({"members": obj.get("members"), "organization": obj.get("organization")}) return _obj diff --git a/annofabapi/pydantic_models/plugin_detail_extended_annotation_specs.py b/annofabapi/pydantic_models/plugin_detail_extended_annotation_specs.py index 18fa591a..df3f2e9c 100644 --- a/annofabapi/pydantic_models/plugin_detail_extended_annotation_specs.py +++ b/annofabapi/pydantic_models/plugin_detail_extended_annotation_specs.py @@ -35,7 +35,7 @@ class PluginDetailExtendedAnnotationSpecs(BaseModel): description="プラグインを使用したプロジェクトで選択可能なアノテーション種別のリストです。 同じ種別を重複して設定することはできません。 " ) user_defined_annotation_type_definitions: Optional[Dict[str, UserDefinedAnnotationTypeDefinition]] = Field( - default=None, description="Keyが[アノテーションの種類(AnnotationType)](#section/AnnotationType)であるDictionaryです。 " + default=None, description="Keyが[アノテーションの種類(AnnotationType)](#tag/x-data-types/AnnotationType)であるDictionaryです。 " ) compatible_input_data_types: List[InputDataType] = Field( description="プラグインが対応している入力データです。 プラグイン種別がカスタムアノテーションエディタ、またはカスタムアノテーション仕様の場合のみ有効です。 " diff --git a/annofabapi/pydantic_models/plugin_detail_task_assignment.py b/annofabapi/pydantic_models/plugin_detail_task_assignment.py index 31ba9f43..e63e2309 100644 --- a/annofabapi/pydantic_models/plugin_detail_task_assignment.py +++ b/annofabapi/pydantic_models/plugin_detail_task_assignment.py @@ -30,7 +30,7 @@ class PluginDetailTaskAssignment(BaseModel): plugin_compatibility: Optional[OrganizationPluginCompatibility] = None url: Optional[StrictStr] = Field( default=None, - description='「カスタムタスク割当API」のURLです。 プラグイン種別がカスタムタスク割当の場合のみ有効です。 #### カスタムタスク割当APIについて。 * 独自のアルゴリズムで作業者にタスクを割当するAPIです。 * Annofabから提供されるものではなく、第三者 (ユーザー様) が用意します。 * 作業者がタスク一覧やアノテーションエディタのタスク取得ボタンを押すと、指定したURLに複数の情報 (※1) と共にHTTPリクエスト (POST) が送られます。 * カスタムタスク割当APIでは、Annofabで提供しているAPI (※2) を使用して作業者にタスクを割当してください。 * タスクの割当に成功した場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: 割当した単一の[タスク](https://annofab.com/docs/api/#section/Task) * ステータスコード: 200 * 作業者に割当できるタスクがない場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: `{"errors": [{"error_code": "MISSING_RESOURCE"}]}` * ステータスコード: 404 * 作業者の認証トークンの期限が切れている場合があります。その場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: `{"errors": [{"error_code": "EXPIRED_TOKEN"}]}` * ステータスコード: 401 #### Preflightリクエストについて。 * Annofabからカスタムタスク割当APIへCross-OriginなHTTPリクエストを送信するより前に、ブラウザの仕様により「Preflightリクエスト」と呼ばれるHTTPリクエストが送られます。 * カスタムタスク割当を利用するためには、カスタムタスク割当APIとは別に「Preflightリクエスト対応API」を用意する必要があります。 * 以下の要件を満たす「Preflightリクエスト対応API」を用意してください。 * URL: カスタムタスク割当APIと同じURL * HTTPメソッド: OPTIONS * レスポンスヘッダ: * `Access-Control-Allow-Origin: https://annofab.com` * `Access-Control-Allow-Headers: Content-Type` * レスポンスボディ: 空(から) * ステータスコード: 200 ※1 以下の情報が送られます。 * HTTPボディ (JSON形式) * `authorization_token` : タスク割当専用の認証トークン。AnnofabのAPIを利用する際に使用します。 * `project_id` : タスクの割当リクエストが行われたプロジェクトのID。 * `phase` : 作業者が割当を要求したタスクフェーズ。このフェーズのタスクを割当してください。 ※2 例えば以下のAPIがあります。(詳しい情報はAPIドキュメントを参照してください) * `getMyAccount` : 作業者のアカウント情報を取得できます。 * `getTasks` : プロジェクトのタスクを取得できます。 * `assignTasks` : 作業者にタスクを割当することができます。 ', + description='「カスタムタスク割当API」のURLです。 プラグイン種別がカスタムタスク割当の場合のみ有効です。 #### カスタムタスク割当APIについて。 * 独自のアルゴリズムで作業者にタスクを割当するAPIです。 * Annofabから提供されるものではなく、第三者 (ユーザー様) が用意します。 * 作業者がタスク一覧やアノテーションエディタのタスク取得ボタンを押すと、指定したURLに複数の情報 (※1) と共にHTTPリクエスト (POST) が送られます。 * カスタムタスク割当APIでは、Annofabで提供しているAPI (※2) を使用して作業者にタスクを割当してください。 * タスクの割当に成功した場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: 割当した単一の[タスク](https://annofab.com/docs/api/#tag/x-data-types/Task) * ステータスコード: 200 * 作業者に割当できるタスクがない場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: `{"errors": [{"error_code": "MISSING_RESOURCE"}]}` * ステータスコード: 404 * 作業者の認証トークンの期限が切れている場合があります。その場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` * レスポンスボディ: `{"errors": [{"error_code": "EXPIRED_TOKEN"}]}` * ステータスコード: 401 #### Preflightリクエストについて。 * Annofabからカスタムタスク割当APIへCross-OriginなHTTPリクエストを送信するより前に、ブラウザの仕様により「Preflightリクエスト」と呼ばれるHTTPリクエストが送られます。 * カスタムタスク割当を利用するためには、カスタムタスク割当APIとは別に「Preflightリクエスト対応API」を用意する必要があります。 * 以下の要件を満たす「Preflightリクエスト対応API」を用意してください。 * URL: カスタムタスク割当APIと同じURL * HTTPメソッド: OPTIONS * レスポンスヘッダ: * `Access-Control-Allow-Origin: https://annofab.com` * `Access-Control-Allow-Headers: Content-Type` * レスポンスボディ: 空(から) * ステータスコード: 200 ※1 以下の情報が送られます。 * HTTPボディ (JSON形式) * `authorization_token` : タスク割当専用の認証トークン。AnnofabのAPIを利用する際に使用します。 * `project_id` : タスクの割当リクエストが行われたプロジェクトのID。 * `phase` : 作業者が割当を要求したタスクフェーズ。このフェーズのタスクを割当してください。 ※2 例えば以下のAPIがあります。(詳しい情報はAPIドキュメントを参照してください) * `getMyAccount` : 作業者のアカウント情報を取得できます。 * `getTasks` : プロジェクトのタスクを取得できます。 * `assignTasks` : 作業者にタスクを割当することができます。 ', ) type: Optional[StrictStr] = Field( default=None, description="`TaskAssignment` [詳しくはこちら](#section/API-Convention/API-_type) ", alias="_type" diff --git a/annofabapi/pydantic_models/put_annotation_thumbnail_body.py b/annofabapi/pydantic_models/put_annotation_thumbnail_body.py index 6974fc70..e13cf913 100644 --- a/annofabapi/pydantic_models/put_annotation_thumbnail_body.py +++ b/annofabapi/pydantic_models/put_annotation_thumbnail_body.py @@ -31,7 +31,7 @@ class PutAnnotationThumbnailBody(BaseModel): images: List[AnnotationThumbnailImageSource] = Field(description="アップロードするサムネイル画像の一覧") annotations: Dict[str, AnnotationThumbnailDetail] = Field(description="アノテーションIDをキーとしたサムネイル情報") annotation_updated_datetime: str = Field( - description="サムネイルの元になったアノテーションの更新日時。 [putEditorAnnotation](#operation/putEditorAnnotation) API や [getEditorAnnotation](#operation/getEditorAnnotation) API のレスポンスに含まれる `updated_datetime` を指定します。" + description="サムネイルの元になったアノテーションの更新日時。 [putAnnotation](#operation/putAnnotation) API や [getEditorAnnotation](#operation/getEditorAnnotation) API のレスポンスに含まれる `updated_datetime` を指定します。" ) __properties: ClassVar[List[str]] = ["images", "annotations", "annotation_updated_datetime"] diff --git a/annofabapi/pydantic_models/supplementary_data_by_input_data_id_identifier.py b/annofabapi/pydantic_models/supplementary_data_by_input_data_id_identifier.py new file mode 100644 index 00000000..68fc5b3e --- /dev/null +++ b/annofabapi/pydantic_models/supplementary_data_by_input_data_id_identifier.py @@ -0,0 +1,81 @@ +""" + + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class SupplementaryDataByInputDataIdIdentifier(BaseModel): + """ + 補助情報の所属先 + """ + + project_id: StrictStr = Field(description="プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) ") + input_data_id: StrictStr = Field(description="入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) ") + __properties: ClassVar[List[str]] = ["project_id", "input_data_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SupplementaryDataByInputDataIdIdentifier from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SupplementaryDataByInputDataIdIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"project_id": obj.get("project_id"), "input_data_id": obj.get("input_data_id")}) + return _obj diff --git a/annofabapi/pydantic_models/task_identifier.py b/annofabapi/pydantic_models/task_identifier.py new file mode 100644 index 00000000..5373e005 --- /dev/null +++ b/annofabapi/pydantic_models/task_identifier.py @@ -0,0 +1,81 @@ +""" + + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class TaskIdentifier(BaseModel): + """ + タスクを指定するための情報 + """ + + project_id: StrictStr = Field(description="プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) ") + task_id: StrictStr = Field(description="タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) ") + __properties: ClassVar[List[str]] = ["project_id", "task_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaskIdentifier from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaskIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"project_id": obj.get("project_id"), "task_id": obj.get("task_id")}) + return _obj diff --git a/annofabapi/pydantic_models/user_cache_record.py b/annofabapi/pydantic_models/user_cache_record.py index 120d312d..ec8e6113 100644 --- a/annofabapi/pydantic_models/user_cache_record.py +++ b/annofabapi/pydantic_models/user_cache_record.py @@ -27,9 +27,8 @@ class UserCacheRecord(BaseModel): account: Optional[StrictStr] = None members: Optional[StrictStr] = None - projects: Optional[StrictStr] = None organizations: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["account", "members", "projects", "organizations"] + __properties: ClassVar[List[str]] = ["account", "members", "organizations"] model_config = ConfigDict( populate_by_name=True, @@ -79,7 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"account": obj.get("account"), "members": obj.get("members"), "projects": obj.get("projects"), "organizations": obj.get("organizations")} - ) + _obj = cls.model_validate({"account": obj.get("account"), "members": obj.get("members"), "organizations": obj.get("organizations")}) return _obj diff --git a/docs/api_reference/pydantic_models.rst b/docs/api_reference/pydantic_models.rst index 076f908d..de64e95f 100644 --- a/docs/api_reference/pydantic_models.rst +++ b/docs/api_reference/pydantic_models.rst @@ -796,6 +796,14 @@ annofabapi.pydantic\_models.annotation\_v2\_output module :show-inheritance: :undoc-members: +annofabapi.pydantic\_models.annotations\_by\_input\_data\_id\_identifier module +------------------------------------------------------------------------------- + +.. automodule:: annofabapi.pydantic_models.annotations_by_input_data_id_identifier + :members: + :show-inheritance: + :undoc-members: + annofabapi.pydantic\_models.assignee\_rule\_of\_resubmitted\_task module ------------------------------------------------------------------------ @@ -1300,6 +1308,38 @@ annofabapi.pydantic\_models.full\_annotation\_detail module :show-inheritance: :undoc-members: +annofabapi.pydantic\_models.get\_editor\_annotations\_in\_bulk\_response module +------------------------------------------------------------------------------- + +.. automodule:: annofabapi.pydantic_models.get_editor_annotations_in_bulk_response + :members: + :show-inheritance: + :undoc-members: + +annofabapi.pydantic\_models.get\_input\_data\_in\_bulk\_response module +----------------------------------------------------------------------- + +.. automodule:: annofabapi.pydantic_models.get_input_data_in_bulk_response + :members: + :show-inheritance: + :undoc-members: + +annofabapi.pydantic\_models.get\_supplementary\_data\_in\_bulk\_response module +------------------------------------------------------------------------------- + +.. automodule:: annofabapi.pydantic_models.get_supplementary_data_in_bulk_response + :members: + :show-inheritance: + :undoc-members: + +annofabapi.pydantic\_models.get\_tasks\_in\_bulk\_response module +----------------------------------------------------------------- + +.. automodule:: annofabapi.pydantic_models.get_tasks_in_bulk_response + :members: + :show-inheritance: + :undoc-members: + annofabapi.pydantic\_models.global\_idp\_name\_determinant module ----------------------------------------------------------------- @@ -1356,6 +1396,14 @@ annofabapi.pydantic\_models.input\_data module :show-inheritance: :undoc-members: +annofabapi.pydantic\_models.input\_data\_identifier module +---------------------------------------------------------- + +.. automodule:: annofabapi.pydantic_models.input_data_identifier + :members: + :show-inheritance: + :undoc-members: + annofabapi.pydantic\_models.input\_data\_list module ---------------------------------------------------- @@ -2812,6 +2860,14 @@ annofabapi.pydantic\_models.supplementary\_data module :show-inheritance: :undoc-members: +annofabapi.pydantic\_models.supplementary\_data\_by\_input\_data\_id\_identifier module +--------------------------------------------------------------------------------------- + +.. automodule:: annofabapi.pydantic_models.supplementary_data_by_input_data_id_identifier + :members: + :show-inheritance: + :undoc-members: + annofabapi.pydantic\_models.supplementary\_data\_request module --------------------------------------------------------------- @@ -3012,6 +3068,14 @@ annofabapi.pydantic\_models.task\_history\_short module :show-inheritance: :undoc-members: +annofabapi.pydantic\_models.task\_identifier module +--------------------------------------------------- + +.. automodule:: annofabapi.pydantic_models.task_identifier + :members: + :show-inheritance: + :undoc-members: + annofabapi.pydantic\_models.task\_input\_validation module ---------------------------------------------------------- diff --git a/generate/swagger/swagger-api-components.yaml b/generate/swagger/swagger-api-components.yaml index 8f11e81e..690b58c7 100644 --- a/generate/swagger/swagger-api-components.yaml +++ b/generate/swagger/swagger-api-components.yaml @@ -18,23 +18,7 @@ components: type: "apiKey" in: "cookie" name: "CloudFront-Signature" - EveryoneRequestBody: - description: | - Annofabのユーザーなら誰でも利用できます。 - - 認証/認可には、リクエストボディに含まれるパスワード、トークン、または何らかの検証コードを用います。 - 詳しくは個別のAPIの説明を確認してください。 - type: "http" - scheme: "requestBody" - EveryoneQueryParameter: - description: | - Annofabのユーザーなら誰でも利用できます。 - - 認証/認可には、クエリパラメータに含まれるトークンまたは何らかの検証コードを用います。 - 詳しくは個別のAPIの説明を確認してください。 - type: "http" - scheme: "requestBody" - Everyone: + AnnofabUser: description: | Annofabのユーザーなら誰でも利用できます。 @@ -326,7 +310,7 @@ components: 言語コードとメッセージ(テキスト)のリスト。 * アノテーションエディタなどでは、Annofabの表示言語(各ユーザーが個人設定で選んだ言語)のメッセージが使われます - * 以下の名前は、[Simple Annotation](#section/Simple-Annotation-ZIP) では `en-US` のメッセージが使われます + * 以下の名前は、[Simple Annotation](#tag/x-annotation-zip/Simple-Annotation-ZIP) では `en-US` のメッセージが使われます * ラベル名 * 属性名 * 選択肢名 @@ -946,12 +930,8 @@ components: OrganizationCacheRecord: type: object properties: - input: - type: string members: type: string - statistics: - type: string organization: type: string OrganizationSummary: @@ -1201,7 +1181,7 @@ components: user_defined_annotation_type_definitions: type: object description: | - Keyが[アノテーションの種類(AnnotationType)](#section/AnnotationType)であるDictionaryです。 + Keyが[アノテーションの種類(AnnotationType)](#tag/x-data-types/AnnotationType)であるDictionaryです。 additionalProperties: $ref: "#/components/schemas/UserDefinedAnnotationTypeDefinition" compatible_input_data_types: @@ -1302,7 +1282,7 @@ components: * カスタムタスク割当APIでは、Annofabで提供しているAPI (※2) を使用して作業者にタスクを割当してください。 * タスクの割当に成功した場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` - * レスポンスボディ: 割当した単一の[タスク](https://annofab.com/docs/api/#section/Task) + * レスポンスボディ: 割当した単一の[タスク](https://annofab.com/docs/api/#tag/x-data-types/Task) * ステータスコード: 200 * 作業者に割当できるタスクがない場合は以下のHTTPレスポンスを返却してください。 * レスポンスヘッダ: `Access-Control-Allow-Origin: https://annofab.com` @@ -1448,8 +1428,6 @@ components: type: string members: type: string - projects: - type: string organizations: type: string OrganizationId: @@ -2313,7 +2291,7 @@ components: $ref: "#/components/schemas/InputDataType" default: image description: | - アノテーション対象の入力データの種類。[詳細はこちら](#section/InputDataType)を参照してください。 + アノテーション対象の入力データの種類。[詳細はこちら](#tag/x-data-types/InputDataType)を参照してください。 プロジェクトの作成時のみ指定可能です。更新時は無視されます。 organization_name: @@ -2934,7 +2912,7 @@ components: description: マーカーのタイトル graph_type: description: | - マーカーを配置するグラフ。[詳細はこちら](#section/GraphType) + マーカーを配置するグラフ。[詳細はこちら](#tag/x-data-types/GraphType) $ref: "#/components/schemas/GraphType" marked_at: description: グラフ上のマーカー位置(x軸) @@ -3882,7 +3860,7 @@ components: description: | KeyがフィールドIdであるDictionaryです。 - カスタムの[組織プラグイン](#operation/putOrganizationPlugin)で利用される[UserDefinedAnnotationTypeDefinition](#section/UserDefinedAnnotationTypeDefinition).`field_definitions`で定義されます。 + カスタムの[組織プラグイン](#operation/putOrganizationPlugin)で利用される[UserDefinedAnnotationTypeDefinition](#tag/x-data-types/UserDefinedAnnotationTypeDefinition).`field_definitions`で定義されます。 additionalProperties: $ref: "#/components/schemas/AnnotationTypeFieldValue" additional_data_definitions: @@ -4742,7 +4720,7 @@ components: status: $ref: "#/components/schemas/TaskStatus" description: | - 次に遷移させるタスクの状態。[詳細はこちら](#section/TaskStatus)。 + 次に遷移させるタスクの状態。[詳細はこちら](#tag/x-data-types/TaskStatus)。 last_updated_datetime: $ref: "#/components/schemas/LastUpdatedDatetime" description: | @@ -4786,7 +4764,7 @@ components: properties: phase: $ref: "#/components/schemas/TaskPhase" - description: 割り当てるタスクのフェーズ。[詳細はこちら](#section/TaskPhase) + description: 割り当てるタスクのフェーズ。[詳細はこちら](#tag/x-data-types/TaskPhase) _type: type: string description: | @@ -4818,7 +4796,7 @@ components: properties: phase: $ref: "#/components/schemas/TaskPhase" - description: 割り当てるタスクのフェーズ。[詳細はこちら](#section/TaskPhase) + description: 割り当てるタスクのフェーズ。[詳細はこちら](#tag/x-data-types/TaskPhase) _type: type: string description: | @@ -6167,11 +6145,11 @@ components: annotation_id: $ref: "#/components/schemas/AnnotationId" description: "アノテーションリンク属性の属性値。 リンク先アノテーションのIDが格納されます。" -# これを定義して使いたいが、api-js-clientがコンパイルできない(実装も適切でない)コードを生成してしまうのでコメントアウトしている -# SingleAnnotationList: -# oneOf: -# - $ref: "#/components/schemas/SingleAnnotationV1List" -# - $ref: "#/components/schemas/SingleAnnotationV2List" + # これを定義して使いたいが、api-js-clientがコンパイルできない(実装も適切でない)コードを生成してしまうのでコメントアウトしている + # SingleAnnotationList: + # oneOf: + # - $ref: "#/components/schemas/SingleAnnotationV1List" + # - $ref: "#/components/schemas/SingleAnnotationV2List" SingleAnnotationV1List: description: SingleAnnotationV1の配列です type: array @@ -6839,7 +6817,7 @@ components: $ref: "#/components/schemas/InspectionId" phase: $ref: "#/components/schemas/TaskPhase" - description: 検査コメントを付与したときのタスクフェーズ。[詳細はこちら](#section/TaskPhase) + description: 検査コメントを付与したときのタスクフェーズ。[詳細はこちら](#tag/x-data-types/TaskPhase) phase_stage: type: integer description: 検査コメントを付与したときのフェーズのステージ @@ -6854,7 +6832,7 @@ components: ##### スレッドの先頭のコメントである(`parent_inspection_id` に値がない)場合 検査コメントに紐づくアノテーションのID。アノテーションに紐付けられていない場合(アノテーションの付け忘れに対する指定など)は未指定。 - [詳細はこちら](#section/AnnotationId)。 + [詳細はこちら](#tag/x-data-types/AnnotationId)。 ##### 返信コメントである(`parent_inspection_id` に値がある)場合 @@ -7056,7 +7034,7 @@ components: $ref: "#/components/schemas/CommentId" phase: $ref: "#/components/schemas/TaskPhase" - description: コメントを作成したときのタスクフェーズ。[詳細はこちら](#section/TaskPhase) + description: コメントを作成したときのタスクフェーズ。[詳細はこちら](#tag/x-data-types/TaskPhase) phase_stage: type: integer description: コメントを作成したときのフェーズのステージ。 @@ -7133,7 +7111,7 @@ components: annotation_id: $ref: "#/components/schemas/AnnotationId" description: | - コメントに紐づくアノテーションのID。アノテーションに紐付けられていない場合(アノテーションの付け忘れに対する指摘など)は未指定。[詳細はこちら](#section/AnnotationId)。 + コメントに紐づくアノテーションのID。アノテーションに紐付けられていない場合(アノテーションの付け忘れに対する指摘など)は未指定。[詳細はこちら](#tag/x-data-types/AnnotationId)。 label_id: $ref: "#/components/schemas/LabelId" description: | @@ -7211,7 +7189,7 @@ components: $ref: "#/components/schemas/CommentId" phase: $ref: "#/components/schemas/TaskPhase" - description: コメントを作成したときのタスクフェーズ。[詳細はこちら](#section/TaskPhase) + description: コメントを作成したときのタスクフェーズ。[詳細はこちら](#tag/x-data-types/TaskPhase) phase_stage: type: integer description: コメントを作成したときのフェーズのステージ。 @@ -8736,7 +8714,7 @@ components: annotation_updated_datetime: type: string format: date-time - description: サムネイルの元になったアノテーションの更新日時。 [putEditorAnnotation](#operation/putEditorAnnotation) API や [getEditorAnnotation](#operation/getEditorAnnotation) API のレスポンスに含まれる `updated_datetime` を指定します。 + description: サムネイルの元になったアノテーションの更新日時。 [putAnnotation](#operation/putAnnotation) API や [getEditorAnnotation](#operation/getEditorAnnotation) API のレスポンスに含まれる `updated_datetime` を指定します。 AnnotationThumbnailImage: type: object required: @@ -8962,3 +8940,118 @@ components: description: データの最終更新時刻。新規作成時は未指定、更新時は必須(更新前の日時) ProjectExtraDataValueJson: description: プロジェクト追加データの値。 nullを除く任意のJson + TaskIdentifier: + type: object + description: タスクを指定するための情報 + required: + - project_id + - task_id + properties: + project_id: + $ref: "#/components/schemas/ProjectId" + task_id: + $ref: "#/components/schemas/TaskId" + GetTasksInBulkResponse: + type: object + description: 複数のタスク取得時のレスポンス + required: + - success + - failure + properties: + success: + type: array + items: + $ref: "#/components/schemas/Task" + description: 取得に成功したタスク + failure: + type: array + items: + $ref: "#/components/schemas/TaskIdentifier" + description: 取得に失敗したタスクのIDとそのプロジェクトID + InputDataIdentifier: + type: object + description: 入力データを指定するための情報 + required: + - project_id + - input_data_id + properties: + project_id: + $ref: "#/components/schemas/ProjectId" + input_data_id: + $ref: "#/components/schemas/InputDataId" + GetInputDataInBulkResponse: + type: object + description: 複数の入力データ取得時のレスポンス + required: + - success + - failure + properties: + success: + type: array + items: + $ref: "#/components/schemas/InputData" + description: 取得に成功した入力データ + failure: + type: array + items: + $ref: "#/components/schemas/InputDataIdentifier" + description: 取得に失敗した入力データのIDとそのプロジェクトID + AnnotationsByInputDataIdIdentifier: + type: object + description: アノテーションの所属先 + required: + - project_id + - task_id + - input_data_id + properties: + project_id: + $ref: "#/components/schemas/ProjectId" + task_id: + $ref: "#/components/schemas/TaskId" + input_data_id: + $ref: "#/components/schemas/InputDataId" + GetEditorAnnotationsInBulkResponse: + type: object + description: 複数の入力データにわたるアノテーション取得時のレスポンス + required: + - success + - failure + properties: + success: + type: array + items: + $ref: "#/components/schemas/AnnotationV2Output" + description: 取得に成功したアノテーション + failure: + type: array + items: + $ref: "#/components/schemas/AnnotationsByInputDataIdIdentifier" + description: 取得に失敗したアノテーションの所属先 + SupplementaryDataByInputDataIdIdentifier: + type: object + description: 補助情報の所属先 + required: + - project_id + - input_data_id + properties: + project_id: + $ref: "#/components/schemas/ProjectId" + input_data_id: + $ref: "#/components/schemas/InputDataId" + GetSupplementaryDataInBulkResponse: + type: object + description: 複数の入力データにわたる補助情報取得時のレスポンス + required: + - success + - failure + properties: + success: + type: array + items: + $ref: "#/components/schemas/SupplementaryData" + description: 取得に成功した補助情報 + failure: + type: array + items: + $ref: "#/components/schemas/SupplementaryDataByInputDataIdIdentifier" + description: 取得に失敗した補助情報の所属先 diff --git a/generate/swagger/swagger.v2.yaml b/generate/swagger/swagger.v2.yaml index 223cf49e..27e10ae4 100644 --- a/generate/swagger/swagger.v2.yaml +++ b/generate/swagger/swagger.v2.yaml @@ -115,7 +115,7 @@ info: 上記例 `account_id_count` は、タスクのフィールド `account_id` でタスクを分類したところ「`account_id` が `c5eee002` であるタスクが9件、`9f110e48` であるタスクが5件、`b25dfeb3` であるタスクが1件」だったという結果を表しています。 - version: 0.203.1 + version: 0.206.0 title: Annofab Web API x-logo: url: "https://annofab.com/resource/images/logo_landscape.png" @@ -168,12 +168,8 @@ components: $ref: "swagger-api-components.yaml#/components/securitySchemes/SignedCookiePolicy" SignedCookieSignature: $ref: "swagger-api-components.yaml#/components/securitySchemes/SignedCookieSignature" - 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" + AnnofabUser: + $ref: "swagger-api-components.yaml#/components/securitySchemes/AnnofabUser" AnnofabAdminOnly: $ref: "swagger-api-components.yaml#/components/securitySchemes/AnnofabAdminOnly" AllProjectMember: @@ -203,7 +199,7 @@ paths: この Cookie には有効期限があり、有効期限はリソース種類によって異なる場合があります。 有効期限が切れた場合は再取得します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: getSignedAccessV2 parameters: - name: url @@ -220,7 +216,7 @@ paths: Set-Cookie: schema: type: string - description: Signed Cookieが発行されます。発行されるCookieの詳細は [こちら](#section/Authentication) を参照ください。 + description: Signed Cookieが発行されます。Cookieの構成は変更される可能性があります。 example: CloudFront-Key-Pair-Id=XXXXYYYZZZZ; Path=/api/v2/projects/xxxx-xxxx-xxx; max-age=84600; HttpOnly; SameSite=Strict; Secure "401": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnauthorizedApi" @@ -367,7 +363,7 @@ paths: - af-statistics-v2 summary: タスク集計取得 description: | - 指定した期間の [タスク集計データ](/docs/api/#section/ArrayOfProjectTaskStatisticsHistory) を取得できるAPI。取得期間は最大3か月です。 + 指定した期間の [タスク集計データ](/docs/api/#tag/x-data-types/ArrayOfProjectTaskStatisticsHistory) を取得できるAPI。取得期間は最大3か月です。 security: - SignedCookieKeyPairId: [] SignedCookiePolicy: [] @@ -415,7 +411,7 @@ paths: - af-statistics-v2 summary: ユーザー別タスク集計取得 description: | - 指定した期間の [ユーザー別タスク集計データ](/docs/api/#section/ArrayOfProjectAccountStatistics) を取得できるAPI。取得期間は最大3か月です。 + 指定した期間の [ユーザー別タスク集計データ](/docs/api/#tag/x-data-types/ArrayOfProjectAccountStatistics) を取得できるAPI。取得期間は最大3か月です。 security: - SignedCookieKeyPairId: [] SignedCookiePolicy: [] @@ -463,7 +459,7 @@ paths: - af-statistics-v2 summary: 検査コメント集計取得 description: | - 指定した期間の [検査コメント集計データ](/docs/api/#section/ArrayOfInspectionStatistics) を取得できるAPI。取得期間は最大3か月です。 + 指定した期間の [検査コメント集計データ](/docs/api/#tag/x-data-types/ArrayOfInspectionStatistics) を取得できるAPI。取得期間は最大3か月です。 security: - SignedCookieKeyPairId: [] SignedCookiePolicy: [] @@ -511,7 +507,7 @@ paths: - af-statistics-v2 summary: フェーズ別タスク集計取得 description: | - 指定した期間の [フェーズ別タスク集計データ](/docs/api/#section/ArrayOfTaskPhaseStatistics) を取得できるAPI。取得期間は最大3か月です。 + 指定した期間の [フェーズ別タスク集計データ](/docs/api/#tag/x-data-types/ArrayOfTaskPhaseStatistics) を取得できるAPI。取得期間は最大3か月です。 security: - SignedCookieKeyPairId: [] SignedCookiePolicy: [] @@ -737,7 +733,7 @@ paths: - name: history_id in: query description: | - 過去のアノテーション仕様を取得する場合、[アノテーション仕様履歴取得](#operation/getAnnotationSpecsHistories)APIで取得した `history_id` の値を指定します。 + 過去のアノテーション仕様を取得する場合、[アノテーション仕様履歴取得](/docs/api/#operation/getAnnotationSpecsHistories)APIで取得した `history_id` の値を指定します。 未指定時は最新のアノテーション仕様を取得します。 required: false schema: @@ -1184,105 +1180,6 @@ paths: $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" - /users/{account_id}/projects: - get: - tags: - - af-users-v2 - summary: 自分のプロジェクトメンバー情報検索 - description: | - 指定したユーザーが所属するプロジェクトを検索します。 - - 本 API は `cache` クエリパラメータが同じであれば結果がキャッシュされ、以降は高速にレスポンスが返ります。 - security: - - SignedCookieKeyPairId: [] - SignedCookiePolicy: [] - SignedCookieSignature: [] - operationId: getUserProjectsV2 - parameters: - - name: account_id - in: path - description: アカウントID - required: true - schema: - $ref: "swagger-api-components.yaml#/components/schemas/AccountId" - - 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 - maximum: 200 - - name: organization_id - in: query - description: | - 指定した組織に属するプロジェクトに絞り込む。未指定時は全プロジェクト。 - required: false - schema: - $ref: "swagger-api-components.yaml#/components/schemas/OrganizationId" - - name: title - in: query - description: | - プロジェクトタイトルでの部分一致検索。1文字以上あれば使用します。利便性のため、大文字小文字は区別しません。 - required: false - schema: - type: string - - name: status - in: query - description: | - 指定した状態のプロジェクトで絞り込む。未指定時は全プロジェクト。 - required: false - schema: - $ref: "swagger-api-components.yaml#/components/schemas/ProjectStatus" - - name: input_data_type - in: query - description: | - 指定した入力データ種別でプロジェクトを絞り込む。未指定時は全プロジェクト - 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 - - name: cache - in: query - description: | - CACHE TIMESTAMP - required: false - schema: - type: string - example: "123456789" - responses: - "200": - description: 正常 - content: - application/json: - schema: - $ref: "swagger-api-components.yaml#/components/schemas/ProjectList" - "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" /users/{account_id}: get: tags: diff --git a/generate/swagger/swagger.yaml b/generate/swagger/swagger.yaml index 97194d78..e8ddf645 100644 --- a/generate/swagger/swagger.yaml +++ b/generate/swagger/swagger.yaml @@ -119,7 +119,7 @@ info: 上記例 `account_id_count` は、タスクのフィールド `account_id` でタスクを分類したところ「`account_id` が `c5eee002` であるタスクが9件、`9f110e48` であるタスクが5件、`b25dfeb3` であるタスクが1件」だったという結果を表しています。 また、AggregationResultの集約の件数は、合計で10000件以下に制限されており、それを超える件数がある場合は上位10000件が取得されます。もし、省略された部分を取得したい場合は、検索条件を縛って結果に上る集約の数を減らしてください。 - version: 0.203.1 + version: 0.206.0 title: Annofab Web API x-logo: url: "https://annofab.com/resource/images/logo_landscape.png" @@ -350,12 +350,8 @@ x-tagGroups: - 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" + AnnofabUser: + $ref: "swagger-api-components.yaml#/components/securitySchemes/AnnofabUser" AnnofabAdminOnly: $ref: "swagger-api-components.yaml#/components/securitySchemes/AnnofabAdminOnly" AllProjectMember: @@ -384,8 +380,7 @@ paths: ログインして、APIの認証に必要なトークンを取得します。 なりすましなどの悪用を防ぐため、トークンは他人に教えたり外部に公開しないでください。 - security: - - EveryoneRequestBody: [] + security: [] operationId: login requestBody: required: true @@ -412,8 +407,7 @@ paths: - af-login summary: ログアウト description: ログアウトします。 - security: - - EveryoneRequestBody: [] + security: [] operationId: logout requestBody: required: true @@ -436,8 +430,7 @@ paths: - af-login summary: MFAコードによるログイン description: MFAコードによるログインを行います。 - security: - - EveryoneRequestBody: [] + security: [] operationId: loginRespondToAuthChallenge requestBody: required: true @@ -468,8 +461,7 @@ paths: IDトークンやアクセストークンの有効期限が切れた場合に使います。 リフレッシュトークンの有効期限が切れた場合は、本APIでは再発行できません。代わりに、[login API](#operation/login)を実行してください。 - security: - - EveryoneRequestBody: [] + security: [] operationId: refreshToken requestBody: required: true @@ -516,8 +508,7 @@ paths: #### refresh_token を使う場合 (PluginTokenRequestRefreshToken) 1. プラグイン: 前回のトークン発行時に access_token と共に発行される refresh_token を記憶しておく 1. プラグイン: 本APIに上記 refresh_token を渡し、 access_token と refresh_token を得る - security: - - EveryoneRequestBody: [] + security: [] operationId: requestPluginToken requestBody: required: true @@ -635,8 +626,7 @@ paths: description: | プロジェクトゲスト用のトークンを発行します。 このAPIが返すトークンを利用することで、Annofabにユーザー登録を行わず、対象のプロジェクトの一部操作が可能となります。 - security: - - EveryoneRequestBody: [] + security: [] operationId: issueProjectGuestUserToken requestBody: required: true @@ -663,7 +653,7 @@ paths: description: | 自分のアカウント情報を取得します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: getMyAccount responses: "200": @@ -683,7 +673,7 @@ paths: description: | 自分のアカウント情報を更新します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: putMyAccount requestBody: required: true @@ -712,7 +702,7 @@ paths: description: | 自分が所属するプロジェクトのメンバー情報を一括で取得します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: getMyProjectMembers responses: "200": @@ -735,7 +725,7 @@ paths: 自身に届いている通知メッセージが上限(10000件)を超える場合、上限を超えた分の通知メッセージは取得できません。 また、上限を超える場合、開封済みの通知メッセージの数は、取得可能な通知メッセージ中の集計値となります。詳細はレスポンスの項目を参照ください。 security: - - Everyone: [] + - AnnofabUser: [] operationId: getMyNotificationMessages parameters: - name: page @@ -778,7 +768,7 @@ paths: description: | 自分に届いている通知メッセージの未読件数を取得します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: getMyNotificationUnreadMessagesCount responses: "200": @@ -801,7 +791,7 @@ paths: description: | 自分に届いているメッセージを取得します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: getMyNotificationMessage parameters: - name: message_id @@ -833,7 +823,7 @@ paths: 通知メッセージのステータスを更新します。 自分に届いた通知メッセージのみ更新できます。 security: - - Everyone: [] + - AnnofabUser: [] operationId: putMyNotificationMessageOpened parameters: - name: message_id @@ -866,7 +856,7 @@ paths: description: | 自分が発行したパーソナルアクセストークンの一覧を取得します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: getPersonalAccessTokens responses: "200": @@ -889,7 +879,7 @@ paths: description: | パーソナルアクセストークンを発行します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: issuePersonalAccessToken requestBody: required: true @@ -918,7 +908,7 @@ paths: description: | 発行済のパーソナルアクセストークンを無効化します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: revokePersonalAccessToken requestBody: required: true @@ -951,7 +941,7 @@ paths: 既に存在する組織名をリクエストボディに指定すると、400エラーが発生します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: createNewOrganization requestBody: required: true @@ -1191,7 +1181,7 @@ paths: - name: input_data_type in: query description: | - 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#section/InputDataType)を参照してください。 + 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#tag/x-data-types/InputDataType)を参照してください。 schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataType" - name: sort_by @@ -1423,9 +1413,8 @@ paths: summary: 組織への招待の受諾 description: | 組織への招待を受諾し、組織へのメンバー登録を完了します。 - security: - - EveryoneRequestBody: [] + - AnnofabUser: [] operationId: acceptOrganizationInvitation parameters: - name: organization_name @@ -1768,7 +1757,7 @@ paths: description: | 自分が所属しているプロジェクトを一括で取得します。 security: - - Everyone: [] + - AnnofabUser: [] operationId: getMyProjects parameters: - name: page @@ -1815,7 +1804,7 @@ paths: - name: input_data_type in: query description: | - 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#section/InputDataType)を参照してください。 + 入力データの種類でプロジェクトを絞り込みます。[詳細はこちら](#tag/x-data-types/InputDataType)を参照してください。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/InputDataType" @@ -1879,11 +1868,11 @@ paths: プロジェクトを新規作成または更新します。 ### 新規作成する場合 - ユーザーは、作成するプロジェクトをひもづける組織の [OrganizationAdministrator](#section/Authentication/OrganizationAdministrator) である必要があります。 + ユーザーは、作成するプロジェクトをひもづける組織の `組織管理者` である必要があります。 ### 更新する場合 - ユーザーは、更新するプロジェクトの [ProjectOwner](#section/Authentication/ProjectOwner) である必要があります。 - また所属組織を変更する場合は、新しくひもづける組織の [OrganizationAdministrator](#section/Authentication/OrganizationAdministrator) である必要があります。 + ユーザーは、更新するプロジェクトの `プロジェクトオーナー` である必要があります。 + また所属組織を変更する場合は、新しくひもづける組織の `組織管理者` である必要があります。 なお、プロジェクト状態を「停止中」にした場合、アノテーションZIPやタスク進捗状況などの集計情報は自動更新されなくなります。 @@ -1908,13 +1897,15 @@ paths: - name: v in: query description: | - APIの戻り型のバージョンを指定します。 - 値と戻り型の対応は以下です。 - - "1":Project - - "2":PutProjectResponse + **所属組織を変更したとき**のレスポンスのフォーマットバージョンを指定します。 + - "1":ステータスコードは200で、スキーマは`Project` + - "2":ステータスコードは202で、スキーマは`PutProjectResponse`。`PutProjectResponse`には、登録されたジョブが含まれます。 required: false schema: type: string + enum: + - "1" + - "2" default: "1" example: "2" requestBody: @@ -1930,7 +1921,7 @@ paths: schema: $ref: "swagger-api-components.yaml#/components/schemas/Project" "202": - description: 組織変更実施時 + description: クエリパラメータに`v=2`を指定して、所属組織変更を実施した場合 content: application/json: schema: @@ -2103,7 +2094,7 @@ paths: 入力データ全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 - 入力データ全件ファイルは、すべての入力データが記載されたJSONファイルです。SON構造は、[InputData](#section/InputData)の配列です。 + 入力データ全件ファイルは、すべての入力データが記載されたJSONファイルです。SON構造は、[InputData](#tag/x-data-types/InputData)の配列です。 ただしInputData中のurlは常にnullです。 毎日AM02:00(JST)頃に更新されます。 @@ -2179,7 +2170,7 @@ paths: タスク全件ファイルにアクセスするための、認証済み一時URLを取得します。 取得したURLは1時間で失効し、アクセスできなくなります。 - タスク全件ファイルは、すべてのタスクが記載されたJSONファイルです。JSON構造は、[Task](#section/Task)の配列です。 + タスク全件ファイルは、すべてのタスクが記載されたJSONファイルです。JSON構造は、[Task](#tag/x-data-types/Task)の配列です。 毎日AM02:00(JST)頃に更新されます。 [postProjectTasksUpdate](#operation/postProjectTasksUpdate) APIを利用すれば、手動でタスク全件ファイルを更新できます。 @@ -2256,7 +2247,7 @@ paths: 取得したURLは1時間で失効し、アクセスできなくなります。 検査コメント全件ファイルには、すべての検査コメントが記載されたファイルです。 - JSON構造は、[Inspection](#section/Inspection)の配列です。 + JSON構造は、[Inspection](#tag/x-data-types/Inspection)の配列です。 毎日AM02:00(JST)頃に更新されます。 security: @@ -2288,7 +2279,7 @@ paths: 取得したURLは1時間で失効し、アクセスできなくなります。 コメント全件ファイルは、すべてのコメントが記載されたJSONファイルです。 - JSON構造は、[Comment](#section/Comment)の配列です。 + JSON構造は、[Comment](#tag/x-data-types/Comment)の配列です。 毎日AM02:00(JST)頃に更新されます。 security: @@ -2322,7 +2313,7 @@ paths: タスク履歴イベント全件ファイルは、すべてのタスク履歴イベント情報が記載されたJSONファイルです。 - JSON構造は、[TaskHistoryEvent](#section/TaskHistoryEvent)の配列です。 + JSON構造は、[TaskHistoryEvent](#tag/x-data-types/TaskHistoryEvent)の配列です。 毎日AM02:00(JST)頃に更新されます。 security: @@ -2354,7 +2345,7 @@ paths: 取得したURLは1時間で失効し、アクセスできなくなります。 - タスク履歴イベント全件ファイルは、すべてのタスク履歴情報が記載されたJSONファイルです。JSON構造は、キーがタスクID、値が[TaskHistory](#section/TaskHistory)の配列となるマップです。 + タスク履歴イベント全件ファイルは、すべてのタスク履歴情報が記載されたJSONファイルです。JSON構造は、キーがタスクID、値が[TaskHistory](#tag/x-data-types/TaskHistory)の配列となるマップです。 毎日AM02:00(JST)頃に更新されます。 security: @@ -2915,7 +2906,7 @@ paths: - af-statistics summary: ラベル別アノテーション数の取得 description: | - [ラベル別アノテーション数集計データ](#section/ArrayOfLabelStatistics) を取得するための認証済み一時URLを取得します。 + [ラベル別アノテーション数集計データ](#tag/x-data-types/ArrayOfLabelStatistics) を取得するための認証済み一時URLを取得します。 security: - AllProjectMember: [] operationId: getLabelStatistics @@ -3141,7 +3132,7 @@ paths: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationName" - name: type in: query - description: 取得するジョブの種別。[詳細はこちら](#section/OrganizationJobType)。 + description: 取得するジョブの種別。[詳細はこちら](#tag/x-data-types/OrganizationJobType)。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/OrganizationJobType" @@ -3328,7 +3319,7 @@ paths: $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" - name: type in: query - description: 取得するジョブの種別。[詳細はこちら](#section/ProjectJobType)。 + description: 取得するジョブの種別。[詳細はこちら](#tag/x-data-types/ProjectJobType)。 required: false schema: $ref: "swagger-api-components.yaml#/components/schemas/ProjectJobType" @@ -3909,7 +3900,7 @@ paths: - name: annotation in: query description: | - アノテーションの絞り込み条件をJSON形式([AnnotationQuery](#section/AnnotationQuery))で指定したもの。指定した条件に合致するアノテーションを持つタスクを絞り込む際に指定する。 + アノテーションの絞り込み条件をJSON形式([AnnotationQuery](#tag/x-data-types/AnnotationQuery))で指定したもの。指定した条件に合致するアノテーションを持つタスクを絞り込む際に指定する。 required: false example: '{"label_id":"b048c6b3-b36f-4c8d-97ea-96828a50a44c"}' schema: @@ -4251,6 +4242,51 @@ paths: $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" + /projects/{project_id}/tasks-in-bulk: + get: + tags: + - af-task + summary: タスクのバルク取得 + description: | + タスクをバルク取得します。 + + このAPIは、[getTask](#operation/getTask) APIと似た機能を持ちますが、`task_id`を複数指定できる点が異なります。 + security: + - AllProjectMember: [] + operationId: getTasksInBulk + parameters: + - name: project_id + in: path + description: プロジェクトID + required: true + schema: + $ref: "swagger-api-components.yaml#/components/schemas/ProjectId" + - name: task_id + in: query + description: タスクIDのカンマ区切りリスト + required: true + style: form + explode: false + schema: + type: array + items: + $ref: "swagger-api-components.yaml#/components/schemas/TaskId" + example: [task_1,task_2,task_3] + minItems: 1 + maxItems: 100 + responses: + "200": + description: 正常 + content: + application/json: + schema: + $ref: "swagger-api-components.yaml#/components/schemas/GetTasksInBulkResponse" + "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}/assign-tasks: post: tags: @@ -4592,7 +4628,7 @@ paths: - name: query in: query description: | - 絞り込み条件([AnnotationQuery](#section/AnnotationQuery))をJSON形式で表した文字列。 + 絞り込み条件([AnnotationQuery](#tag/x-data-types/AnnotationQuery))をJSON形式で表した文字列。 required: false example: '{"label_id":"b048c6b3-b36f-4c8d-97ea-96828a50a44c"}' schema: @@ -4867,6 +4903,57 @@ paths: $ref: "swagger-api-components.yaml#/components/schemas/Errors" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" + /projects/{project_id}/tasks/{task_id}/annotations-in-bulk: + get: + tags: + - af-annotation + summary: アノテーションのバルク取得 + description: | + アノテーションをバルク取得します。 + + このAPIは、[getEditorAnnotation](#operation/getEditorAnnotation) APIと似た機能を持ちますが、`input_data_id`を複数指定できる点が異なります。 + security: + - AllProjectMember: [] + operationId: getEditorAnnotationsInBulk + 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: query + description: 入力データID + required: true + style: form + explode: false + schema: + type: array + items: + $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" + example: [input_data_1,input_data_2] + minItems: 1 + maxItems: 10 + responses: + "200": + description: 正常 + content: + application/json: + schema: + $ref: "swagger-api-components.yaml#/components/schemas/GetEditorAnnotationsInBulkResponse" + "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}/tasks/{task_id}/inputs/{input_data_id}/annotation/simple: get: tags: @@ -4925,7 +5012,7 @@ paths: アノテーションZIPの更新中に、このAPIを実行すると409エラーが発生します。 - FullアノテーションZIPのデータ構造については、[Full Annotation ZIP](#section/Full-Annotation-ZIP)を参照ください。 + FullアノテーションZIPのデータ構造については、[Full Annotation ZIP](#tag/x-annotation-zip/Full-Annotation-ZIP)を参照ください。 security: - ProjectDataUser: [] operationId: getArchiveFullWithProId @@ -4963,7 +5050,7 @@ paths: アノテーションZIPの更新中に、このAPIを実行すると409エラーが発生します。 - SimpleアノテーションZIPのデータ構造については、[Simple Annotation ZIP](#section/Simple-Annotation-ZIP)を参照ください。 + SimpleアノテーションZIPのデータ構造については、[Simple Annotation ZIP](#tag/x-annotation-zip/Simple-Annotation-ZIP)を参照ください。 security: - ProjectDataUser: [] @@ -5436,6 +5523,51 @@ paths: $ref: "swagger-api-components.yaml#/components/schemas/Errors" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" + /projects/{project_id}/input-data-in-bulk: + get: + tags: + - af-input + summary: 入力データのバルク取得 + description: | + 入力データをバルク取得します。 + + このAPIは、[getInputData](#operation/getInputData) APIと似た機能を持ちますが、`input_data_id`を複数指定できる点が異なります。 + security: + - AllProjectMember: [] + operationId: getInputDataInBulk + 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: true + style: form + explode: false + schema: + type: array + items: + $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" + example: [input_data_id1,input_data_id2] + minItems: 1 + maxItems: 100 + responses: + "200": + description: 正常 + content: + application/json: + schema: + $ref: "swagger-api-components.yaml#/components/schemas/GetInputDataInBulkResponse" + "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}/inputs/{input_data_id}: get: tags: @@ -5675,6 +5807,50 @@ paths: $ref: "swagger-api-components.yaml#/components/responses/ErrorMissingResource" "503": $ref: "swagger-api-components.yaml#/components/responses/ErrorUnderMaintenance" + /projects/{project_id}/supplementary-data-in-bulk: + get: + tags: + - af-supplementary + summary: 補助情報のバルク取得 + description: | + 補助情報をバルク取得します。 + このAPIは、[getSupplementaryDataList](#operation/getSupplementaryDataList) APIと似た機能を持ちますが、`input_data_id`を複数指定できる点が異なります。 + security: + - AllProjectMember: [] + operationId: getSupplementaryDataInBulk + 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: true + style: form + explode: false + schema: + type: array + items: + $ref: "swagger-api-components.yaml#/components/schemas/InputDataId" + example: [input_data_id1,input_data_id2] + minItems: 1 + maxItems: 100 + responses: + "200": + description: 正常 + content: + application/json: + schema: + $ref: "swagger-api-components.yaml#/components/schemas/GetSupplementaryDataInBulkResponse" + "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}/inputs/{input_data_id}/supplementary-data/{supplementary_data_id}: put: tags: