Denis Mikhaylov
Denis Mikhaylov

Reputation: 2045

Jira REST API idempotency

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?

Upvotes: 2

Views: 548

Answers (1)

HeyZiko
HeyZiko

Reputation: 1720

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).

Upvotes: 1

Related Questions