When Canva sends an HTTP request to endpoints, it limits the number of resources that can be included in the response. For example, when Canva sends a request to the
/content/resources/findendpoint, the endpoint must respond with 100 or fewer resources.
If an extension needs to respond with more resources than this limit allows, it can use continuation to deliver the resources across multiple requests and responses.
This topic explains what continuation is and how to support it.
Any endpoint that returns a list of resources can support continuation, including:
If an endpoint supports continuation, it can include a
continuationproperty in the response body:
This property must contain a continuation token. A continuation token is a string of characters that, when passed back to the server, identifies how to return the next logical batch of resources. It can be as simple as a page number or a complex string that encodes more information.
The presence of the
continuationproperty tells Canva to send another request to the endpoint when more resources are required, such as when a user scrolls through content in a content extension.
The subsequent request that Canva sends has a
continuationproperty in the request body. This property contains the continuation token from the previous response:
The endpoint can use the token to respond with the relevant resources. For example, if the
continuationproperty contains a value of
"2", the endpoint can identify and return the resources that belong to that page.
When there are no more resources to retrieve, the endpoint can set the
continuationproperty in the response body to
This tells Canva to stop sending additional requests to the endpoint.
To learn how to add continuation to an extension, see the following guides: