DA CLI is a command-line interface tool designed to help with Design Automation API tasks.
Each feature is provided by a different command line option:
--engines: list all available engines.--token: create a 3-legged token that will be used if you are running a work item that relies on a signed activity. You'll just have to openlocalhost:8080in the browser and log in with the user account you want to use. The access token will be saved intoken.jsonand will be used if needed when running a work item.--bundle: create a new app bundle or a new version for an existing app bundle. Theappbundlepart of theconfig.jsonfile needs to be filled in correctly.--activity: create a new activity or a new version for an existing activity. Theactivitypart of theconfig.jsonfile needs to be filled in correctly.--workitem: run a work item. Theworkitempart of theconfig.jsonfile needs to be filled in correctly. The work item report files will be saved in thereportssubfolder of this project.--delete: delete app, i.e. delete all app bundles, activities and the nickname that was associated with theclientIdprovided in thecredentialspart of theconfig.jsonfile.--key: create public and private keys. It will create two files calledmykey.jsonandmypublickey.jsonthat will be needed if you want to sign an activity - see--signoption.--patch: patch app to set nickname and/or public key for the activity. Thenicknameneeds to be set in theconfig.jsonfile. If you want to also set a public key then first use the--keyoption that will generatemypublickey.json. By deafult the nickname of the app is the same as theclientIdthat was used to create it. In order to use--patchyou need to set anicknamethat is different from theclientId.--sign: sign activity with private key. First the app needs to have a public key assigned using--patch.--config <name>: specify the path of theconfig.jsonfile to use for the operations.
You can find more information about what the --key, --patch and --sign options are doing here
For certain values in the config.js file you can use global variables that will be replaced runtime.
- in
activity.bundlesyou can reference{{nickname}} - in
workitem.arguments.<argument name>.headers.Authorizationyou can reference{{accessToken2LO}}or{{accessToken3LO}} - in
workitem.arguments.<argument name>.urlyou can reference{{bucketName}}if you set its value in the config file
If no Authorization header is provided for an item in workitem.arguments but its url value starts with urn: then the app will try to generate a signed url for it using the 2-legged access token.
As an example the content of config.json is set based on the tutorial found here
Before using the app follow these steps:
- make sure the APS app whose credentials (client id / client secret) you are using has
http://localhost:8080/callbackadded as aCallback URLon the APS website - replace
<client id>and<client secret>everywhere inconfig.jsonwith the correct values - also fornickname - download
UpdateIPTParam.zipfrom here and extract it into the root folder of this sample like so:
- upload
inventor_sample_file.iptfrom here to one of your OSS buckets that belong to the sameclientIdyou provided for this project and updatebucketNameinconfig.jsonwith the correct value.
The launch.json file contains quite a few start options that can be used from VS Code's Run and Debug palette
This project is licensed under the MIT License.