About this article
This article contains the release notes for the Stable version of Templafy Public API.
Released to Stable in April 2023
The following endpoints and related functionality were delivered as a part of the first stable version.
Libraries
Two GET library endpoints to fetch the data about all libraries from all spaces or any specific library. The response will contain, but not be limited to, the space identifier, the library type, and the root folder identifier. These will be required to be passed when making calls to other endpoints. The current version of API doesn't support returning space names.
Folders
Five endpoints to work with folders. They are as follows:
- GET folder by the folder identifier to return the basic information including the navigation path and the parent folder identifier.
- GET the list of any children's folders by the parent folder identifier.
- POST endpoint to create a new folder with the specified name.
- PATCH the folder to update the name and/or move to a different parent folder within the same library across all spaces. The endpoint supports partial updates.
- DELETE the folder with all content inside. The root folders can't be deleted.
Templates and assets
Every template and asset library supports five endpoints. All the endpoints across all libraries use the same route structure that only differs by the library type and request/response contracts. In the sections below only the key features and main differences will be described. Please refer to Swagger documentation to get more detailed information.
Every library supports the following five endpoints:
-
GET all the assets or templates from the specified folder. By default, the results are not paginated. To limit the results, the searchQuery parameter can be used to filter the template name, description, and tags. Page number and page size can be passed to dynamically go through the returned data.
-
GET the asset or template by the identifier. The endpoint will return the asset/template details, external data, and the generated temporary access URL for content downloading.
-
POST to create a new asset or template and return its identifier. For file-based assets/templates only the file is required to be passed, while the name is automatically retrieved. Some additional details might be passed as well as external data that are used to store any information for future reference.
-
PATCH allows doing multiple actions with the asset or template.
- Update asset/template details
- Replace asset/template file
- Move asset/template to a different folder within the library across spaces
This endpoint supports partial updates.
-
DELETE the asset or template by the identifier.
Important information:
- Zip upload is not supported
- Asset/template response doesn't have a state property for now.
- POST and PATCH for file-based libraries use multipart/form-data content type.
Library specific details
- Images contain data about dimensions, automatic tags, and generated preview links.
- Links library being not file-based uses application/json content type for all its endpoints. Here for POST name and URL should be provided. PATCH can be used to change the details, URL, or move an asset.
- Presentations, Slide and SlideElements are the libraries that work with two types of assets at the same time, for example, requesting all data from the Presentation library will return both presentations and slides in a flattened structure. AssetType can be used as a discriminator to make a distinction. Both the identifier of the presentation or slide can be used to get the details about the asset. It will contain generated preview links, dimensions, and also type-specific data like childrenAssetIds for the presentation or presentationId for slide. There is a limited scope of actions that can be done on slides as a part of PATCH or DELETE.
Comments
0 comments
Article is closed for comments.