-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: bulk enable/disable audits #302
base: main
Are you sure you want to change the base?
Conversation
This PR will trigger a minor release when merged. |
schema: | ||
type: object | ||
properties: | ||
baseURLs: |
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.
the primary key of sites is the siteId
(as used in routes like /sites/<siteId>
for example) - is it a conscious decision to use baseURL
instead?
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.
Yes, it is coming from #115, because if we want to easily use the API, we know the baseURL of a site, whereas for the id we need to do another request
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.
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.
@solaris007 , the consumers generally know the site URL and it's a hassle for them to:
- encode the baseURL
- get the site id via API https://opensource.adobe.com/spacecat-api-service/#tag/site/operation/getSiteByBaseUrl and use that one
In all requests we've received about configuring/looking at some data for a site, only the URL is mentioned (or sometimes just the customer name), not the site id.
docs/openapi/sites-api.yaml
Outdated
- site | ||
summary: Enable audits for multiple sites | ||
description: | | ||
This endpoint is useful for enabling audit types for multiple sites. |
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.
The description and operationId don't seem to match to what the code does, which is also affect organization config...
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.
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.
that's fine - all i'm saying is the API doc should transparently describe the effects.
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.
I agree to rename to make this more clear.
Specifically for enabling the org, I will add here the discussion I had with @alinarublea :
Users might not always want to enable/disable at the org level when they do this for the site.
E.g. case we had with a customer, where we had to enable the whole org and disable a part of the sites within that org. So we need a way to disable at site level without disabling at the same time at org level.
For enable = true, it's pointless to enable just the site, because anyways the audit doesn't run unless the org is enabled as well. In this case, we'd want to unify those 2 changes in 1 API call.
docs/openapi/sites-api.yaml
Outdated
- site | ||
summary: Enable audits for multiple sites | ||
description: | | ||
This endpoint is useful for enabling audit types for multiple sites. |
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.
that's fine - all i'm saying is the API doc should transparently describe the effects.
schema: | ||
type: object | ||
properties: | ||
baseURLs: |
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.
Please ensure your pull request adheres to the following guidelines: