search cancel

AE API REST endpoint folderobjects requires a certain order of json payload

book

Article ID: 202797

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

In AE 12.3.x API REST it is possible to use  POST https://hostname:8088/ae/api/v1/<client>/folderobjects endpoint and provide a single JSON to import a Folder and multiple objects in one go.

The problem is that if the path attribute comes before data, the import will fail with the error:

Error message:
{
    "code": 45110,
    "error": "An Automation Engine internal error occured.",
    "details": "No detail information available."
}

If you reverse the order, it works. It seems that the JSON parser in the AE does not use the name of the attribute here, but the position.

This structure leads to an error:
{
    "data": [
        {
            "path" : "ANWENDUNGEN/VIP/COMP/HYPERV/GET_VM",
            "data" : {
              "scri" : {
                "metadata" : {
                  "version" : "12.3.0"
                },
                "general_attributes" : {
                  "minimum_ae_version" : "11.2",
                  "auto_deactivation" : "A",
                  "child_flags" : "00000000000000000000000000000000",
                  "last_runtimes" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                  "max_parallel_action" : "1",
                  "mrt_time" : "000000",
                  "name" : "VIP.COMP.HYPERV.001.TEST_JAN.SCRI",
                  "type" : "SCRI",
                  "inherit_output_filter" : "N",
                  "queue" : "CLIENT_QUEUE"
                },
                "script_attributes" : { },
                "rollback_definitions" : { }
              }
            }
          }
    ]
}



This structure can be imported:
{
    "data": [
        {
            "data" : {
              "scri" : {
                "metadata" : {
                  "version" : "12.3.0"
                },
                "general_attributes" : {
                  "minimum_ae_version" : "11.2",
                  "auto_deactivation" : "A",
                  "child_flags" : "00000000000000000000000000000000",
                  "last_runtimes" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                  "max_parallel_action" : "1",
                  "mrt_time" : "000000",
                  "name" : "VIP.COMP.HYPERV.001.TEST_JAN.SCRI",
                  "type" : "SCRI",
                  "inherit_output_filter" : "N",
                  "queue" : "CLIENT_QUEUE"
                },
                "script_attributes" : { },
                "rollback_definitions" : { }
              }
            },
            "path" : "ANWENDUNGEN/VIP/COMP/HYPERV/GET_VM"
          }
    ]
}

Environment

Release: 12.3

Component: AUTOMATION ENGINE

Subcomponent: REST API

Cause

Faulty error handling, there should not be an order in JSON objects.

Resolution

Solution:
Update to a fix version listed below or a newer version if available.

Fix version:
Component(s): Automation.Engine 

Automation.Engine 12.3.5 - Planned release in March 2021