Managing Watch Folders With The Api - IBM Aspera HST Admin Manual

High-speed transfer server
Table of Contents

Advertisement

Field
Save the configuration file. The path to the configuration file is used in the next step.
7. Start the Watch Folder.
# curl -k --user node_api_user:node_api_password -H "X-
aspera-WF-version:2017_10_23" -X POST -d @path/to/json_file
https://host:node_api_port/v3/watchfolders
By default, the API port is 9092.
Note: The header "X-aspera-WF-version:2017_10_23" is required when submitting POST, PUT, and
GET requests to /v3/watchfolders on servers that are version 3.8.0 or newer. This enables Watch Folders to parse
the JSON "source" and "target" objects in the format that was introduced in version 3.8.0.
For example:
# curl -k --user watchfolder_admin:XF324cd28 -H "X-aspera-
WF-version:2017_10_23" -X POST -d @/watchfolder_conf.json
https://198.51.100.22:9092/v3/watchfolders
{
"id": "b394d0ee-1cda-4f0d-b785-efdc6496c585"
}
8. Verify that the Watch Folder is running.
# curl -k --user node_api_user:node_api_password -H "X-aspera-
WF-version:2017_10_23" -X GET https://host:node_api_port/v3/
watchfolders/watchfolder_id/state
For example:
# curl -sk --user watchfolder_admin:XF324cd28
WF-version:2017_10_23" -X GET https://198.51.100.22:9092/v3/
watchfolders/b394d0ee-1cda-4f0d-b785-efdc6496c585/state
If the Watch Folder is running, it is reported with "state":"HEALTHY".
You can manage Watch Folders using the API. For more information, see
page 203.

Managing Watch Folders with the API

You can use the Watch Folder API to create, remove, and manage Watch Folders. The instructions below uses curl
commands to interact with the API.
Retrieve a list of Watch Folders
To retrieve a list of Watch Folders, run the following curl command:
# curl -k --user node_api_user:node_api_password -H "X-aspera-WF-
version:2017_10_23" -X GET https://host:node_api_port/v3/watchfolders
Description
Lower scan periods detect changes faster but can result in greater
resource consumption, particularly for object storage.
Note: The value for scan period cannot be empty, otherwise the
configuration is rejected.
| Watch Folders and the Aspera Watch Service | 203
Default
-H "X-aspera-
Managing Watch Folders with the API
on

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents