コンテンツにスキップ
言語の選択:日本語
テーマの選択

工具アセンブリAPI

工具アセンブリのモデルを一覧・取得し、ライブラリ全体をFusion 360パッケージとしてエクスポートします。

更新日:

ベースパス:/v1/organizations/:organization_id/tool_assemblies

メソッド パス 説明
GET /tool_assemblies エクスポート可能な工具アセンブリのモデルの一覧
GET /tool_assemblies/:id 工具アセンブリのモデルを取得
GET /tool_library/:vendor 指定したベンダー向けのパッケージとしてライブラリをエクスポート

工具アセンブリはAPIでは読取り専用です。POST、PATCH、DELETEのルートはありません。アプリのライブラリ → 工具アセンブリで作成・管理してください。

{
"id": 42,
"name": "Face Mill Ø80 — ADKT",
"designation": "TA-042",
"status": "released",
"created_at": "2025-01-10T08:00:00Z",
"updated_at": "2025-06-01T10:00:00Z",
"category": { "id": 3, "name": "Face Mills", "code": "FM" },
"created_by": { "id": 7, "email": "user@example.com", "firstname": "Long", "lastname": "Han" },
"cutting_data": [
{
"id": "b1e1f7a0-1c2d-4e3f-9a8b-7c6d5e4f3a2b",
"material_id": 2,
"name": "42CrMo4 — Face milling",
"operation": "milling_face",
"parameters": { "cutting_speed": 180, "feed_per_tooth": 0.12 },
"unit_system": "metric",
"created_at": "2025-01-10T08:00:00Z",
"updated_at": "2025-01-10T08:00:00Z"
}
]
}

識別項目はnumberではなくdesignationです。cutting_data[].parametersは自由形式のJSONで、キーはoperationによって変わり、スキーマで固定されません。安定した仕様としてではなく、中身の決まっていない切削パラメータの集まりとして扱ってください。

GET /tool_assembliesは、次の条件を満たすものだけを返します。

  • statusが、組織で「工具ライブラリのエクスポート対象」に設定された状態に含まれていること。対象の状態は、管理センター → 組織 → 設定の共通工具アセンブリライブラリのチェックボックス(下書き/リリース済み/稼働中/アーカイブ予定/アーカイブ済み)で選びます。これは組織単位の設定(organizations.preferences["engineering"]["tool_library_exportable"])であり、固定の状態の一覧ではありません。工具アセンブリ自体のリリースの流れにおけるstatusとは別の軸で、状態遷移上の「リリース済み」とは関係なく、何を「CAMで使用可能」とするかを組織が決めます。
  • assets_builded: trueであること。3D・STEPアセットの処理が完了している状態です。

画面に存在して見える工具アセンブリでも、いずれかを満たさなければ一覧に表示されません。

GET /tool_assemblies/:idには一覧エンドポイントのような絞り込みはなく、通常の権限によるアクセス範囲の中で、IDを指定した、その組織の任意の工具アセンブリを返します。認証を参照してください。

GET /v1/organizations/:organization_id/tool_library/:vendor

:vendorは現在fusionのみ実装されています(Autodesk Fusion 360の工具ライブラリJSON形式で、一覧エンドポイントと同じ状態・アセットの条件で作成されます)。それ以外のベンダー値では、エラーではなく本文がnullの200 OKが返ります。エラーステータスに頼らず、空またはnullのレスポンスかどうかを確認してください。Autodesk Fusionとの接続は、ToolingMetrics CAM Connect for Autodesk Fusionを参照してください。

# List all exportable tool assemblies
curl "https://api.toolingmetrics.com/v1/organizations/12/tool_assemblies" \
-H "Authorization: Bearer YOUR_TOKEN"
# Get a specific tool assembly with cutting data
curl "https://api.toolingmetrics.com/v1/organizations/12/tool_assemblies/42" \
-H "Authorization: Bearer YOUR_TOKEN"
# Export the full library as a Fusion 360 package
curl "https://api.toolingmetrics.com/v1/organizations/12/tool_library/fusion" \
-H "Authorization: Bearer YOUR_TOKEN" \
-o tool_library.json
import requests
import json
BASE = "https://api.toolingmetrics.com/v1"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}
# Fetch all exportable tool assemblies and index them by designation for lookup
assemblies = requests.get(
f"{BASE}/organizations/12/tool_assemblies",
headers=HEADERS,
).json()
by_designation = {a["designation"]: a for a in assemblies}
ta = by_designation.get("TA-042")
if ta:
print(f"{ta['name']} — status: {ta['status']}")
# Download the Fusion 360 library package
fusion_pkg = requests.get(
f"{BASE}/organizations/12/tool_library/fusion",
headers=HEADERS,
).json()
if fusion_pkg:
with open("tool_library.json", "w") as f:
json.dump(fusion_pkg, f, indent=2)
print("Fusion 360 library exported.")
else:
print("Nothing exported — no exportable tool assemblies, or the vendor value isn't supported.")

ステータス 原因
401 この組織の工具アセンブリを閲覧する権限がない、またはこのIDの組織が存在しない
404 GET /tool_assemblies/:id:この組織にこのIDの工具アセンブリが存在しない。本文は加工部品、プロジェクト、機械と同じく単数形のerrorキーを使います(エラーを参照)
422 ライブラリのエクスポートのみ:組み立てられない工具アセンブリを除いてもエクスポートを組み立てられなかった(通常、そのような工具アセンブリはライブラリから除かれ、そのユーザーに通知されます)。理由はerrorsに入ります
500 ライブラリのエクスポートのみ:エクスポートが想定外の理由で失敗した。errorsは"The tool library export failed"です