Skip to main content

getAdminsInfo

Get all administrator accounts.

Description​

Fetches administrator accounts and resolves to an array of IAdminEntity objects.

.getAdminsInfo(

, , ,

);

Parameters schema​

Schema

body: IFilterParams[]
Filter objects with search conditions. Default: [].
example:

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

body.attributeMarker: string
Marker of the indexed attribute to filter by. Optional: a filter entry can select by statusMarker, pageUrls or title alone, for example { statusMarker: "in_stock" }.
example: "color"

body.conditionMarker: string | null
Marker of the filter condition, such as eq. Default: null.
example: "eq"

body.conditionValue: number | string | null
Value to compare against. Required together with attributeMarker. Default: null.
example: "new"

body.pageUrl: string | null
Not supported by the API and ignored. Use pageUrls.
example: "23-laminat-floorwood-maxima"

body.pageUrls: string[] | null
URLs of the category pages.
example: ["23-laminat-floorwood-maxima"]

body.statusMarker: string | null
Marker of the product status. Not set by default.
example: "in_stock"

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

body.isNested: boolean
Whether to include products from the nested categories of the pages in pageUrls. Default: false.
example: true

langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"

offset: number
Number of records to skip. Default: 0. offset + limit must not exceed 200; a larger window is rejected with 400.
example: 0

limit: number
Maximum number of records to return. Default: 30.
example: 30

Record limit. If the user group's permission for this method allows only restricted reading, the API returns at most the number of records set in the project settings (10 by default), whatever limit you pass. With full read access, limit works as usual. See Module permissions (opens in a new tab).

Examples​

Minimal example​

const response = await Admins.getAdminsInfo();

Example with a filter​


/** @type {import('oneentry').[]} */
const body = [
{
,
,
}
];

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
eqEqualnum = 1
neqNot equalnum ≠ 1
inContains the value as a substring (case-insensitive)num in "1"
ninDoesn't contain the value as a substringnum nin "1"
mthMore thannum > 1
lthLess thannum < 3
exsExists (has value)num has a value
nexsDoes not existnum is empty
patMatches patterntitle matches "*man*"
sameHas any non-empty value (conditionValue is ignored)num has a value
same_partNot applied by the admins endpoint: conditionValue is ignoredno filtering

conditionValue: The value to compare against: a single value (number | string | null), not an array.

Example response​

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

Response schema​

Schema: IAdminEntity[]

id: number
Object ID.
example: 1764

attributeSetId: number | null
ID of the attribute set in use.
example: 120

identifier: string
Not returned by the Content API: it was the admin's sign-in login, and the platform no longer sends it. Kept optional for compatibility.

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

position: number | null
Position used for sorting.
example: 1

isSync: boolean
Whether the admin has attribute data in the requested language (false with empty attributeValues otherwise).
example: true

attributeValues: IAttributeValues
Attribute values keyed by attribute marker.
example:

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

formModuleConfigs: IFormConfig[]
Form configurations of the module associated with the admin (the API key is formModuleConfigs).
example: []

formModuleConfigs.id: number
ID of the form configuration.
example: 123

formModuleConfigs.formId: number
Numeric ID of the form the configuration belongs to. Returned by the Forms API (getFormByMarker).
example: 6

formModuleConfigs.moduleId: number
Numeric ID of the module the configuration belongs to. Returned by the Forms API (getFormByMarker).
example: 4

formModuleConfigs.formIdentifier: string
Marker of the form (products and pages API only).
example: "review"

formModuleConfigs.moduleIdentifier: string
Marker of the module the form configuration belongs to.
example: "module_identifier"

formModuleConfigs.isGlobal: boolean
Whether the form configuration is global.
example: true

formModuleConfigs.isClosed: boolean
Whether the form configuration is closed.
example: true

formModuleConfigs.isModerate: boolean
Whether the form requires moderation. Returned only by the Products and Pages APIs.
example: false

formModuleConfigs.viewOnlyUserData: boolean
Whether users see only the form data they submitted themselves.
example: true

formModuleConfigs.commentOnlyUserData: boolean
Whether commenting is limited to user data (forms API).
example: true

formModuleConfigs.viewOnlyMyData: boolean
Whether users can view only their own form data. Returned only by the Products and Pages APIs.
example: false

formModuleConfigs.commentOnlyMyData: boolean
Whether commenting is limited to the user's own data (products and pages API).
example: false

formModuleConfigs.entityIdentifiers: object[]
Entities the form configuration is attached to.

formModuleConfigs.nestedEntityIdentifiers: string[]
Markers of nested entities. Returned only by the Products and Pages APIs.
example: ["catalog"]

formModuleConfigs.exceptionIds: string[]
Exception IDs.

formModuleConfigs.formDataCount: number
Total number of form records (products and pages API only).
example: 306

formModuleConfigs.entityFormDataCount: Record<string, number>
Number of form records per entity ID (products and pages API only).
example:

{"catalog": 306}

formModuleConfigs.isRating: boolean | null
Whether this form configuration collects ratings.
example: null

formModuleConfigs.isAnonymous: boolean | null
Whether anonymous submissions are allowed.
example: null

formModuleConfigs.allowHalfRatings: boolean | null
Whether half-star ratings are allowed.
example: null

formModuleConfigs.allowRerating: boolean | null
Whether a user can rate the same entity again.
example: null

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

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

distance: number
Cosine distance to the query. Returned on every item by the semantic (vector) search endpoint.
example: 0.12