API ReferenceBackend API

Backend API Reference

Overview

The Lineo-PM backend exposes a RESTful JSON API built with FastAPI. All endpoints accept and return JSON. Authentication and authorization configuration depends on your deployment setup.

Interactive Documentation

FastAPI generates live, interactive API documentation automatically from the codebase. When the backend is running, you can explore and test all endpoints directly in the browser:

FormatURL
Swagger UIhttp://localhost:8000/docs
ReDochttp://localhost:8000/redoc
OpenAPI JSONhttp://localhost:8000/openapi.json

The Swagger UI is the recommended starting point for exploring the API — it allows you to inspect request/response schemas and execute requests with live data.

Endpoint Groups

GroupBase PathDescription
Projects/projectsCreate, read, update, and delete projects; list all projects
Tasks/tasksManage tasks within a project; update dates, durations, and risk levels
Milestones/milestonesCreate and manage milestone markers within a project
Scenarios/scenariosCreate scenarios, clone from baseline, switch active scenario, promote to baseline
Simulations/simulationsTrigger Monte Carlo simulation jobs; retrieve results and per-task statistics
Relations/relationsDefine and remove task-to-task dependency relationships (finish-to-start)
Updates/updatesAdd, edit, and retrieve narrative update entries for projects and scenarios

Request and Response Format

All request bodies and responses use application/json. Timestamps follow ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Dates (for task and milestone scheduling) use the YYYY-MM-DD format.

Error Responses

The API returns standard HTTP status codes:

CodeMeaning
200Success
201Resource created
400Bad request (validation error)
404Resource not found
422Unprocessable entity (Pydantic validation failure)
500Internal server error

Error responses include a JSON body with a detail field describing the error.