Checking for lifecycle state

How can I check the lifecycle state (installed, enabled, disabled, uninstalled) of my add-on in Jira?

I have some background processes that should only execute for add-on instances that are enabled. In a perfect world, the lifecycle callbacks would be perfectly reliable; but we’ve seen that’s not the case. Service outages mean that some lifecycle callbacks get missed, and our records of lifecycle state become out-of-sync with Jira itself. I’d like to be able to periodically check whether the add-on is enabled in the relevant Jira instance. Do you know how I can do that?

Thanks much.
David

Hi @david.pinn,

you can use GET /rest/atlassian-connect/1/addons/{addonKey} to confirm whether your add-on is installed and enabled.

1 Like

Thanks @epehrson. Just to clarify, the doco says:

state: “The state of the app. ENABLED is the only value returned.”

So 401 or 403 HTTP status code responses are the indicators of disabled add-ons?

Yes, @david.pinn. Only add-ons that are installed and enabled can access this REST API. So if you cannot, it means that your app is not installed or installed but disabled.

1 Like