/content mapping & automation
Pull your connected site's content library via API
Important
Do not
make changes directly to your connected template.
Instead, generate a new site from that template first. This will give you a safe working copy to test, update, and automate—without affecting your original template.
Now that your connected template is set up, it's time to automate how content gets populated using the Duda API.
In this lesson, we’ll make an API call to the GET Content Library API call to pull all the fields mapped under Connected Data in the site's Content Library. This response gives you a well-structured JSON object that mirrors the organization of the content on the site.
Rather than building your object from scratch, we can use a tool like Postman to retrieve the exact object format Duda expects—ready to update and send back.
Once we’ve pulled the content object, we’ll be able to map each field and update it with new content. You’ll see how all the fields come together—including custom entries, images, and other data from the Content Library—making it easy to review, modify, and personalize the site content.
API Reference
GET https://api.duda.co/api/sites/multiscreen/{site_name}/content
Get the data that exists within the content library of a website.
Documentation:
GET Content Library |
Content Library Object
Best Practice
In this lesson, I’m using Visual Studio Code (VSCode) as my text editor to review and edit the content object. It’s free, lightweight, and great for working with JSON and other code formats.
That said, feel free to use any text editor you’re comfortable with—Notepad, Sublime Text, or even any tool already installed on your machine, like Notepad (Windows) or TextEdit (Mac).
Reminder
If you're just getting started with APIs or need a refresher on how to use Postman to make Duda API calls, we’ve got you covered. Check out our beginner-friendly course: Integrate the Duda Builder into Your Workflow
This course walks you through the basics—setting up Postman, authenticating with the Duda API, and making your first successful requests. It’s a perfect companion to help you follow along with the lessons in this series.