{"type":"api","title":"FETCH JOBS","meta":{"id":"/apps/pubhub/media/conc-2511/d77fe2fa1c66c5533550637c8fa49491e06b8c79/cd22b897-e087-31df-8b37-b00601b24f02","info":{"title":"PM Service","description":"PM Service api documentation","contact":{},"license":{"name":"ONC-AE-License","url":"https://www.cisco.com"},"version":"1.0.0-25.1.1"},"security":[{"basicAuth":[]}],"x-parser-conf":{"overview":{"markdownPath":"reference/2431/pm-service.md"},"serverConfig":"full","enableAuthEditing":true,"httpBasic":{"username":"api-user","password":"encrypted-password@123"}},"openapi":"3.0.1","servers":[{"url":"https://cisco-onc-ip:8443/onc-pm-service","description":"Generated server url"}],"securitySchemes":{"basicAuth":{"type":"http","description":"Basic authentication scheme","scheme":"basic"}}},"spec":{"tags":["pm-history-job-controller"],"summary":"FETCH JOBS","description":"API will get all the pm schedule job or the job with given id","operationId":"fetchJob","parameters":[{"name":"jobId","in":"query","description":"Id of the Job to get the details","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Retrieved the PM data successfully","headers":{"Date":{"description":"The date and time at which the response was generated","schema":{"pattern":"^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \\d{4} \\d{2}:\\d{2}:\\d{2} GMT$","type":"string","example":"Thu, 15 Aug 2024 09:48:17 GMT"}},"Cache-Control":{"description":"Directives for caching mechanisms in responses","schema":{"type":"string","example":"private, no-cache, no-store, max-age=0, must-revalidate"}}},"content":{"*/*":{"schema":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Error message when job operation fails","nullable":true},"jobId":{"type":"string","description":"Unique identifier of the job","nullable":true},"status":{"type":"string","description":"Status of the job","nullable":true},"jobList":{"type":"array","description":"List of jobs details with current status","nullable":true,"items":{"type":"object","properties":{"jobId":{"type":"string","description":"Unique identifier for Job","format":"uuid","nullable":true},"jobName":{"type":"string","description":"Job Name entered by the user","nullable":true},"jobDescription":{"type":"string","description":"Job Description of the scheduled job","nullable":true},"jobType":{"type":"string","description":"Type of the Job(4 types)","nullable":true},"recurrenceType":{"type":"string","description":"Recurrence type of the job(daily/weekly/monthly)","nullable":true},"cronExpression":{"type":"string","description":"Cron expression to execute the job recurrently","nullable":true},"recurrenceDescription":{"type":"string","description":"Description of the recurrence job","nullable":true},"startTime":{"type":"string","description":"Start time of the job","format":"date-time","nullable":true},"endTime":{"type":"string","description":"End time of the job","format":"date-time","nullable":true},"lastRunTime":{"type":"string","description":"Last run time of the job","format":"date-time","nullable":true},"nextRunTime":{"type":"string","description":"Next run time of the job","format":"date-time","nullable":true},"mailId":{"type":"array","description":"Mail Id to send the excel report","nullable":true,"items":{"type":"string","description":"Mail Id to send the excel report"}},"selectedValues":{"type":"array","description":"Selected values specific to report type (interfaces/services/fiberlinks)","nullable":true,"items":{"type":"string","description":"Selected values specific to report type (interfaces/services/fiberlinks)"}},"createdTime":{"type":"string","description":"Job Created time","format":"date-time","nullable":true},"updatedTime":{"type":"string","description":"Job updated time","format":"date-time","nullable":true},"jobStatus":{"type":"string","description":"Status of the job","nullable":true},"downloadFiles":{"type":"array","description":"List of reports to download from UI","nullable":true,"items":{"type":"string","description":"List of reports to download from UI"}},"lastRunTimeStatus":{"type":"string","description":"Last run time status of the job","nullable":true},"lastRunStatusMessage":{"type":"string","description":"Last run time status message(cause of failure if job failed)","nullable":true},"granularity":{"type":"string","description":"Granularity of the PM data to be considered for report(15 min/24 hour)","nullable":true},"daysCount":{"type":"integer","description":"Days count for daily report","format":"int32","nullable":true},"smtpConfigured":{"type":"boolean","nullable":true},"paused":{"type":"boolean","nullable":true}},"description":"Job data mapped from jobs stored in DB","$$ref":"#/components/schemas/ScheduleJobData"}}},"description":"Contains response for the job operation","$$ref":"#/components/schemas/JobResponse"},"example":{"errorMessage":"","jobId":"ALL","status":"Success","jobList":[{"jobId":"8191ea97-03d0-48e6-aa31-6d36479cac78","jobName":"testschedule7","jobDescription":"test","jobType":"predefined_links","recurrenceType":"weekly","cronExpression":"0 */5 * ? * *","recurrenceDescription":"report","startTime":"2024-08-16 07:15:00","endTime":"2024-08-16 07:32:00","lastRunTime":"2024-08-16 07:30:00","nextRunTime":null,"mailId":["psoonaga@cisco.com"],"selectedValues":["Site3##Site3##4b363df4-5d4c-36d2-a0c3-75b730dfb0bf##Passive Unit 4##4/CH-17-TX##opticalTransport##OCH-PORT","Site3##Site3##4b363df4-5d4c-36d2-a0c3-75b730dfb0bf##Passive Unit 4##4/CH-29-RX##opticalTransport##OCH-PORT","Site3##Site3##4b363df4-5d4c-36d2-a0c3-75b730dfb0bf##Passive Unit 4##4/CH-15-RX##opticalTransport##OCH-PORT","Site3##Site3##4b363df4-5d4c-36d2-a0c3-75b730dfb0bf##Passive Unit 4##4/CH-16-TX##opticalTransport##OCH-PORT","Site3##Site3##4b363df4-5d4c-36d2-a0c3-75b730dfb0bf##Passive Unit 4##4/CH-2-TX##opticalTransport##OCH-PORT","layers##OCH-PORT##OTS-PORT##AOTS-PORT"],"createdTime":"2024-08-16 07:10:46","updatedTime":"2024-08-16 07:30:03","jobStatus":"COMPLETED","downloadFiles":[],"lastRunTimeStatus":"failed","lastRunStatusMessage":"Invalid char (/) found at index (0) in sheet name '/coveragereport/PMScheduleRepor'","granularity":"15min","daysCount":0,"smtpConfigured":true,"paused":false}]}}}},"400":{"description":"Bad Request","headers":{"Date":{"description":"The date and time at which the response was generated","schema":{"pattern":"^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \\d{4} \\d{2}:\\d{2}:\\d{2} GMT$","type":"string","example":"Thu, 15 Aug 2024 09:48:17 GMT"}},"Cache-Control":{"description":"Directives for caching mechanisms in responses","schema":{"type":"string","example":"private, no-cache, no-store, max-age=0, must-revalidate"}}},"content":{"*/*":{"schema":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Error message when job operation fails","nullable":true},"jobId":{"type":"string","description":"Unique identifier of the job","nullable":true},"status":{"type":"string","description":"Status of the job","nullable":true},"jobList":{"type":"array","description":"List of jobs details with current status","nullable":true,"items":{"type":"object","properties":{"jobId":{"type":"string","description":"Unique identifier for Job","format":"uuid","nullable":true},"jobName":{"type":"string","description":"Job Name entered by the user","nullable":true},"jobDescription":{"type":"string","description":"Job Description of the scheduled job","nullable":true},"jobType":{"type":"string","description":"Type of the Job(4 types)","nullable":true},"recurrenceType":{"type":"string","description":"Recurrence type of the job(daily/weekly/monthly)","nullable":true},"cronExpression":{"type":"string","description":"Cron expression to execute the job recurrently","nullable":true},"recurrenceDescription":{"type":"string","description":"Description of the recurrence job","nullable":true},"startTime":{"type":"string","description":"Start time of the job","format":"date-time","nullable":true},"endTime":{"type":"string","description":"End time of the job","format":"date-time","nullable":true},"lastRunTime":{"type":"string","description":"Last run time of the job","format":"date-time","nullable":true},"nextRunTime":{"type":"string","description":"Next run time of the job","format":"date-time","nullable":true},"mailId":{"type":"array","description":"Mail Id to send the excel report","nullable":true,"items":{"type":"string","description":"Mail Id to send the excel report"}},"selectedValues":{"type":"array","description":"Selected values specific to report type (interfaces/services/fiberlinks)","nullable":true,"items":{"type":"string","description":"Selected values specific to report type (interfaces/services/fiberlinks)"}},"createdTime":{"type":"string","description":"Job Created time","format":"date-time","nullable":true},"updatedTime":{"type":"string","description":"Job updated time","format":"date-time","nullable":true},"jobStatus":{"type":"string","description":"Status of the job","nullable":true},"downloadFiles":{"type":"array","description":"List of reports to download from UI","nullable":true,"items":{"type":"string","description":"List of reports to download from UI"}},"lastRunTimeStatus":{"type":"string","description":"Last run time status of the job","nullable":true},"lastRunStatusMessage":{"type":"string","description":"Last run time status message(cause of failure if job failed)","nullable":true},"granularity":{"type":"string","description":"Granularity of the PM data to be considered for report(15 min/24 hour)","nullable":true},"daysCount":{"type":"integer","description":"Days count for daily report","format":"int32","nullable":true},"smtpConfigured":{"type":"boolean","nullable":true},"paused":{"type":"boolean","nullable":true}},"description":"Job data mapped from jobs stored in DB","$$ref":"#/components/schemas/ScheduleJobData"}}},"description":"Contains response for the job operation","$$ref":"#/components/schemas/JobResponse"},"example":{"timestamp":1725390500104,"status":"400","error":"Bad Request","path":"/v2/job"}}}},"500":{"description":"Internal server error has occurred","headers":{"Date":{"description":"The date and time at which the response was generated","schema":{"pattern":"^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \\d{4} \\d{2}:\\d{2}:\\d{2} GMT$","type":"string","example":"Thu, 15 Aug 2024 09:48:17 GMT"}},"Cache-Control":{"description":"Directives for caching mechanisms in responses","schema":{"type":"string","example":"private, no-cache, no-store, max-age=0, must-revalidate"}}},"content":{"*/*":{"schema":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Error message when job operation fails","nullable":true},"jobId":{"type":"string","description":"Unique identifier of the job","nullable":true},"status":{"type":"string","description":"Status of the job","nullable":true},"jobList":{"type":"array","description":"List of jobs details with current status","nullable":true,"items":{"type":"object","properties":{"jobId":{"type":"string","description":"Unique identifier for Job","format":"uuid","nullable":true},"jobName":{"type":"string","description":"Job Name entered by the user","nullable":true},"jobDescription":{"type":"string","description":"Job Description of the scheduled job","nullable":true},"jobType":{"type":"string","description":"Type of the Job(4 types)","nullable":true},"recurrenceType":{"type":"string","description":"Recurrence type of the job(daily/weekly/monthly)","nullable":true},"cronExpression":{"type":"string","description":"Cron expression to execute the job recurrently","nullable":true},"recurrenceDescription":{"type":"string","description":"Description of the recurrence job","nullable":true},"startTime":{"type":"string","description":"Start time of the job","format":"date-time","nullable":true},"endTime":{"type":"string","description":"End time of the job","format":"date-time","nullable":true},"lastRunTime":{"type":"string","description":"Last run time of the job","format":"date-time","nullable":true},"nextRunTime":{"type":"string","description":"Next run time of the job","format":"date-time","nullable":true},"mailId":{"type":"array","description":"Mail Id to send the excel report","nullable":true,"items":{"type":"string","description":"Mail Id to send the excel report"}},"selectedValues":{"type":"array","description":"Selected values specific to report type (interfaces/services/fiberlinks)","nullable":true,"items":{"type":"string","description":"Selected values specific to report type (interfaces/services/fiberlinks)"}},"createdTime":{"type":"string","description":"Job Created time","format":"date-time","nullable":true},"updatedTime":{"type":"string","description":"Job updated time","format":"date-time","nullable":true},"jobStatus":{"type":"string","description":"Status of the job","nullable":true},"downloadFiles":{"type":"array","description":"List of reports to download from UI","nullable":true,"items":{"type":"string","description":"List of reports to download from UI"}},"lastRunTimeStatus":{"type":"string","description":"Last run time status of the job","nullable":true},"lastRunStatusMessage":{"type":"string","description":"Last run time status message(cause of failure if job failed)","nullable":true},"granularity":{"type":"string","description":"Granularity of the PM data to be considered for report(15 min/24 hour)","nullable":true},"daysCount":{"type":"integer","description":"Days count for daily report","format":"int32","nullable":true},"smtpConfigured":{"type":"boolean","nullable":true},"paused":{"type":"boolean","nullable":true}},"description":"Job data mapped from jobs stored in DB","$$ref":"#/components/schemas/ScheduleJobData"}}},"description":"Contains response for the job operation","$$ref":"#/components/schemas/JobResponse"},"example":{"timestamp":1725390500104,"status":"500","error":"Internal Server Error","path":"/v2/job"}}}}},"security":[{"basicAuth":[]},{"basicAuth":[]}],"__originalOperationId":"fetchJob","method":"get","path":"/v2/job"}}