API リファレンス
Architecto にプログラムからアクセスするための開発者向けドキュメント
Architecto API を使うと、プラットフォーム上に独自のアプリケーション、連携、ワークフローを構築できます。
認証
すべての API リクエストで、API キーによる認証が必要です。
Authorization: Bearer YOUR_API_KEYAPI キーの作成
- 設定 → 開発者 → API キー に移動します
- 新しいキーを作成 をクリックします
- 名前と有効期限(無期限、30 日、90 日、1 年)を入力します
- スコープ(読み取り、書き込み、管理)を選択します
- キーをコピーします(一度だけ表示されます)
API キーを公開しないでください。 パスワードと同様に扱ってください。
API キーの失効
- 設定 → 開発者 → API キー に移動します
- キーの横にある 失効 をクリックします
- 即座に無効になります
ベース URL
すべての API エンドポイントは、次の URL で利用できます。
https://api.architecto.dev/v1主なエンドポイント
認証
POST /auth/login # Login and get session
POST /auth/logout # End session
POST /auth/refresh # Refresh access tokenアーキテクチャ
GET /architectures # List your architectures
POST /architectures # Create new architecture
GET /architectures/{id} # Get architecture details
PUT /architectures/{id} # Update architecture
DELETE /architectures/{id} # Delete architecture
GET /architectures/{id}/versions # Get version history分析
POST /architectures/{id}/analyze/cost # Run cost analysis
POST /architectures/{id}/analyze/scalability # Run scalability analysis
POST /architectures/{id}/analyze/threats # Run threat modelingドキュメント
POST /architectures/{id}/documents/rfc # Generate RFC
POST /architectures/{id}/documents/adr # Generate ADR
POST /architectures/{id}/documents/runbook # Generate runbook共有
POST /architectures/{id}/shares # Create share link
GET /shares/{token} # Get shared architecture
POST /shares/{token}/comments # Add comment to shared archチーム
GET /organizations # List your organizations
POST /organizations # Create organization
GET /organizations/{id}/members # List team members
POST /organizations/{id}/invites # Invite team memberエラー処理
API エラーでは、標準の HTTP ステータスコードが返されます。
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Architecture with id 'arch_123' not found",
"details": {
"resource_type": "architecture",
"resource_id": "arch_123"
}
}
}主なステータスコード
| コード | 意味 |
|---|---|
| 200 | 成功 |
| 400 | 不正なリクエスト(無効なパラメーター) |
| 401 | 認証エラー(無効な API キー) |
| 403 | アクセス禁止(権限不足) |
| 404 | 見つかりません |
| 429 | レート制限超過 |
| 500 | サーバーエラー |
レート制限
API リクエストには、次のレート制限があります。
- Free プラン: 100 リクエスト/時間
- Pro プラン: 1,000 リクエスト/時間
- Ultimate プラン: 10,000 リクエスト/時間
レート制限の情報は、レスポンスヘッダーに含まれます。
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200例:アーキテクチャの作成と分析
# 1. Create architecture
curl -X POST https://api.architecto.dev/v1/architectures \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "E-commerce Platform",
"description": "Multi-region e-commerce with real-time inventory",
"cloud_provider": "aws"
}'
# Response:
# {
# "id": "arch_abc123",
# "title": "E-commerce Platform",
# "created_at": "2024-01-15T10:30:00Z"
# }
# 2. Run cost analysis
curl -X POST https://api.architecto.dev/v1/architectures/arch_abc123/analyze/cost \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scale_points": [1000, 10000, 100000],
"region": "us-east-1"
}'
# Response:
# {
# "analysis_id": "analysis_xyz789",
# "estimates": [
# {
# "users": 1000,
# "monthly_cost": 150,
# "breakdown": { "compute": 80, "storage": 40, "data_transfer": 30 }
# },
# ...
# ]
# }Webhook(近日公開)
アーキテクチャのイベントを購読できます。
POST /webhooks
{
"url": "https://your-app.com/webhook",
"events": ["architecture.created", "architecture.updated", "analysis.completed"]
}SDK
次の言語向け公式 SDK を近日公開予定です。
- Python
- Node.js / TypeScript
- Go
- Ruby
- Java
対話型 API ドキュメント
コードを書かずに API を試せます。
サポート
- API の不具合: GitHub Issues に投稿してください
- 質問: コミュニティ Discord でお尋ねください
- 法人のお客様: sales@architecto.dev までお問い合わせください
次のステップ:
- 連携ガイド
- Webhook の設定 (近日公開)