Targets: REST API changes
Along with the Targets feature, we need to make some major changes to the way our API retrieves information about actions. Targets will allow users to define server credentials as a "target" that can be used across multiple actions, and actions will gain the ability to point to multiple targets at the same time.
What will change?
In addition to collecting action information, other changes include adding and updating actions using the REST API.
Since backward compatibility will not be supported, we will be rolling out those changes in waves. First wave includes the following actions:
- Transfer (replacing former FTP, FTPS and SFTP actions)
- Download (replacing former FTP, FTPS and SFTP download actions)
- SSH Command
The way this works is that the action's JSON will now have the server information in the Targets array.
Here's an example of SFTP transfer action that uses key as an authentication method:
JSON{ "name": "Upload files to 5.75.234.250 by SFTP(Key)", "type": "TRANSFER", "trigger_time": "ON_EVERY_EXECUTION", "input_type": "SCM_REPOSITORY", "local_path": "/", "remote_path": "", "targets": [ { "id": "sftp_target_1", "type": "SSH", "host": "5.75.234.250", "port": "22", "auth": { "method": "SSH_KEY", "username": "sftp-key-0", "key": "$MyKey" } } ] }
Please take note that authentication_mode
has been replaced with indented auth
and the value names were replaced with:
- PASS is now PASSWORD
- PRIVATE_KEY, PRIVATE_KEY_AND_PASS are now SSH_KEY
- ENV_KEY is now ASSETS_KEY
- SAME_AS_PROXY is now PROXY_CREDENTIALS
- PROXY_KEY, CUSTOM_PROXY_KEY are now PROXY_KEY
- NAME is now ID
- SERVER_KEY is now KEY
- ENV_KEY is now ASSET
- CUSTOM_PROXY_KEY, serverKey are now keyPath
For all the changes and examples please check our API documentation:
Jarek Dylewski
Customer Support
A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.