Update licence using API

Jesse Kahtava shared this question 4 months ago
Completed

Similar to this post:
https://community.yellowfinbi.com/topic/yellowfin-9-data-format-for-upload-license-endpoint

I am wondering how to POST the licence to the /api/rpc/licence-management/upload-licence endpoint.

Following the documentation here:
https://developers.yellowfinbi.com/dev/api-docs/current/#tag/licence-management


My curl command:


curl -s --header "Authorization: YELLOWFIN ts=1765817323378, nonce=babfbc52-07dc-4502-a806-1227e53b9788" -X POST --header "Content-Type: multipart/form-data" --header "cache-control: no-cache" --header "Accept: application/vnd.yellowfin.api-v4+json;" --form "newLicence=@./staging.lic;type=application/octet-stream" http://127.0.0.1:8080/api/rpc/licence-management/upload-licence --trace-ascii trace.log


I can see in the access logs:

127.0.0.1 - - [15/Dec/2025:11:50:04 -0500] "POST /api/rpc/licence-management/upload-licence HTTP/1.1" 500 144


and the response from the request reads:


{"code":500,"reason":null,"description":"Oh no! An error has occurred during processing, please try again later\n\nException:\nnull"}


When I upload the same licence through the Yellowfin Admin interface, it works fine.


I know that my authorization headers are good because I can work with other API endpoints.


Any tips?

Thank you.


Version info:


Application Version: 9.15.0
java.version: 1.8.0_462
os.name: Linux
os.arch: amd64
os.version: 4.18.0-553.87.1.el8_10.x86_64
Best Answer
photo

Hello Jesse Kahtava,

My name is Siddartha Pathi from the Yellowfin Technical Support Team. We have received your support request, and I will be your primary contact on the following ticket:

Ticket Number: #{33216}
Case Title: {Update licence using API}


When uploading the license file via the API, we have a comprehensive documentation article available. Please refer to the link below for further information.

https://community.yellowfinbi.com/knowledge-base/article/is-there-another-way-to-load-the-license-other-then-through-the-administration-console

To resolve the issue with uploading a license via the /api/rpc/licence-management/upload-licence endpoint, consider the following steps:

  1. Ensure the endpoint URL is correct and accessible.
  2. Double-check the Authorization header. Ensure the token is valid and has the necessary permissions.
  3. Ensure the Content-Type is set to multipart/form-data and the Accept header matches the API version your Yellowfin instance supports.
  4. Verify the file path is correct and the application has permission to read the file.
  5. Ensure the API version specified in the Accept header is supported by your Yellowfin instance.

Kindly provide us with the yellowfin logs while you replicate the issue, as this will allow us to examine the error details contained within the logs.



Sincerely,

Siddartha Pathi

Yellowfin Technical Support Engineer

Replies (2)

photo
1

Hello Jesse Kahtava,

My name is Siddartha Pathi from the Yellowfin Technical Support Team. We have received your support request, and I will be your primary contact on the following ticket:

Ticket Number: #{33216}
Case Title: {Update licence using API}


When uploading the license file via the API, we have a comprehensive documentation article available. Please refer to the link below for further information.

https://community.yellowfinbi.com/knowledge-base/article/is-there-another-way-to-load-the-license-other-then-through-the-administration-console

To resolve the issue with uploading a license via the /api/rpc/licence-management/upload-licence endpoint, consider the following steps:

  1. Ensure the endpoint URL is correct and accessible.
  2. Double-check the Authorization header. Ensure the token is valid and has the necessary permissions.
  3. Ensure the Content-Type is set to multipart/form-data and the Accept header matches the API version your Yellowfin instance supports.
  4. Verify the file path is correct and the application has permission to read the file.
  5. Ensure the API version specified in the Accept header is supported by your Yellowfin instance.

Kindly provide us with the yellowfin logs while you replicate the issue, as this will allow us to examine the error details contained within the logs.



Sincerely,

Siddartha Pathi

Yellowfin Technical Support Engineer

photo
1

Thank you.

Using the import files for Postman and Jupyter from that article were helpful to narrow the issue down.


Is was a fault of mine, where I copied the authorization header from the access token step, which meant I wasn't passing `token=`.


After which, the following curl command did succeed:

curl -s --header "Authorization: YELLOWFIN ts=1765903183941, nonce=6b0763af-8c3c-4225-b0c4-1bb917219bfd, token=xxxxx" -X POST --header "Content-Type: multipart/form-data" --header "cache-control: no-cache" --header "Accept: application/vnd.yellowfin.api-v4+json;" --form "newLicence=@./staging.lic;type=application/octet-stream http://127.0.0.1:8080/api/rpc/licence-management/upload-licence" --trace-ascii trace.log


Better logging would have helped resolved this issue sooner.

photo
photo
1

Hello Jesse Kahtava,

Greetings of the day

Thank you for confirming and giving us the opportunity to assist you with this case. I am glad to hear the issue was resolved. If you have any other issues, please contact us again by opening up a new ticket, and we will provide additional support.

You will be receiving a Survey to evaluate our support. It would be very helpful for us if you could hit us with a SATISFIED on that Survey.

Thank you,

Siddartha Pathi

Yellowfin Technical Support

Leave a Comment
 
Attach a file