Yellowfin 9 Data format for Upload License endpoint

Ryan Malesevich shared this question 3 years ago
Answered

We are starting to explore Yellowfin 9 and upgrading our deployment to using Docker/Kubernetes. As part of that, we are exploring using automation to set up the development environments locally on our machines. Through the Docker instructions we have it running but the first thing that would need to be done is to upload the license file. I'm working with the REST API. I was successful in getting the Refresh Token and Access Token, but I've got a question on the expectation of the format on the Upload a new license endpoint: In the CURL example there is the --form with:

--form 'newLicence=Binary data would go here;type=application/octet-stream' \
I'm not an expert on submitting binary data with REST endpoints. What format is Yellowfin expecting? I've tried a few things based on wild google searching but am getting a 500 error.
I'm using Powershell and this is what I've got so far:
$Header = @{
  "Authorization" = "YELLOWFIN ts=$ts, nonce=$uuid, token=$AccessToken"
  "Content-Type" = "multipart/form-data"
  "Accept" = "application/vnd.yellowfin.api-v1+json;"
  "cache-control" = "no-cache"
}
$LicenseContent = [System.IO.File]::ReadAlltext(".\license.lic")
$LicenseEncoded = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($LicenseContent))

$Parameters = @{
  Method = "POST"
  Uri = "http://localhost/api/rpc/license-management/upload-license"
  Headers = $Header
  Body = "newLicense=$LicenseEncoded;type=application/octet-stream"
}
$response = Invoke-RestMethod @Parameters
I've tried to pass in the regular text. I've done base64 (this is how we were having to upload the report content with the YF8 SOAP services). It's returning an HTTP 500 error. The logs I'm seeing on Docker are:
YF:2021-03-01 18:33:16.733: INFO (ErrorAction) - [37] [Background] [/api/rpc/license-management/upload-license] ErrorAction entered
YF:2021-03-01 18:33:16.734: INFO (ErrorAction) - [37] [Background] [/api/rpc/license-management/upload-license] ErrorAction exiting with action: success
I'm positive it's something I'm missing, but looking for any guidance!

Replies (2)

photo
1

Hi Ryan,

Thanks for reaching out. Setting this up is a bit outside the scope of Support I'm afraid. The good news though, is I reached out to your Account Manager and you do have Extended Services time available, so she'll be reaching out to the Services Team to facilitate further discussion on this as they are well-suited for this type of discussion.

You should be hearing back from someone at Yellowfin regarding this some time soon.

Regards,

Mike

photo
1

Hi Ryan,

I'm going to go ahead and mark this one as Answered since this is now in the hands of the Services Team, but if you have any other questions or concerns, or if for some reason you don't hear back from them, please let me know here and I'll reach out for further updates.

Regards,

Mike

Leave a Comment
 
Attach a file