Skip to main content

getAttributes

Getting all attribute set objects.

AttributesSets?.getAttributes( langCode?, offset?, limit?, typeId?, sortBy? );

Minimal example

const value = await AttributesSets.getAttributes()
Schema

langCode: string
Language code. Default: "en_US"
example: "en_US"

limit: number
parameter limiting the selection of records. Default: 30
example: 30

offset: number
parameter offset of record selection. Default: 0
example: 0

typeId: number
identifier of the attribute set type. Default: null
example: NaN

sortBy: string
identifier of the attribute set type. Default: "id"
example: "id"

This method return all attribute sets objects and total.

Example response

{
"total": 16,
"items": [
{
"id": 27,
"updatedDate": "2025-02-26T17:18:11.275Z",
"version": 0,
"identifier": "admins",
"typeId": 1,
"title": "Admins",
"schema": {
"admin-text": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "admin-text",
"localizeInfos": {
"title": "Admins text"
}
}
},
"isVisible": true,
"properties": {},
"type": {
"id": 1,
"type": "forAdmins"
},
"position": 1
},
{
"id": 22,
"updatedDate": "2025-03-23T12:23:56.420Z",
"version": 0,
"identifier": "block",
"typeId": 2,
"title": "Block",
"schema": {
"block-text": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "block-text",
"localizeInfos": {
"title": "Block text"
}
},
"interval": {
"id": 2,
"type": "timeInterval",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "interval",
"localizeInfos": {
"title": "Interval",
"intervals": [
{
"id": "c6466cd8-c55d-4583-97c5-42b684210f12",
"range": [],
"external": [],
"fullMonth": 2,
"intervals": [
{
"id": "ab0e3e90-8153-4679-aea4-198c5022f8d4",
"end": {
"hours": 19,
"minutes": 0
},
"start": {
"hours": 9,
"minutes": 0
},
"period": 60
}
],
"inEveryMonth": true,
"selectedYear": 2025
}
]
}
}
},
"isVisible": true,
"properties": {},
"type": {
"id": 2,
"type": "forBlocks"
},
"position": 2
},
{
"id": 17,
"updatedDate": "2025-02-26T16:25:01.688Z",
"version": 0,
"identifier": "page",
"typeId": 4,
"title": "Page",
"schema": {
"text": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "text",
"localizeInfos": {
"title": "text"
}
},
"number": {
"id": 2,
"type": "integer",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "number",
"localizeInfos": {
"title": "Number"
}
},
"real": {
"id": 3,
"type": "real",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "real",
"localizeInfos": {
"title": "Real"
}
},
"float": {
"id": 4,
"type": "float",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "float",
"localizeInfos": {
"title": "Float"
}
}
},
"isVisible": true,
"properties": {},
"type": {
"id": 4,
"type": "forPages"
},
"position": 3
},
"..."
]
}

Response schema

Schema

total: number
Total items.
example: 100

items: IAttributeSetsEntity[]
IAttributeSetsEntity array containing attribute set entities.
example:

[
{
"id": 1,
"identifier": "set1"
},
{
"id": 2,
"identifier": "set2"
}
]