GET Roles
/web/academy/roles
List all hero roles available in the game (Tank, Fighter, Assassin, Mage, Marksman, Support). Supports query parameters for pagination, sorting, and localization.
Query parameters:
- size: Number of items per page (minimum: 1).
- index: Page index (starting from 1).
- order: Sort order for results. Allowed values:
asc,desc. - lang: Language code for localized content (default:
en).
The response includes role data:
- records: Array of role entries, each containing:
- _id: Unique record identifier.
- caption: Localized role caption (e.g., '坦克', '法师').
- configId: Configuration ID.
- createdAt: Creation timestamp.
- createdUser: Creator username.
- updatedAt: Last update timestamp.
- updatedUser: Last updater username.
- data:
- emblem_id: Emblem ID associated with the role.
- emblem_title: Emblem title (e.g., 'Tank', 'Mage').
- emblem_icon: Emblem icon URL.
- emblem_detail:
- _id: Emblem detail record ID.
- _createdAt: Creation timestamp.
- _updatedAt: Last update timestamp.
- data:
- emblemid: Emblem ID.
- emblemname: Emblem name (e.g., 'Assassin').
- emblemattrid: Attribute ID.
- emblemattr: Attribute bonuses (e.g., '+500 Extra Max HP').
- attriicon: Attribute icon URL.
- attriicon2: Secondary attribute icon URL (optional).
- emblembg: Background indicator.
This endpoint is useful for:
- Displaying role categories.
- Explaining role-specific attributes and emblem bonuses.
- Guiding players in hero selection based on roles.