API Overview
The ArchiCore REST API allows you to integrate architecture analysis into your workflows.
Base URL
https://api.archicore.io/api/v1
Authentication
All API requests require authentication using a Bearer token:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.archicore.io/api/v1/projects
See Authentication for details on obtaining API keys.
Response Format
All responses are JSON:
{
"success": true,
"data": { ... }
}
Error responses:
{
"success": false,
"error": "Error message",
"code": "ERROR_CODE"
}
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing token |
403 | Forbidden - Insufficient permissions |
404 | Not Found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Rate Limits
| Tier | Requests/day | Requests/minute |
|---|---|---|
| Free | 100 | 10 |
| Pro | 10,000 | 100 |
| Enterprise | Unlimited | 1,000 |
Rate limit headers are included in all responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000
Endpoints Summary
Projects
| Method | Endpoint | Description |
|---|---|---|
GET | /projects | List all projects |
POST | /projects | Create a project |
GET | /projects/:id | Get project details |
DELETE | /projects/:id | Delete a project |
POST | /projects/:id/index | Trigger indexing |
Analysis
| Method | Endpoint | Description |
|---|---|---|
POST | /projects/:id/search | Semantic search |
POST | /projects/:id/ask | Ask AI assistant |
GET | /projects/:id/metrics | Get code metrics |
GET | /projects/:id/security | Security scan results |
POST | /projects/:id/analyze | Impact analysis |
Webhooks
| Method | Endpoint | Description |
|---|---|---|
GET | /webhooks | List webhooks |
POST | /webhooks | Create webhook |
DELETE | /webhooks/:id | Delete webhook |
SDKs
Official SDKs are available for:
- JavaScript/TypeScript:
npm install @archicore/sdk - Python:
pip install archicore
Quick Example
import { ArchiCore } from '@archicore/sdk';
const client = new ArchiCore({ apiKey: 'YOUR_API_KEY' });
// Search code
const results = await client.projects.search('project-id', {
query: 'authentication logic'
});
// Ask AI
const answer = await client.projects.ask('project-id', {
question: 'How does the auth system work?'
});