Invalid Login Report (v1)

Users who have both a Service Administrator role and an Identity Domain Administrator role can use this API to generate an Invalid Login Report. This allows you to automate reporting on unsuccessful login attempts. This report shows unsuccessful login attempts for users within the provided time frame. This report can be generated for the previous 90 days from the current date. You can download the report using the Download REST API. This report shows all the unsuccessful login attempts to the corresponding Identity Cloud Service. These may not all be to this particular Oracle Fusion Cloud EPM instance.

This is an asynchronous job and uses the job status URI to determine if the operation is complete.

The presence of status -1 in the response indicates that the generation of the report is in progress. Use the job status URI to determine whether the generation of the report is complete. Any non-zero status except -1 indicates failure of generating the report.

The default retention period for audit data is 30 days; however, you can extend the retention period up to a maximum of 90 days from the Identity Console. If you want a longer duration of audit data, download an Invalid Login Report and archive it.

Required Roles

Identity Domain Administrator and any application role (Service Administrator, Power User, User, or Viewer)

REST Resource

POST /interop/rest/security/v1/invalidloginreport

Table 2-110 Tasks for Invalid Login Report

Task Request REST Resource
Invalid Login Report POST

/interop/rest/security/v1/invalidloginreport/

Invalid Login Report Status GET

/interop/rest/security/{api_version}/jobs/{jobId}

Request

Supported Media Types: application/x-www-form-urlencoded

The following table summarizes the request parameters.

Table 2-111 Parameters

Name Description Type Required Default
nDays Number of days for which audit records should be exported. Maximum value is 90. Form No None
from_date The start date for the report (in YYYY-MM-DD format) Form No None
to_date The end date for the report (in YYYY-MM-DD format) Form No None
filename CSV file where the report is to be populated, such as InvalidLoginReport.csv Form Yes None

Note:

Date range validations are performed for the nDays, from_date, and to_date values:
  • You must specify either ndays or a date range using the from_date and to_date parameters.
  • The from_date cannot be earlier than the allowed maximum retention period specified by the Audit Retention Period (days) setting in the Oracle Cloud Identity Console.
  • The to_date cannot be later than the maximum retention period from the from_date.
  • The to_date cannot be earlier than the from_date.

Response

Supported Media Types: application/json

Table 2-112 Parameters

Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to get the status
data Parameters as key value pairs passed in the request

Sample Invalid Login Report


Sample Invalid Login report

Examples of Response Body

The following show examples of the response body in JSON format.

Response 1: Job is in Progress

{
    "links": [
        {
            "rel": "self",
            "href": "https://<BASE-URL>/interop/rest/security/<api_version>/invalidloginreport",
            "data": {
                "jobType": "GENERATE_INVALID_LOGIN_REPORT",
                "to_date": "<toDate>",
                "filename": "<filename>",
                "from_date": "<fromDate>"
                "nDays": "<nDays>"
            },
            "action": "POST"
        },
        {
            "rel": "Job Status",
            "href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/<job_id>",
            "data": null,
            "action": "GET"
        }
    ],
    "details": null,
    "status": -1,
    "items": null
}

Response 2: Job Completes with Errors

{
    "links": [
        {
            "data": {
                "jobType": "GENERATE_INVALID_LOGIN_REPORT",
		    "from_date": " ",
		    "to_date": " ",
                "filename": " "
                "nDays": " "
            },
            "action": "POST",
            "href": "https://<BASE-URL>/interop/rest/security/{api_version}/invalidloginreport",
            "rel": "self"
        }
    ],
    "status": 1,
    "details": "EPMCSS-20679: Failed to generate Invalid Login Report. Invalid or insufficient parameters specified. Provide all required parameters for the REST API. ",
    "items": null
}

Response 3: Job Completes without Errors

{
    "links": [
        {
            "data": null,
            "action": "GET",
            "href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/<jobID>",
            "rel": "self"
        }
    ],
    "status": 0,
    "details": null,
    "items": null
}

Response 4

{
  "links": [
    {
      "href": "https://<BASE-URL>/interop/rest/security/<api_version>/invalidloginreport",
      "action": "POST",
      "rel": "self",
      "data": {
        "filename": "<filename>",
        "from_date": "",
        "to_date": "",
        "nDays": "<nDays>",
        "jobType": "GENERATE_INVALID_LOGIN_REPORT"
      }
    },
    {
      "href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/<job_id>",
      "action": "GET",
      "rel": "Job Status",
      "data": null
    }
  ]
}

Sample cURL Command Basic Auth

curl -X POST -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/x-www-form-urlencoded' -d 'nDays=90&filename=invalidLoginReport.csv' 'https://<BASE-URL>/interop/rest/security/v1/invalidloginreport'

Sample cURL Command OAuth 2.0

curl -X POST --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H'Content-Type: application/x-www-form-urlencoded' -d 'nDays=90&filename=invalidLoginReport.csv' 'https://<BASE-URL>/interop/rest/security/v1/invalidloginreport'