Event Cloud offers Custom Roles for you to fine-tune what you offer to which Attendees. This article will go over how to get Custom Role information from the API. It will go over:
- CustomRoles endpoint
- Users endpoint
- SessionTypes endpoint
- Sessions endpoint
Note: Custom Roles can be assigned to Session Types and/or Sessions. If it's assigned to a Session, that will take precedence over the Custom Roles allowed to the Session Type. Consult with the event administrator to determine what logic is most appropriate for your event.
CustomRoles
This is how you can get Custom Role information from the API:
GET /api/{version}/{eventId}/CustomRoles
This will return a list of Custom Roles available for the event.
{
"Id": 0,
"Title": "string",
"Description": "string"
}
Users
This is how you can get Custom Role information from the API:
GET /api/{version}/{eventId}/Users?$expand=UserCustomRoles
This will return all users, and it will expand the Custom Role field, allowing you to see the Custom Role data from the Users endpoint. This is a sample of the kind of data that could be returned:
"UserCustomRoles": [{
"CustomRole" : "Example Custom Role",
"UserId" : 0,
"CustomRoleId" : 0,
"Id" : 0
}]
SessionTypes
This is how you can get Custom Role information from the API:
GET /api/{version}/{eventId}/SessionTypes?$expand=AllowedCustomRoles
This will return a list of Custom Roles that are allowed to see that SessionType's sessions. Only these Attendees are allowed to have access to the sessions tagged as the SessionType.
"AllowedCustomRoles": [{
"Id": 0,
"SessionId": 0,
"SessionTypeId": 0,
"CustomRoleId": 0
}]
Sessions
This is how you can get Custom Role information from the API:
GET /api/{version}/{eventId}/Sessions?$expand=AllowedCustomRoles
This will return a list of Custom Roles allowed to see this specific Session. Only Attendees with these Custom Roles are allowed to have access to the session.
"AllowedCustomRoles": [{
"Id": 0,
"SessionId": 0,
"SessionTypeId": 0,
"CustomRoleId": 0
}]
Comments
Please sign in to leave a comment.