How to load a Transport Case via the REST API
search cancel

How to load a Transport Case via the REST API

book

Article ID: 390220

calendar_today

Updated On:

Products

Automic SaaS CA Automic Workload Automation - Automation Engine

Issue/Introduction

Loading a Transport Case via the REST API is new in v24.3 and can be done using:

  • A curl command
  • A REST API developer program like Postman
  • ...

The first 2 options are explained below.

Resolution

cURL

On Linux:

curl 'https://<server>:<port>/ae/api/v1/<client>/transportcase' \
--header 'Content-Type: text/plain' \
--data-binary '@<path_to_transport_case>/<transport_case>' \
--cacert '<path_to_JCP_cert>' \
-u '<user>/<department>:<password>'

 

On Windows:

curl "https://<server>:<port>/ae/api/v1/<client>/transportcase" --header "Content-Type: text/plain" --data-binary "@C:/<path_to_transport_case>/<transport_case>" --cacert "C:\<path_to_JCP_cert>" -u "<user>/<department>:<password>"

 

For authentication, you can use 2 alternative safer methods that don't display the password. This is instead of using  -u "<user>/<department>:<password>":

  • A Base64 encoded user/password in the header:
    --header "Authentication: Basic <base64 encoded user:password>"
    (use single quotes for Unix)

To find the base64 encoding execute the following simple ping request with the '--verbose' option and the password in cleartext:

curl "https://<server>:<port>/ae/api/v1/ping" --cacert "C:\<path_to_JCP_cert>" -u "<user>/<department>:<password>" --verbose

From the output, find the line starting with 'Authentication: Basic ...' and copy it entirely into the header option as above.

 

Postman

Create a POST request with the following settings:

Authorization

This can be set to Basic Auth or Bearer Token (see also above): 

Headers

The Content-Type 'text/plain' should be set:

Body

The body should be set to 'binary' after which you can select a transport case file from the file system: