Get attributes by marker
In this example, we demonstrate how to retrieve the attribute schema for a specific attribute set by its marker using the OneEntry API.
✅ Purpose of the scenario:
- Connect to the OneEntry API
- Retrieve the attribute schema for a named attribute set
- Access attribute metadata: marker, type, label, validators, and listTitles
✅ What you need:
- A valid PROJECT_URL and APP_TOKEN for authentication with the OneEntry API.
- An attribute set configured in OneEntry with a known marker (e.g., "product")
📌 Important:
- These examples do not include error handling.
- You can manage errors using a try-catch block or by employing a construction like await Promise.catch((error) => error).
- Returns SCHEMA of attributes — NOT the actual values of entities.
- value is always {} in schema — to get real values use Products.getProducts(), Pages.getPageByUrl(), etc.
- Use listTitles to build filter options for list and radioButton type attributes.
Loading sandbox…
