I am using docker image for aspose.cells to set up on premise aspose.cells cloud. Now image is up and running, and I can see swagger ui when hit the /index.html endpoint…
but if i try to use any api, for example: conversion api to save excel file as pdf, image.png (201.6 KB)
here i am not able to execute the api. moreover not able to understand that the workbook name
mentioned, like where should the file be present in case of onpremise…does that need to be mounted?
Also after mounting, i am executing following lines of code to hit the api:
let configuration = {
method: 'post',
url: baseUrl + '/v3.0/cells/' + inputFileName + '/SaveAs?newfilename=' + outputFilePath + '&isAutoFitRows=true&isAutoFitColumns=true&folder=' + inputDatafolder +'&checkExcelRestriction=false',
headers: {
'accept': 'application/json',
'Content-Type': 'application/json',
},
data: 'data'
}
await axios(configuration)
.then(function (response) {
if(response.status === 200) {
logger.info(`File converted successfully to pdf.`);
}
else {
logger.error(`Error while converting file to pdf. Response Status Code: ${response.status}`)
}
})
.catch(function (error) {
throw error;
});
Is the above method correct for hitting this api? i am getting 400 error that object instance in not defined.
Response: MicrosoftTeams-image (3).png (270.0 KB)
PS: I just need to confirm is there any thing wrong in above code if i am hitting the api through axios.