RESTful knowledge exchange
Post Reply
UmeshP
Influencer
Posts: 14
Liked: 3 times
Joined: Jan 14, 2021 8:01 am
Full Name: Umesh Phendarkar
Contact:

How to Get Only Failed Backup jobs Details from Restapi

Post by UmeshP »

How to Get Only Failed Backup jobs Details from Restapi ?
I need only Failed Backup jobs details, like Backup job ID and Server name and Result. Any lookup query for this ?
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How to Get Only Failed Backup jobs Details from Restapi

Post by Vitaliy S. » 2 people like this post

Hi Umesh,

Can you try running the second sample from Chris over here and then apply filtering options by status? Does it work for you?

Thanks!
UmeshP
Influencer
Posts: 14
Liked: 3 times
Joined: Jan 14, 2021 8:01 am
Full Name: Umesh Phendarkar
Contact:

Re: How to Get Only Failed Backup jobs Details from Restapi

Post by UmeshP » 1 person likes this post

Hi Vitaliy,

Yes both the Search queries are working fine, i am getting the desired result, getting only failed Jobs. Thanks For Reply.. Really Appreciated.
Thanks..
UmeshP
Influencer
Posts: 14
Liked: 3 times
Joined: Jan 14, 2021 8:01 am
Full Name: Umesh Phendarkar
Contact:

[MERGED] How to Get Only Failed Back jobs in last 12 Hours with Restapi

Post by UmeshP »

I need to get the report for Failed Backup jobs which are failed in last 12 Hours or so.
Any Search filter for this ?
Natalia Lupacheva
Veteran
Posts: 1143
Liked: 302 times
Joined: Apr 27, 2020 12:46 pm
Full Name: Natalia Lupacheva
Contact:

Re: How to Get Only Failed Backup jobs Details from Restapi

Post by Natalia Lupacheva »

Hi @UmeshP,

moved your post to your original thread.
Did the suggested solution work for you?

Thanks!
UmeshP
Influencer
Posts: 14
Liked: 3 times
Joined: Jan 14, 2021 8:01 am
Full Name: Umesh Phendarkar
Contact:

Re: How to Get Only Failed Backup jobs Details from Restapi

Post by UmeshP »

Hi Natalia,

Yes the suggested solution worked for me. However now i wanted to see reports for jobs which are Failed in last 12 Hours.
How i can mention time in query for last 12hours ?
Natalia Lupacheva
Veteran
Posts: 1143
Liked: 302 times
Joined: Apr 27, 2020 12:46 pm
Full Name: Natalia Lupacheva
Contact:

Re: How to Get Only Failed Backup jobs Details from Restapi

Post by Natalia Lupacheva » 2 people like this post

Umesh,

it should be something like

Code: Select all

filter=EndTime>="2021-01-14T11:08:57.103Z";Result==failed
so the full query will be

Code: Select all

/api/query?type=BackupJobSession&format=Entities&sortDesc=EndTime&pageSize=15&page=1&filter=EndTime%3E=%222021-01-14T11:08:57.103Z%22;Result==failed
You will need to change the value of EndTime parameter when you trigger this request.

Thanks!
UmeshP
Influencer
Posts: 14
Liked: 3 times
Joined: Jan 14, 2021 8:01 am
Full Name: Umesh Phendarkar
Contact:

Re: How to Get Only Failed Backup jobs Details from Restapi

Post by UmeshP » 1 person likes this post

Thanks Natalia.. Its Working ..Really Appreciated ..
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest