External Custom Validation REST API Specification

Use this API specification to provide a REST API endpoint that enables Oracle Fusion Cloud Enterprise Data Management to validate request items using logic and data residing in an external system.

Cloud EDM calls this API when request items are validated using an External custom validation. The external system validates the request data and returns validation messages for any request items or actions that fail validation. The response is then used by Cloud EDM to display the validation issues with the severity specified in the custom validation.

REST Resource

To run external custom validations:

HTTP Method: POST

Path: Configured external validation path as defined in the External Validation global connection

Path example: /api/rest/externalValidation

Note:

Request Body and Response are required to run external custom validations.

To test the External Validation global connection: (see Creating Global Connections)

HTTP Method: GET

Path: Configured external validation path as defined in the External Validation global connection

Path example: /api/rest/externalValidation

Note:

Request Body and Response are not required to test the global connection.

Authentication

HTTP requests to the external system should supply HTTP Basic Authentication credentials through the Authorization header.

API Request

Supported Media Types: application/json

The following table summarizes the client request.

Table -26 Parameters

Name Description Required Default
requestId The EDM request identifier Yes None
applicationId The EDM application identifier Yes None
validationId The EDM custom validation identifier. Yes None
validationKey The external validation program name Yes None
data (see Table -27) Collection of validation data grouped by dimension Yes None

Table -27 Parameters for data

Name Description Required Default
dimensionId The EDM dimension identifier Yes None
dimensionName The external dimension name from the Application Dimension. Yes None
nodeTypeId The EDM node type identifier. Yes None
dataSetKey The external data set name Yes None
nodes (see Table -28) Collection of nodes being validated Yes None

Table -28 Parameters for nodes

Name Description Required Default
nodeName The EDM node name Yes None
actions (see Table -29) Collection of actions associated with the node. Yes None

Table -29 Parameters for actions

Name Description Required Default
actionId The EDM action identifier Yes None
actionType The action type being validated. Valid values include add, delete, insert, remove, move, reorder, rename, and update. Yes None
parentName The parent node name. Required when the action is in a hierarchy view. None
oldParentName The previous parent node name for a move action. Required for move actions. None
previousSibling The previous sibling node name for a reorder action. Use null if the node is being moved to the first position. Required for reorder actions. None
newName The new node name for a rename action. Required for rename actions. None
propertyName The property name for an update action. Required for update actions. None
propertyFromValue The current property value for an update action. Required for update actions. None
propertyToValue The updated property value for an update action. Required for update actions. None

Example Request

{
  "requestId": "edm_request_id",
  "applicationId": "edm_application_id",
  "validationId": "edm_custom_validation_id",
  "validationKey": "external_program_name",
  "data": [
    {
      "dimensionId": "edm_dimension_id",
      "dimensionName": "dimension_name",
      "nodeTypeId": "edm_node_type_id",
      "dataSetKey": "external_data_set_name",
      "nodes": [
        {
          "nodeName": "edm_node_name",
          "actions": [
            {
              "actionId": "edm_action_id",
              "actionType": "add",
              "parentName": "edm_parent_node_name"
            },
            {
              "actionId": "edm_action_id",
              "actionType": "delete",
              "parentName": "edm_parent_node_name"
            },
            {
              "actionId": "edm_action_id",
              "actionType": "insert",
              "parentName": "edm_parent_node_name"
            },
            {
              "actionId": "edm_action_id",
              "actionType": "remove",
              "parentName": "edm_parent_node_name"
            },
            {
              "actionId": "edm_action_id",
              "actionType": "move",
              "parentName": "edm_parent_name",
              "oldParentName": "edm_old_parent_name"
            },
            {
              "actionId": "edm_action_id",
              "actionType": "reorder",
              "parentName": "edm_parent_node_name",
              "previousSibling": "edm_previous_sibling"
            },
            {
              "actionId": "edm_action_id",
              "actionType": "rename",
              "parentName": "edm_parent_node_name",
              "newName": "edm_new_name"
            },
            {
              "actionId": "edm_action_id",
              "actionType": "update",
              "propertyName": "edm_property_name",
              "propertyFromValue": "edm_property_from_value",
              "propertyToValue": "edm_property_to_value",
              "parentName": "edm_parent_node_name"
            }
          ]
        }
      ]
    }
  ]
}

API Response

Supported Media Type: application/json

Table -30 Parameters

Name Description Required Default
requestId The EDM request identifier Yes None
applicationId The EDM application identifier Yes None
validationId The EDM custom validation identifier. Yes None
validationKey The external validation program name Yes None
data (see Table -31) Collection of validation results grouped by dimension Yes None

Table -31 Parameters for data

Name Description Required Default
dimensionId The EDM dimension identifier Yes None
nodeTypeId The EDM node type identifier. Yes None
dataSetKey The external data set name Yes None
nodes (see Table -32) Collection of nodes with validation results Yes None

Table -32 Parameters for nodes

Name Description Required Default
nodeName The EDM node name Yes None
message A node-level validation message returned by the external system. No None
severity The severity of the node-level validation message. No None
validationMessages (see Table -33) Collection of action-level validation messages. Yes None

Table -33 Parameters for validationMessages

Name Description Required Default
actionID The EDM action identifier Yes None
actionType The action type that failed validation. Yes None
message The validation message returned by the external system. Yes None
severity The severity of the action-level validation message. No Error

Example Response

{
  "requestId": "edm_request_id",
  "applicationId": "edm_application_id",
  "validationId": "edm_custom_validation_id",
  "validationKey": "external_program_name",
  "data": [
    {
      "dimensionId": "edm_dimension_id",
      "nodeTypeId": "edm_node_type_id",
      "dataSetKey": "external_data_set_name",
      "nodes": [
        {
          "nodeName": "edm_node_name",
          "message": "external_validation_message",
          "severity": "warning",
          "validationMessages": [
            {
              "actionId": "edm_action_id",
              "actionType": "delete",
              "message": "external_validation_message",
              "severity": "error"
            }
          ]
        }
      ]
    }
  ]
}

Example

The following example shows how to run an external validation by submitting a post request on the REST resource using cURL.

cURL Command

curl --user external_user -X POST -H "Content-Type: application/json" -d @example_request_payload.json https://externalhostname.example.com/api/rest/externalValidation