91 lines
1.2 KiB
Markdown
91 lines
1.2 KiB
Markdown
# API Contract Freeze M2
|
|
|
|
## Required V1 endpoints
|
|
|
|
### Health
|
|
|
|
`GET /health`
|
|
|
|
Response:
|
|
|
|
```json
|
|
{"status":"ok","service":"geointel-backend"}
|
|
```
|
|
|
|
### Projects
|
|
|
|
`POST /projects`
|
|
|
|
Request:
|
|
|
|
```json
|
|
{"name":"Geel Building Detection","description":"Demo project","region":"Kempen"}
|
|
```
|
|
|
|
Response: project object.
|
|
|
|
`GET /projects`
|
|
|
|
Response: paginated projects.
|
|
|
|
### Areas
|
|
|
|
`POST /projects/{project_id}/areas`
|
|
|
|
Request must contain GeoJSON polygon.
|
|
|
|
### Datasets
|
|
|
|
`POST /projects/{project_id}/datasets/upload`
|
|
|
|
Multipart upload. Returns dataset object and metadata status.
|
|
|
|
`GET /projects/{project_id}/datasets`
|
|
|
|
Returns datasets.
|
|
|
|
### Analysis runs
|
|
|
|
`POST /analysis/object-detection`
|
|
|
|
Request:
|
|
|
|
```json
|
|
{
|
|
"project_id": "uuid",
|
|
"dataset_id": "uuid",
|
|
"area_id": "uuid",
|
|
"model_id": "yolov8n-building-demo",
|
|
"confidence_threshold": 0.5
|
|
}
|
|
```
|
|
|
|
Response: job envelope.
|
|
|
|
`GET /analysis-runs/{id}`
|
|
|
|
Returns run status, metrics, outputs.
|
|
|
|
### QA/QC
|
|
|
|
`POST /analysis/qaqc/building-detection-vs-reference`
|
|
|
|
Request:
|
|
|
|
```json
|
|
{
|
|
"project_id": "uuid",
|
|
"prediction_run_id": "uuid",
|
|
"reference_dataset_id": "uuid",
|
|
"iou_threshold": 0.5
|
|
}
|
|
```
|
|
|
|
Response: job envelope.
|
|
|
|
### Exports
|
|
|
|
`POST /exports/geojson`
|
|
|
|
Exports detections, segmentations, QA findings, or vector layers.
|