On This Page:
Related Pages:
The sp:GetJobStatsRequest
API method can be used to obtain aggregate, daily statistics about the jobs in the system, either for one or more specific FRU, or for all FRUs in the system.
Description
The sp:GetJobStatsRequest
 API method returns statistics about jobs in the system, aggregated at a daily level.
Definition
The definition of this API is:
 Click here to expand...
Web Service | Type | Description | Req? | Val? |
<sp:GetJobStatsRequest>
| Â
| Â | Â | Â |
Â
| <FRUs>?</FRUs> | FRUID
| The FRUs field may be supplied zero or more times. - Do not supply any
FRUs field values, if statistics should be returned for all FRUs in the system; or - Supply one or more
FRUs values, to representing the FRU(s) for which statistics should be returned.
| | |
 | <StartDate>?</StartDate> | spDate | The inclusive start date of the date range for which job statistics should be returned.  | | |
 | <EndDate>?</EndDate> | spDate | The inclusive end date of the date range for which job statistics should be returned. | | |
</sp:GetJobStatsRequest> | Â | Â | Â | Â |
Return Structure
The API returns a non-standard return structure.
 Click here to expand...
Web Service | Type                   | Description | Req? | Val? |
<sp:GetJobStatsResponse>
| Â
| Â | Â | Â |
 | <result>
| Â | A structure containing details of the success or failure of the API call. | Â | Â |
 |  | <type>?</type> | string | The Return Code name, representing the result of the API call. |  |  |
 |  | <code>?</code> | int | The Return Code number, representing the result of the API call. |  |  |
 | </result> |  |  |  |  |
 | <JobStatsResponse> |  | One or more JobStatsResponse structures will be present, with each describing the statistics for the relevant FRU in ServiceScheduling. - This structure is only returned when the API call does not return an error Return Code.
| Â | Â |
 |  | <FRU>?</FRU> | FRUID | The ID of the FRU to which the parent JobStatsResponse structure relates to. |  |  |
 |  | <JobStatPerDate> |  | One or more JobStatPerDate structures will be present, with each describing the statistics for the relevant date. |  |  |
 |  |  | <Date>?</Date> | spDate | The date for which the parent JobStatPerDate structure relates to. |  |  |
 |  |  | <JobStats> |  | A structure to contain the job statistics for the date. If there are no job statistics for the date, then the JobStats structure will not be present. |  |  |
 |  |  |  | <Total_Jobs>?</Total_Jobs> | int | Total number of all jobs for the date. |  |  |
 |  |  |  | <Completed_Jobs>?</Completed_Jobs> | int | The number of "completed" (i.e. Logged Off/Cleared) jobs. |  |  |
 |  |  |  | <Ontrack_Jobs>?</Ontrack_Jobs> | int | The number of "on track" (i.e. not in Jeopardy) jobs. |  |  |
 |  |  |  | <Jeopardy_Jobs>?</Jeopardy_Jobs> | int | The number of in Jeopardy jobs. |  |  |
 |  |  |  | <Unresourced_Jobs>?</Unresourced_Jobs> | int | The number of unresourced jobs. |  |  |
 |  |  |  | <HCBroken_Jobs>?</HCBroken_Jobs> | int | The number of jobs with broken hard constrains. |  |  |
 |  |  |  | <ManuallySch_Jobs>?</ManuallySch_Jobs> | int | The number of manually scheduled jobs. |  |  |
 |  |  |  | <TechnicianOn_Jobs>?</TechnicianOn_Jobs> | int | The number of technicians on all the jobs for the date. |  |  |
 |  |  |  | <overlapDay_Jobs>?</overlapDay_Jobs> | int | The number of jobs that overlap the day boundary. |  |  |
 |  |  |  | <overlapDay_UnresJobs>?</overlapDay_UnresJobs> | int | The number of unresourced jobs that overlap the day boundary. |  |  |
 |  |  |  |  | <JobType> |  | One or more JobType structures will be present, each containing a summary of job statistics by job type for the date. |  |  |
 |  |  |  |  |  | <jobTypeId>?</jobTypeId> | JobTypeID | The JobTypeID for which the parent JobType summary relates to. |  |  |
 |  |  |  |  |  | <Description>?</Description>
| varchar2(30)
| A text description of the job type. | Â | Â |
 |  |  |  |  |  | <NumOfJobs>?</NumOfJobs> | int | Total number of jobs for the date that are jobs with the associated JobTypeID . |  |  |
 |  |  |  |  | </JobType> |  |  |  |  |
 |  |  | </JobStats> |  |  |  |  |
 |  | </JobStatPerDate> |  |  |  |  |
 | </JobStatsResponse> |  |  |  |  |
</sp:GetJobStatsResponse> | Â | Â | Â | Â |
Return Codes
In addition to the Standard Return Codes, the possible Return Codes from this API are:
 Click here to expand...
SP_END_NOT_GE_START_DATE (19)
SP_UNIT_INVALID (28)
SP_OUTSIDE_HORIZON (53)
SP_START_DATE_INVALID (55)
SP_END_DATE_INVALID (56)
SP_DATE_NOT_SUPPLIED (638)
SP_DUPLICATE_FRUID (811)
SP_DATERANGE_GT_MAX_DAYS_STATS (812)
SP_NOT_ALL_FRU_RESPOND (813)