annofabapi.dataclass module#

annofabapi.dataclass.annotation module#

annofabapiのmodelをDataClassで定義したクラス

Note

このファイルはopenapi-generatorで自動生成される。詳細は generate/README.mdを参照. oneOf, allOfなどは正しく表現できない可能性がある。

class annofabapi.dataclass.annotation.AdditionalDataV1(additional_data_definition_id: str, flag: bool | None, integer: int | None, comment: str | None, choice: str | None)[source]#
additional_data_definition_id: str#

属性ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

choice: str | None#

選択肢ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

comment: str | None#

additional_data_definition`の`type`が`text,`comment`,`link` または `tracking`のときの属性値。

flag: bool | None#

`additional_data_definition`の`type`が`flag`のときの属性値。

integer: int | None#

`additional_data_definition`の`type`が`integer`のときの属性値。

class annofabapi.dataclass.annotation.AdditionalDataV2(definition_id: str, value: dict[str, Any] | None)[source]#
definition_id: str#

属性ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

value: dict[str, Any] | None#
class annofabapi.dataclass.annotation.AdditionalDataValueChoice(type: str, choice_id: str)[source]#
choice_id: str#

選択肢ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

type: str#
class annofabapi.dataclass.annotation.AdditionalDataValueComment(type: str, value: str)[source]#
type: str#
value: str#

自由記述(1行)の属性値

class annofabapi.dataclass.annotation.AdditionalDataValueFlag(type: str, value: bool)[source]#
type: str#
value: bool#

ON/OFF属性の属性値。 ONの時trueとなります

class annofabapi.dataclass.annotation.AdditionalDataValueInteger(type: str, value: int)[source]#
type: str#
value: int#

整数属性の属性値

annotation_id: str#

アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。

type: str#
class annofabapi.dataclass.annotation.AdditionalDataValueSelect(type: str, choice_id: str)[source]#
choice_id: str#

選択肢ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

type: str#
class annofabapi.dataclass.annotation.AdditionalDataValueText(type: str, value: str)[source]#
type: str#
value: str#

自由記述(複数行)の属性値

class annofabapi.dataclass.annotation.AdditionalDataValueTracking(type: str, value: str)[source]#
type: str#
value: str#

トラッキングID属性の属性値

class annofabapi.dataclass.annotation.AnnotationDetailContentInputInner(type: str, data: Any)[source]#

アノテーションのデータ部をJSON内部に保持します

data: Any#
type: str#
class annofabapi.dataclass.annotation.AnnotationDetailContentInputOuter(type: str, path: str)[source]#

アノテーションのデータ部を外部ファイルの形式(画像など)で保持します

path: str#

外部ファイルの位置を示す文字列。 [createTempPath](#operation/createTempPath) APIによって取得したpathを指定します。

type: str#
class annofabapi.dataclass.annotation.AnnotationDetailContentOutputInner(type: str, data: Any)[source]#

アノテーションのデータ部をJSON内部に保持します

data: Any#
type: str#
class annofabapi.dataclass.annotation.AnnotationDetailContentOutputInnerUnknown(type: str, data: str)[source]#

アノテーションのデータ部をJSON内部に保持します。 AnnotationDetailV1の形式で保存されていたデータのAnnotationTypeが特定できない場合にこの値となります。 典型的な例では、アノテーションの保存後にアノテーション仕様が書き換わっていた場合が該当します。

data: str#

アノテーション座標値や区間などの文字列表現です。 アノテーション種類(annotation_type)とデータ格納形式(data_holding_type)に応じて、以下のとおり表現が変わります。 <table> <tr><th>annotation_type</th><th>data_holding_type</th><th>文字列表現</th></tr> <tr><td>bounding_box</td><td>inner</td><td><code>”左上x,左上y,右下x,右下y”</code></td></tr> <tr><td>point</td><td>inner</td><td><code>”x1,y1”</code></td></tr> <tr><td>polygon / polyline</td><td>inner</td><td><code>”x1,y1,x2,y2, … “</code></td></tr> <tr><td>range </td><td>inner</td><td><code>”開始時間(ミリ秒),終了時間(ミリ秒) “</code></td></tr> <tr><td>classification</td><td>inner</td><td><code>null</code></td></tr> <tr><td>segmentation</td><td>outer</td><td><code>null</code></td></tr> <tr><td>segmentation_v2</td><td>outer</td><td><code>null</code></td></tr> </table>

type: str#
class annofabapi.dataclass.annotation.AnnotationDetailContentOutputOuter(type: str, url: str, etag: str)[source]#

アノテーションのデータ部を外部ファイルの形式(画像など)で保持します

etag: str#

外部ファイルに保存されたアノテーションのETag

type: str#
url: str#

外部ファイルに保存されたアノテーションの認証済み一時URL

class annofabapi.dataclass.annotation.AnnotationDetailContentOutputOuterUnresolved(type: str)[source]#

アノテーションのデータ部を外部ファイルの形式(画像など)で保持します。 Outerのurl / etagを解決しなかった場合(過去のアノテーションを取得した場合等)にこの値となります。

type: str#
class annofabapi.dataclass.annotation.AnnotationDetailV1(annotation_id: str, account_id: str, label_id: str, is_protected: bool, data_holding_type: annofabapi.models.AnnotationDataHoldingType, data: str | dict[str, Any] | None, path: str | None, etag: str | None, url: str | None, additional_data_list: list[annofabapi.dataclass.annotation.AdditionalDataV1], created_datetime: str | None, updated_datetime: str | None)[source]#
account_id: str#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

additional_data_list: list[AdditionalDataV1]#

属性情報。 アノテーション属性の種類(additional_data_definition`の`type)によって、属性値を格納するプロパティは変わります。 | 属性の種類 | additional_data_definition`の`type | 属性値を格納するプロパティ | |------------|————————-|----------------------| | ON/OFF | flag | flag | | 整数 | integer | integer | | 自由記述(1行)| text | comment | | 自由記述(複数行)| comment | comment | | トラッキングID | tracking | comment | | アノテーションリンク | link | comment | | 排他選択(ラジオボタン) |choice | choice | | 排他選択(ドロップダウン) | select | choice |

annotation_id: str#

アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。

created_datetime: str | None#

作成日時

data: str | dict[str, Any] | None#
data_holding_type: AnnotationDataHoldingType#
etag: str | None#

外部ファイルに保存されたアノテーションのETag。`data_holding_type`が`inner`の場合、または[putAnnotation](#operation/putAnnotation) APIのリクエストボディに渡す場合は未指定です。

is_protected: bool#

`true`の場合、アノテーションをアノテーションエディタ上での削除から保護できます。 外部から取り込んだアノテーションに属性を追加するときなどに指定すると、データの削除を防げます。

label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

path: str | None#

外部ファイルに保存されたアノテーションのパス。`data_holding_type`が`inner`の場合は未指定です。 レスポンスの場合は`annotation_id`と同じ値が格納されます。 [putAnnotation](#operation/putAnnotation) APIのリクエストボディに渡す場合は、[createTempPath](#operation/createTempPath) APIで取得できる一時データ保存先パスを格納してください。 更新しない場合は、[getEditorAnnotation](#operation/getEditorAnnotation) APIで取得した`path`をそのまま渡せます。 外部ファイルのフォーマットは下表の通りです。 <table> <tr><th>annotation_type</th><th>形式</th></tr> <tr><td>segmentation / segmentation_v2 </td><td>PNG画像。塗りつぶした部分は<code>rgba(255, 255, 255, 1) </code>、塗りつぶしていない部分は<code>rgba(0, 0, 0, 0) </code>。</td></tr> </table>

updated_datetime: str | None#

更新日時

url: str | None#

外部ファイルに保存されたアノテーションの認証済み一時URL。`data_holding_type`が`inner`の場合、または[putAnnotation](#operation/putAnnotation) APIのリクエストボディに渡す場合は未指定です。

class annofabapi.dataclass.annotation.AnnotationDetailV2Create(type: str, annotation_id: str, label_id: str, body: dict[str, Any], additional_data_list: list[AdditionalDataV2], editor_props: AnnotationPropsForEditor)[source]#

新規にアノテーションを作成する場合にこの型を利用します。

additional_data_list: list[AdditionalDataV2]#
annotation_id: str#

アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。

body: dict[str, Any]#
editor_props: AnnotationPropsForEditor#
label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

type: str#
class annofabapi.dataclass.annotation.AnnotationDetailV2Get(type: str, annotation_id: str, account_id: str, label_id: str, body: dict[str, Any], additional_data_list: list[annofabapi.dataclass.annotation.AdditionalDataV2], editor_props: annofabapi.dataclass.annotation.AnnotationPropsForEditor, created_datetime: str, updated_datetime: str)[source]#
account_id: str#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

additional_data_list: list[AdditionalDataV2]#
annotation_id: str#

アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。

body: dict[str, Any]#
created_datetime: str#

作成日時

editor_props: AnnotationPropsForEditor#
label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

type: str#
updated_datetime: str#

更新日時

class annofabapi.dataclass.annotation.AnnotationDetailV2Import(type: str, annotation_id: str, account_id: str, label_id: str, body: dict[str, Any], additional_data_list: list[AdditionalDataV2], editor_props: AnnotationPropsForEditor, created_datetime: str, updated_datetime: str)[source]#

過去にAnnofab内外で作成したアノテーションをそのままインポートする場合にこの型を利用します。

account_id: str#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

additional_data_list: list[AdditionalDataV2]#
annotation_id: str#

アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。

body: dict[str, Any]#
created_datetime: str#

作成日時

editor_props: AnnotationPropsForEditor#
label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

type: str#
updated_datetime: str#

更新日時

class annofabapi.dataclass.annotation.AnnotationDetailV2Update(type: str, annotation_id: str, label_id: str, body: dict[str, Any] | None, additional_data_list: list[AdditionalDataV2], editor_props: AnnotationPropsForEditor)[source]#

既に存在するアノテーションを更新する場合にこの型を利用します

additional_data_list: list[AdditionalDataV2]#
annotation_id: str#

アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。

body: dict[str, Any] | None#
editor_props: AnnotationPropsForEditor#
label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

type: str#
class annofabapi.dataclass.annotation.AnnotationPropsForEditor(can_delete: bool | None, can_edit_data: bool | None, can_edit_additional: bool | None, description: str | None, tags: list[str] | None, etc: dict[str, Any] | None)[source]#

アノテーションエディタ用のアノテーション毎のプロパティです。<br /> ここに含まれているデータはアノテーション結果に反映されず、エディタが利用するために存在します。 エディタ用のデータであるため、たとえば`can_delete`や`can_edit_data`が`false`でも、APIによる編集は妨げません。<br /> ここで定義されているデータを利用して動作を変えるかどうかは、エディタによって異なります。

can_delete: bool | None#

アノテーションがエディタ上で削除できるかどうか。 trueの場合削除可能。

can_edit_additional: bool | None#

アノテーションの付加情報を編集できるかどうか。 trueの場合編集可能。 2022/09現在、この値を利用しているエディタは存在しません。

can_edit_data: bool | None#

アノテーションの本体のデータを編集できるかどうか。 trueの場合編集可能。 2022/09現在、この値を利用しているエディタは存在しません。

description: str | None#

アノテーションについての人間可読な説明。 2022/09現在、この値を利用しているエディタは存在しません。

etc: dict[str, Any] | None#

上記以外の任意のJson構造

tags: list[str] | None#

アノテーションに付与されている機械可読・人間可読なタグの列。 2022/09現在、この値を利用しているエディタは存在しません

class annofabapi.dataclass.annotation.AnnotationV1(project_id: str, task_id: str, input_data_id: str, details: list[annofabapi.dataclass.annotation.AnnotationDetailV1], updated_datetime: str | None)[source]#
details: list[AnnotationDetailV1]#

矩形、ポリゴン、全体アノテーションなど個々のアノテーションの配列。

input_data_id: str#

入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID)

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_id: str#

タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str | None#

更新日時

class annofabapi.dataclass.annotation.AnnotationV2Input(project_id: str, task_id: str, input_data_id: str, details: list[dict[str, Any]], updated_datetime: str | None, format_version: str)[source]#
details: list[dict[str, Any]]#

矩形、ポリゴン、全体アノテーションなど個々のアノテーションの配列。

format_version: str#
input_data_id: str#

入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID)

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_id: str#

タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str | None#

対象タスク・対象入力データへの最初の保存時は未指定にしてください。 更新の場合はアノテーション取得時のupdated_datetimeをそのまま指定してください。

class annofabapi.dataclass.annotation.AnnotationV2Output(project_id: str, task_id: str, input_data_id: str, details: list[dict[str, Any]], updated_datetime: str | None, format_version: str)[source]#
details: list[dict[str, Any]]#

矩形、ポリゴン、全体アノテーションなど個々のアノテーションの配列。

format_version: str#
input_data_id: str#

入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID)

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_id: str#

タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str | None#

対象タスク・対象入力データへ一度もアノテーションの保存が行われていない場合、未指定となります。 そうで無い場合、対象タスク・対象入力データのアノテーション最終更新時刻です。

class annofabapi.dataclass.annotation.FullAnnotation(project_id: str, task_id: str, task_phase: annofabapi.models.TaskPhase, task_phase_stage: int, task_status: annofabapi.models.TaskStatus, input_data_id: str, input_data_name: str, details: list[annofabapi.dataclass.annotation.FullAnnotationDetail], updated_datetime: str | None, annotation_format_version: str)[source]#
annotation_format_version: str#

//semver.org/)にもとづきます。 JSONに出力されるアノテーションフォーマットのバージョンは、アノテーションZIPが作成される時点のものが使われます。 すなわち、1.0.0`の時点のタスクで作成したアノテーションであっても、フォーマットが `1.0.1 に上がった次のZIP作成時では 1.0.1 となります。 バージョンを固定してZIPを残しておきたい場合は、プロジェクトが完了した時点でZIPをダウンロードして保管しておくか、またはプロジェクトを「停止中」にします。

Type:

アノテーションフォーマットのバージョンです。 アノテーションフォーマットとは、プロジェクト個別のアノテーション仕様ではなく、Annofabのアノテーション構造のことです。 したがって、アノテーション仕様を更新しても、このバージョンは変化しません。 バージョンの読み方と更新ルールは、業界慣習の[Semantic Versioning](https

details: list[FullAnnotationDetail]#

矩形、ポリゴン、全体アノテーションなど個々のアノテーションの配列

input_data_id: str#

入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID)

input_data_name: str#

入力データ名

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_id: str#

タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_phase: TaskPhase#
task_phase_stage: int#

タスクのフェーズのステージ番号

task_status: TaskStatus#
updated_datetime: str | None#

更新日時。アノテーションが一つもない場合(教師付作業が未着手のときなど)は、未指定。

class annofabapi.dataclass.annotation.FullAnnotationAdditionalData(additional_data_definition_id: str, additional_data_definition_name: dict[str, Any], type: AdditionalDataDefinitionType, value: dict[str, Any])[source]#

属性情報

additional_data_definition_id: str#

属性ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

additional_data_definition_name: dict[str, Any]#
type: AdditionalDataDefinitionType#
value: dict[str, Any]#
class annofabapi.dataclass.annotation.FullAnnotationDataBoundingBox(left_top: annofabapi.dataclass.annotation.Point, right_bottom: annofabapi.dataclass.annotation.Point, type: str)[source]#
left_top: Point#
right_bottom: Point#
type: str#

BoundingBox

class annofabapi.dataclass.annotation.FullAnnotationDataClassification(type: str)[source]#
type: str#

Classification

class annofabapi.dataclass.annotation.FullAnnotationDataPoints(points: list[annofabapi.dataclass.annotation.Point], type: str)[source]#
points: list[Point]#

頂点の座標値

type: str#

Points

class annofabapi.dataclass.annotation.FullAnnotationDataRange(begin: float, end: float, type: str)[source]#
begin: float#

開始時間(ミリ秒)

end: float#

終了時間(ミリ秒)

type: str#

Range

class annofabapi.dataclass.annotation.FullAnnotationDataSegmentation(data_uri: str, type: str)[source]#
data_uri: str#

塗りつぶし画像のパス。 塗りつぶし画像のファイル形式はPNGです。塗りつぶされた部分の色は`rgba(255, 255, 255, 1)`、塗りつぶされていない部分の色は`rgba(0, 0, 0, 0)`です。

type: str#

Segmentation

class annofabapi.dataclass.annotation.FullAnnotationDataSegmentationV2(data_uri: str, type: str)[source]#
data_uri: str#

塗りつぶし画像のパス。 塗りつぶし画像のファイル形式はPNGです。塗りつぶされた部分の色は`rgba(255, 255, 255, 1)`、塗りつぶされていない部分の色は`rgba(0, 0, 0, 0)`です。

type: str#

SegmentationV2

class annofabapi.dataclass.annotation.FullAnnotationDataSinglePoint(point: annofabapi.dataclass.annotation.Point, type: str)[source]#
point: Point#
type: str#

SinglePoint

class annofabapi.dataclass.annotation.FullAnnotationDetail(annotation_id: str, user_id: str, label_id: str, label_name: dict[str, Any], annotation_type: str, data_holding_type: annofabapi.models.AnnotationDataHoldingType, data: Any, additional_data_list: list[annofabapi.dataclass.annotation.FullAnnotationAdditionalData])[source]#
additional_data_list: list[FullAnnotationAdditionalData]#

属性情報。

annotation_id: str#

アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。

annotation_type: str#
data: Any#
data_holding_type: AnnotationDataHoldingType#
label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

label_name: dict[str, Any]#
user_id: str#

ユーザーID。[値の制約についてはこちら。](#section/API-Convention/APIID)

class annofabapi.dataclass.annotation.Point(x: int, y: int)[source]#

点の座標値

x: int#

X座標の値[ピクセル]

y: int#

Y座標の値[ピクセル]

class annofabapi.dataclass.annotation.SimpleAnnotation(annotation_format_version: str, project_id: str, task_id: str, task_phase: annofabapi.models.TaskPhase, task_phase_stage: int, task_status: annofabapi.models.TaskStatus, input_data_id: str, input_data_name: str, details: list[annofabapi.dataclass.annotation.SimpleAnnotationDetail], updated_datetime: str | None)[source]#
annotation_format_version: str#

//semver.org/)にもとづきます。 JSONに出力されるアノテーションフォーマットのバージョンは、アノテーションZIPが作成される時点のものが使われます。 すなわち、1.0.0`の時点のタスクで作成したアノテーションであっても、フォーマットが `1.0.1 に上がった次のZIP作成時では 1.0.1 となります。 バージョンを固定してZIPを残しておきたい場合は、プロジェクトが完了した時点でZIPをダウンロードして保管しておくか、またはプロジェクトを「停止中」にします。

Type:

アノテーションフォーマットのバージョンです。 アノテーションフォーマットとは、プロジェクト個別のアノテーション仕様ではなく、Annofabのアノテーション構造のことです。 したがって、アノテーション仕様を更新しても、このバージョンは変化しません。 バージョンの読み方と更新ルールは、業界慣習の[Semantic Versioning](https

details: list[SimpleAnnotationDetail]#

矩形、ポリゴン、全体アノテーションなど個々のアノテーションの配列。

input_data_id: str#

入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID)

input_data_name: str#

入力データ名

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_id: str#

タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_phase: TaskPhase#
task_phase_stage: int#

タスクのフェーズのステージ番号

task_status: TaskStatus#
updated_datetime: str | None#

更新日時。アノテーションが一つもない場合(教師付作業が未着手のときなど)は、未指定。

class annofabapi.dataclass.annotation.SimpleAnnotationDetail(label: str, annotation_id: str, data: Any, attributes: dict[str, Any])[source]#
annotation_id: str#

個々のアノテーションにつけられたIDです。

attributes: dict[str, Any]#

各属性の値 * 選択肢を定義している場合、その選択肢の表示名 (英語) * それ以外は属性値そのまま (文字列、数値、論理値)

Type:

キーと値が以下のようになっている辞書構造です。 * キー

Type:

アノテーション仕様で設定した属性名 (英語) * 値

data: Any#
label: str#

アノテーション仕様で設定したラベル名 (英語) です。

class annofabapi.dataclass.annotation.SingleAnnotationDetailV1(annotation_id: str, account_id: str, label_id: str, data_holding_type: AnnotationDataHoldingType, data: Any | None, etag: str | None, url: str | None, additional_data_list: list[AdditionalDataV1], created_datetime: str, updated_datetime: str)[source]#

アノテーション情報

account_id: str#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

additional_data_list: list[AdditionalDataV1]#

属性情報。 アノテーション属性の種類(additional_data_definition`の`type)によって、属性値を格納するプロパティは変わります。 | 属性の種類 | additional_data_definition`の`type | 属性値を格納するプロパティ | |------------|————————-|----------------------| | ON/OFF | flag | flag | | 整数 | integer | integer | | 自由記述(1行)| text | comment | | 自由記述(複数行)| comment | comment | | トラッキングID | tracking | comment | | アノテーションリンク | link | comment | | 排他選択(ラジオボタン) |choice | choice | | 排他選択(ドロップダウン) | select | choice |

annotation_id: str#

アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。

created_datetime: str#

作成日時

data: Any | None#
data_holding_type: AnnotationDataHoldingType#
etag: str | None#

data_holding_typeがouterの場合のみ存在し、データのETagが格納される

label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str#

更新日時

url: str | None#

data_holding_typeがouterの場合のみ存在し、データへの一時URLが格納される

class annofabapi.dataclass.annotation.SingleAnnotationDetailV2(annotation_id: str, account_id: str, label_id: str, body: dict[str, Any], additional_data_list: list[AdditionalDataV2], created_datetime: str, updated_datetime: str)[source]#

アノテーション情報

account_id: str#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

additional_data_list: list[AdditionalDataV2]#
annotation_id: str#

アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID) `annotation_type`が`classification`の場合は label_id と同じ値が格納されます。

body: dict[str, Any]#
created_datetime: str#

作成日時

label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str#

更新日時

class annofabapi.dataclass.annotation.SingleAnnotationV1(project_id: str, task_id: str, input_data_id: str, detail: annofabapi.dataclass.annotation.SingleAnnotationDetailV1, updated_datetime: str)[source]#
detail: SingleAnnotationDetailV1#
input_data_id: str#

入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID)

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_id: str#

タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str#

更新日時

class annofabapi.dataclass.annotation.SingleAnnotationV2(project_id: str, task_id: str, input_data_id: str, detail: annofabapi.dataclass.annotation.SingleAnnotationDetailV2, updated_datetime: str)[source]#
detail: SingleAnnotationDetailV2#
input_data_id: str#

入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID)

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_id: str#

タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str#

更新日時

annofabapi.dataclass.annotation_specs module#

annofabapiのmodelをDataClassで定義したクラス

Note

このファイルはopenapi-generatorで自動生成される。詳細は generate/README.mdを参照. oneOf, allOfなどは正しく表現できない可能性がある。

class annofabapi.dataclass.annotation_specs.AdditionalDataDefinitionV1(additional_data_definition_id: str, read_only: bool | None, name: annofabapi.dataclass.annotation_specs.InternationalizationMessage | None, default: bool | int | str | None, keybind: list[annofabapi.dataclass.annotation_specs.Keybind] | None, type: annofabapi.models.AdditionalDataDefinitionType, choices: list[annofabapi.dataclass.annotation_specs.AdditionalDataDefinitionV1Choices] | None, regex: str | None, label_ids: list[str] | None, required: bool | None, metadata: dict[str, str] | None)[source]#
additional_data_definition_id: str#

属性ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

choices: list[AdditionalDataDefinitionV1Choices] | None#

ドロップダウンまたはラジオボタンの選択肢

default: bool | int | str | None#
keybind: list[Keybind] | None#

ショートカットキー

label_ids: list[str] | None#

リンク属性において、リンク先として指定可能なラベルID(空の場合制限なし)

metadata: dict[str, str] | None#

ユーザーが自由に登録できるkey-value型のメタデータです。

name: InternationalizationMessage | None#
read_only: bool | None#

読み込み専用

regex: str | None#

属性の値が、指定した正規表現に一致している必要があります。

required: bool | None#

リンク属性において、入力を必須とするかどうか

type: AdditionalDataDefinitionType#
class annofabapi.dataclass.annotation_specs.AdditionalDataDefinitionV1Choices(choice_id: str, name: annofabapi.dataclass.annotation_specs.InternationalizationMessage, keybind: list[annofabapi.dataclass.annotation_specs.Keybind] | None)[source]#
choice_id: str#

選択肢ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

keybind: list[Keybind] | None#

ショートカットキー

name: InternationalizationMessage#
class annofabapi.dataclass.annotation_specs.AdditionalDataDefinitionV2(additional_data_definition_id: str, read_only: bool | None, name: annofabapi.dataclass.annotation_specs.InternationalizationMessage, default: bool | int | str | None, keybind: list[annofabapi.dataclass.annotation_specs.Keybind] | None, type: annofabapi.models.AdditionalDataDefinitionType, choices: list[annofabapi.dataclass.annotation_specs.AdditionalDataDefinitionV1Choices] | None, metadata: dict[str, str] | None)[source]#
additional_data_definition_id: str#

属性ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

choices: list[AdditionalDataDefinitionV1Choices] | None#

ドロップダウンまたはラジオボタンの選択肢

default: bool | int | str | None#
keybind: list[Keybind] | None#

ショートカットキー

metadata: dict[str, str] | None#

ユーザーが自由に登録できるkey-value型のメタデータです。

name: InternationalizationMessage#
read_only: bool | None#

読み込み専用

type: AdditionalDataDefinitionType#
class annofabapi.dataclass.annotation_specs.AdditionalDataRestriction(additional_data_definition_id: str, condition: dict[str, Any])[source]#
additional_data_definition_id: str#

属性ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

condition: dict[str, Any]#
class annofabapi.dataclass.annotation_specs.AnnotationEditorFeature(append: bool, erase: bool, freehand: bool, rectangle_fill: bool, polygon_fill: bool, fill_near: bool)[source]#

塗りつぶしの作図機能に関する情報

append: bool#

塗りつぶしの「追記」機能が使えるか否か

erase: bool#

塗りつぶしの「消しゴム」機能が使えるか否か

fill_near: bool#

「近似色塗りつぶし」機能を有効にするかどうか

freehand: bool#

塗りつぶしの「フリーハンド」機能が使えるか否か

polygon_fill: bool#

塗りつぶしの「自由形状」機能が使えるか否か

rectangle_fill: bool#

塗りつぶしの「矩形」機能が使えるか否か

class annofabapi.dataclass.annotation_specs.AnnotationSpecsHistory(history_id: str, project_id: str, updated_datetime: str, url: str, account_id: str | None, comment: str | None)[source]#
account_id: str | None#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

comment: str | None#

変更内容のコメント

history_id: str#

アノテーション仕様の履歴ID

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str#

更新日時

url: str#

アノテーション仕様が格納されたJSONのURL。URLにアクセスするには認証認可が必要です。

class annofabapi.dataclass.annotation_specs.AnnotationSpecsV1(project_id: str, labels: list[annofabapi.dataclass.annotation_specs.LabelV1], inspection_phrases: list[annofabapi.dataclass.annotation_specs.InspectionPhrase], updated_datetime: str | None, option: dict[str, Any] | None, metadata: dict[str, str])[source]#
inspection_phrases: list[InspectionPhrase]#

定型指摘

labels: list[LabelV1]#

ラベル

metadata: dict[str, str]#

ユーザーが自由に登録できるkey-value型のメタデータです。

option: dict[str, Any] | None#
project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str | None#

更新日時

class annofabapi.dataclass.annotation_specs.AnnotationSpecsV2(project_id: str, labels: list[annofabapi.dataclass.annotation_specs.LabelV2], additionals: list[annofabapi.dataclass.annotation_specs.AdditionalDataDefinitionV2], restrictions: list[annofabapi.dataclass.annotation_specs.AdditionalDataRestriction], inspection_phrases: list[annofabapi.dataclass.annotation_specs.InspectionPhrase], format_version: str, updated_datetime: str | None, option: dict[str, Any] | None, metadata: dict[str, str])[source]#
additionals: list[AdditionalDataDefinitionV2]#

属性

format_version: str#

アノテーション仕様のフォーマットのバージョン

inspection_phrases: list[InspectionPhrase]#

定型指摘

labels: list[LabelV2]#

ラベル

metadata: dict[str, str]#

ユーザーが自由に登録できるkey-value型のメタデータです。

option: dict[str, Any] | None#
project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

restrictions: list[AdditionalDataRestriction]#

属性の制約

updated_datetime: str | None#

更新日時

class annofabapi.dataclass.annotation_specs.AnnotationSpecsV3(project_id: str, labels: list[annofabapi.dataclass.annotation_specs.LabelV3], additionals: list[annofabapi.dataclass.annotation_specs.AdditionalDataDefinitionV2], restrictions: list[annofabapi.dataclass.annotation_specs.AdditionalDataRestriction], inspection_phrases: list[annofabapi.dataclass.annotation_specs.InspectionPhrase], annotation_type_version: str | None, format_version: str, updated_datetime: str | None, option: dict[str, Any] | None, metadata: dict[str, str])[source]#
additionals: list[AdditionalDataDefinitionV2]#

属性

annotation_type_version: str | None#

アノテーション種別のバージョン。 拡張仕様プラグインで定義した値が転写されます。プロジェクトに拡張仕様プラグインが設定されていない場合は未指定です。

format_version: str#

アノテーション仕様のフォーマットのバージョン

inspection_phrases: list[InspectionPhrase]#

定型指摘

labels: list[LabelV3]#

ラベル

metadata: dict[str, str]#

ユーザーが自由に登録できるkey-value型のメタデータです。

option: dict[str, Any] | None#
project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

restrictions: list[AdditionalDataRestriction]#

属性の制約

updated_datetime: str | None#

更新日時

class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueAnnotationEditorFeature(type: str, append: bool, erase: bool, freehand: bool, rectangle_fill: bool, polygon_fill: bool, fill_near: bool)[source]#

作図ツール・作図モード

append: bool#
erase: bool#
fill_near: bool#
freehand: bool#
polygon_fill: bool#
rectangle_fill: bool#
type: str#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueDisplayLineDirection(type: str, has_direction: bool)[source]#

線の向き表示/非表示の設定

has_direction: bool#
type: str#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueEmptyFieldValue(type: str)[source]#

値を持たないフィールド。 アノテーション仕様上に定義が存在すること自体に意味がある場合のフィールド値に利用します。

type: str#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueMarginOfErrorTolerance(type: str, max_pixel: int)[source]#

誤差許容範囲

max_pixel: int#
type: str#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueMinimumArea2d(type: str, min_area: int)[source]#

最小の面積

min_area: int#
type: str#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueMinimumSize(type: str, min_warn_rule: AnnotationTypeFieldMinWarnRule, min_width: int, min_height: int)[source]#

アノテーションの最小サイズに関する設定

min_height: int#
min_warn_rule: AnnotationTypeFieldMinWarnRule#
min_width: int#
type: str#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueMinimumSize2dWithDefaultInsertPosition(type: str, min_warn_rule: annofabapi.models.AnnotationTypeFieldMinWarnRule, min_width: int, min_height: int, position_for_minimum_bounding_box_insertion: list[int] | None)[source]#
min_height: int#
min_warn_rule: AnnotationTypeFieldMinWarnRule#
min_width: int#
position_for_minimum_bounding_box_insertion: list[int] | None#

最小矩形の挿入位置を、要素が2の配列で指定します。

type: str#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueOneBooleanFieldValue(type: str, value: bool)[source]#

真偽値をひとつだけ持つフィールド

type: str#
value: bool#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueOneIntegerFieldValue(type: str, value: int)[source]#

数値をひとつだけ持つフィールド

type: str#
value: int#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueOneStringFieldValue(type: str, value: str)[source]#

文字列を一つだけ持つフィールド

type: str#
value: str#
class annofabapi.dataclass.annotation_specs.AnnotationTypeFieldValueVertexCountMinMax(type: str, min: int, max: int)[source]#

頂点数の最大・最小

max: int#
min: int#
type: str#
class annofabapi.dataclass.annotation_specs.BoundingBoxMetadata(min_width: int, min_height: int, min_warn_rule: str, min_area: int | None, max_vertices: int | None, min_vertices: int | None, position_for_minimum_bounding_box_insertion: PositionForMinimumBoundingBoxInsertion | None, tolerance: int | None, has_direction: bool | None)[source]#

ベクター形式のアノテーション(矩形、ポリゴン、ポリライン、点)のメタデータ

has_direction: bool | None#

annotation_typepolyline の場合、アノテーションに向きを持たせるかどうかを指定できます。 この値が true の場合、Annofabの標準画像エディタ上ではポリラインの向きを示す矢印が描画されるようになります。 annotationTypepolyline 以外の場合は必ず false となります。

max_vertices: int | None#

頂点数の最大値

min_area: int | None#

面積の最小値[平方ピクセル]

min_height: int#

高さの最小値[ピクセル]

min_vertices: int | None#

頂点数の最小値

min_warn_rule: str#

サイズの制約に関する情報 * none - 制約なし * or - 幅と高さの両方が最小値以上 * and - 幅と高さのどちらか一方が最小値以上

min_width: int#

幅の最小値[ピクセル]

position_for_minimum_bounding_box_insertion: PositionForMinimumBoundingBoxInsertion | None#
tolerance: int | None#

許容誤差[ピクセル]

class annofabapi.dataclass.annotation_specs.Color(red: int, green: int, blue: int)[source]#

RGBで表現される色情報

blue: int#
green: int#
red: int#
class annofabapi.dataclass.annotation_specs.InspectionPhrase(id: str, text: annofabapi.dataclass.annotation_specs.InternationalizationMessage)[source]#
id: str#

定型指摘ID

text: InternationalizationMessage#
class annofabapi.dataclass.annotation_specs.InternationalizationMessage(messages: list[annofabapi.dataclass.annotation_specs.InternationalizationMessageMessages], default_lang: str)[source]#
default_lang: str#

希望された言語のメッセージが存在しない場合に、フォールバック先として使われる言語コード

messages: list[InternationalizationMessageMessages]#

言語コードとメッセージ(テキスト)のリスト。 * アノテーションエディタなどでは、Annofabの表示言語(各ユーザーが個人設定で選んだ言語)のメッセージが使われます * 以下の名前は、[Simple Annotation](#tag/x-annotation-zip/Simple-Annotation-ZIP) では en-US のメッセージが使われます * ラベル名 * 属性名 * 選択肢名 * いずれの場合でも、表示しようとした言語が messages に含まれない場合、 default_lang に指定した言語のメッセージが使われます

class annofabapi.dataclass.annotation_specs.InternationalizationMessageMessages(lang: str, message: str)[source]#
lang: str#

言語コード。en-US (英語) 、ja-JP (日本語)、 `vi-VN`(ベトナム語)のみサポートしています。

message: str#

lang で指定された言語でのメッセージ

class annofabapi.dataclass.annotation_specs.Keybind(code: str, shift: bool, ctrl: bool, alt: bool)[source]#
alt: bool#

Altキーを押しているかどうか

code: str#

//developer.mozilla.org/ja/docs/Web/API/KeyboardEvent/code)に相当する値です。

Type:

[KeyboardEvent.code](https

ctrl: bool#

Ctrlキーを押しているかどうか

shift: bool#

Shiftキーを押しているかどうか

class annofabapi.dataclass.annotation_specs.LabelV1(label_id: str, label_name: annofabapi.dataclass.annotation_specs.InternationalizationMessage, keybind: list[annofabapi.dataclass.annotation_specs.Keybind], annotation_type: str, bounding_box_metadata: annofabapi.dataclass.annotation_specs.BoundingBoxMetadata | None, segmentation_metadata: annofabapi.dataclass.annotation_specs.SegmentationMetadata | None, additional_data_definitions: list[annofabapi.dataclass.annotation_specs.AdditionalDataDefinitionV1], color: annofabapi.dataclass.annotation_specs.Color, annotation_editor_feature: annofabapi.dataclass.annotation_specs.AnnotationEditorFeature, metadata: dict[str, str] | None)[source]#
additional_data_definitions: list[AdditionalDataDefinitionV1]#

属性

annotation_editor_feature: AnnotationEditorFeature#
annotation_type: str#
bounding_box_metadata: BoundingBoxMetadata | None#
color: Color#
keybind: list[Keybind]#

ショートカットキー

label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

label_name: InternationalizationMessage#
metadata: dict[str, str] | None#

ユーザーが自由に登録できるkey-value型のメタデータです。

segmentation_metadata: SegmentationMetadata | None#
class annofabapi.dataclass.annotation_specs.LabelV2(label_id: str, label_name: annofabapi.dataclass.annotation_specs.InternationalizationMessage, keybind: list[annofabapi.dataclass.annotation_specs.Keybind], annotation_type: str, bounding_box_metadata: annofabapi.dataclass.annotation_specs.BoundingBoxMetadata | None, segmentation_metadata: annofabapi.dataclass.annotation_specs.SegmentationMetadata | None, additional_data_definitions: list[str], color: annofabapi.dataclass.annotation_specs.Color, annotation_editor_feature: annofabapi.dataclass.annotation_specs.AnnotationEditorFeature, metadata: dict[str, str] | None)[source]#
additional_data_definitions: list[str]#

ラベルに所属する属性のID

annotation_editor_feature: AnnotationEditorFeature#
annotation_type: str#
bounding_box_metadata: BoundingBoxMetadata | None#
color: Color#
keybind: list[Keybind]#

ショートカットキー

label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

label_name: InternationalizationMessage#
metadata: dict[str, str] | None#

ユーザーが自由に登録できるkey-value型のメタデータです。

segmentation_metadata: SegmentationMetadata | None#
class annofabapi.dataclass.annotation_specs.LabelV3(label_id: str, label_name: annofabapi.dataclass.annotation_specs.InternationalizationMessage, keybind: list[annofabapi.dataclass.annotation_specs.Keybind], annotation_type: str, field_values: dict[str, dict[str, Any]], additional_data_definitions: list[str], color: annofabapi.dataclass.annotation_specs.Color, metadata: dict[str, str] | None)[source]#
additional_data_definitions: list[str]#

ラベルに所属する属性のID

annotation_type: str#
color: Color#
field_values: dict[str, dict[str, Any]]#

KeyがフィールドIdであるDictionaryです。 カスタムの[組織プラグイン](#operation/putOrganizationPlugin)で利用される[UserDefinedAnnotationTypeDefinition](#tag/x-data-types/UserDefinedAnnotationTypeDefinition).`field_definitions`で定義されます。

keybind: list[Keybind]#

ショートカットキー

label_id: str#

ラベルID。[値の制約についてはこちら。](#section/API-Convention/APIID)

label_name: InternationalizationMessage#
metadata: dict[str, str] | None#

ユーザーが自由に登録できるkey-value型のメタデータです。

class annofabapi.dataclass.annotation_specs.PositionForMinimumBoundingBoxInsertion(x: int, y: int)[source]#

annotation_typebounding_box かつ min_warn_ruleand または or の場合のみ、挿入する最小矩形アノテーションの原点を指定できます。 画像左上の座標が「x=0, y=0」です。 未指定、もしくは「画像外に飛び出たアノテーション」を許可していないにも関わらず飛び出してしまう場合は、表示範囲の中央に挿入されます。 「スキャンした帳票の記入欄」や「定点カメラで撮影した製品ラベル」など、アノテーションしたい位置やサイズが多くの画像で共通している場合に便利です。 annotation_typebounding_box 以外の場合は必ず未指定となります。

x: int#
y: int#
class annofabapi.dataclass.annotation_specs.SegmentationMetadata(min_width: int, min_height: int, min_warn_rule: str, tolerance: int | None)[source]#

塗りつぶしアノテーションのメタデータ

min_height: int#

高さの最小値[ピクセル]

min_warn_rule: str#

サイズの制約に関する情報 * none - 制約なし * or - 幅と高さの両方が最小値以上 * and - 幅と高さのどちらか一方が最小値以上

min_width: int#

幅の最小値[ピクセル]

tolerance: int | None#

許容誤差[ピクセル]

annofabapi.dataclass.input module#

annofabapiのmodelをDataClassで定義したクラス

Note

このファイルはopenapi-generatorで自動生成される。詳細は generate/README.mdを参照. oneOf, allOfなどは正しく表現できない可能性がある。

class annofabapi.dataclass.input.InputData(input_data_id: str, project_id: str, organization_id: str, input_data_set_id: str, input_data_name: str, input_data_path: str, url: str | None, etag: str | None, original_input_data_path: str | None, updated_datetime: str, sign_required: bool, metadata: dict[str, str], system_metadata: dict[str, Any])[source]#

入力データの情報を表すデータ構造です。

etag: str | None#

//developer.mozilla.org/ja/docs/Web/HTTP/Headers/ETag)に相当する値です。

Type:

[HTTPレスポンスヘッダー ETag](https

input_data_id: str#

入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID)

input_data_name: str#

入力データ名

input_data_path: str#

入力データの実体が保存されたURLです。 URLスキームが s3 もしくは https であるもののみをサポートしています。

input_data_set_id: str#

入力データセットID(システム内部用のプロパティ)。[値の制約についてはこちら。](#section/API-Convention/APIID)

metadata: dict[str, str]#

ユーザーが自由に登録できるkey-value型のメタデータです。

organization_id: str#

組織ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

original_input_data_path: str | None#

システム内部用のプロパティ

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

sign_required: bool#

CloudFrontのSignedCookieを使ったプライベートストレージを利用するかどうか

system_metadata: dict[str, Any]#
updated_datetime: str#

更新日時

url: str | None#

システム内部用のプロパティ

class annofabapi.dataclass.input.Resolution(width: int, height: int)[source]#
height: int#

画像の高さ[ピクセル]

width: int#

画像の幅[ピクセル]

annofabapi.dataclass.job module#

Deprecated: 2025-02-01 以降に廃止します

class annofabapi.dataclass.job.ProjectJobInfo(project_id: str, job_type: annofabapi.models.ProjectJobType, job_id: str, job_status: annofabapi.models.JobStatus, job_execution: dict[str, Any] | None, job_detail: dict[str, Any] | None, errors: dict[str, Any], created_datetime: str, updated_datetime: str)[source]#
created_datetime: str#

作成日時

errors: dict[str, Any]#
job_detail: dict[str, Any] | None#

ジョブ結果の内部情報

job_execution: dict[str, Any] | None#

ジョブの内部情報

job_id: str#

ジョブID。[値の制約についてはこちら。](#section/API-Convention/APIID)

job_status: JobStatus#
job_type: ProjectJobType#
project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str#

更新日時

annofabapi.dataclass.organization module#

annofabapiのmodelをDataClassで定義したクラス

Note

このファイルはopenapi-generatorで自動生成される。詳細は generate/README.mdを参照. oneOf, allOfなどは正しく表現できない可能性がある。

class annofabapi.dataclass.organization.Organization(organization_id: str, organization_name: str, email: str, price_plan: annofabapi.models.PricePlan, summary: dict[str, Any], created_datetime: str, updated_datetime: str)[source]#
created_datetime: str#

作成日時

email: str#

メールアドレス

organization_id: str#

組織ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

organization_name: str#

組織名。[値の制約についてはこちら。](#section/API-Convention/APIID)

price_plan: PricePlan#
summary: dict[str, Any]#

廃止予定のプロパティです。常に中身は空です。

updated_datetime: str#

更新日時

annofabapi.dataclass.organization_member module#

annofabapiのmodelをDataClassで定義したクラス

Note

このファイルはopenapi-generatorで自動生成される。詳細は generate/README.mdを参照. oneOf, allOfなどは正しく表現できない可能性がある。

class annofabapi.dataclass.organization_member.OrganizationMember(organization_id: str, account_id: str, user_id: str, username: str, role: annofabapi.models.OrganizationMemberRole, status: annofabapi.models.OrganizationMemberStatus, biography: str | None, created_datetime: str, updated_datetime: str)[source]#
account_id: str#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

biography: str | None#

人物紹介、略歴。 この属性は、Annofab外の所属先や肩書などを表すために用います。 Annofab上の「複数の組織」で活動する場合、本籍を示すのに便利です。

created_datetime: str#

作成日時

organization_id: str#

組織ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

role: OrganizationMemberRole#
status: OrganizationMemberStatus#
updated_datetime: str#

更新日時

user_id: str#

ユーザーID。[値の制約についてはこちら。](#section/API-Convention/APIID)

username: str#

ユーザー名

annofabapi.dataclass.project module#

Deprecated: 2025-02-01 以降に廃止します

class annofabapi.dataclass.project.Project(project_id: str, organization_id: str, title: str, overview: str | None, project_status: annofabapi.models.ProjectStatus, input_data_type: annofabapi.models.InputDataType, configuration: annofabapi.dataclass.project.ProjectConfiguration, created_datetime: str, updated_datetime: str, summary: annofabapi.dataclass.project.ProjectSummary)[source]#
configuration: ProjectConfiguration#
created_datetime: str#

作成日時

input_data_type: InputDataType#
organization_id: str#

組織ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

overview: str | None#

プロジェクトの概要

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

project_status: ProjectStatus#
summary: ProjectSummary#
title: str#

プロジェクトのタイトル

updated_datetime: str#

更新日時

class annofabapi.dataclass.project.ProjectConfiguration(number_of_inspections: int | None, assignee_rule_of_resubmitted_task: AssigneeRuleOfResubmittedTask | None, task_assignment_type: TaskAssignmentType | None, task_assignment_property: dict[str, Any] | None, max_tasks_per_member: int | None, max_tasks_per_member_including_hold: int | None, input_data_set_id_list: list[str] | None, input_data_max_long_side_length: int | None, sampling_inspection_rate: int | None, sampling_acceptance_rate: int | None, private_storage_aws_iam_role_arn: str | None, plugin_id: str | None, custom_task_assignment_plugin_id: str | None, custom_specs_plugin_id: str | None, extended_specs_plugin_id: str | None, editor_version: str | None, use_beginner_navigation: bool | None)[source]#

プロジェクトの設定情報

assignee_rule_of_resubmitted_task: AssigneeRuleOfResubmittedTask | None#
custom_specs_plugin_id: str | None#

プラグインID。[値の制約についてはこちら。](#section/API-Convention/APIID)

custom_task_assignment_plugin_id: str | None#

プラグインID。[値の制約についてはこちら。](#section/API-Convention/APIID)

editor_version: str | None#

標準アノテーションエディタのバージョン。 * stable * 安定版。通常はこちらを利用してください。 * preview * 最新版。新機能やUI変更の先行リリース版。 プロジェクト更新時に未指定の場合は stable が指定されたものとみなします。

extended_specs_plugin_id: str | None#

プラグインID。[値の制約についてはこちら。](#section/API-Convention/APIID)

input_data_max_long_side_length: int | None#

入力データ画像の長辺の最大値(未指定時は4096px)。 画像をアップロードすると、長辺がこの値になるように画像が自動で圧縮されます。 アノテーションの座標は、もとの解像度の画像でつけたものに復元されます。 大きな数値を設定すると入力データ画像のサイズが大きくなり、生産性低下やブラウザで画像を表示できない懸念があります。注意して設定してください。

input_data_set_id_list: list[str] | None#

システム内部用のプロパティ。 [putProject](#operation/putProject) APIでプロジェクトを更新する際は、[getProject](#operation/getProject) APIで取得した値を指定してください。

max_tasks_per_member: int | None#

保留中のタスクを除き、1人(オーナー以外)に割り当てられるタスク数の上限。

max_tasks_per_member_including_hold: int | None#

保留中のタスクを含めて、1人(オーナー以外)に割り当てられるタスク数上限の保留分。 割り当て時の上限チェックは、max_tasks_per_memberとこの数字の合計で行われます。 例えばmax_tasks_per_memberが10、max_tasks_per_member_including_holdが20の場合、保留中を含むタスク数の割り当て上限は30になります。

number_of_inspections: int | None#

検査回数。 * 0回:教師付け -> 受入 * 1回:教師付け -> 検査 -> 受入 * n回(n >= 2):教師付け -> 検査1 -> … -> 検査n -> 受入

plugin_id: str | None#

プラグインID。[値の制約についてはこちら。](#section/API-Convention/APIID)

private_storage_aws_iam_role_arn: str | None#

AWS IAMロール。S3プライベートストレージの認可で使います。 [S3プライベートストレージの認可の設定についてはこちら](/docs/faq/#m0b240)をご覧ください。

sampling_acceptance_rate: int | None#

抜取受入率[%]。未指定の場合は100%として扱う。

sampling_inspection_rate: int | None#

抜取検査率[%]。未指定の場合は100%として扱う。

task_assignment_property: dict[str, Any] | None#
task_assignment_type: TaskAssignmentType | None#
use_beginner_navigation: bool | None#

true の場合、プロジェクトの画面でナビゲーションUIを表示します(ログインユーザーがプロジェクトオーナーの場合のみ)。

class annofabapi.dataclass.project.ProjectSummary(last_tasks_updated_datetime: str | None)[source]#

プロジェクトのサマリー情報

last_tasks_updated_datetime: str | None#

タスクの最終更新日時

annofabapi.dataclass.project_member module#

annofabapiのmodelをDataClassで定義したクラス

Note

このファイルはopenapi-generatorで自動生成される。詳細は generate/README.mdを参照. oneOf, allOfなどは正しく表現できない可能性がある。

class annofabapi.dataclass.project_member.ProjectMember(project_id: str, account_id: str, user_id: str, username: str, member_status: annofabapi.models.ProjectMemberStatus, member_role: annofabapi.models.ProjectMemberRole, biography: str | None, updated_datetime: str, created_datetime: str, sampling_inspection_rate: int | None, sampling_acceptance_rate: int | None)[source]#
account_id: str#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

biography: str | None#

人物紹介、略歴。 この属性は、Annofab外の所属先や肩書などを表すために用います。 Annofab上の「複数の組織」で活動する場合、本籍を示すのに便利です。

created_datetime: str#

作成日時

member_role: ProjectMemberRole#
member_status: ProjectMemberStatus#
project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

sampling_acceptance_rate: int | None#

抜取受入率(パーセント)

sampling_inspection_rate: int | None#

抜取検査率(パーセント)

updated_datetime: str#

更新日時

user_id: str#

ユーザーID。[値の制約についてはこちら。](#section/API-Convention/APIID)

username: str#

ユーザー名

annofabapi.dataclass.supplementary module#

annofabapiのmodelをDataClassで定義したクラス

Note

このファイルはopenapi-generatorで自動生成される。詳細は generate/README.mdを参照. oneOf, allOfなどは正しく表現できない可能性がある。

class annofabapi.dataclass.supplementary.SupplementaryData(organization_id: str, input_data_set_id: str, project_id: str, input_data_id: str, supplementary_data_id: str, supplementary_data_name: str, supplementary_data_path: str, url: str, etag: str | None, supplementary_data_type: annofabapi.models.SupplementaryDataType, supplementary_data_number: int, updated_datetime: str)[source]#
etag: str | None#

//developer.mozilla.org/ja/docs/Web/HTTP/Headers/ETag)に相当する値です。

Type:

[HTTPレスポンスヘッダー ETag](https

input_data_id: str#

入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID)

input_data_set_id: str#

入力データセットID(システム内部用のプロパティ)。[値の制約についてはこちら。](#section/API-Convention/APIID)

organization_id: str#

組織ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

supplementary_data_id: str#

補助情報ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

supplementary_data_name: str#

補助情報の名前

supplementary_data_number: int#

補助情報の表示順を表す数値。

supplementary_data_path: str#

補助情報の実体が存在するURLです。 URLスキームが s3 もしくは https であるもののみをサポートしています。

supplementary_data_type: SupplementaryDataType#
updated_datetime: str#

更新日時

url: str#

システム内部用のプロパティ

annofabapi.dataclass.task module#

annofabapiのmodelをDataClassで定義したクラス

Note

このファイルはopenapi-generatorで自動生成される。詳細は generate/README.mdを参照. oneOf, allOfなどは正しく表現できない可能性がある。

class annofabapi.dataclass.task.Task(project_id: str, task_id: str, phase: annofabapi.models.TaskPhase, phase_stage: int, status: annofabapi.models.TaskStatus, input_data_id_list: list[str], account_id: str | None, histories_by_phase: list[annofabapi.dataclass.task.TaskHistoryShort], work_time_span: int, number_of_rejections: int, started_datetime: str | None, updated_datetime: str, operation_updated_datetime: str | None, sampling: str | None, metadata: dict[str, Any] | None)[source]#
account_id: str | None#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

histories_by_phase: list[TaskHistoryShort]#

簡易的なタスク履歴(あるフェーズを誰が担当したか)

input_data_id_list: list[str]#

タスクに含まれる入力データのID

metadata: dict[str, Any] | None#

ユーザーが自由に登録できるkey-value型のメタデータです。 keyにはメタデータ名、valueには値を指定してください。 keyに指定できる文字種は次の通りです。 * 半角英数字 * _ (アンダースコア) * - (ハイフン) valueに指定できる値は次の通りです。 * 文字列 * 数値 * 真偽値

number_of_rejections: int#

このタスクが差戻しされた回数(すべてのフェーズでの差戻し回数の合計 このフィールドは、どのフェーズで何回差戻されたかを区別できないため、廃止予定です。 histories_by_phase で各フェーズの回数を計算することで、差戻し回数が分かります。 例)`acceptance`フェーズが3回ある場合、`acceptance`フェーズで2回差し戻しされたことになります。

operation_updated_datetime: str | None#

タスクのステータスやフェーズ、担当者などが更新されたときの日時

phase: TaskPhase#
phase_stage: int#

タスクのフェーズのステージ番号

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

sampling: str | None#

検査抜取検査/抜取受入によって、どのフェーズがスキップされたか * inspection_skipped - 抜取検査の対象外となり、検査フェーズがスキップされた * inspection_stages_skipped - 抜取検査の対象外となり、検査フェーズのステージの一部がスキップされた * acceptance_skipped - 抜取受入の対象外となり、受入フェーズがスキップされた * inspection_and_acceptance_skipped - 抜取検査・抜取受入の対象外となり、検査・受入フェーズがスキップされた 未指定ならば、どのフェーズもスキップされていません。

started_datetime: str | None#

現在のフェーズが開始された日時

status: TaskStatus#
task_id: str#

タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID)

updated_datetime: str#

更新日時

work_time_span: int#

累計実作業時間(ミリ秒)

class annofabapi.dataclass.task.TaskHistory(project_id: str, task_id: str, task_history_id: str, started_datetime: str | None, ended_datetime: str | None, accumulated_labor_time_milliseconds: str, phase: TaskPhase, phase_stage: int, account_id: str | None)[source]#

タスクのあるフェーズで、誰がいつどれくらいの作業時間を費やしたかを表すタスク履歴です。

account_id: str | None#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

accumulated_labor_time_milliseconds: str#

累計実作業時間(ISO 8601 duration)

ended_datetime: str | None#

終了日時

phase: TaskPhase#
phase_stage: int#

タスクのフェーズのステージ番号

project_id: str#

プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID)

started_datetime: str | None#

開始日時

task_history_id: str#

タスク履歴ID。[値の制約についてはこちら。](#section/API-Convention/APIID)

task_id: str#

タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID)

class annofabapi.dataclass.task.TaskHistoryShort(phase: TaskPhase, phase_stage: int, account_id: str, worked: bool | None)[source]#

タスクのあるフェーズを誰が担当したかを表します。

account_id: str#

アカウントID。[値の制約についてはこちら。](#section/API-Convention/APIID)

phase: TaskPhase#
phase_stage: int#
worked: bool | None#

そのフェーズでタスクの作業を行ったかどうか(行った場合はtrue)