I'm writing a software that interacts with Jira using REST API.
Are there any means to achieve idempotency of create issue request?
Or should I use a compensating action in case of detected duplicate?
I'm writing a software that interacts with Jira using REST API.
Are there any means to achieve idempotency of create issue request?
Or should I use a compensating action in case of detected duplicate?
Because JIRA uses an incremental integer suffix for tickets, calling a create action will always create a ticket with a new identifier, even if all else is equal.
In general, idempotence is patterned into the API itself and is particularly rare when creating a resource. If you try to mimic idempotence into your calling action, then you risk losing idempotence if the API changes. You're better off testing for duplicates and handling exceptions (again, as a generalization).