Skip to content
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

Introduce /api/rules/archive-by-tag endpoint #478

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Conversation

simonbyford
Copy link
Contributor

@simonbyford simonbyford commented Aug 2, 2024

What does this change?

Does two things:

  1. adds some handling to the /api/rules/csv-import endpoint to ensure the user making the request has the correct permissions. Also stores their email address against the change instead of the dummy value "CSV Import" (see: b71cd93)
  2. introduces a new endpoint /api/rules/archive-by-tag which can be used to bulk-archive rules based on a given tag (see: e62afe1)

The new endpoint /api/rules/archive-by-tag accepts one parameter encoded as form-data:

  • tag (required): the tag associated with the rules to archive.

For example:

curl --location 'https://manager.typerighter.gutools.co.uk/api/rules/archive-by-tag' \
--header 'accept: */*' \
--header 'content-type: application/json' \
--form 'tag="MP"'

How to test

It's slightly more complicated than the above. See these notes on the previous PR: #477 (comment)

Testing on CODE:

Kapture.2024-08-05.at.10.56.49.mp4

I'm not too sure why this particular request took 17 seconds. Subsequent requests took 200ms!

@simonbyford simonbyford requested a review from a team as a code owner August 2, 2024 10:36
@prout-bot
Copy link

Overdue on Checker, Rule Manager (merged by @simonbyford 15 minutes and 3 seconds ago) What's gone wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants