Solved

REST API command plan details

  • 5 February 2021
  • 4 replies
  • 112 views

Userlevel 2
Badge +7

Hi,

i need help with the plan details command API : /Plan/{planID}

when running this command i can’t find the retention criteria for a specific plan in the response.

please advice for any help on this command

kind regards,

 

 

icon

Best answer by Stuart Painter 5 February 2021, 15:07

View original

4 replies

Userlevel 7
Badge +15

Hi Christophe

Thanks for the question, I’ve been checking the REST API calls and can see GET Plan doesn’t contain retention, nor does GET Plan/{id}. Also storage policy api calls don’t include retention in the response.

We have PUT <webservice>/Plan/{planId}/Storage/Modify that can set PrimaryRetentionInDays and SecondaryRetentionInDays, but I also don’t see a simple API call to get the retention.

An alternative may be to call a dataset from a report to obtain this information:

https://documentation.commvault.com/commvault/v11_sp20/article?p=115048.htm

I’ll keep checking and see if there’s a simple way to obtain Plan retention for you.

Thanks,

Stuart

Userlevel 7
Badge +15

Hi Christophe

I have checked internally and found Plan retention can be obtained with get plan:

GET <webservice>/v2/Plan/{id}?propertyLevel=20

will provide “retainBackupDataForDays” response parameter.

Thanks,

Stuart

Userlevel 2
Badge +7

Hi stuart,

thnak for the reply.i will test this command asap and i will get backup to you.

kind regards,

Userlevel 2
Badge +7

Hello Stuart,

the test is ok and it returns the retention.

thank you so much for the help :handshake_tone2:

kind regards

Reply