Get Audit

Returns the audit log for a project.

Endpoint Supported methods Full URL
/api/v1/projects/<YOUR_PROJECT_ID>/audit GET api.mpin.io/api/v1/projects/<YOUR_PROJECT_ID>/audit

# Endpoint Authentication

  • Basic - The client ID and secret are used as a username:password pair for the HTTP Basic authentication of the request.

# Parameters

Name Type Required Description
projectId Path True Project ID
applicationId Query False Application ID
fromDate Query False Start date of the period
toDate Query False End date of the period
userId Query False User ID by which to filter the result set
mpinId Query False MPin ID by which to filter the result set
deviceName Query False Device name by which to filter the result set
offset Query False List offset
limit Query False List response limit

# Request Example

curl \
  --user "${YOUR_CLIENT_ID}:${YOUR_CLIENT_SECRET}" \
  "https://api.mpin.io/api/v1/projects/${YOUR_PROJECT_ID}/audit?fromDate=2021-06-01T00:00:00Z&toDate=2021-07-01T00:00:00Z&userId=${USER_ID}&limit=10&offset=0"

# Response Example

{
  "total": 1,
  "list": [
    {
      "IPAddress": "87.227.194.151",
      "appID": "353f337f-ed78-4436-8f3c-5389ed83555c",
      "appName": "Test",
      "country": "UK",
      "createdAt": "2021-10-01T07:52:27.204579Z",
      "deviceName": "Chrome on Linux",
      "eventStatus": "authenticate_success",
      "eventType": "authentication",
      "mpinID": "c324f5e55e377de0343f37019ad5b77b8b01bdfee40014a54d76fd934e36a792",
      "userID": "test@example.com"
    }
  ]
}

# Errors

# INVALID_REQUEST_PARAMETERS

Missing or invalid parameters from the request. You can see the affected parameter(s) in the context of the error. For information about the possible parameters, see the Parameters section above.

{
  "error": "INVALID_REQUEST_PARAMETERS",
  "info": "Missing or invalid parameters from the request.",
  "context": {
    "params": "projectId"
  }
}