Reorder Slides in a PowerPoint Presentation using Aspose.Slides Cloud REST API

Thank you, that worked and I was able to merge multiple presentations. I am exploring your api through : Developer Guide|Documentation but having issues:

At the moment, I am trying to change the order of slides in a presentation but it keeps failing. the request is :

curl -v "https://api.aspose.cloud/v1.1/slides/blank.pptx/slides?oldPosition=3&newPosition=4" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer xxxx"

The file exists in the storage and I am not specifycing the slide numbers out of bound, but I get an error:

HTTP Error 411. The request must be chunked or have a content length.

Could you please let me know what the issue is and also if you have an updated curl documentation for me to try out the other sections

@mufeel

You may test Aspose.Slides REST APIs using Swagger UI. It lets you run the APIs right from your browser.

Okay will try that out, but can I know the issue with the the curl request I made as ultimately I will have to boil it down to pure curl in order to integrate with our application

curl -v “https://api.aspose.cloud/v1.1/slides/blank.pptx/slides?oldPosition=3&newPosition=4” 
-X POST 
-H “Content-Type: application/json” 
-H “Accept: application/json” 
-H “Authorization: Bearer xxxx”

The file exists in the storage and I am not specifycing the slide numbers out of bound, but I get an error:

HTTP Error 411. The request must be chunked or have a content length.

@mufeel

The problem is not with the API, but with your cURL request. Please add header Content-Length: 0 in your cURL request, as shown below:

// cURL example to change order of slides
curl -v "https://api.aspose.cloud/v1.1/slides/sample-input.pptx/slides?oldPosition=3&newPosition=1" \
-X POST \
-H "Content-Length: 0" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer xxxxx"

More examples of the similar APIs are given here:

Hi

Is it possible to change multiple positions of slides in one API call, I am currently using

/v1.1/slides/filename.pptx/slides?oldPosition=1&newPosition=2

Would like to know if its possible to pass an array or oldPositions and its corresponding newPositions?

Regards

Mufeel

@mufeel

Unfortunately, at present, we do not provide an API that let you reorder multiple slides in one API call.

We have logged the request (SLIDESCLOUD-542) in our internal tracking software for the implementation of this feature. We will update you here as soon as the feature is implemented.

@mufeel

We are pleased to inform you that we have introduced an API that let you reorder multiple slides in a presentation in one API Call. Please use POST /slides/{name}/slides/reorder API for the said purpose.