โ04-03-2022 12:45 PM
I need to find out all jobs which are currently running and not get other jobs
The below command fetches all the jobs
curl --location --request GET 'https://xxxxxx.gcp.databricks.com/api/2.1/jobs/list?active_only=true&expand_tasks=true&run_type=JOB_RUN&completed_only=false&verbose=TRUE& offset=0' \
--header 'Authorization: Bearer xxxxxxxx'
active_only=true doesn't seem to work. Any help is appreciated
โ04-03-2022 06:47 PM
Work around -
You can add a filter for start_time and end_time to get jobs that were executed after a specific date (eg. T-1 day) to current time. And once you get the response, parse the JSON output to filter out jobs that don't have end time (implying that they're still running).
โ04-04-2022 02:12 AM
Strange. I've tested your curl with Azure databricks, and everything worked perfectly. What distribution are you using?
โ04-04-2022 12:01 PM
โ05-12-2022 10:55 PM
@Sumit Rohatgiโ can you try with limit and see if that works. are you still not getting it worked?Please let me know if still this is not listing. Thanks. also, just try running https://xxxxxx.gcp.databricks.com/api/2.1/jobs/list?active_only=true and see if the output.
โ06-07-2022 11:10 AM
Hi @Sumit Rohatgiโ,
Just a friendly follow-up. Did Atanu's response help you? please let us know if you still need help.
โ06-11-2022 01:31 AM
Hi @Sumit Rohatgiโ
It seems like active_only=true only applies to jobs/runs/list API and not to jobs/list.
Can you please try the jobs/runs/list API?
โ07-25-2022 11:42 AM
HHi @Sumit Rohatgiโ,
Just a friendly follow-up. Did any of the responses help you to resolve your question? if it did, please mark it as best. Otherwise, please let us know if you still need help.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group