Jobs
  • 22 Nov 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Jobs

  • Dark
    Light
  • PDF

Article summary

Jobs

/v1/dru/jobs/

The Data Reporting Utility enables users to define aggregation jobs and generate aggregated results. The job definitions and results are stored in your database and can be accessed through this API

This endpoint produce List Of Data Reporting Utility Jobs.

Example for calling:

http://server/v1/dru/jobs - retrieves all jobs

http://server/v1/dru/jobs?network_id=1 – retrieves jobs related to the network having id = 1

http://server/v1/dru/jobs?id=2 – retrieves job with id 2

http://server/v1/dru/jobs?network_id=1&id=2 – retrieves job with id 2 where the job is linked to network with id 1.


Allowed Methods:

[GET]

API Controller: dru_job

Description:

  1. Retrieves the Jobs defined for the Data Reporting Utility..

Parameters:

NameTypeDescriptionNotes
network_idintegerNetwork IdReturns constraints related to given network id. If "SafranWebAPIOwnerVerificationDuringApiCalls" in Application Settings is in use, this is mandatory
idintegerThe ID of the Job


Response Fields:

NameTypeDescriptionNotes
job_idintegerThe ID of the Job
job_namestringThe name of the Job
ownerstringThe owner of the job
projectproject[]The project linked to the job, see job.project
from_datedatetimeThe from date of the job, part of the periodTime is in Coordinated Universal Time
until_datedatetimeThe until date of the job, part of the periodTime is in Coordinated Universal Time
intervalinterval[]The internval of the job, part of the period, see job.jobinterval
filterstringThe filter used on activities for the job
timedscheduletimedschedule[]The Timed Schedule setting of the Job, see jobs.jobtimedschedule
jobdatafieldjobdatafield[]The Timed Schedule setting of the Job, see jobs.jobjobdatafield
datagroupdatagroup[]The dimensions of the Job, see jobs.jobdatagroup


job.project

Project table

NameTypeDescriptionNotes
network_idintegerThe network id of the project used in a job
network_namestringThe network name of the project used in a job
project_idintegerThe project id used in a job


job.interval

Interval table

NameTypeDescriptionNotes
intervalinteger
unitstringInterval unitYear
Quarter
CalendarMonth
Week
Day


job.timedschedule

TimedSchedule table

NameTypeDescriptionNotes
run_frequencyintegerThe job run frequency
run_frequency_unitcharInterval unit'O' - Month
'B' - BiWeek
'W' - Week
'D' - Day
'H' - Hour
'M' - Minute
'N' - Never
'I' - Immidately
run_frequency_methodstringInterval unit"PureFrequencies"
"LastRunStarted"
"LastRunEnded"
last_rundatetimeWhen the Job was last ranTime is in Coordinated Universal Time
last_run_endeddatetimeWhen the Job was last ran endedTime is in Coordinated Universal Time
last_run_usedstringHow long time the last ran took
next_rundatetimeThe next planned run dateTime is in Coordinated Universal Time


job.jobdatafield

Job Data Field table

NameTypeDescriptionNotes
jobdatafield_idintegerThe ID of the job data field
datasetscheduledatasetschedule[]The Schedule of the data set, see jobs.jobjobdatafielddatasetschedule
jobdatasetscopejobdatasetscope[]The Scope of the data set, see jobs.jobjobdatafieldjobdatasetscope


job.jobdatafield.datasetschedule

Dataset Schedule table

NameTypeDescriptionNotes
scheduleintegerThe ID of the schedule
descriptionstringDescription of the schedule


job.jobdatafield.jobdatasetscope

Job Dataset Scope table

NameTypeDescriptionNotes
scopeintegerThe ID of the scope
descriptionstringDescription of the scope


job.datagroup

Job Data Group table

NameTypeDescriptionNotes
numberintegerThe group number of the Job
fieldstringThe field linked to the dimmension, all fiels comes from activities
oc_levelinteger
labelstringThe full label of the field


Show JSON Response

json result

[
    {
        "job_id": 1,
        "job_name": "Job Minutes Sundays",
        "owner": "JOSTEIN.ULLESTAD",
        "project": {
            "network_id": 1280,
            "network_name": "DRU Minutes Sundays",
            "project_id": 1237
        },
        "from_date": "2024-06-01T00:00:00",
        "until_date": "2024-09-07T00:00:00",
        "interval": {
            "interval": 1,
            "unit": "Week"
        },
        "filter": "",
        "timedschedule": {
            "run_frequency": 1,
            "run_frequency_unit": "Week",
            "run_frequency_method": "PureFrequencies",
            "last_run": "2024-09-26T14:31:19.973",
            "last_run_ended": "2024-09-26T14:31:36.713",
            "last_time_used": "17 seconds",
            "next_run": null
        },
        "jobdatafield": [
            {
                "jobdatafield_id": 1,
                "datasetschedule": {
                    "schedule": 4,
                    "description": "Live Plan, Early"
                },
                "jobdatasetscope": {
                    "scope": 3,
                    "description": "Total"
                }
            },
            {
                "jobdatafield_id": 2,
                "datasetschedule": {
                    "schedule": 2,
                    "description": "Baseline Plan Early"
                },
                "jobdatasetscope": {
                    "scope": 1,
                    "description": "Baseline"
                }
            },
            {
                "jobdatafield_id": 3,
                "datasetschedule": {
                    "schedule": 10,
                    "description": "Earned"
                },
                "jobdatasetscope": {
                    "scope": 1,
                    "description": "Baseline"
                }
            },
            {
                "jobdatafield_id": 4,
                "datasetschedule": {
                    "schedule": 10,
                    "description": "Earned"
                },
                "jobdatasetscope": {
                    "scope": 3,
                    "description": "Total"
                }
            }
        ],
        "datagroup": [
            {
                "number": 1,
                "field": "an",
                "oc_level": 1,
                "label": ""
            },
            {
                "number": 2,
                "field": "r1",
                "oc_level": 2,
                "label": "Reference 1"
            },
            {
                "number": 3,
                "field": "l55",
                "oc_level": 3,
                "label": "Flag 55"
            },
            {
                "number": 4,
                "field": "r46",
                "oc_level": 4,
                "label": "Reference 46"
            },
            {
                "number": 5,
                "field": "t",
                "oc_level": 5,
                "label": ""
            }
        ]
    }
]


Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence