Adds new table Sites & creates/updates related endpoints
Maintainers usually reply within 7 days
@fe51 is already working on this.
Since Mar 3, 2026.
Assessment
This issue has not been assessed yet.
Description
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 !
- Dominant language
- Python
- Stars
- 31
- Forks
- 15
- Avg merge
- 7d 18h
- Merged PRs (30d)
- 17
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyronear/pyro-api
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 7 days
-
endpoint: detections type: fix
Difficulty 4/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 7 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 7 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 7 days
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
Maintainers usually reply within 7 days
All issues in pyronear/pyro-api
Similar issues
-
area: ci enhancement perceived difficulty: 1
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Nitjsefnie-Harness-Commons/daedalus#1826 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vllm-project/vllm-sail#398 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
DiamondLightSource/sm-bluesky#476 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
jenkinsci/user-guide-ai-chatbot-plugin#132 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100