Loading a Transport Case via the REST API is new in v24.3 and can be done using:
The first 2 options are explained below.
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>"
:
--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.
--header "Authentication: Bearer <token>"
(use single quotes for Unix)
The token for the user can be generated in AWI: https://docs.automic.com/documentation/webhelp/english/AA/24.3/DOCU/24.3/Automic%20Automation%20Guides/Content/_Common/GettingStarted/UserSettings_API_Key.htm
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: