organization list_usage#
Description#
組織の月別または日別の利用状況を出力します。組織管理者として実行してください。
CSV・JSONともに、--organization で指定した組織名を organization_name として出力します。
エディタ利用時間の単位は時間、ストレージ利用量の単位はGB時です。 作業時間や請求金額を出力するコマンドではありません。
Examples#
月別利用状況#
$ annofabcli organization list_usage --organization org1 --start_month 2026-08 --end_month 2026-09 --output out.csv
年月は YYYY-MM 形式で指定します。開始月・終了月は、いずれも集計対象に含まれます。
--end_month を省略すると日本時間(JST)の現在の月、
--start_month を省略すると終了月の11か月前になります。CLIが終了月を含む12か月分の取得期間を指定します。
たとえば現在の月が2026年10月の場合、両方を省略すると2025年11月から2026年10月までの12か月分を取得します。
--end_month 2026-09 のみ指定した場合は、2025年10月から2026年9月までを取得します。
日別利用状況#
$ annofabcli organization list_usage --organization org1 --month 2026-09 --output daily.csv
--month を指定すると、その月の日別利用状況を出力します。
--start_month、--end_month とは同時に指定できません。
日別CSVでは month の代わりに date が出力され、created_datetime も追加されます。
出力結果#
CSV出力#
ストレージ利用量を storage_usage_gb_hour (GB時)として出力します。
エディタ利用時間を image_editor_usage_hour、video_editor_usage_hour、
3d_editor_usage_hour の列に展開します。APIに含まれないエディタの利用時間は空欄です。
APIから追加のエディタ名が返された場合は、{エディタ名}_usage_hour の列も出力します。
取得結果が0件でもヘッダ行を出力します。
organization_id |
organization_name |
month |
aggregation_period_from |
aggregation_period_to |
storage_usage_gb_hour |
image_editor_usage_hour |
video_editor_usage_hour |
3d_editor_usage_hour |
|---|---|---|---|---|---|---|---|---|
12345678-abcd-1234-abcd-1234abcd5678 |
org1 |
2026-09 |
2026-09-01T00:00:00+09:00 |
2026-10-01T00:00:00+09:00 |
720.0 |
12.5 |
3.0 |
JSON出力#
JSONはCSVと同じ項目名・単位・レコード構造の配列として出力します。
APIに含まれないエディタの利用時間は、CSVでは空欄、JSONでは null になります。
$ annofabcli organization list_usage --organization org1 --start_month 2026-09 --end_month 2026-09 --format pretty_json --output out.json
[
{
"organization_id": "12345678-abcd-1234-abcd-1234abcd5678",
"organization_name": "org1",
"month": "2026-09",
"aggregation_period_from": "2026-09-01T00:00:00+09:00",
"aggregation_period_to": "2026-10-01T00:00:00+09:00",
"storage_usage_gb_hour": 720.0,
"image_editor_usage_hour": 12.5,
"video_editor_usage_hour": 3.0,
"3d_editor_usage_hour": null
}
]
日別JSONでは month の代わりに date が含まれ、created_datetime も含まれます。
Usage Details#
組織の月別または日別の利用状況を出力します。エディタ利用時間の単位は時間、ストレージ利用量の単位はGB時です。
usage: annofabcli organization list_usage [-h] [--yes]
[--endpoint_url ENDPOINT_URL]
[--annofab_user_id ANNOFAB_USER_ID]
[--annofab_password ANNOFAB_PASSWORD]
[--annofab_pat ANNOFAB_PAT]
[--logdir LOGDIR] [--disable_log]
[--debug] -org ORGANIZATION
[--start_month START_MONTH]
[--end_month END_MONTH]
[--month MONTH]
[-f {csv,json,pretty_json}]
[-o OUTPUT]
Named Arguments#
- -org, --organization
対象の組織名。
- --start_month
月別一覧の開始月(YYYY-MM、指定月を含む)。省略時は終了月の11か月前です(終了月を含む12か月分)。
- --end_month
月別一覧の終了月(YYYY-MM、指定月を含む)。省略時は日本時間(JST)の現在の月です。
- --month
日別一覧を取得する対象月(YYYY-MM)。--start_month、--end_monthとは同時に指定できません。
- -f, --format
Possible choices: csv, json, pretty_json
出力フォーマットを指定します。
Default:
'csv'- -o, --output
出力先のファイルパスを指定します。未指定の場合は、標準出力に出力されます。
common options (after the subcommand)#
- --yes
処理中に現れる問い合わせに対して、常に
yesと回答します。- --endpoint_url
Annofab WebAPIのエンドポイントを指定します。
- --annofab_user_id
Annofabにログインする際のユーザーID
- --annofab_password
Annofabにログインする際のパスワード
- --annofab_pat
Annofabにログインする際のパーソナルアクセストークン
- --logdir
ログファイルを保存するディレクトリを指定します。
Default:
.log- --disable_log
ログを無効にします。
- --debug
HTTPリクエストの内容やレスポンスのステータスコードなど、デバッグ用のログが出力されます。
組織管理者または組織オーナーロールを持つユーザーで実行してください。