If the request is successful, you will receive a response consisting of an array of posts. The response will be paginated if the number of posts is large. Below is an example API request response:
Download the assets for each post from the array. The possible types of assets are:
— sizes — several options for the image size, depending on the device’s screen size.
Note: Getting the images field in your response will require using additional parameters.
Step 3 — uploading assets to your CDN
When all assets are downloaded, store them in your infrastructure.
Advice – store files with the same path, that will simplify the update script.
Step 4 — replacing asset URLs and updating content
When all assets are downloaded and stored in your infrastructure, you need to replace all links used in the Post body and include CSS files in the Post Page. You will need a custom script tailored to your case.
Inside the Post body there might be images. If you created Posts inside Setka Cloud you’ll find srcset generated for multiple image sizes. It’s a feature provided by Setka Cloud. Links to image variations are not provided. We suggest that you remove everything inside the srcsetHTML attribute for in <img tag> and store the original image in your infrastructure.