Set JSM License throught REST API

I’m trying to setup a Jira Service Management License through REST API but have a weird error.

curl -v -u admin:admin -X POST http://localhost:2990/jira/rest/plugins/applications/1.0/installed/jira-servicedesk/license/ -H "Content-Type: application/vnd.atl.plugins+json" -d '{"licenseKey":"AAAB8g0ODAoPeNqNU9tu2kAQffdXWOpLosru2g42QrJUapyGCAPBJKgSL4MZYMt6be2uueTru4YSUCrSPHr2zJzLjL/cC2o+Ajc9xySNluO17hpmlI5Nl7gNIxIIiha8AwrDumIRx/Ico0cz5BLH+xL7kGMYDZIkHkXdds/oV/kMxWDxLFHI0HrDxruSiv3FIM8irpFWM5kJWtYkoRIVGlmR26AYSEmB23rIRvfPUa7tD0jjDbAKzkN+UwG25oIIuUJxLLJj/wPIVZhE2+j+YRxsvz4PcQnB2l+5CbxOtt7w24/hctBePfVId7QjBYFgl+W/YCbnTX98Rx1RtKfhNDz56nbCXreTxn2r55Kg4Xt+8wMPvMpHBcOoqLiqwzkILUUxrzJl1x/WJRoyRTd4Yekq8p/UU/2IQotr/2wGVuoFI+spaU4s/2USG2vcv2hcHZfjExKQpqeXOqxEtgKJ75d93c0h3FJQ+SmN7/ehMws/m9tlEh08n8yjJjHTI9BMgMMSc01h3iwKkaNg+7dH3bW+NW9qEeZRxe20ZZ4Px0iA6ioHnl251b/3c0rO/Y/dVIGovS6ASTQGYgmcyuONsiIDZlEuVc1mRAVX2mCsFbAQZnNklDFY2XoZEvLvuFM2soMvaUFZSlvndGo6/Amf7fkDJPxdljAsAhQw4wE2fo6/1g+xpp99JavHAeyykQIUcd9W47pt+obnfMzABrpNQbNUQJI=X02nj"}

here is the response that i’m getting

{"license":{"valid":false,"active":false},"validation":{"errorMessages":[],"warningMessages":[],"valid":true},"licenseMismatch":{"newLicense":"AAAB8g0ODAoPeNqNU9tu2kAQffdXWOpLosru2g42QrJUapyGCAPBJKgSL4MZYMt6be2uueTru4YSUCrSPHr2zJzLjL/cC2o+Ajc9xySNluO17hpmlI5Nl7gNIxIIiha8AwrDumIRx/Ico0cz5BLH+xL7kGMYDZIkHkXdds/oV/kMxWDxLFHI0HrDxruSiv3FIM8irpFWM5kJWtYkoRIVGlmR26AYSEmB23rIRvfPUa7tD0jjDbAKzkN+UwG25oIIuUJxLLJj/wPIVZhE2+j+YRxsvz4PcQnB2l+5CbxOtt7w24/hctBePfVId7QjBYFgl+W/YCbnTX98Rx1RtKfhNDz56nbCXreTxn2r55Kg4Xt+8wMPvMpHBcOoqLiqwzkILUUxrzJl1x/WJRoyRTd4Yekq8p/UU/2IQotr/2wGVuoFI+spaU4s/2USG2vcv2hcHZfjExKQpqeXOqxEtgKJ75d93c0h3FJQ+SmN7/ehMws/m9tlEh08n8yjJjHTI9BMgMMSc01h3iwKkaNg+7dH3bW+NW9qEeZRxe20ZZ4Px0iA6ioHnl251b/3c0rO/Y/dVIGovS6ASTQGYgmcyuONsiIDZlEuVc1mRAVX2mCsFbAQZnNklDFY2XoZEvLvuFM2soMvaUFZSlvndGo6/Amf7fkDJPxdljAsAhQw4wE2fo6/1g+xpp99JavHAeyykQIUcd9W47pt+obnfMzABrpNQbNUQJI=X02nj","newLicenseApplicationName":"Jira Service Management","newLicenseApplicationKey":"jira-servicedesk","toDC":true,"appCrossgrades":[{"name":"XXX"}],"singleEvalLicense":true}}

I’m using Jira 10.3.0 note that API works fine in a Jira 9.12.

Any insights folks ?

Kind regards

Hello @AbdelillahHassam

Can you please provide a link to the Jira Service Management v10 documentation that describes that API endpoint and its parameters / methods etc.

Hey,

The only documentation I found about that is this article here

I don’t know if an atlassian staff can respond. Just for you to know i’m a data center developer

That is not JSM v10 documentation, it’s ancient documentation about Jira v7. That documentation contains a very clear warning message:

Please note that these are private endpoints and may change without notice.

So, it’s possible the endpoint has been removed or changed. That’s always the risk you take when you use private / internal endpoints instead of public ones.

However, the actual warning message coming back from the REST API seems to be just telling you that there is a license mismatch; you’re probably using an invalid licence key / type for that particular JSM DC instance.

Infortunately, i’m sure about the license being valid.

It was generate for that particular server ID and is still valid. And it is a Jira Service Management license for sure.

Thanks for your help. I still think the problem comes from elsewhere. Didn’t find other documentation other than the one I found earlier