Map Generation
1
Authenticate
Header
Value
{
"email": "[email protected]",
"password": "hunter2"
}POST <SUPABASE_URL>/auth/v1/token?grant_type=password
apikey: <SUPABASE_ANON_KEY>
Content-Type: application/json
{
"email": "[email protected]",
"password": "hunter2"
}{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "bearer",
"expires_in": 3600,
"expires_at": 1711324800,
"refresh_token": "v1.MjQ3...",
"user": {
"id": "d0d8c19e-1b2a-4c3d-8e4f-5a6b7c8d9e0f",
"email": "[email protected]",
"role": "authenticated"
}
}2
Submit Map Generation Job
Header
Value
Field
Type
Required
Description
POST <SUPABASE_URL>/functions/v1/submit-map-job
apikey: <SUPABASE_ANON_KEY>
Authorization: Bearer <access_token>
Content-Type: application/json
{
"area_name": "downtown_austin",
"geometry": {
"type": "Polygon",
"coordinates": [[
[-97.75, 30.26],
[-97.73, 30.26],
[-97.73, 30.28],
[-97.75, 30.28],
[-97.75, 30.26]
]]
}
}{
"workflow_id": "wf-abc-123",
"request_id": 42,
"status": "queued",
"message": "Map generation job submitted successfully",
"area_name": "downtown_austin",
"area_km2": 1.25,
"quota_info": {
"total_quota_km2": 500,
"used_km2": 120.5,
"remaining_km2": 378.25,
"requested_km2": 1.25,
"after_request_km2": 121.75
}
}{
"error": "Quota exceeded. You have 0.2 km² remaining, but requested 1.3 km².",
"quota_info": {
"total_quota_km2": 500,
"used_km2": 499.8,
"remaining_km2": 0.2,
"requested_km2": 1.3,
"after_request_km2": 501.1
}
}{
"error": "No active license found. Please purchase a license at https://dashboard.theseus.us",
"quota_info": null
}Field
Description
3
Poll Job Status
Header
Value
Field
Type
Required
Description
POST <SUPABASE_URL>/functions/v1/map-workflow-status
apikey: <SUPABASE_ANON_KEY>
Authorization: Bearer <access_token>
Content-Type: application/json
{
"workflow_id": "wf-abc-123"
}{
"state": "processing",
"status": "Generating tiles (batch 3/8)",
"percent_complete": 42,
"area_name": "downtown_austin",
"task_id": "wf-abc-123"
}{
"state": "completed",
"status": "Map generation complete",
"percent_complete": 100,
"area_name": "downtown_austin",
"task_id": "wf-abc-123"
}{
"state": "failed",
"error": "Satellite imagery unavailable for the requested area",
"area_name": "downtown_austin",
"task_id": "wf-abc-123"
}State
Meaning
4
Cancel a Job (Optional)
Header
Value
Field
Type
Required
Description
POST <SUPABASE_URL>/functions/v1/cancel-map-workflow
apikey: <SUPABASE_ANON_KEY>
Authorization: Bearer <access_token>
Content-Type: application/json
{
"workflow_id": "wf-abc-123"
}{
"workflow_id": "wf-abc-123",
"status": "cancelled",
"message": "Workflow cancelled successfully",
"area_name": "downtown_austin"
}Complete Flow Summary
Geometry Format
Area Name Requirements
Rule
Constraint
Last updated
