Adds new table Sites & creates/updates related endpoints
I maintainer di solito rispondono entro 7 giorni
@fe51 ci sta già lavorando.
Dal 3/3/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Pitch
The concept of a site appears frequently in discussions with business stakeholders. We also use it implicitly in various contexts (engine, frontend, and streaming).
As a result, we need to reintroduce this concept into the API, specifically in order to be able to:
- Display the list of cameras grouped by site
- Live streaming (currently hardcoded)
- On the dashboard
- Retrieve the IP address of the Pi associated with the site (live streaming) (currently hard-coded)
- Retrieve the livestream URL (currently hard-coded)
About the table sites
Below some guideline about the new table (Description is here for the purpose of the issue but not sure if we include it postgresSQL tables)
Do we include a created_at field ? -> To discuss
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | INT | PRIMARY KEY | Unique identifier |
| organization_id | INT | FOREIGN KEY → organizations(id) | Reference to the related organization in organizations table |
| name | VARCHAR | TO LIMIT NB OF CHARACTERS ? ? | Name of the site |
| created_at | TIMESTAMP | DEFAULT CURRENT_TIMESTAMP | Record creation timestamp |
What has to be done
- Add every thing related to the introduction of a the new table Sites in the api (and updates in camera table : removing organisaiton_id foreign key)
- Endpoints -> To be detailed
- Update camera endpoint (adding site id) -> For ease of use, but also to ensure continuity of service (before shutting down the old platform, making changes to the new one, and introducing it to users)
- Create : POST and PATCH (and GET?) endpoints for Site ressource
- Add migration script
- Update UML at
scripts/dbdiagram.txt - Do not forget to add tests :)
Would be happy to discuss it !
- Lingua principale
- Python
- Stelle
- 31
- Fork
- 15
- Merge medio
- 7g 18h
- PR unite (30g)
- 17
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pyronear/pyro-api
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 7 giorni
-
endpoint: detections type: fix
Difficoltà 4/5 1-2 giorni Idoneità per principianti 68/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
I maintainer di solito rispondono entro 7 giorni
Tutte le issue di pyronear/pyro-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
UKGovernmentBEIS/inspect_ai#6733 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ProyectoRespira/respira-webapp#334 ·
I maintainer di solito rispondono entro 1 giorno
-
bug security-alert
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
spectrayan/carefold#391 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Jakeschincariol/instagram-agent-skill#83 ·
I maintainer di solito rispondono entro 10 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 64/100