-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add cron job endpoints #63
Conversation
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.
Since jobs cannot be created or deleted by the API, I am assuming that all job names are known, unique and cannot be changed. If that is the case, I would like to see those names explicitly listed in the API response. Knowing the names beforehand reduces the likelihood, that a user has to run through the keys of the response map.
A more expected response would be a list of job
s, where each job contains its own name.
Since the jobs are referenced by their names, I would expect the name
to be a mandatory field in the job
-schema and not just a reference key to an unnamed operation.
Also the description of /v1/jobs
says Fetch a list of known jobs"
, which does not indicate a map
.
Agreed, updated.
Do you think that a list of jobs would make more sense compared to a map? I was thinking that maybe having a map with known keys might be more simple to handle for API clients as a list would introduce some arbitrary order without any meaning. Or would you just change the "list of jobs" into a "map of jobs"? That's what I did in the latest commit just now.
Could you elaborate on that? I definitely agree that all keys (job names) should be documented in the API spec. Currently the job names are documented in the introduction of the "Background Jobs" section (as it applies to all related endpoints in a way). Would you like to also include all known jobs in the response samples and/or response schemas? Does this only concern the I think maintaining samples for all available jobs would be quite cumbersome and serve little benefit (especially since the samples would only differ by their |
This is probably true. Having the jobs listed in the "Backgroud Jobs" section, seems like the best choice.
I think a |
Good suggestion. I have added a link to the "Background Jobs" section from both the |
This PR adds endpoints that allow application admins to inspect scheduled background jobs.
The jobs are created by a server admin during application startup but can be inspected and potentially started via the API.