v1-v3 APIs have been deprecated.
Although these APIs are not shut off yet, all new development with APIs should use the newest version of our API if available, and the version /1 in all other cases. These later versions are based on RESTful principles, secured by OAuth 2.0, and provide JSON messages, search, pagination, sorting, and filtering.
Get Events
Events are actions that occur within your organization’s OneLogin account. Events include individual user actions, administrative operations, provisioning, and OTP device registration, for example.
For a description of each element in the Event object, see Event Resource and Types.
Resource URL
Before calling this API, consider using its version /1 equivalent.
https://api.onelogin.com/api/v1/events
Parameters
from_timestamp integer |
Set to an epoch timestamp to return only events that occurred on or after the date and time indicated by the timestamp. |
page integer |
Set to the page number of the page of results you want to return. A “page” refers to the list of events returned by a single request. For example, a request made without this parameter value will return the first page of events. To return subsequent pages of events, set this value to You can use this parameter in conjunction with the |
per_page integer |
By default, this request returns 51 events. To return a different number of events, set this parameter to the number of events you want to return per page, plus 1. For example, set this value to You can use this parameter in conjunction with the page parameter to page through events. |
id integer |
Set to the event’s ID to return that event only. |
event_type_id integer |
Set to an event type ID to return only events of that event type. |
user_id integer |
Set to a user ID to return only events that reference a specific user ID. |
actor_user_id integer |
Set to an actor user ID to return only events of that reference a specific actor user ID. |
app_id integer |
Set to an app ID to return only events of that reference a specific app ID. |
Sample Response
- 200 OK
<events type="array">
<event>
<account-id>1</account-id>
<actor-system></actor-system>
<actor-user-id>11111</actor-user-id>
<actor-user-name>Benjamin Radnikov</actor-user-name>
<app-id nil="true"></app-id>
<app-name nil="true"></app-name>
<assuming-acting-user-id nil="true"></assuming-acting-user-id>
<created-at>2015-03-02T14:57:47-08:00</created-at>
<custom-message nil="true"></custom-message>
<directory-sync-run-id nil="true"></directory-sync-run-id>
<event-type-id>72</event-type-id>
<group-id nil="true"></group-id>
<group-name nil="true"></group-name>
<id>870005870</id>
<ipaddr>01.234.567.891</ipaddr>
<notes nil="true"></notes>
<otp-device-id nil="true"></otp-device-id>
<otp-device-name nil="true"></otp-device-name>
<policy-id nil="true"></policy-id>
<policy-name nil="true"></policy-name>
<role-id nil="true"></role-id>
<role-name nil="true"></role-name>
<user-id>22222</user-id>
<user-name>Olivier Katayama</user-name>
</event>
<!-- clip -->
<event>
<account-id>1</account-id>
<actor-system>Provision Command</actor-system>
<actor-user-id nil="true"></actor-user-id>
<actor-user-name>Provision Command</actor-user-name>
<app-id>12345</app-id>
<app-name>Google Apps</app-name>
<assuming-acting-user-id nil="true"></assuming-acting-user-id>
<created-at>2015-03-02T10:44:54-08:00</created-at>
<custom-message nil="true"></custom-message>
<directory-sync-run-id nil="true"></directory-sync-run-id>
<event-type-id>85</event-type-id>
<group-id nil="true"></group-id>
<group-name nil="true"></group-name>
<id>870005732</id>
<ipaddr nil="true"></ipaddr>
<notes nil="true"></notes>
<otp-device-id nil="true"></otp-device-id>
<otp-device-name nil="true"></otp-device-name>
<policy-id nil="true"></policy-id>
<policy-name nil="true"></policy-name>
<role-id nil="true"></role-id>
<role-name nil="true"></role-name>
<user-id>3333333</user-id>
<user-name>Chiharu Torrentino</user-name>
</event>
</events>
Sample cURL Request
Be sure to replace placeholder values surrounded by { }
with actual values.
curl -u {api_key}:x -X GET https://api.onelogin.com/api/v1/events
Postman Collection
- Clicking Run in Postman button navigates to the page where you can fork the collection to your workspace. Forking the collection into your workspace will enable you to contribute to the source collection using pull requests. You can also view the collection in a public workspace if you like and even import a copy of the collection using the links present on the screen.
Have a Question?
Found a problem or a bug? Submit a support ticket.
Looking for walkthroughs or how-to guides on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.
Have a product idea or request? Share it with us in our Ideas Portal.