Asset
Version 1.0
Serves as the foundation for managing assets. Assets are the files that you upload to Qooly. These files can be images, videos, documents, and more. Assets are used in various places throughout the Qooly platform, such as products, assets, and more.
Asset Entity
- Name
id
- Type
- string Required
- Description
Every asset is assigned a unique identifier - an unsigned 64-bit integer known as the Asset ID. This specific number is exclusive and distinct across the entire Qooly platform, ensuring an unparalleled level of uniqueness.
- Name
name
- Type
- string Required
- Description
The name of the asset.
- Name
description
- Type
- string
- Description
The description of the asset.
- Name
type
- Type
- varchar(16)
- Description
This property indicates the type of the asset.
Default: Image
Image
Video
File
- Name
url
- Type
- string
- Description
This property indicates the URL of the asset.
- Name
url_hash
- Type
- string
- Description
This property indicates the URL hash of the asset.
- Name
thumbnail_url
- Type
- string
- Description
This property indicates the thumbnail URL of the asset.
- Name
created_at
- Type
- timestamp
- Description
This property indicates the time in ISO_8601 when the asset was created.
- Name
updated_at
- Type
- timestamp
- Description
This property indicates the time in ISO_8601 when the asset was last updated.
- Name
created_by
- Type
- foreignId
- Description
This property indicates the user who created the asset.
- Name
updated_by
- Type
- foreignId
- Description
This property indicates the user who recently updated the asset.
The Asset Entity
{
"id": "123456789",
"name": "Example Asset",
"description": "This is an example asset.",
"type": "Image",
"url": "https://example.com/image.jpg",
"url_hash": "123456789",
"thumbnail_url": "https://example.com/image.jpg",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
Retrieve all Assets
This endpoint allows you to retrieve all assets.
Examples
Retrieve all assets
curl --request GET \
--url https://api.qooly.io/v1/assets
Retrieve a single asset
curl --request GET \
--url https://api.qooly.io/v1/assets
[
{
"id": "123456789",
"name": "Example Asset",
"description": "This is an example asset.",
"type": "Image",
"url": "https://example.com/image.jpg",
"url_hash": "123456789",
"thumbnail_url": "https://example.com/image.jpg",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
},
{
"id": "987654321",
"name": "Example Asset 2",
"description": "This is another example asset.",
"type": "Image",
"url": "https://example.com/image2.jpg",
"url_hash": "987654321",
"thumbnail_url": "https://example.com/image2.jpg",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
]
Retrieve a Single Asset
This endpoint allows you to retrieve a single asset.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Retrieve a single asset
curl --request GET \
--url https://api.qooly.io/v1/assets/123456789
Retrieve a single asset
curl --request GET \
--url https://api.qooly.io/v1/assets/123456789
{
"id": "123456789",
"name": "Example Asset",
"description": "This is an example asset.",
"type": "Image",
"url": "https://example.com/image.jpg",
"url_hash": "123456789",
"thumbnail_url": "https://example.com/image.jpg",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
Delete a Single Asset
This endpoint allows you to delete a single asset.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Delete a single asset
curl --request DELETE \
--url https://api.qooly.io/v1/assets/123456789
Delete a single asset
curl --request DELETE \
--url https://api.qooly.io/v1/assets/123456789
{}