cURL
curl -X POST 'https://api.supermodeltools.com/v1/graphs/domain' \
-H 'Idempotency-Key: <idempotency-key>' \
-H 'X-Api-Key: <api-key>' \
-F 'file=@/path/to/your/repo-snapshot.zip;type=application/zip'{
"status": "completed",
"jobId": "abc-123-def",
"result": {
"runId": "smart-sampling-a1b2c3d4",
"graph": {
"nodes": [
{
"id": "domain:BillingAccount",
"labels": [
"Domain"
],
"properties": {
"name": "BillingAccount",
"description": "Handles billing and account management"
}
},
{
"id": "subdomain:BillingAccount:PaymentProcessing",
"labels": [
"Subdomain"
],
"properties": {
"name": "PaymentProcessing",
"description": "Processes payment transactions"
}
}
],
"relationships": [
{
"id": "domain:BillingAccount->contains->subdomain:BillingAccount:PaymentProcessing",
"type": "contains",
"startNode": "domain:BillingAccount",
"endNode": "subdomain:BillingAccount:PaymentProcessing",
"properties": {}
}
]
},
"metadata": {
"analysisStartTime": "2025-02-05T15:42:10Z",
"analysisEndTime": "2025-02-05T15:42:25Z",
"fileCount": 2,
"languages": [
"typescript"
]
},
"domains": [
{
"name": "BillingAccount",
"descriptionSummary": "Handles billing and account management",
"keyFiles": [
"src/domain/billing.ts",
"src/services/billing.service.ts"
],
"responsibilities": [
"Account creation",
"Payment processing"
],
"subdomains": [
{
"name": "PaymentProcessing",
"descriptionSummary": "Processes payment transactions",
"files": [
"src/services/billing.service.ts"
],
"functions": [
"func-123"
],
"classes": []
}
]
},
{
"name": "UsageSummary",
"descriptionSummary": "Tracks and summarizes usage metrics",
"keyFiles": [
"src/domain/usage.ts"
],
"responsibilities": [
"Usage tracking",
"Metrics aggregation"
],
"subdomains": []
}
],
"relationships": [
{
"from": "BillingAccount",
"to": "UsageSummary",
"type": "aggregates",
"strength": 0.8,
"reason": "BillingAccount aggregates usage data for billing purposes"
}
],
"fileAssignments": [
{
"filePath": "src/domain/billing.ts",
"domainName": "BillingAccount"
},
{
"filePath": "src/domain/usage.ts",
"domainName": "UsageSummary"
}
],
"functionAssignments": [
{
"functionId": "func-123",
"subdomainName": "PaymentProcessing",
"parentDomain": "BillingAccount"
}
],
"unassignedFunctions": [
{
"functionId": "func-456",
"reason": "Utility function with unclear domain association"
}
],
"classAssignments": [
{
"classId": "class-789",
"domainName": "BillingAccount"
}
],
"functionDescriptions": [
{
"functionId": "func-123",
"descriptionSummary": "Processes incoming payment transactions",
"domainName": "BillingAccount"
},
{
"functionId": "func-456",
"descriptionSummary": "Aggregates usage metrics for billing period"
}
],
"stats": {
"nodeCount": 2,
"relationshipCount": 1,
"nodeTypes": {
"Domain": 2,
"Subdomain": 1
},
"relationshipTypes": {
"contains": 1
},
"domainCount": 2,
"subdomainCount": 1,
"assignedFileCount": 1,
"assignedFunctionCount": 1,
"assignedClassCount": 0,
"fileAssignments": 2,
"functionAssignments": 1,
"unassignedFunctions": 1,
"classAssignments": 1
}
}
}Data Plane
Domain graph
Upload a zipped repository snapshot to generate the domain model graph.
POST
/
v1
/
graphs
/
domain
cURL
curl -X POST 'https://api.supermodeltools.com/v1/graphs/domain' \
-H 'Idempotency-Key: <idempotency-key>' \
-H 'X-Api-Key: <api-key>' \
-F 'file=@/path/to/your/repo-snapshot.zip;type=application/zip'{
"status": "completed",
"jobId": "abc-123-def",
"result": {
"runId": "smart-sampling-a1b2c3d4",
"graph": {
"nodes": [
{
"id": "domain:BillingAccount",
"labels": [
"Domain"
],
"properties": {
"name": "BillingAccount",
"description": "Handles billing and account management"
}
},
{
"id": "subdomain:BillingAccount:PaymentProcessing",
"labels": [
"Subdomain"
],
"properties": {
"name": "PaymentProcessing",
"description": "Processes payment transactions"
}
}
],
"relationships": [
{
"id": "domain:BillingAccount->contains->subdomain:BillingAccount:PaymentProcessing",
"type": "contains",
"startNode": "domain:BillingAccount",
"endNode": "subdomain:BillingAccount:PaymentProcessing",
"properties": {}
}
]
},
"metadata": {
"analysisStartTime": "2025-02-05T15:42:10Z",
"analysisEndTime": "2025-02-05T15:42:25Z",
"fileCount": 2,
"languages": [
"typescript"
]
},
"domains": [
{
"name": "BillingAccount",
"descriptionSummary": "Handles billing and account management",
"keyFiles": [
"src/domain/billing.ts",
"src/services/billing.service.ts"
],
"responsibilities": [
"Account creation",
"Payment processing"
],
"subdomains": [
{
"name": "PaymentProcessing",
"descriptionSummary": "Processes payment transactions",
"files": [
"src/services/billing.service.ts"
],
"functions": [
"func-123"
],
"classes": []
}
]
},
{
"name": "UsageSummary",
"descriptionSummary": "Tracks and summarizes usage metrics",
"keyFiles": [
"src/domain/usage.ts"
],
"responsibilities": [
"Usage tracking",
"Metrics aggregation"
],
"subdomains": []
}
],
"relationships": [
{
"from": "BillingAccount",
"to": "UsageSummary",
"type": "aggregates",
"strength": 0.8,
"reason": "BillingAccount aggregates usage data for billing purposes"
}
],
"fileAssignments": [
{
"filePath": "src/domain/billing.ts",
"domainName": "BillingAccount"
},
{
"filePath": "src/domain/usage.ts",
"domainName": "UsageSummary"
}
],
"functionAssignments": [
{
"functionId": "func-123",
"subdomainName": "PaymentProcessing",
"parentDomain": "BillingAccount"
}
],
"unassignedFunctions": [
{
"functionId": "func-456",
"reason": "Utility function with unclear domain association"
}
],
"classAssignments": [
{
"classId": "class-789",
"domainName": "BillingAccount"
}
],
"functionDescriptions": [
{
"functionId": "func-123",
"descriptionSummary": "Processes incoming payment transactions",
"domainName": "BillingAccount"
},
{
"functionId": "func-456",
"descriptionSummary": "Aggregates usage metrics for billing period"
}
],
"stats": {
"nodeCount": 2,
"relationshipCount": 1,
"nodeTypes": {
"Domain": 2,
"Subdomain": 1
},
"relationshipTypes": {
"contains": 1
},
"domainCount": 2,
"subdomainCount": 1,
"assignedFileCount": 1,
"assignedFunctionCount": 1,
"assignedClassCount": 0,
"fileAssignments": 2,
"functionAssignments": 1,
"unassignedFunctions": 1,
"classAssignments": 1
}
}
}Authorizations
API key issued by the control plane for accessing data plane resources.
Headers
Unique identifier for this request for idempotency and tracing.
Body
multipart/form-data
Zipped repository archive containing the code to analyze.
Response
Domain graph (job completed)
Async response envelope for domain classification operations.
Current status of the job.
Available options:
pending, processing, completed, failed Unique identifier for the job.
Recommended seconds to wait before polling again.
Error message (present when status is failed).
The result (present when status is completed).
Show child attributes
Show child attributes
⌘I