I’m trying to find a way to create automatically expiring snapshots via API. I know I can use v2 api to create normal snapshots, and with Playbooks I can create snaphots which have an expiry time. Is there a way to create recovery points (on-demand) or run playbooks via API? Thanks!
@eino so I am not sure if we can use Playbooks with rest APIs, let me search for it. But I know that we can create Playbooks using Webhooks. Here is the procedure to do so
@eino , I researched a bit so running the playbook via API isn’t an issue.
You first create a playbook and then trigger a webhook by running a POST to the Prism Central URL. That’s even integrated into PC in the playbook section(the document I mentioned above). If you set it that way, you run a POST call against:
https://<pc>:9440/api/nutanix/v3/action_rules/triggerand add the webhook ID to the JSON call:
So basically when you create a playbook, you can simply set a trigger and select a webhook as the trigger.
I hope this will help. Let me know if you need any clarifications on this.
@eino , just following up on your query. Did the above help?
Did you test the above? Let me know if you need anything.