Admin API

abdulmalik1 Registered Posts: 1


I'd asking about Jobs section in the following page "/admin/monitoring/background-tasks" , how I can getting this data using HTTP API or python API.



  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,209 Dataiker

    Hi @abdulmalik1

    There is no public API for "background-tasks" specifically. We've taken note of this feature request.

    Note list_futures() API will return running tasks with the exclusion of scenarios, jobs, and notebooks. This generally captures "other running tasks", specifically webapp backends and code studios.

    From what I understand, what you want is a "list_running_jobs(") API. This currently does not exist, and the only way to obtain running job information would be through iterating through the list_jobs() API and parsing the response. For activities, you can obtain the number of running activities per job from the list_jobs() API so, note you need to iterate trough each project and in instances with lots of projects this can be costly.

    import dataikuclient = dataiku.api_client()#get current projectproject = client.get_default_project()#to get all projects job in project.list_jobs():job_id = job['def']['id']job_object = project.get_job(job_id)if job_object.get_status()['baseStatus']['state'] == 'RUNNING':print(job_object.get_status()['globalState'])


  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,705 Neuron
Setup Info
      Help me…