API 참조
Architecto에 프로그래밍 방식으로 접근하기 위한 개발자 문서
Architecto API를 사용하면 플랫폼을 기반으로 맞춤형 애플리케이션, 연동, 워크플로를 구축할 수 있습니다.
인증
모든 API 요청에는 API 키를 사용한 인증이 필요합니다.
Authorization: Bearer YOUR_API_KEYAPI 키 생성
- 설정 → 개발자 → API 키로 이동합니다
- 새 키 생성을 클릭합니다
- 이름과 만료 기간을 입력합니다(만료 없음, 30일, 90일, 1년)
- 권한 범위를 선택합니다(읽기, 쓰기, 관리자)
- 키를 복사합니다(한 번만 표시됨)
API 키를 공개적으로 공유하지 마세요. 비밀번호처럼 안전하게 관리하세요.
API 키 폐기
- 설정 → 개발자 → API 키로 이동합니다
- 키 옆의 폐기를 클릭합니다
- 즉시 무효화됩니다
기본 URL
모든 API 엔드포인트는 다음 주소에서 사용할 수 있습니다.
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 }
# },
# ...
# ]
# }웹훅(출시 예정)
아키텍처 이벤트를 구독할 수 있습니다.
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를 시험해 보세요.
- Postman 컬렉션
- Swagger UI
- GraphQL Playground (출시 예정)
지원
- API 문제: GitHub Issues에 등록해 주세요
- 질문: Discord 커뮤니티에서 문의해 주세요
- 기업 문의: sales@architecto.dev로 연락해 주세요
다음 단계: