- CheckMates
- :
- Products
- :
- Quantum
- :
- Management
- :
- add-batch-objects idempotency
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
add-batch-objects idempotency
I am using the API command add-batch-objects and I'd like to figure out a way to make it idempotent. That is, if an object exists with the same name, do nothing/move on. Currently, the command will create all of the objects I tell it and end up creating a new object with the same name which creates a validation error and ruins the process.
Prior to this call, I was just using individual calls which could ignore the fact that an object exists and move on. My hope was to discontinue this in favor of the batch call.
Does anyone know a way that I can take advantage of the add-batch-objects single call or a crafty way to find and delete the duplicates that were created to speed up my playbook?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Evan_Gillette ,
Errors and warnings are ignored when using this API but you can find and delete the duplicates that were created by following these steps:
- use "show-validations" command to find the duplicated object names.
- run "show-session" to get the current session id.
- execute "show-changes" command with the parameter "to-session" with the current session to get the objects ids of the duplicated objects.
- use the "delete-objects-batch" with the relevant ids.
Regards,
Management API team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Evan_Gillette ,
Errors and warnings are ignored when using this API but you can find and delete the duplicates that were created by following these steps:
- use "show-validations" command to find the duplicated object names.
- run "show-session" to get the current session id.
- execute "show-changes" command with the parameter "to-session" with the current session to get the objects ids of the duplicated objects.
- use the "delete-objects-batch" with the relevant ids.
Regards,
Management API team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is pretty crafty. I think all of the additional calls make the benefits moot for my purposes. Thank you for the response!
