DELETE SCHEDULE POLICY USING PYTHON OR POSTMAN REST

  • 20 February 2024
  • 9 replies
  • 36 views

Badge +2

Hello Vaulters,

 

I have been to automate schedule policy delete using by calling the API using the syntax on the document but I keep facing error, does any one have an already executed script or guide and how to achieve this?


9 replies

Userlevel 5
Badge +11

Uchenna,

 

What is the error that you are getting.

 

Regards,

Edward J Holowienka

Badge +2

Hello Edward

 

se error attached

 

Regards,

Userlevel 5
Badge +11

Uchenna,

 

Where did you get the values 54656 and 54942 from.

 

Reqards,

Edward J Holowienka

Badge +2

Hello Edward,

 

This is 54656 represent the Schedule task ID and 54942 represent the sub taskID gotten from the postman syntax

 

Regards,

Userlevel 5
Badge +11

Uchenna,

You need to get those values from your environment by running the following;

To get the taskid

GET <webservice>/SchedulePolicy HTTP/1.1

Then you would need to run this to get the subtaskid

GET <webservice>/SchedulePolicy/{taskId} HTTP/1.1

 

Reqards,

Edward J Holowienka

Badge +2

Hello Edward,

 

Exactly what I did but do you have the syntax to delete a schedule policy?

 

Regards,

Userlevel 5
Badge +11

Uchenna,

 

Based upon the error that you are getting one of the values is not correct. Do you want to delete the whole schedule policy or just one of the schedules within it.

 

Regards,

Edward J Holowienka

Badge +2

Hello Edward,

 

the whole schedule policy

 

Regards,

Userlevel 5
Badge +11

Uchenna,

If that is the case, then this is the call that you should be using

https://documentation.commvault.com/2023e/essential/rest_api_delete_schedule_policy.html

DELETE <webservice>/SchedulePolicy/{taskId} HTTP/1.1

Regards,

Edward J Holowienka

Reply