User Login Report

This REST API generates the User Login Report containing information on the users who accessed the environment within a specified date range The report lists the user name, IP address of the device used to access the environment, and the date and time (UTC) at which the user accessed the environment.

Additionally, you can use the report_name parameter to pass a report name with .CSV extension to generate the report with a specific name. This report can then be downloaded using the download API. In the resulting report file, the first character is the Byte Order Mark (BOM) character \ufeff. It is followed by an encrypted application identifier enclosed in double quotes. Headers for the CSV file follow the application identifier.

This API, by default, generates the report in JSON format if a value for the report_name parameter is not specified.

The API is synchronous and returns the outcome of the operation in the response. A non-zero status indicates a failure in generating the User Login Report.

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>&report_name=<REPORT_NAME>

Request

Supported Media Types: application/json

Table 12-92 Request Parameters

Name Description Type Required Default
userlogin

The login name of the user, if you are creating this report for a specific user.

Query No All Users
from_date

The start date of the period for which the report is to be generated in YYYY-MM-DD format.

Query No Today's Date
to_date

The end date of the period for which the report is to be generated in YYYY-MM-DD format.

Query No Today's Date
report_name

A unique file name for the report. The generated report is stored in the inbox.

The .CSV extension must be a part of the file name

Query No None

Response

Supported Media Types: application/json

Table 12-93 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

If a report name is specified using the report_name parameter, either a success message or an error message summarizing the encountered error.

Examples of Response Body

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

Example 1: Execution with No Parameters -- 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: Execution with from_date and to_date Query Parameters -- 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: Execution with userlogin, from_date, and to_date Query Parameter -- Completes without Errors

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

Example 4: Execution with report_name Parameter -- Completes without Errors

{
    "links": {
        "href": "https://<BASE-URL>/interop/rest/security/v1/report/userloginreport?report_name=UserLoginReport.csv",
        "action": "GET"
    },
    "status": 0,
    "error": null,
    "details": "User Login Report generated successfully.",
    "message": null
}

Example 5: Execution with report_name Parameter -- Completes with Errors

{
    "links": {
        "href": "https://<BASE-URL>/interop/rest/security/v1/report/userloginreport?report_name=UserLoginReport.csv",
        "action": "GET"
    },
    "status": 1,
    "error": {
        "errorcode": "EPMCSS-20685",
        "errormessage": "Failed to generate User Login Report. File UserLoginReport.csv already exists.Please provide different file name. "
    },
    "details": null,
    "message": "Failed to generate User Login Report. File UserLoginReport.csv already exists.Please provide different file name. "
}

Example 6: Execution 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'
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&report_name=UserLoginReport.csv'

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'
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&report_name=UserLoginReport.csv '