Developers · Assets
Assets Module
Last updated 7 November 2026
The Assets module (insites_assets) provides file and folder management for Insites instances. This guide covers the module architecture, v2 API endpoints, data structures, and integration patterns for developers.
Module Information
| Property | Value |
|---|---|
| Machine Name | insites_assets |
| Slug | assets |
| Label | Assets |
v2 API Endpoints
The Assets module exposes eight v2 API endpoints: five for assets, two for folders, and one that returns upload credentials (GET /asset/api/v2/credentials). All endpoints require a valid instance API key passed in the Authorization header. For full API documentation including request and response examples, visit <your instance URL>/admin/api.
Asset Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /asset/api/v2/assets | List assets. Supports filtering by folder, tags, and pagination. The default page size is 10. |
| GET | /asset/api/v2/assets/{id} | Get a single asset by its numeric ID. |
| POST | /asset/api/v2/assets | Create a new asset record. |
| DELETE | /asset/api/v2/assets/{id} | Permanently delete an asset by ID or by physical file path. |
| PATCH | /asset/api/v2/assets/{id}/archive | Archive an asset (soft delete). |
Folder Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /asset/api/v2/folders | Create a new folder. |
| DELETE | /asset/api/v2/folders | Delete a folder and all its contents. The match is by name prefix, so pass the folder path with its trailing slash. |
Data Structures
Asset Object
| Field | Type | Description |
|---|---|---|
id | Integer | Auto-assigned numeric ID. Note: this is an integer, not a UUID like other Insites modules. |
name | String | Full path name of the asset, including the folder structure. |
physical_file_path | String | Physical storage path of the file. |
url | String | CDN URL where the asset can be accessed directly. |
metadata | Object | Contains is_archived (string), tags (array of strings), and administrator_uuid (string). |
created_at | DateTime | ISO 8601 timestamp of when the asset was created. |
updated_at | DateTime | ISO 8601 timestamp of when the asset was last modified. |
Folder Object
| Field | Type | Description |
|---|---|---|
id | Integer | Auto-assigned numeric ID. |
name | String | Full folder path. |
created_at | DateTime | ISO 8601 timestamp. |
updated_at | DateTime | ISO 8601 timestamp. |
Metadata Object
| Field | Type | Default | Description |
|---|---|---|---|
is_archived | String | false | Whether the asset is archived. Stored as a string, not a boolean. |
tags | Array | [] | Array of tag strings for categorization and search. |
administrator_uuid | String | (auto-set) | UUID of the administrator who last modified the asset. |
Rendering Assets
Assets can be rendered in your pages and templates using Liquid tags or direct URLs.
Liquid Tag
Use the asset_name_to_raw_url Liquid filter to get the URL of an asset by its name. It returns nil if there is no such asset:
{{ 'path/to/file.png' | asset_name_to_raw_url }}
You can copy this snippet from the file detail panel in the Assets admin interface.
Direct URL
Each asset has a direct CDN URL that can be used in Markdown, HTML, or external applications. The URL is available in the file detail panel under the URL field.
Event Stream Integration
The Assets module integrates with the Insites Event Stream to track all file and folder activity. Events are created server-side when files or folders are added, edited, deleted, archived, or restored. Each event records the administrator, the asset name, and a timestamp.
The Event Stream is accessible from the Assets sidebar under Event Stream.