Databricks Running jobs are not visible

gokkul
Databricks Partner

Hi guys ,

I have a  issue here . I dont know why suddenly I cannot view Jobs which are running . Basically if I set the time and change the run status as "Active" . No active jobs are being shown . Although If I set run status as "Completed" or anything , its showing correctly. Anyone help me with this annoying issue . 

Screenshot 1: When run status is set as "Active" - no jobs are shown inspite of jobs running .

gokkul_0-1751976572885.png

Screenshot 2: When run status is set as "Completed" or anything - it displays jobs correctly .

gokkul_1-1751976706169.png

 

 

 

Khaja_Zaffer
Esteemed Contributor

Hello Gokku

Good day!
I think - The most common reason. You might have permission to see the job itself and its completed runs, but lack the specific permission (CAN_VIEW or CAN_MANAGE_RUN) required to see its active state. This can happen if job access controls have been recently modified.
can you confirm this once?

gokkul
Databricks Partner

Hi v-kzaffer 

Thanks for responding . Will talk with my seniors and confirm back to you . 

nayan_wylde
Esteemed Contributor II

use this code to view all active jobs. But use a token that is admin to the workspace.

%python
import requests
import json

# Replace these variables with your specific values
databricks_instance = 'your-workspace-url'
token = 'use an admin token'

# Define the API endpoint
url = f'https://{databricks_instance}/api/2.0/jobs/runs/list'

# Define the parameters
params = {
    'active_only': 'true'
}

# Define the headers
headers = {
    'Authorization': f'Bearer {token}'
}

# Make the GET request
response = requests.get(url, headers=headers, params=params)

# Check if the request was successful
if response.status_code == 200:
    # Parse the JSON response
    data = response.json()
    # Print the active job runs
    print(json.dumps(data, indent=4))
else:
    print(f'Error: {response.status_code}')
    print(response.text)

Khaja_Zaffer
Esteemed Contributor

Thanks Nayan

This must help.