Automic Workload Automation

 View Only

  • 1.  Path in export json with API

    Posted 25 days ago

    Hi,

    I use the Automic API to export our objects in JSON.

    The problem is that when an object is linked to a catalogue, it is this path that is returned and not the object's path.

    How can I get around this?

    Thx



    -------------------------------------------


  • 2.  RE: Path in export json with API

    Broadcom Employee
    Posted 16 days ago

    Hi Frederic,
    Sorry to hear the path is wrongly returned.

    I tried creating two folders one X, and one Y.
    I created a SCRI object in folder Y named A.
    I linked the Y/A object into the X folder.

    Exporting the full folder X or Y via for example:
    https://aehost/ae/api/v1/0100/folderobjects/Y

    both, went fine:
    folder X export

    {
      "data": [
        {
          "data": {
            "fold": {
              "metadata": {
                "version": "24.4.3"
              },
              "general_attributes": {
                "type": "FOLD",
                "name": "X"
              }
            }
          },
          "path": ""
        },
        {
          "data": {
            "link": {
              "metadata": {
                "version": "24.4.3"
              },
              "general_attributes": {
                "name": "A"
              }
            }
          },
          "path": "X"
        }
      ],
      "warnings": {
        "unresolved_external_references": [
          "A"
        ]
      }
    }

    folder Y export

    {
      "data": [
        {
          "data": {
            "fold": {
              "metadata": {
                "version": "24.4.3"
              },
              "general_attributes": {
                "type": "FOLD",
                "name": "Y"
              }
            }
          },
          "path": ""
        },
        {
          "data": {
            "scri": {
              "metadata": {
                "version": "24.4.3"
              },
              "general_attributes": {
                "type": "SCRI",
                "name": "A",
                "max_parallel_action": 1,
                "mrt_time": "000000",
                "inherit_output_filter": "N",
                "queue": "CLIENT_QUEUE",
                "auto_deactivation": "A",
                "minimum_ae_version": "11.2"
              },
              "script_attributes": {}
            }
          },
          "path": "Y"
        }
      ]
    }


    Same went well with the individual object via ( https://aehost/ae/api/v1/0100/objects/A ):

    {
      "total": 1,
      "data": {
        "scri": {
          "metadata": {
            "version": "24.4.3"
          },
          "general_attributes": {
            "type": "SCRI",
            "name": "A",
            "max_parallel_action": 1,
            "mrt_time": "000000",
            "inherit_output_filter": "N",
            "queue": "CLIENT_QUEUE",
            "auto_deactivation": "A",
            "minimum_ae_version": "11.2"
          },
          "script_attributes": {}
        }
      },
      "path": "Y",
      "client": 100,
      "hasmore": false
    }

    I'm a bit lost on how your setup looks. Some AWI screenshots with the object setup, and what REST endpoints you're calling, would be very helpful trying to find out why the path is wrongly returned.

    Please provide:

    • Screenshots with your object structure
    • Actual REST service you're invoking (folderobjects or objects)
    • DB vendor (postgres/db2/mssql/oracle)
    • AE version
    -------------------------------------------



  • 3.  RE: Path in export json with API

    Posted 12 days ago

    Hi,

    I did the same test as you and it seems to be OK. Until I did the opposite: creating the script in X and linking it in Y.

    I did several tests; sometimes it works, sometimes it doesn't. I haven't yet figured out the logic behind why the path is correct or not...

    With de REST service, I invoque the object s, DB vendor si postgre 16.9 and AE version  24.4.1-4

    Thx for ur help

    -------------------------------------------



  • 4.  RE: Path in export json with API

    Posted 11 days ago

    Hi Frederic

    We've run into this issue as well.  It seemed that people who had marked an object as a favourite in an earlier version of Automic, those objects could not be exported via rest in V24.  We had to remove the links so it could be exported. After re-adding the favourite, it stayed with the correct location.

    -------------------------------------------



  • 5.  RE: Path in export json with API

    Broadcom Employee
    Posted 11 days ago

    Hi, I can confirm this is a bug on our side. Unfortunately, the path selection of the folder doesn't differentiate if the path it refers to is a link or not.

    It will be fixed with the next available major version. If it's blocker for you raise it with your managers so it gets in a HF.

    If you have a salesforce case number write it to me in a message, so I can link it to the issue we're tracking internally.

    -------------------------------------------



  • 6.  RE: Path in export json with API

    Posted 11 days ago

    Hi,

    Okay, no, I haven't opened a ticket, since there's a workaround, we'll wait for the next version update.

    Thank you.

    -------------------------------------------