List Templates Public

Retrieve a list of public templates available for use. This endpoint allows filtering by various criteria such as ID, name, and creation date.

GET

Parameters

Query Parameters

Id
Filter resources by their unique identifier
Name
Filter resources by their name or title
Autocomplete
Search term for autocomplete functionality
Limit
How many items to return at one time (max 100)
Next
Pagination token for retrieving the next page of results
Order
Sort order for the results (ascending or descending)
SortBy
Field name to sort the results by
When_created[$gt]
Filter templates created after this date and time
When_created[$lt]
Filter templates created before this date and time
When_created[$gte]
Filter templates created on or after this date and time
When_created[$lte]
Filter templates created on or before this date and time
Status codeDescription
200A list of templates and the next pagination token.
400Bad request error - the request contains invalid parameters or malformed data
500Internal server error - an unexpected error occurred on the server
cURL
curl -L \
"https://blockv-labs.io/public/templates?id={id}&name={name}&autocomplete={autocomplete}&limit={limit}&next={next}&order={order}&sortBy={sortBy}&when_created[$gt]={when_created[$gt]}&when_created[$lt]={when_created[$lt]}&when_created[$gte]={when_created[$gte]}&when_created[$lte]={when_created[$lte]}" \
-H 'Accept: application/json'
Response
{
"templates": [
{
"id": "string",
"name": "string",
"object": {
"metadata": {
"name": "string",
"description": "string",
"category": "string",
"image": {
"id": "string",
"name": "string",
"type": "string",
"url": "string",
"hash": "string",
"is_public": false,
"when_created": "2024-01-01T00:00:00Z"
},
"edition": 0
}
},
"factory": {
"max_supply": 0,
"minted_count": 0,
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-01-01T00:00:00Z",
"whitelist": [
"string"
]
},
"actions": [
{
"name": "mint",
"alias": "string",
"access": {
"type": "public"
},
"url": "string"
}
],
"face_id": "string",
"when_created": "2024-01-01T00:00:00Z",
"when_modified": "2024-01-01T00:00:00Z"
}
],
"next": "string"
}
json
{
"type": "object",
"required": [
"templates"
],
"properties": {
"templates": {
"type": "array",
"description": "Array of template objects.",
"items": {
"type": "object",
"description": "Template public entity defining the structure and behavior for creating smart objects",
"required": [
"id",
"name",
"object",
"actions",
"when_created",
"when_modified"
],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the template",
"x-oapi-codegen-extra-tags": {
"bson": "_id",
"json": "id"
},
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-go-type-skip-optional-pointer": true
},
"name": {
"type": "string",
"description": "Name of the object",
"x-oapi-codegen-extra-tags": {
"bson": "name",
"validate": "required,max=255"
}
},
"object": {
"description": "Reference to the object schema",
"x-oapi-codegen-extra-tags": {
"bson": "object"
},
"type": "object",
"required": [
"metadata"
],
"properties": {
"metadata": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "name,omitempty"
}
},
"description": {
"type": "string",
"description": "Description of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "description,omitempty"
}
},
"category": {
"type": "string",
"description": "Category of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "category,omitempty"
}
},
"image": {
"type": "object",
"description": "Represents a file or media asset stored in the platform",
"required": [
"id",
"url"
],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the asset",
"x-oapi-codegen-extra-tags": {
"bson": "id,omitempty"
}
},
"name": {
"type": "string",
"description": "Human-readable name of the asset",
"x-oapi-codegen-extra-tags": {
"bson": "name,omitempty"
}
},
"type": {
"type": "string",
"description": "MIME type of the asset (e.g., image/jpeg, application/pdf)",
"x-oapi-codegen-extra-tags": {
"bson": "type,omitempty"
}
},
"url": {
"type": "string",
"description": "Public URL where the asset can be accessed",
"x-oapi-codegen-extra-tags": {
"bson": "url,omitempty"
}
},
"hash": {
"type": "string",
"description": "Cryptographic hash of the asset content for integrity verification",
"x-oapi-codegen-extra-tags": {
"bson": "hash,omitempty"
}
},
"is_public": {
"type": "boolean",
"description": "Whether the asset is publicly accessible without authentication",
"x-oapi-codegen-extra-tags": {
"bson": "is_public,omitempty"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the asset was uploaded",
"x-oapi-codegen-extra-tags": {
"bson": "when_created,omitempty"
}
}
}
},
"edition": {
"type": "integer",
"description": "Edition number of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "edition,omitempty"
}
}
},
"x-oapi-codegen-extra-tags": {
"bson": "metadata,omitempty"
}
},
"custom": {
"type": "object",
"description": "Custom properties of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "custom,omitempty"
}
}
}
},
"factory": {
"description": "Reference to the factory schema",
"x-oapi-codegen-extra-tags": {
"bson": "factory"
},
"type": "object",
"required": [
"max_supply",
"minted_count"
],
"properties": {
"max_supply": {
"type": "integer",
"x-oapi-codegen-extra-tags": {
"bson": "max_supply"
}
},
"minted_count": {
"type": "integer",
"default": 0,
"x-oapi-codegen-extra-tags": {
"bson": "minted_count"
}
},
"start_time": {
"type": "string",
"format": "date-time",
"x-oapi-codegen-extra-tags": {
"bson": "start_time"
}
},
"end_time": {
"type": "string",
"format": "date-time",
"x-oapi-codegen-extra-tags": {
"bson": "end_time"
}
},
"whitelist": {
"type": "array",
"items": {
"type": "string"
},
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "whitelist"
}
}
}
},
"actions": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the action",
"enum": [
"mint",
"burn",
"transfer",
"drop",
"pickup",
"update",
"redeem",
"bridgeNFT",
"connect",
"remote"
],
"x-oapi-codegen-extra-tags": {
"bson": "name",
"validate": "required"
}
},
"alias": {
"type": "string",
"description": "Optional alias for the action",
"x-oapi-codegen-extra-tags": {
"bson": "alias"
}
},
"access": {
"type": "object",
"description": "Access control for the action",
"x-oapi-codegen-extra-tags": {
"bson": "access"
},
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"description": "Type of access",
"enum": [
"public",
"private",
"whitelist",
"token"
],
"x-oapi-codegen-extra-tags": {
"bson": "type",
"validate": "required"
}
},
"tokens": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int64"
},
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "tokens"
}
}
}
},
"config": {
"type": "object",
"description": "Configuration for the action",
"x-oapi-codegen-extra-tags": {
"bson": "config"
},
"x-go-type-skip-optional-pointer": true
},
"url": {
"type": "string",
"description": "URL for the action, if applicable",
"x-oapi-codegen-extra-tags": {
"bson": "url"
},
"x-go-type-skip-optional-pointer": true
}
}
},
"description": "Array of actions that can be performed on the template.",
"x-oapi-codegen-extra-tags": {
"bson": "actions"
}
},
"face_id": {
"type": "string",
"description": "Face identifier for the visual representation of objects created from this template",
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-oapi-codegen-extra-tags": {
"bson": "face_id"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"description": "Timestamp of when the object was created",
"x-oapi-codegen-extra-tags": {
"bson": "when_created"
}
},
"when_modified": {
"type": "string",
"format": "date-time",
"description": "Timestamp of when the object was last modified",
"x-oapi-codegen-extra-tags": {
"bson": "when_modified"
}
}
}
}
},
"next": {
"type": "string",
"description": "Pagination token for the next set of results, if any.",
"x-go-type-skip-optional-pointer": true
}
}
}