User Login Report

The User Login Report REST API generates a report for all the users logged into the environment. The report can be created for a specific user login and/or within a valid date range.

The API is synchronous and returns the outcome of the operation in the response. Any non-zero status indicates that generating User Login Report failed.

This API is version v1.

Required Roles

  • Service Administrator

  • Any predefined role and the Access Control - Manage application role

  • Any predefined role and the Access Control - View application role

REST Resource

GET /interop/rest/security/v1/report/userloginreport?userlogin=<USERLOGIN>&from_date=<FROM_DATE>&to_date=<TO_DATE>'

Note:

Before using the REST resources, you must understand how to access the REST resources and other important concepts. See Implementation Best Practices for Cloud EPM REST APIs. Using this REST API requires prerequisites. See Prerequisites.

Table 12-83 Tasks for User Login Report

Task Request REST Resource
User Login Report GET /interop/rest/security/v1/report/userloginreport?userlogin=<USERLOGIN>&from_date=<FROM_DATE>&to_date=<TO_DATE>'

Request

Supported Media Types: application/json

Table 12-84 Request Parameters

Name Description Type Required Default
userlogin

Generates a User Login report for the specified user only.

Query No All Users
from_date

Generates a User Login report for the specified start date only. If this parameter is not specified, the report is generated for the current date.

The start date for the report is in YYYY-MM-DD format.

Query No Today's Date
to_date

Generates a User Login report for the specified end date only. If this parameter is not specified, the report is generated for the current date.

The end date for the report is in YYYY-MM-DD format.

Query No Today's Date

Response

Supported Media Types: application/json

Table 12-85 Response Parameters

Name Description
links Detailed information about the link and HTTP call type
status

Status of the operation

  • 0: Operation succeeded

  • 1: Operation failed

error Detailed information about the error
details Records matching the request

Examples of Response Body

The following examples show the contents of the response body in JSON format:

Example 1: Job Issued with No Parameters and Completes without Errors

{
  "links": {
    "href": "https://<BASE-URL>/interop/rest/security/v1/report/userloginreport",
    "action": "GET"
  },
  "status": 0,
  "error": null,
  "details": [
    {
      "userlogin": "John",
      "ipaddress": "10.69.112.149",
      "accessdateandtime": "July 3, 2025 11:34:33 UTC"
    },
    {
      "userlogin": "Alex",
      "ipaddress": "10.14.110.178",
      "accessdateandtime": "July 3, 2025 13:45:21 UTC"
    },
    {
      "userlogin": "Clark",
      "ipaddress": "10.54.123.118",
      "accessdateandtime": "July 3, 2025 17:23:47 UTC"
    }
  ]
}

Example 2: Job Issued with "from_date" and "to_date " Query Parameters and Completes without Errors

{
  "links": {
    "href": "https://<BASE-URL>/interop/rest/security/v1/report/userloginreport?from_date=2025-06-24&to_date=2025-07-03",
    "action": "GET"
  },
  "status": 0,
  "error": null,
  "details": [   
   {
      "userlogin": "Clark",
      "ipaddress": "10.54.123.118",
      "accessdateandtime": "June 27, 2025 17:23:47 UTC"
    },
    {
      "userlogin": "Alex",
      "ipaddress": "10.14.110.178",
      "accessdateandtime": "July 2, 2025 13:45:21 UTC"
    },
    {
      "userlogin": "John",
      "ipaddress": "10.69.112.149",
      "accessdateandtime": "July 3, 2025 11:34:33 UTC"
    }
  ]
}

Example 3: Job Completes with Errors

{
  "links": {
    "href": "https://<BASE-URL>/interop/rest/security/v1/report/userloginreport?userlogin=clark&from_date=2024-06-24&to_date=2024-07-03",
    "action": "GET"
  },
  "status": 1,
  "error": {
    "errorcode": "EPMCSS-21192",
    "errormessage": "Failed to generate User Login Report. Authorization failed. Please provide valid authorized user."
  },
  "details": null
}

Sample cURL Command Basic Auth

curl -X GET -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json' 'https://<BASE-URL>/interop/rest/security/v1/report/userloginreport'
curl -X GET -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json' 'https://<BASE-URL>/interop/rest/security/v1/report/userloginreport?from_date=2024-06-24&to_date=2024-07-03'
curl -X GET -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json' 'https://<BASE-URL>/interop/rest/security/v1/report/userloginreport?userlogin=John&from_date=2024-06-24&to_date=2024-07-03'

Sample cURL Command OAuth 2.0

curl -X GET --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/json' 'https://<BASE-URL>/interop/rest/security/v1/report/userloginreport'
curl -X GET --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/json' 'https://<BASE-URL>/interop/rest/security/v1/report/userloginreport?from_date=2024-06-24&to_date=2024-07-03'
curl -X GET --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/json' 'https://<BASE-URL>/interop/rest/security/v1/report/userloginreport?userlogin=John&from_date=2024-06-24&to_date=2024-07-03'