Use this API to return the list of all OneLogin event types, with the id (event type ID), name, and description of each. The id values are what you pass as event_type_id when filtering List Events, and what appears in the event_type_id element of every event.
Event types change rarely. Cache the response and refresh it no more than once every 24 hours.
You can also browse and search event types with the Event Type Lookup tool.
Resource URL
https://<subdomain>.onelogin.com/api/2/events/typesHeader Parameters
Authorization required string | Set to Set The access token must have been generated using an API credential pair created using the scope required to call this API. This API can be called using any one of the following scopes: |
Sample Responses
- 200 OK
- 401 Unauthorized
The response is a JSON array of event types, sorted by id.
[
{
"id": 1,
"name": "APP_ADDED_TO_ROLE",
"description": "App %app% added to role %role%"
},
{
"id": 2,
"name": "APP_REMOVED_FROM_ROLE",
"description": "App %app% removed from role %role%"
},
{
"id": 3,
"name": "USER_ASSUMED_USER",
"description": "%actor_user% assumed %user%"
},
{
"id": 4,
"name": "USER_ASSIGNED_ROLE",
"description": "Assigned %role% to user %user%"
},
{
"id": 5,
"name": "USER_LOGGED_INTO_ONELOGIN",
"description": "%user% logged into OneLogin"
},
...
]Typically, this error means that your access token value is invalid, has expired, or was generated with a credential whose scope does not include reading events.
{
"name": "UnauthorizedError",
"message": "Authentication required",
"statusCode": 401
}Sample cURL Request
Replace sample values indicated by < > with your actual values.
curl 'https://<subdomain>.onelogin.com/api/2/events/types' \
-X GET \
-H "Authorization: bearer <access_token>"Have a Question?
Found a problem or a bug? Submit a support ticket.
Looking for walkthroughs or how-to guides? Check out our Knowledge Base.
Have a product idea or request? Share it in our Ideas Portal.