Composition API examples
The following examples allow you to get information about Uniform components and compositions through the API.
Components#
This section provides examples of how to interact with components defined in a Uniform project.
Get all component definitions#
This example demonstrates how to retrieve all component definitions from a Uniform project.
info
For more information, see the package reference for CanvasClient
.
Get composition component definitions#
This example demonstrates how to retrieve the definitions for composition components from a Uniform project.
info
For more information, see the package reference for CanvasClient
.
Compositions#
This section provides examples of how to interact with compositions defined in a Uniform project.
Get all compositions#
The following example demonstrates how to list all compositions that are in a published state.
info
For more information, see the package reference for CanvasClient
.
Get compositions by type#
The following example demonstrates how to get all compositions that are based on a specific component type and are in a draft state.
info
For more information, see the package reference for CanvasClient
.