Add servers and sites API endpoints and let users use the API - #88
Merged
Conversation
API specification not up to dateThe committed API specification files do not match the exported output. Please run the following command, then commit and push the changes: docker compose exec phpfpm composer update-api-spec |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #88 +/- ##
=============================================
+ Coverage 37.14% 37.63% +0.49%
- Complexity 948 955 +7
=============================================
Files 133 135 +2
Lines 2972 2997 +25
=============================================
+ Hits 1104 1128 +24
- Misses 1868 1869 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rimi-itk
force-pushed
the
feature/user-api-key
branch
from
July 2, 2026 13:54
634acf1 to
554131d
Compare
rimi-itk
force-pushed
the
feature/user-api-key
branch
from
July 2, 2026 13:59
9abdab9 to
94aa0ec
Compare
API Specification - Non-breaking changesAPI Changelog 1.0.0 vs. 1.0.0API ChangesGET /api/servers
GET /api/sites
|
API Specification - Non-breaking changesAPI Changelog 1.0.0 vs. 1.0.0API ChangesGET /api/servers
GET /api/sites
|
API Specification - Non-breaking changesAPI Changelog 1.0.0 vs. 1.0.0API ChangesGET /api/servers
GET /api/sites
|
turegjorup
approved these changes
Jul 6, 2026
turegjorup
added a commit
that referenced
this pull request
Jul 30, 2026
Version20260702123347 added user.api_key as NOT NULL and then put a unique index on it, so every existing user got the same empty string and the index collided on the second row. Any database holding more than one user failed to migrate. Generate a key for each existing user before creating the index, matching App\Entity\User::__construct, which gives every user created since #88 a key of its own. The keys come from PHP rather than SQL because they are credentials and SQL's RAND() and UUID() are not cryptographically secure.
turegjorup
added a commit
that referenced
this pull request
Jul 30, 2026
Version20260702123347 added user.api_key as NOT NULL and then put a unique index on it, so every existing user got the same empty string and the index collided on the second row. Any database holding more than one user failed to migrate. Generate a key for each existing user before creating the index, matching App\Entity\User::__construct, which gives every user created since #88 a key of its own. The keys come from PHP rather than SQL because they are credentials and SQL's RAND() and UUID() are not cryptographically secure.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to ticket
https://leantime.itkdev.dk/_#/tickets/showTicket/7910
Description
Adds API key to users and adds read-only endpoints for collections of servers and sites.
No GUI to set user API keys is added. It must be done using the
app:user:set-api-keyconsole command.Screenshot of the result
If your change affects the user interface you should include a screenshot of the result with the pull request.
Checklist
If your code does not pass all the requirements on the checklist you have to add a comment explaining why this change
should be exempt from the list.
Additional comments or questions
If you have any further comments or questions for the reviewer please add them here.