Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 99 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This requires you to provide your tenant domain name, along with a user and pass
The --help parameter provides further information on how to use this along with some examples of its usage.

This CLI tool has been tested against
* webMethods.io Integration v10.11
* webMethods.io Integration v10.12

# License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details
Expand All @@ -28,42 +28,43 @@ node wmiocli.js --help
│ This tool provides command line access to the webMethods.io Integration APIs │
│ Intended to aid usage within DevOps Scenarios for asset deployment │
└──────────────────────────────────────────────────────────────────────────────┘


Usage: wmiocli [options] [command]

Options:
-V, --version output the version number
-d, --domain <tenantDomain> Tenant Doamin Name, e.g.
"tenant.int-aws-us.webmethods.io"
-u, --user <userid> Tenant User ID
-p, --password <password> Tenant User Password
-t, --timeout <delay> timeout in seconds (default: one minute)
--verbose Verbose output
-h, --help display help for command
-V, --version output the version number
-d, --domain <tenantDomain> Tenant Doamin Name, e.g. "tenant.int-aws-us.webmethods.io"
-u, --user <userid> Tenant User ID
-p, --password <password> Tenant User Password
-t, --timeout <delay> timeout in seconds (default: one minute)
--prettyprint Pretty Print JSON output
--verbose Verbose output useful for diagnosing issues
-h, --help display help for command

Commands:
project [project-id] Lists all projects or view an individual project
project-create <project-name> Create project with given name
project-update <project-id> <project-name> Update project with new name
workflow-export <project-id> <workflow-id> <filename> Export workflow with id <workflow-id> from project
<project-id>
workflow-import <project-id> <filename> Import workflow into project <project-id> from file
<filename>
workflow-delete <project-id> <workflow-id> Delete workflow <workflow-id> from project
<project-id>
workflow-execute <project-id> <workflow-id> Execute workflow <workflow-id> from project
<project-id>
workflow-status <project-id> <run-id> Gets Execution status for workflow execution <run-id>
flowservice-export <project-id> <flow-name> <file-name> Export FlowService with name <flow-name> from project
<project-id>
flowservice-import <project-id> <filename> Import FlowService from <filename> into project
<project-id>
flowservice-delete <project-id> <flow-name> Delete FlowService <flow-name> from project
<project-id>
flowservice-execute <project-id> <flow-name> [input-json] Execute FlowService <flow-name> from project
<project-id> with data <input-json>
help [command] display help for command
project [project-name] Lists all projects or view an individual project, specified via project name or uid
project-assets <project-name> Lists project assets from given project name or uid
project-create <project-name> Create project with given name
project-update <project-id> <project-name> Update project with new name
project-delete <project-id> Delete project with given id
project-publish <project-id> <publish-name> <target-tenant-domain-name> <target-user-id> <target-user-password> <assets-json> Pubilsh project to another tenant with given id
project-deploy <projectName> <version> deploy published project with given version into tenant
role [role-id] Lists all roles or views an individual role
role-create <role-name> <role-description> <roles-list> Create roles and specify the permissions for that role. Roles-list should be provided as follows projectName,r,w,e;project name 2,r;
role-update <role-id> <role-name> <role-description> <roles-list> Create roles and specify the permissions for that role. Roles-list should be provided as follows projectName,r,w,e;project name 2,r;
role-delete <roleId> Delete a roles with the given role id
user Lists all users
user-role-assignment <user-id> <role-names> Assigns a user to roles
workflow-export <project-id> <workflow-id> <filename> Export workflow with id <workflow-id> from project <project-id>
workflow-import <project-id> <filename> Import workflow into project <project-id> from file <filename>
workflow-delete <project-id> <workflow-id> Delete workflow <workflow-id> from project <project-id>
workflow-execute <project-id> <workflow-id> Execute workflow <workflow-id> from project <project-id>
workflow-status <project-id> <run-id> Gets Execution status for workflow execution <run-id>
flowservice-export <project-id> <flow-name> <file-name> Export FlowService with name <flow-name> from project <project-id>
flowservice-import <project-id> <filename> Import FlowService from <filename> into project <project-id>
flowservice-delete <project-id> <flow-name> Delete FlowService <flow-name> from project <project-id>
flowservice-execute <project-id> <flow-name> [input-json] Execute FlowService <flow-name> from project <project-id> with data <input-json>
help [command] display help for command


Examples:
Expand All @@ -84,7 +85,21 @@ Examples:
-d tenant.int-aws-us.webmethods.io
-u user
-p password
project
project fl65d3aa87fc1783ea5cf8c8

View individual project with given project name:
$ node wmiocli.js
-d tenant.int-aws-us.webmethods.io
-u user
-p password
project Default

View Project assets from project with given name:
$ node wmiocli.js
-d tenant.int-aws-us.webmethods.io
-u user
-p password
project-assets Default

Update Project name:
$ node wmiocli.js
Expand All @@ -100,6 +115,27 @@ Examples:
-p password
project-delete fl65d3aa87fc1783ea5cf8c8

Get Project Assets:
$ node wmiocli.js
-d tenant.int-aws-us.webmethods.io
-u user
-p password
project-assets fl65d3aa87fc1783ea5cf8c8

/Publish Project to another tenant:
$ node wmiocli.js
-d tenant.int-aws-us.webmethods.io
-u user
-p password
project-publish fl65d3aa87fc1783ea5cf8c8 'My deployment' 'target.int-aws-us.webmethods.io' 'targetuser' 'targetpassword' '{"output":{"workflows":["fla73a20e13dd6736cf9c355","fl3cfd145262bbc5d44acff3"],"flows":["mapLeads"],"rest_api":[],"soap_api":[],"listener":[],"messaging":[]}}'


/Deploy published Project in the tenant with the given name and deploy version:
$ node wmiocli.js
-d tenant.int-aws-us.webmethods.io
-u user
-p password
project-deploy projectName 1

Workflow

Expand Down Expand Up @@ -170,4 +206,35 @@ Examples:
-u user
-p password
flowservice-execute fl65d3aa87fc1783ea5cf8c8 myFlowService


Roles

Get roles list or individual role
$ node wmiocli.js
-d tenant.int-aws-us.webmethods.io
-u user
-p password
role [role-name]

Creates a role
$ node wmiocli.js
-d tenant.int-aws-us.webmethods.io
-u user
-p password
role-create 'rolename' 'role description' 'project 1 name,r,w,e;project 2 name,r;'

Updates a role with a provided Id
$ node wmiocli.js
-d tenant.int-aws-us.webmethods.io
-u user
-p password
role-update 'roleId' 'rolename' 'role description' 'project 1 name,r,w,e;project 2 name,r;'

Delete a role with a provided Id
$ node wmiocli.js
-d tenant.int-aws-us.webmethods.io
-u user
-p password
role-delete 'roleId'
```
4 changes: 4 additions & 0 deletions thirdparty.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ Version: 2.88.2
Copyright: Mikeal Rogers <mikeal.rogers@gmail.com>
License: Apache-2.0

Name: readline-sync
Version: 1.4.10
Copyright: Copyright (c) 2019 anseki
License: MIT