Skip to main content

getAdminsInfo

Getting all objects of user-administrators.

Description

This method retrieves user objects of type admin from the API. It returns a Promise that resolves to an array of IAdminEntity objects.

Admins.getAdminsInfo(

body, langCode, offset, limit

);

Parameters schema

Schema

body: IFilterParams[]
Array of filter objects with search conditions. Default: []
example:

[
{
"attributeMarker": "num",
"conditionMarker": "mth",
"conditionValue": 1
},
{
"attributeMarker": "num",
"conditionMarker": "lth",
"conditionValue": 3
}
]

body.attributeMarker(required): string | null
The text identifier of the indexed attribute by which values are filtered. Default: null.
example: "color"

body.conditionMarker: string | null
Id of the filter condition by which the values are filtered. Default: null.
example: "equals"

body.conditionValue(required): number | null
The value that is being searched for, default null.
example: "new"

body.pageUrl: string | null
Url of the category page object.
example: ["23-laminat-floorwood-maxima"]

body.pageUrls: string[] | null
Url of the category page object.
example: ["23-laminat-floorwood-maxima"]

body.statusMarker: string | null
Text identifier of the product page status (default not set).
example: "in_stock"

body.title: string | null
Product name.
example: "Laminatboden Maxima"

body.isNested: boolean
Flag for nested attributes, default false.
example: true

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

offset: number
Parameter for pagination. Default: 0
example: 0

limit: number
Parameter for pagination. Default: 30
example: 30

By default, you can retrieve 10 objects. This is due to the record limit in the module's permissions settings.
For pagination to work correctly, you need to configure Module permissions according to your needs in the corresponding section.

Examples

Minimal example

const response = await Admins.getAdminsInfo();

Example with attributes


const body = [
{
"attributeMarker": "num",
"conditionMarker": "mth",
"conditionValue": 1
}
];

const response = await Admins.getAdminsInfo(body, "en_US", 0, 30);

Use filters to find specific admins:

attributeMarker: The text identifier of the indexed attribute by which values are filtered. conditionMarker: The type of condition to apply to the attribute value.

MarkerMeaningExample
eqEqualstatusId = 1 (active only)
neqNot equalrole ≠ "Viewer"
inContains (one of)role in ["Editor", "Manager"]
ninNot containsemail not in ["@temp.com"]
exsExists (has value)Has lastLogin
nexsDoes not existNever logged in

conditionValue: The value to compare against.

Example response

[
{
"id": 2,
"attributeSetId": 27,
"identifier": "Aleksandr",
"attributeSetIdentifier": "admins",
"position": 1,
"isSync": false,
"attributeValues": {},
"moduleFormConfigs": []
},
{
"id": 1,
"attributeSetId": 27,
"identifier": "admin",
"attributeSetIdentifier": "admins",
"position": 2,
"isSync": true,
"attributeValues": {
"admin-text": {
"type": "string",
"value": "",
"position": 0,
"additionalFields": {}
}
},
"moduleFormConfigs": []
},
{
"id": 4,
"attributeSetId": null,
"identifier": "developer_admin",
"attributeSetIdentifier": null,
"position": 3,
"isSync": false,
"attributeValues": {},
"moduleFormConfigs": []
}
]

Response schema

Schema: IAdminEntity[]

id: number
The identifier of the object.
example: 1764

attributeSetId: number | null
The identifier of the attribute set being used.
example: 120

identifier: string
The textual identifier for the record field.
example: "admin1"

attributeSetIdentifier: string | null
The identifier of the attribute set.
example: "admins"

position: number | null
Position number (for sorting).
example: 1

isSync: boolean
Page indexing flag (true or false).
example: true

attributeValues: IAttributeValues
Array of attribute values from the index (presented as a pair of user attribute identifier: attribute value).
example:

[
{
"marker": {
"type": "string",
"value": "Some value"
}
}
]

moduleFormConfigs: IFormConfig[]
Array of module form configurations associated with the admin.

moduleFormConfigs.id: number
The identifier of the form configuration.
example: 123

moduleFormConfigs.formIdentifier: string
The form identifier (only in products/pages API).
example: "review"

moduleFormConfigs.moduleIdentifier: string
The identifier of the module associated with the form configuration.
example: "module_identifier"

moduleFormConfigs.isGlobal: boolean
Indicates whether the form configuration is global.
example: true

moduleFormConfigs.isClosed: boolean
Indicates whether the form configuration is closed.
example: true

moduleFormConfigs.isModerate: boolean
Indicates whether the form requires moderation (only in products/pages API).
example: false

moduleFormConfigs.viewOnlyUserData: boolean
Indicates whether the form configuration allows viewing user data (used in forms API).
example: true

moduleFormConfigs.commentOnlyUserData: boolean
Indicates whether the form configuration allows commenting on user data (used in forms API).
example: true

moduleFormConfigs.viewOnlyMyData: boolean
Indicates whether the form configuration allows viewing my data (used in products/pages API).
example: false

moduleFormConfigs.commentOnlyMyData: boolean
Indicates whether the form configuration allows commenting on my data (used in products/pages API).
example: false

moduleFormConfigs.entityIdentifiers: object[]
An array of entity identifiers associated with the form configuration.

moduleFormConfigs.nestedEntityIdentifiers: string[]
An array of nested entity identifier strings (only in products/pages API).
example: ["catalog"]

moduleFormConfigs.exceptionIds: string[]
An array of exception identifiers.

moduleFormConfigs.formDataCount: number
Total count of form data entries (only in products/pages API).
example: 306

moduleFormConfigs.entityFormDataCount: Record<string, number>
Form data count per entity identifier (only in products/pages API).
example: {"catalog": 306}

moduleFormConfigs.isRating: boolean | null
Indicates whether this form config is for ratings.
example: null

moduleFormConfigs.isAnonymous: boolean | null
Indicates whether anonymous submissions are allowed.
example: null

moduleFormConfigs.allowHalfRatings: boolean | null
Indicates whether half ratings are allowed.
example: null

moduleFormConfigs.allowRerating: boolean | null
Indicates whether re-rating is allowed.
example: null

moduleFormConfigs.maxRatingScale: number | null
Maximum rating scale value.
example: 5

moduleFormConfigs.ratingCalculation: string
Rating calculation method.
example: "average"