Description
Returns a list of recent login activity events.
GET
/v1/security/login_activity
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
pageSize | query | integer | false | Limit number of results returned (Max 100). |
page | query | integer | false | Page number to retrieve in the paginated results (0-based index). |
Code Samples
curl -X GET https://h.app.wdesk.com/s/wdata/oc/api/v1/security/login_activity \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http GET https://h.app.wdesk.com/s/wdata/oc/api/v1/security/login_activity \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=GET "https://h.app.wdesk.com/s/wdata/oc/api/v1/security/login_activity" \
--output-document - \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('https://h.app.wdesk.com/s/wdata/oc/api/v1/security/login_activity', headers = headers)
print(r.json())
Returns
200 - OK
Returns a LoginActivityResponse
containing an array of LoginActivity
objects representing login events for a company.
Example Responses
{
"data": [
{
"id": "1",
"identity": "[email protected]",
"context": "sessions#create",
"success": true,
"failure_reason": "Invalid login credentials. Please try again.",
"user_id": "1",
"ip": "1.1.1.1",
"city": "New York",
"region": "Midwest",
"country": "United States",
"created_at": "2018-03-14 20:10:39.520585"
}
]
}