Get PDF File via REST Call

Hello,

i am uploading a Base64 encoded PDF File from my external formn to the camunda process engine.
Here the related part of the JSON:

  				"belege" : {
  					"value" : base64Encoded,
  					"type" : "File",
  						"valueInfo": {
  							"filename" : "testFile.pdf",
  							"mimetype" : "application/pdf",
  							"encoding" : "UTF-8"
  						}
  				}

In Cockpit i can see the variable as intended:

When i click on download, the correct PDF File is downloaded.

Now i want to download this PDF file and provide a download link in the next external form.

But when i make a REST Call for that variable i get this in response:
image

I thought that “value” should contain the Base64 String, but obviously this is wrong.

Can anybody help me getting the PDF File?

Thanks for your help.

I think what you’re looking for is the Get Variable Instance API. That should allow you to access the data stream by variable id.

File variables with MIME type information are returned as the saved type. Additionally, for file variables the Content-Disposition header will be set.

Thanks for your reply.
I will have a Look at this :slight_smile: