Introduction
The Content Delivery API (CDA) is a core component of Penzle's platform. It delivers content from Penzle's cloud-based platform to your apps, websites, and other media. Content is delivered as JSON data during the delivery process, while images, videos, and other media are delivered as files.
This API provides a simple and consistent way to access and manipulate your content, making it easy for you to build robust and scalable applications.
The API is made available to users through a globally dispersed Content Delivery Network (CDN). This approach offers several advantages for users and ensures that the API is highly accessible and responsive.
Advantages of using a CDN of Penzle API include:
- Minimized Latency: By serving content from the server closest to the user, latency is minimized, providing a fast and responsive user experience. This is especially beneficial for mobile users.
- Improved Availability: Hosting content in multiple data centers worldwide improves the API's overall availability. This means that users are less likely to experience downtime or disruptions to their API access.
- Scalability: CDNs are designed to handle large amounts of traffic and can quickly scale to meet increased demand. This ensures that the API is always accessible and responsive, even during periods of high traffic.
Overall, using a globally dispersed CDN for API delivery provides users with a fast, reliable, and highly available API experience. In this API reference guide, you will find detailed information about the various endpoints and methods available through the CDA and the data structures and response formats. Whether you're a seasoned developer or just getting started, this guide will provide you with the knowledge and tools you need to use the Penzle Delivery API in your projects effectively.
Get started with a free Penzle account. Click here to sign up.
An overview of the API
The Content Delivery API (CDA) is a RESTful API provided by Penzle that allows developers to access and retrieve content stored in Penzle.
The base URL for the CDA is:
https://api.penzle.com
Authentication
The Content Delivery API (CDA) requires authentication to access and retrieve content stored in Penzle. To authenticate a request to the CDA, you need to include an access token in the header of each request.
Content Delivery API (CDA) Key: This key is used to retrieve and deliver content from Penzle's cloud-based platform to your application. The CDA key is public and can be safely embedded in your client-side code.
More details about Penzle authentication can be found in our reference guide.
Common Resource Attributes
When making requests to the API, you will receive data in the form of resources. Resources are fundamental building blocks of Penzle's content model and represent individual pieces of content, such as entries, assets, etc.
Most resources in the API have a common set of attributes, including:
system
: This attribute contains system information about the resource, such as its ID, type, and creation and modification dates. The system attribute is read-only and cannot be modified.fields
: This attribute contains the actual data for the resource. The fields for a resource are defined by its content type and can include text, numbers, dates, images, and more. The fields for a resource can be read and modified using the API.base
: This attribute is used to retrieve data from inherited content models.
The structure of the resource attributes will vary depending on the type of resource being returned. For more information on the attributes available for specific resources, see the relevant section of the API reference guide.
Understanding the common resource attributes allows you to effectively access and manipulate your content using the Content Delivery API. Whether you're building a simple website or a complex application, the API provides the flexibility and power you need to create the best possible user experience.
Entries
Entries are the basic building blocks of Penzle's content model and represent individual pieces of content in your project.
An entry can be anything from a blog post to a product description and include various fields, such as text, images, and numbers. Entries can have link fields that point to other entries or assets. You can learn more about links in our concept guide.
Entry
An Entry in Penzle represents a single piece of content in your project.
Get a single entry
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{ENTRY_ID}
This API allows you to retrieve a single entry by its unique identifier by making a GET request.
Where {project_code_name} is the code name of the project you want to access, {environment-code-name} is the code name of the environment you want to access, and {entry_id} is the ID of the entry you want to retrieve.
The project and environment properties are mandatory for each request.
Parameters
id |
string Required
The unique entry id.
|
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
language |
string Nullable
The code language of entry.
|
preview |
boolean
Specifies whether to return a preview version of the API.
|
include |
integer
Specifies number of levels you want to return.
|
Responses
RESPONSE SCHEMA: application/json
fields |
object
Field elements of the entry.
|
system |
object
System information about the entry.
|
base |
Array of objects
Data from inherited content models.
|
Get a single entry by slug
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries?slug={SLUG}
This API allows you to retrieve a single entry by its unique slug by making a GET request.
Where {project_code_name} is the code name of the project you want to access, {environment_code_name} is the code name of the environment you want to access, and {slug} is the Slug of the entry you want to retrieve.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
slug |
string Required
The entry slug.
|
language |
string Nullable
The code language of entry.
|
preview |
boolean
Specifies whether to return a preview version of the API.
|
include |
integer
Specifies number of levels you want to return.
|
Responses
RESPONSE SCHEMA: application/json
fields |
object
Field elements of the entry.
|
system |
object
System information about the entry.
|
base |
Array of objects
Data from inherited content models.
|
Entries collection
The Entries collection refers to a group of entries that belong to a specific content model. It can be useful for displaying lists of content in your application, such as a list of blog posts or products.
Using the Entries collection, you can effectively manage and display large amounts of content in your application.
Get all entries
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}
This API allows you to retrieve a collection of entries by making a GET request.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Search Parameters
The Entries collection refers to a group of entries that belong to a specific content model. It can be useful for displaying lists of content in your application, such as a list of blog posts or products. To enhance the utility of the Entries collection, you can utilize search parameters to filter and retrieve specific content based on various criteria.
Using the search parameters, you can effectively manage and display large amounts of content in your application by tailoring the results to match your specific requirements. These search parameters allow you to filter and refine the content displayed, making it easier to find and present the most relevant information to your users. Whether you need to filter content by date, category, author, or any other attribute, these search parameters provide a powerful tool for customizing the content presentation in your application.
Equality operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}]={YOUR_FIELD_VALUE}
Filters for entries where the specified property’s value is equal to the provided value.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Inequality operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][neq]={YOUR_FIELD_VALUE}
Filters for entries where the specified property’s value is not equal to the provided value.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Greater than operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][gt]={YOUR_FIELD_VALUE}
Filters for entries where the specified property’s value is greater than the provided value.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Greater than or equal operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][gte]={YOUR_FIELD_VALUE}
Filters for entries where the specified property’s value is greater or equal to the provided value.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Lower than operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][lt]={YOUR_FIELD_VALUE}
Filters for entries where the specified property’s value is lower than the provided value.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Lower than or equal operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][lt]={YOUR_FIELD_VALUE}
Filters for entries where the specified property’s value is lower or equal to the provided value.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
In operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][in]={YOUR_FIELD_VALUE}
Filters for entities where the specified property’s value matches any value from the specified comma-separated array of options.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Not In operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][nin]={YOUR_FIELD_VALUE}
Filters for entities where the specified property’s value does not match any value from the specified comma-separated array of options.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Empty operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][empty]
Filters for entities where the specified property’s value is null.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Not empty operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][nempty]
Filters for entities where the specified property’s value is not null.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Starts with operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][like]=^{YOUR_FIELD_VALUE}
Filters for entities where the specified property’s value starts with provided value.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Ends with operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][like]={YOUR_FIELD_VALUE}$
Filters for entities where the specified property’s value ends with provided value.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Like operator
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/entries/{DATA_TEMPLATE}?filter[where][and][{YOUR_FIELD_NAME}][like]=*{YOUR_FIELD_VALUE}*
Filters for entities where the specified property’s value contains provided value.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
template |
string Required
The entry template code name.
|
preview |
boolean Nullable
Specifies whether to return a preview version of the API. The default value is false.
|
include |
integer Nullable
Specifies number of levels you want to return. The default value is 0.
|
PageSize |
integer Nullable
The page size of the response. The default value is 10
|
Page |
integer Nullable
The page number of the response. Started from index 1.
|
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of items returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Assets
Assets in Penzle represent binary files that are stored in your project.
Assets can be of any file type, including images, videos, audio, and documents, and are commonly linked to entries to display media in your content. Each Asset can be localized by providing separate files for different locales. If an Asset is not localized, it will be available as a single file under the default locale.
Asset
An Asset in Penzle represents a single piece of the media item in your project.
Get a single asset
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/assets/{ASSET_ID}
This API allows you to retrieve a single asset by its unique identifier by making a GET request.
Parameters
id |
string($uuid) Required
The unique asset id.
|
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
language |
string Nullable
The code language of the asset.
|
type |
string Nullable
The asset item type.
|
Responses
RESPONSE SCHEMA: application/json
url |
string
URL of the Asset file.
|
mediaItemId |
string
Unique identifier of the Asset file.
|
workflowId |
string
ID of the workflow associated with the Asset. If not associated, the value will be null.
|
language |
string
Locale of the Asset.
|
mediaMimeType |
object
MIME type of the Asset, with properties: type (array of strings) and extension (string).
|
tags |
array of objects
Tags associated with the Asset, with properties: id (string) and name (string).
|
id |
string
Unique identifier of the Asset in Contentful.
|
name |
string
Name of the Asset file.
|
description |
string
Description of the Asset.
|
createdAt |
string
Date and time the Asset was created, in ISO 8601 format.
|
modifiedAt |
string
Date and time the Asset was last modified, in ISO 8601 format.
|
type |
string
Type of the Asset, which will always be "File".
|
size |
integer
Size of the Asset file, in bytes.
|
Assets collection
Asset collection refers to a group of assets that belongs to a specific project.
Get all assets
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/assets
This API allows you to retrieve a collection of assets by making a GET request.
Parameters
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
language |
string
The language code of the asset items to be returned. This allows you to retrieve assets localized to a specific language.
|
tag |
string
The tag of the asset items to be returned. This allows you to retrieve assets that are tagged with a specific value.
|
mimeType |
string
The MIME type of the asset items to be returned. This allows you to retrieve assets of a specific file type (e.g. image/jpeg).
|
ids |
string
The collection of IDs of the asset items to be returned. This allows you to retrieve specific assets by their ID.
|
parentId |
string($uuid)
The parent ID of the asset items to be retrieved. This allows you to retrieve assets that are children of a specific asset.
|
keyword |
string
The generic keyword to be used for searching assets. This allows you to search for assets that contain a specific word or phrase in the name, description, or other fields.
|
types |
array[object]
The collection of asset item types to be retrieved. This allows you to retrieve assets of specific types, such as images or videos.
|
pageSize |
integer($int32)
The page size of the response. The default value is 10. This allows you to control the number of assets returned in each response.
|
Page* |
integer($int32)
Required
The page number of the response. The index starts from 1.
|
OrderBy |
string
Specifies the field to sort the returned asset items by.
|
Direction |
string
The sort direction of response like
asc or desc . |
Responses
RESPONSE SCHEMA: application/json
items |
Array of objects
Array of assets returned in the current page.
|
pageIndex |
integer
Zero-based index of the current page.
|
pageSize |
integer
Number of items returned in a single page.
|
totalCount |
integer
Total number of items in the collection.
|
totalPages |
integer
Total number of pages needed to display the entire collection.
|
hasPreviousPage |
boolean
Indicates availability of a previous page.
true means there is a previous page, false means the current page is the first page. |
hasNextPage |
boolean
Indicates availability of a next page.
true means there is a next page, false means the current page is the last page.. |
Forms
The Forms module in Penzle is a powerful tool for collecting data from users through online forms. It allows you to create custom forms, manage submissions, and view collected data, all within the Penzle platform.
Whether you need to gather feedback, conduct surveys, or collect information for lead generation, the Forms module has covered you.
Get a single form
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/forms/{FORM_ID}
This API allows you to retrieve a single form entry by its unique identifier by making a GET request.
Parameters
id |
string($uuid) Required
The unique form entry id.
|
project |
string Required
The specific project you are working on.
|
environment |
string Required
The specific environment of the project you are working on.
|
language |
string Nullable
The code language of the asset.
|
Responses
RESPONSE SCHEMA: application/json
fields |
object
Field elements of the entry.
|
system |
object
System information about the entry.
|
base |
Array of objects
Data from inherited content models.
|
Data Templates
Building the project data structure is one of the first steps in starting a new project.
Penzle will allow you to make data templates, validations, the assignment of child entries, and the creation of content entries, all of which are essential parts of building a data structure that will represent the strong type object in your application with business rules.
Get a single template
/api/project/{PROJECT_CODE_NAME}/environment/{ENVIRONMENT_CODE_NAME}/templates/{CODE_NAME_OR_ID}/schema
This API allows you to retrieve a single data template by its unique identifier or unique code name by making a GET request.
Parameters
id or code name |
string Required
The unique id or code name.
|
project |
string Required
A unique identifier of your project.
|
environment |
string Required
A unique identifier of the environment within the project.
|
Responses
RESPONSE SCHEMA: application/json
type |
string
The type of the content model, either "Template" or "Form".
|
fields |
object
Field elements of the content model.
|
base |
array of objects
Data from inherited content models, if any.
|
template |
string
The id of the template this content model is based on.
|
id |
string
The unique identifier of the content model.
|
parentId |
string
The identifier of the parent content model, if any.
|
name |
string
The name of the content model.
|
modifiedAt |
string (DateTime format)
The date and time when the content model was last modified.
|
createdAt |
string (DateTime format)
The date and time when the content model was created.
|