Jobs

Prev Next

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:

Name Type Description Notes
network_id integer Network Id Returns constraints related to given network id. If "SafranWebAPIOwnerVerificationDuringApiCalls" in Application Settings is in use, this is mandatory
id integer The ID of the Job


Response Fields:

Name Type Description Notes
job_id integer The ID of the Job
job_name string The name of the Job
owner string The owner of the job
project project[] The project linked to the job, see job.project
from_date datetime The from date of the job, part of the period Time is in Coordinated Universal Time
until_date datetime The until date of the job, part of the period Time is in Coordinated Universal Time
interval interval[] The internval of the job, part of the period, see job.jobinterval
filter string The filter used on activities for the job
fullstartunit boolean The filter used on activities for the job
  • When set to true: The system uses the periods defined in the Cutoff Dates within the project properties to establish the first and last periods (e.g., Year, Quarter, Calendar Month, Week). (The periods will be Monday to Sunday.)
  • When set to false: The first and last periods are adjusted. (The first period will be from the "From Date" to the first Sunday, and the last period will be from the Monday to the "Until Date")
timedschedule timedschedule[] The Timed Schedule setting of the Job, see jobs.jobtimedschedule
jobdatafield jobdatafield[] The Timed Schedule setting of the Job, see jobs.jobjobdatafield
datagroup datagroup[] The dimensions of the Job, see jobs.jobdatagroup


job.project

Project table

Name Type Description Notes
network_id integer The network id of the project used in a job
network_name string The network name of the project used in a job
project_id integer The project id used in a job


job.interval

Interval table

Name Type Description Notes
interval integer
unit string Interval unit Year
Quarter
CalendarMonth
Week
Day


job.timedschedule

TimedSchedule table

Name Type Description Notes
run_frequency integer The job run frequency
run_frequency_unit char Interval unit 'O' - Month
'B' - BiWeek
'W' - Week
'D' - Day
'H' - Hour
'M' - Minute
'N' - Never
'I' - Immidately
run_frequency_method string Interval unit "PureFrequencies"
"LastRunStarted"
"LastRunEnded"
last_run datetime When the Job was last ran Time is in Coordinated Universal Time
last_run_ended datetime When the Job was last ran ended Time is in Coordinated Universal Time
last_run_used string How long time the last ran took
next_run datetime The next planned run date Time is in Coordinated Universal Time


job.jobdatafield

Job Data Field table

Name Type Description Notes
jobdatafield_id integer The ID of the job data field
datasetschedule datasetschedule[] The Schedule of the data set, see jobs.jobjobdatafielddatasetschedule
jobdatasetscope jobdatasetscope[] The Scope of the data set, see jobs.jobjobdatafieldjobdatasetscope
original boolean Configured by the user
approved boolean Configured by the user
estimated boolean Configured by the user
internal boolean Configured by the user
subcontracted boolean
fromField job.jobdatafield.fromuntilfield From field as defined in the Data Fields
untilField job.jobdatafield.fromuntilfield Until fields as defined in the Data Fields
quantityType string "Planned" or "Contracted"
calculatedValues string Option to set which values to be calcualted: "Period", "Cumulative", "Manpower", or "Scope"


job.jobdatafield.datasetschedule

Dataset Schedule table

Name Type Description Notes
schedule integer The ID of the schedule
description string Description of the schedule


job.jobdatafield.jobdatasetscope

Job Dataset Scope table

Name Type Description Notes
scope integer The ID of the scope
description string Description of the scope


job.datagroup

Job Data Group table

Name Type Description Notes
number integer The group number of the Job
field string The field linked to the dimmension, all fiels comes from activities
oc_level integer
label string The full label of the field


job.jobdatafield.fromuntilfield

Job Dataset Scope table

Name Type Description Notes
Name string Name of the field
Short string Short indicator of the field
Type string Field type: number, string, flag, date, ...



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": ""
            }
        ]
    }
]