See api-docs Menu

v1-v3 APIs have been deprecated

Don't worry, these APIs are deprecated, but they won't be shut off until 2017, at the earliest. Questions? Contact devsupport@onelogin.com.

All new development with APIs should use the newest version of our API: /1. API /1 is based on RESTful principles, is secured by OAuth 2.0, and provides 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

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 2, 3, and so forth.

You can use this parameter in conjunction with the per_page parameter to control the number of events you want to display per page.

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 n to return n+1 events.

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

<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

Be sure to set Postman-specific environment variables indicated by {{ }}.

Download for the Events API