The REST API itself not supports to query timestamp greater than or lesser than.
For this situation I need help to adjust in script to create a checkpoint of id's that is indexed already.
https://${nw_server_hostname}:9090/nwrestapi/v3/global/${endpoint}?q=completionStatus: "Failed"
This end point gives me backup failed events like below:
{
"count":6,
"jobs":[
{
"adhocJob":false,
"command":"/xxx/xxxx/xxxxxxx -C DefaultReportHomeTask",
"completionStatus":"Failed",
"dependentJobIds":[
0
],
"endTime":"2020-01-16T08:00:00+08:00",
"exitCode":1,
"id":221372,
"itemIdLong":221372,
"links":[
{
"href":"https://{nw_server_hostname}:9090/nwrestapi/v3/global/jobs/221372",
"rel":"item"
}
],
"name":"DefaultReportHomeTask",
"ndmp":false,
"parentJobId":0,
"previousJobId":0,
"rootParentJobId":0,
"runOnHost":"{nw_server_hostname}.xxxxxxx.com",
"siblingJobIds":[
],
"startTime":"2020-01-16T08:00:00+08:00",
"state":"Completed",
"stopped":true,
"tenant":"",
"type":"task job"
},
{
"adhocJob":false,
"command":"/xxx/xxxx/xxxxxxx -C DefaultNsrclientfixTask",
"completionStatus":"Failed",
"dependentJobIds":[
0
],
"endTime":"2020-01-16T07:00:00+08:00",
"exitCode":1,
"id":221371,
"itemIdLong":221371,
"links":[
{
"href":"https://{nw_server_hostname}:9090/nwrestapi/v3/global/jobs/221371",
"rel":"item"
}
],
"name":"DefaultNsrclientfixTask",
"ndmp":false,
"parentJobId":0,
"previousJobId":0,
"rootParentJobId":0,
"runOnHost":"{nw_server_hostname}.xxxxxxx.com",
"siblingJobIds":[
],
"startTime":"2020-01-16T07:00:00+08:00",
"state":"Completed",
"stopped":true,
"tenant":"",
"type":"task job"
},
{
"adhocJob":false,
"command":"/xxx/xxxx/xxxxxxx -C DefaultReportHomeTask",
"completionStatus":"Failed",
"dependentJobIds":[
0
],
"endTime":"2020-01-15T08:00:00+08:00",
"exitCode":1,
"id":221124,
"itemIdLong":221124,
"links":[
{
"href":"https://{nw_server_hostname}:9090/nwrestapi/v3/global/jobs/221124",
"rel":"item"
}
],
"name":"DefaultReportHomeTask",
"ndmp":false,
"parentJobId":0,
"previousJobId":0,
"rootParentJobId":0,
"runOnHost":"{nw_server_hostname}.xxxxxxx.com",
"siblingJobIds":[
],
"startTime":"2020-01-15T08:00:00+08:00",
"state":"Completed",
"stopped":true,
"tenant":"",
"type":"task job"
},
{
"adhocJob":false,
"command":"/xxx/xxxx/xxxxxxx -C DefaultNsrclientfixTask",
"completionStatus":"Failed",
"dependentJobIds":[
0
],
"endTime":"2020-01-15T07:00:00+08:00",
"exitCode":1,
"id":221123,
"itemIdLong":221123,
"links":[
{
"href":"https://{nw_server_hostname}:9090/nwrestapi/v3/global/jobs/221123",
"rel":"item"
}
],
"name":"DefaultNsrclientfixTask",
"ndmp":false,
"parentJobId":0,
"previousJobId":0,
"rootParentJobId":0,
"runOnHost":"{nw_server_hostname}.xxxxxxx.com",
"siblingJobIds":[
],
"startTime":"2020-01-15T07:00:00+08:00",
"state":"Completed",
"stopped":true,
"tenant":"",
"type":"task job"
},
{
"adhocJob":false,
"command":"/xxx/xxxx/xxxxxxx -C DefaultReportHomeTask",
"completionStatus":"Failed",
"dependentJobIds":[
0
],
"endTime":"2020-01-14T08:00:00+08:00",
"exitCode":1,
"id":220875,
"itemIdLong":220875,
"links":[
{
"href":"https://{nw_server_hostname}:9090/nwrestapi/v3/global/jobs/220875",
"rel":"item"
}
],
"name":"DefaultReportHomeTask",
"ndmp":false,
"parentJobId":0,
"previousJobId":0,
"rootParentJobId":0,
"runOnHost":"{nw_server_hostname}.xxxxxxx.com",
"siblingJobIds":[
],
"startTime":"2020-01-14T08:00:00+08:00",
"state":"Completed",
"stopped":true,
"tenant":"",
"type":"task job"
},
{
"adhocJob":false,
"command":"/xxx/xxxx/xxxxxxx -C DefaultNsrclientfixTask",
"completionStatus":"Failed",
"dependentJobIds":[
0
],
"endTime":"2020-01-14T07:00:00+08:00",
"exitCode":1,
"id":220874,
"itemIdLong":220874,
"links":[
{
"href":"https://{nw_server_hostname}:9090/nwrestapi/v3/global/jobs/220874",
"rel":"item"
}
],
"name":"DefaultNsrclientfixTask",
"ndmp":false,
"parentJobId":0,
"previousJobId":0,
"rootParentJobId":0,
"runOnHost":"{nw_server_hostname}.xxxxxxx.com",
"siblingJobIds":[
],
"startTime":"2020-01-14T07:00:00+08:00",
"state":"Completed",
"stopped":true,
"tenant":"",
"type":"task job"
}
]
}
I can only do a check point with endTime field.
But cant make a call with "endTime" greater than some timestamp.The vendor REST API is not supported with greater than or less than symbols(https://www.support.nec.co.jp/DownLoad.aspx?file=document%2Fdocu91962_NetWorker-18.2-REST-API-Getting-Started-Guide.pdf&id=3170102299)
Is there any way to do a checkpoint so that I can make sure that no duplicate events I am getting everytime make a REST API call.
NB:- id field is unique for each event. Is ther a way to do checkpoint using id field?
... View more