-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST API to recalculate bits and clone katalogus settings #3572
Merged
Conversation
This file contains 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
ammar92
previously approved these changes
Sep 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checklist for QA:
- I have checked out this branch, and successfully ran a fresh
make reset
. - I confirmed that there are no unintended functional regressions in this branch:
- I have managed to pass the onboarding flow
- Objects and Findings are created properly
- Tasks are created and completed properly
- I confirmed that the PR's advertised
feature
orhotfix
works as intended. - I checked the logs for errors and/or warnings and made issues where necessary
What works:
- API endpoints exist and work as expected
- Was able to recalculate bits
- Was able to clone KATalogus settings to a new organization
underdarknl
reviewed
Sep 27, 2024
underdarknl
reviewed
Sep 27, 2024
dekkers
force-pushed
the
api-bits-recalculate-clone-settings
branch
from
September 30, 2024 11:23
9384612
to
b42d841
Compare
underdarknl
previously approved these changes
Sep 30, 2024
Checklist for QA:
What works:Couldn't test due to the error message below. What doesn't work:
Bug or feature?:n/a |
underdarknl
reviewed
Sep 30, 2024
Co-authored-by: Jan Klopper <[email protected]>
underdarknl
approved these changes
Oct 1, 2024
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.
Changes
This adds the REST API for recalculating bits and cloning settings. The endpoints are under the organization endpoint. For example if organization has rocky primary key 1, using httpie you can recalculate bits using:
$ http POST http://127.0.0.1:8000/api/v1/organization/1/recalculate_bits/ "Authorization:Token <token>"
To clone the katalogus settings to organization with rocky primary key 2:
$ http POST http://127.0.0.1:8000/api/v1/organization/1/clone_katalogus_settings/ to_organization=2 "Authorization:Token <token>"
This includes PR #3571 because else the tests with the right permissions don't work, so PR #3571 needs to be merged first.
Issue link
Closes #3525
QA notes
See Changes how to test the API.
Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.