Open Design

List all pages and artboards

Once you import a design, you can fetch a list of all of the pages or artboards that are inside. Alternatively, you can find a specific page or artboard with a query.

List all pages

To list all pages, use the design.getPages() method on the design.

Here's an example snippet:

This returns an array of objects that looks like this:

With this data, you can get a page instance using its ID and do things like:

List all artboards

To list all artboards, use the design.getArtboards() method on the design.

Here's an example snippet:

This returns an array of objects that looks like this:

With this data, you can get an artboard instance using its ID and do things like: