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

Get running jobs API #261

Closed
servo1x opened this issue Feb 13, 2020 · 5 comments
Closed

Get running jobs API #261

servo1x opened this issue Feb 13, 2020 · 5 comments
Assignees

Comments

@servo1x
Copy link

servo1x commented Feb 13, 2020

Hi,

Is there an API endpoint to get all running jobs (even ones started manually)?

Thanks!

@jhuckaby
Copy link
Owner

I'm so sorry, but there is not. I will add this to the TODO list and get it done as soon as possible.

@jhuckaby jhuckaby self-assigned this Feb 13, 2020
@servo1x
Copy link
Author

servo1x commented Feb 13, 2020

No need to apologize @jhuckaby , if you want to provide any pointers maybe someone could make a PR?

@jhuckaby
Copy link
Owner

jhuckaby commented Feb 13, 2020 via email

@servo1x
Copy link
Author

servo1x commented Feb 13, 2020

Thank you so much! 👍

@jhuckaby
Copy link
Owner

Okay, I just dropped Version 0.8.42 which has the requested API. Have fun! Docs:

https://github.com/jhuckaby/Cronicle#get_active_jobs

get_active_jobs

/api/app/get_active_jobs/v1

This fetches status for all active jobs, and returns them all at once. It takes no parameters (except an API Key of course). The response format is as follows:

{
	"code": 0,
	"jobs": {
		"jk6lmar4c01": {
			...
		},
		"jk6lmar4d04": {
			...
		}
	}
}

In addition to the Standard Response Format, the response object will contain a jobs object. This object will have zero or more nested objects, each representing one active job. The inner property names are the Job IDs, and the contents are the status, progress, and other information about the active job. For details on the job objects, see the get_job_status API call above, as the parameters of each job will be the same as that API.

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

No branches or pull requests

2 participants