Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LizandroCanul/back_sdo/llms.txt
Use this file to discover all available pages before exploring further.
Get Started in 5 Minutes
This guide will help you get the API running locally and make your first request. You’ll set up the database, start the server, and authenticate to retrieve public works data.Start the Database
Use Docker Compose to launch PostgreSQL with PostGIS:This starts a PostgreSQL database with the PostGIS extension on port 5432.
Make sure Docker is installed and running on your system before executing this command.
Make Your First Request
Now that the API is running, let’s authenticate and retrieve some data.1. Login to Get a JWT Token
The API uses JWT authentication. First, obtain an access token:Save the
access_token - you’ll need it for authenticated requests.2. Retrieve Public Works
Use the token to fetch the list of obras (public works):3. Get a Specific Obra
Retrieve details for a single public work by ID:Understanding the Response
Each obra (public work) includes:- numeroObra: Sequential number for the fiscal year
- claveUnica: Unique identifier for the project
- nombre: Project name
- monto: Budget amount in Mexican pesos
- municipio: Associated municipality
- estatusObra: Current project status
- ejercicioFiscal: Fiscal year
- dependencia: Government agency responsible
- ubicaciones: Geographic locations (with PostGIS data)
Role-Based Access Control
The API implements role-based permissions:| Action | Admin | User |
|---|---|---|
| View obras | ✅ | ✅ |
| Create obra | ✅ | ❌ |
| Update obra | ✅ | ❌ |
| Delete obra | ✅ | ❌ |
Filtering and Pagination
The API supports query parameters for filtering:Next Steps
Full Installation Guide
Learn about production setup, migrations, and troubleshooting
Authentication Guide
Deep dive into JWT authentication and role management
API Reference
Explore all available endpoints and parameters
Database Schema
Understand the data model and relationships