{
    "openapi":"3.0.0",
    "info":{
        "description":"REST API for Risk Customer Service",
        "version":"2024.12.13",
        "title":"REST API for Customer Care Service in Oracle Advanced Risk Manager",
        "contact":{
            "email":"ngssodev_us_grp@oracle.com"
        },
        "license":{
            "name":"Apache 2.0",
            "url":"http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "x-summary":"REST API for Risk Customer Service"
    },
    "tags":[
        {
            "name":"CustomerCare"
        },
        {
            "name":"Rules"
        }
    ],
    "paths":{
        "/customercare/v1/rules":{
            "get":{
                "tags":[
                    "Rules"
                ],
                "summary":"Get rules data",
                "description":"Return all the rules excuted for the given session ID. Provides basic information of what rules got triggered, doesn't provide complete hierarchy information. Rules execution data is persisted asynchrously and may not be available immediately.",
                "operationId":"getRulesData",
                "parameters":[
                    {
                        "in":"query",
                        "name":"sessionId",
                        "required":true,
                        "description":"Session ID",
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/RuleResponse"
                                }
                            },
                            "application/xml":{
                                "schema":{
                                    "$ref":"#/components/schemas/RuleResponse"
                                }
                            }
                        }
                    },
                    "400":{
                        "description":"Invalid input"
                    },
                    "404":{
                        "description":"Session ID not found"
                    }
                },
                "x-internal-id":"customercare-v1-rules-get",
                "x-filename-id":"customercare-v1-rules-get"
            }
        },
        "/customercare/v1/{customerId}/status":{
            "get":{
                "tags":[
                    "CustomerCare"
                ],
                "summary":"Get final auth status",
                "description":"Return the final authentication status of a user. This method does not fetch data more than 30 days old.",
                "operationId":"getFinalAuthStatus",
                "parameters":[
                    {
                        "name":"customerId",
                        "in":"path",
                        "description":"It is the uniqueUserId of the user. Details can be found in the <a href='https://docs.oracle.com/en/middleware/idm/advanced-authentication/oaart/op-oaa-runtime-preferences-v1-fetchuserpreferencessecurely-put.html'>user preferences API</a>.",
                        "required":true,
                        "style":"simple",
                        "explode":false,
                        "schema":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"requestId",
                        "in":"query",
                        "description":"Request Id (session Id) for the user's session.",
                        "required":true,
                        "style":"form",
                        "explode":true,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/AuthStatusResponse"
                                }
                            },
                            "application/xml":{
                                "schema":{
                                    "$ref":"#/components/schemas/AuthStatusResponse"
                                }
                            }
                        }
                    },
                    "400":{
                        "description":"Invalid input"
                    },
                    "404":{
                        "description":"Customer ID not found"
                    }
                },
                "x-internal-id":"customercare-v1-{customerId}-status-get",
                "x-filename-id":"customercare-v1-customerid-status-get"
            }
        },
        "/customercare/v1/{customerId}/provision":{
            "put":{
                "tags":[
                    "CustomerCare"
                ],
                "summary":"Set a temporary allow",
                "description":"Sets a temporary allow for the user.",
                "operationId":"setTemporaryAllow",
                "parameters":[
                    {
                        "name":"customerId",
                        "in":"path",
                        "description":"It is the uniqueUserId of the user. Details can be found in the <a href='https://docs.oracle.com/en/middleware/idm/advanced-authentication/oaart/op-oaa-runtime-preferences-v1-fetchuserpreferencessecurely-put.html'>user preferences API</a>.",
                        "required":true,
                        "style":"simple",
                        "explode":false,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "requestBody":{
                    "$ref":"#/components/requestBodies/TempAllowRequest"
                },
                "responses":{
                    "200":{
                        "description":"Success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/StatusResponse"
                                }
                            },
                            "application/xml":{
                                "schema":{
                                    "$ref":"#/components/schemas/StatusResponse"
                                }
                            }
                        }
                    },
                    "400":{
                        "description":"Invalid input"
                    },
                    "404":{
                        "description":"Customer ID not found"
                    }
                },
                "x-internal-id":"customercare-v1-{customerId}-provision-put",
                "x-filename-id":"customercare-v1-customerid-provision-put"
            },
            "delete":{
                "tags":[
                    "CustomerCare"
                ],
                "summary":"Delete customer info",
                "description":"Deletes customer information. Requires exactly one of the following parameters to be true: cancelAllTemporaryAllows, unregisterDevices, or reset. If more than one parameter is true, then only the operation with the highest precedence will be completed. The order of precedence is cancelAllTemporaryAllows > unregisterDevices > reset.",
                "operationId":"deleteCustomerInfo",
                "parameters":[
                    {
                        "name":"customerId",
                        "in":"path",
                        "description":"It is the uniqueUserId of the user. Details can be found in the <a href='https://docs.oracle.com/en/middleware/idm/advanced-authentication/oaart/op-oaa-runtime-preferences-v1-fetchuserpreferencessecurely-put.html'>user preferences API</a>.",
                        "required":true,
                        "style":"simple",
                        "explode":false,
                        "schema":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"cancelAllTemporaryAllows",
                        "in":"query",
                        "description":"Cancel all temporary allows for the user",
                        "required":false,
                        "style":"form",
                        "explode":true,
                        "schema":{
                            "type":"boolean"
                        }
                    },
                    {
                        "name":"unregisterDevices",
                        "in":"query",
                        "description":"Unregister all devices for the user",
                        "required":false,
                        "style":"form",
                        "explode":true,
                        "schema":{
                            "type":"boolean"
                        }
                    },
                    {
                        "name":"reset",
                        "in":"query",
                        "description":"Reset all profiles set for the user, including registration, questions, images and phrases",
                        "required":false,
                        "style":"form",
                        "explode":true,
                        "schema":{
                            "type":"boolean"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/StatusResponse"
                                }
                            },
                            "application/xml":{
                                "schema":{
                                    "$ref":"#/components/schemas/StatusResponse"
                                }
                            }
                        }
                    },
                    "400":{
                        "description":"Invalid input"
                    },
                    "404":{
                        "description":"Customer ID not found"
                    }
                },
                "x-internal-id":"customercare-v1-{customerId}-provision-delete",
                "x-filename-id":"customercare-v1-customerid-provision-delete"
            }
        },
        "/customercare/v1/{customerId}/counters":{
            "delete":{
                "tags":[
                    "CustomerCare"
                ],
                "summary":"Reset challenge counters",
                "description":"Reset challenge failure counters for a given user. Must specify a questionId or challengeType, but not both.",
                "operationId":"resetChallengeFailureCounters",
                "parameters":[
                    {
                        "name":"customerId",
                        "in":"path",
                        "description":"It is the uniqueUserId of the user. Details can be found in the <a href='https://docs.oracle.com/en/middleware/idm/advanced-authentication/oaart/op-oaa-runtime-preferences-v1-fetchuserpreferencessecurely-put.html'>user preferences API</a>.",
                        "required":true,
                        "style":"simple",
                        "explode":false,
                        "schema":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"requestId",
                        "in":"query",
                        "description":"Request Id (session Id) for the user's session.",
                        "required":true,
                        "style":"form",
                        "explode":true,
                        "schema":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"questionId",
                        "in":"query",
                        "description":"If provided, failure counters for the given question ID are reset",
                        "required":false,
                        "style":"form",
                        "explode":true,
                        "schema":{
                            "type":"integer"
                        }
                    },
                    {
                        "name":"challengeType",
                        "in":"query",
                        "description":"If provided, failure counter for the given challengeType is reset. This is one of the challenge.type.enum.",
                        "required":false,
                        "style":"form",
                        "explode":true,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/StatusResponse"
                                }
                            },
                            "application/xml":{
                                "schema":{
                                    "$ref":"#/components/schemas/StatusResponse"
                                }
                            }
                        }
                    },
                    "400":{
                        "description":"Invalid input"
                    },
                    "404":{
                        "description":"Customer ID not found"
                    }
                },
                "x-internal-id":"customercare-v1-{customerId}-counters-delete",
                "x-filename-id":"customercare-v1-customerid-counters-delete"
            }
        },
        "/customercare/v1/{customerId}/session":{
            "get":{
                "tags":[
                    "CustomerCare"
                ],
                "summary":"Get rules data for last session",
                "description":"Return all the rules executed for the given user for past session. Provides basic information of what rules got triggered, doesn't provide complete hierarchy information. Rules execution data is persisted asynchrously and may not be available immediately.",
                "operationId":"getRulesDataForLastSession",
                "parameters":[
                    {
                        "name":"customerId",
                        "in":"path",
                        "description":"It is the uniqueUserId of the user. Details can be found in the <a href='https://docs.oracle.com/en/middleware/idm/advanced-authentication/oaart/op-oaa-runtime-preferences-v1-fetchuserpreferencessecurely-put.html'>user preferences API</a>.",
                        "required":true,
                        "style":"simple",
                        "explode":false,
                        "schema":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/RuleResponse"
                                }
                            },
                            "application/xml":{
                                "schema":{
                                    "$ref":"#/components/schemas/RuleResponse"
                                }
                            }
                        }
                    },
                    "404":{
                        "description":"Customer ID not found"
                    }
                },
                "x-internal-id":"customercare-v1-{customerId}-session-get",
                "x-filename-id":"customercare-v1-customerid-session-get"
            }
        },
        "/customercare/v1/{customerId}/action":{
            "get":{
                "tags":[
                    "CustomerCare"
                ],
                "summary":"Get action count",
                "description":"Get the count of an action for a user. Action should be one of the enumerated actions in rule.action.enum.",
                "operationId":"getActionCount",
                "parameters":[
                    {
                        "name":"customerId",
                        "in":"path",
                        "description":"It is the uniqueUserId of the user. Details can be found in the <a href='https://docs.oracle.com/en/middleware/idm/advanced-authentication/oaart/op-oaa-runtime-preferences-v1-fetchuserpreferencessecurely-put.html'>user preferences API</a>.",
                        "required":true,
                        "style":"simple",
                        "explode":false,
                        "schema":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"requestId",
                        "in":"query",
                        "description":"Request Id (session Id) for the user's session.",
                        "required":true,
                        "style":"form",
                        "explode":true,
                        "schema":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"actionEnumId",
                        "in":"query",
                        "description":"Action for which count is required. It should be one of rule.action.enum.",
                        "required":true,
                        "style":"form",
                        "explode":true,
                        "schema":{
                            "type":"integer"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"Success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/ActionCountResponse"
                                }
                            },
                            "application/xml":{
                                "schema":{
                                    "$ref":"#/components/schemas/ActionCountResponse"
                                }
                            }
                        }
                    },
                    "400":{
                        "description":"Invalid input"
                    },
                    "404":{
                        "description":"Customer ID not found"
                    }
                },
                "x-internal-id":"customercare-v1-{customerId}-action-get",
                "x-filename-id":"customercare-v1-customerid-action-get"
            }
        }
    },
    "components":{
        "schemas":{
            "RuleResponse":{
                "type":"object",
                "properties":{
                    "requestId":{
                        "type":"string",
                        "description":"Request ID for logging/tracking purposes"
                    },
                    "runtimeData":{
                        "type":"object",
                        "additionalProperties":{
                            "$ref":"#/components/schemas/RuntimeDataList"
                        },
                        "description":"Map of runtime IDs to runtime data lists"
                    },
                    "statusResponse":{
                        "$ref":"#/components/schemas/StatusResponse"
                    }
                }
            },
            "RuntimeData":{
                "type":"object",
                "properties":{
                    "runtime":{
                        "type":"integer"
                    },
                    "runtimeName":{
                        "type":"string"
                    },
                    "finalScore":{
                        "type":"integer"
                    },
                    "actionList":{
                        "type":"array",
                        "items":{
                            "type":"string"
                        }
                    },
                    "alertList":{
                        "type":"array",
                        "items":{
                            "$ref":"#/components/schemas/Alert"
                        }
                    },
                    "ruleList":{
                        "type":"array",
                        "items":{
                            "$ref":"#/components/schemas/Rule"
                        }
                    }
                }
            },
            "RuntimeDataList":{
                "type":"array",
                "items":{
                    "$ref":"#/components/schemas/RuntimeData"
                }
            },
            "Alert":{
                "type":"object",
                "properties":{
                    "id":{
                        "type":"integer"
                    },
                    "message":{
                        "type":"string"
                    },
                    "type":{
                        "type":"string"
                    },
                    "level":{
                        "type":"string"
                    }
                }
            },
            "Rule":{
                "type":"object",
                "properties":{
                    "ruleName":{
                        "type":"string"
                    },
                    "ruleId":{
                        "type":"integer"
                    },
                    "modelName":{
                        "type":"string"
                    },
                    "modelId":{
                        "type":"integer"
                    }
                }
            },
            "StatusResponse":{
                "type":"object",
                "description":"Status information for API call",
                "properties":{
                    "responseCode":{
                        "type":"string",
                        "description":"status code of the request"
                    },
                    "responseMessage":{
                        "type":"string",
                        "description":"response message related to the response code if needed."
                    },
                    "status":{
                        "type":"boolean",
                        "description":"authentication update request status"
                    },
                    "sessionId":{
                        "type":"string",
                        "description":"session id of the authentcation."
                    }
                }
            },
            "SessionUserData":{
                "type":"object",
                "description":"user related data",
                "required":[
                    "loginName",
                    "groupName"
                ],
                "properties":{
                    "loginName":{
                        "type":"string",
                        "description":"login name used for authentication"
                    },
                    "groupName":{
                        "type":"string",
                        "description":"group name"
                    },
                    "userId":{
                        "type":"string",
                        "description":"user identifier"
                    }
                }
            },
            "AuthStatusResponse":{
                "type":"object",
                "properties":{
                    "authStatus":{
                        "type":"integer",
                        "description":"Final authentication status of the user"
                    },
                    "statusResponse":{
                        "$ref":"#/components/schemas/StatusResponse"
                    }
                }
            },
            "TempAllowRequest":{
                "type":"object",
                "properties":{
                    "tempAllowType":{
                        "type":"integer",
                        "description":"Should be one of the enumerated types in customercare.case.tempallow.level.enum"
                    },
                    "expirationDate":{
                        "$ref":"#/components/schemas/DateTime"
                    }
                }
            },
            "ActionCountResponse":{
                "type":"object",
                "properties":{
                    "actionCount":{
                        "type":"integer",
                        "description":"value of the increment cache counter for the specified action"
                    },
                    "statusResponse":{
                        "$ref":"#/components/schemas/StatusResponse"
                    }
                }
            },
            "DateTime":{
                "type":"string",
                "description":"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6 e.g format 2021-08-13T01:29:29.768Z",
                "format":"date-time"
            }
        },
        "requestBodies":{
            "TempAllowRequest":{
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/TempAllowRequest"
                        }
                    },
                    "application/xml":{
                        "schema":{
                            "$ref":"#/components/schemas/TempAllowRequest"
                        }
                    }
                }
            }
        },
        "securitySchemes":{
            "Apikey":{
                "type":"http",
                "scheme":"basic"
            }
        }
    },
    "security":[
        {
            "Apikey":[
            ]
        }
    ]
}