IO operations tool
The following sets of commands require the environment variabiles listed in the table below:
api-services:*
, users:*
, migrate-service
.
Variable name | Description | type |
---|---|---|
BASE_URL_ADMIN | The URL of the admin functions API | string |
OCP_APIM | The key used to authenticate to the admin functions API | string |
$ npm install -g io-ops
$ io-ops COMMAND
running command...
$ io-ops (--version)
io-ops/1.0.0 darwin-x64 node-v18.13.0
$ io-ops --help [COMMAND]
USAGE
$ io-ops COMMAND
...
io-ops api-services:create
io-ops api-services:get SERVICEID
io-ops api-services:get-all
io-ops api-services:keys SERVICEID
io-ops api-services:keys-regenerate SERVICEID
io-ops api-services:logo SERVICEID
io-ops api-services:update
io-ops hello
io-ops help [COMMANDS]
io-ops messages:attributes
io-ops messages:check-content
io-ops messages:list FISCALCODE
io-ops migrate-services METADATA
io-ops plugins
io-ops plugins:install PLUGIN...
io-ops plugins:inspect PLUGIN...
io-ops plugins:install PLUGIN...
io-ops plugins:link PLUGIN
io-ops plugins:uninstall PLUGIN...
io-ops plugins:uninstall PLUGIN...
io-ops plugins:uninstall PLUGIN...
io-ops plugins:update
io-ops profiles:delete FISCALCODE
io-ops profiles:exist
io-ops profiles:list
io-ops services:check
io-ops services:details
io-ops services:list
io-ops subscriptions:list-delete DELETEFILEPATH [DELAYONDELETE] [OWNEREMAIL]
io-ops users:create
io-ops users:get EMAIL
io-ops users:get-all
io-ops users:subscription EMAIL SUBSCRIPTIONID
io-ops users:update-groups EMAIL
io-ops users:update_user_token_name EMAIL TOKENNAMEVALUE
io-ops users:write-messages EMAIL ACTION
io-ops users:write-services EMAIL ACTION
Create a service
USAGE
$ io-ops api-services:create --payload <value>
FLAGS
--payload=<value> (required) JSON string rapresentation of a service
DESCRIPTION
Create a service
EXAMPLES
$ io-ops api-service:create --json='{ "authorized_cidrs": [], "authorized_recipients": [], "department_name": "department_test", "organization_fiscal_code": "12345670013", "organization_name": "organization_name", "service_id": "test-api-123", "service_name": "test_name", "is_visible": false, "max_allowed_payment_amount": 0, "require_secure_channels": false }'
See code: src/commands/api-services/create.ts
Get the service by serviceId
USAGE
$ io-ops api-services:get SERVICEID
ARGUMENTS
SERVICEID id of the service
DESCRIPTION
Get the service by serviceId
EXAMPLES
$ io-ops api-service:get SERVICEID
See code: src/commands/api-services/get.ts
Get all services
USAGE
$ io-ops api-services:get-all
DESCRIPTION
Get all services
EXAMPLES
$ io-ops api-service:get-all
See code: src/commands/api-services/get-all.ts
Get subscription keys associated to service
USAGE
$ io-ops api-services:keys SERVICEID
ARGUMENTS
SERVICEID id of the service
DESCRIPTION
Get subscription keys associated to service
EXAMPLES
$ io-ops api-service:keys SERVICEID
See code: src/commands/api-services/keys.ts
Regenerate keys associated to service
USAGE
$ io-ops api-services:keys-regenerate SERVICEID --key_type PRIMARY_KEY|SECONDARY_KEY
ARGUMENTS
SERVICEID id of the service
FLAGS
--key_type=<option> (required) JSON string rapresentation of a service
<options: PRIMARY_KEY|SECONDARY_KEY>
DESCRIPTION
Regenerate keys associated to service
EXAMPLES
$ io-ops api-service:keys-regenerate SERVICEID --key_type=PRIMARY_KEY
See code: src/commands/api-services/keys-regenerate.ts
Update service data with base64 of the logo
USAGE
$ io-ops api-services:logo SERVICEID --logo <value>
ARGUMENTS
SERVICEID id of the service
FLAGS
--logo=<value> (required) Path of logo image to be uploaded
DESCRIPTION
Update service data with base64 of the logo
EXAMPLES
$ io-ops api-service:logo SERVICEID --logo ~/PATH/logo.png
See code: src/commands/api-services/logo.ts
Update a service
USAGE
$ io-ops api-services:update --payload <value>
FLAGS
--payload=<value> (required) JSON string rapresentation of a service
DESCRIPTION
Update a service
EXAMPLES
$ io-ops api-service:update --json='{ "authorized_cidrs": [], "authorized_recipients": [], "department_name": "department_test", "organization_fiscal_code": "12345670013", "organization_name": "organization_name", "service_id": "test-api-123", "service_name": "test_name", "is_visible": false, "max_allowed_payment_amount": 0, "require_secure_channels": false }'
See code: src/commands/api-services/update.ts
describe the command here
USAGE
$ io-ops hello [-h] [-n <value>] [-f]
FLAGS
-f, --force
-h, --help Show CLI help.
-n, --name=<value> name to print
DESCRIPTION
describe the command here
EXAMPLES
$ io-ops hello
hello world from ./src/hello.ts!
See code: src/commands/hello.ts
Display help for io-ops.
USAGE
$ io-ops help [COMMANDS] [-n]
ARGUMENTS
COMMANDS Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for io-ops.
See code: @oclif/plugin-help
Update message attributes
USAGE
$ io-ops messages:attributes -i <value> [-p <value>] [--isPending true|false|undefined]
FLAGS
-i, --input=<value> (required) Input file (CSV, with path as first column)
-p, --parallel=<value> [default: 1] Number of parallel workers to run
--isPending=<option> Set 'isPending' flag
<options: true|false|undefined>
DESCRIPTION
Update message attributes
See code: src/commands/messages/attributes.ts
Checks validity of messages
USAGE
$ io-ops messages:check-content [-i <value>] [-p <value>]
FLAGS
-i, --input=<value> Input file (CSV, with path as first column) - defaults to stdin
-p, --parallel=<value> [default: 1] Number of parallel workers to run
DESCRIPTION
Checks validity of messages
See code: src/commands/messages/check-content.ts
List messages for a fiscalCode
USAGE
$ io-ops messages:list FISCALCODE
DESCRIPTION
List messages for a fiscalCode
See code: src/commands/messages/list.ts
Migrate metadata or logos from github
USAGE
$ io-ops migrate-services METADATA
ARGUMENTS
METADATA (metadata|logo) Migrate metadata or logo from github
DESCRIPTION
Migrate metadata or logos from github
EXAMPLES
$ io-ops migrate metadata
$ io-ops migrate logo
See code: src/commands/migrate-services.ts
List installed plugins.
USAGE
$ io-ops plugins [--core]
FLAGS
--core Show core plugins.
DESCRIPTION
List installed plugins.
EXAMPLES
$ io-ops plugins
See code: @oclif/plugin-plugins
Installs a plugin into the CLI.
USAGE
$ io-ops plugins:install PLUGIN...
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
ALIASES
$ io-ops plugins:add
EXAMPLES
$ io-ops plugins:install myplugin
$ io-ops plugins:install https://github.com/someuser/someplugin
$ io-ops plugins:install someuser/someplugin
Displays installation properties of a plugin.
USAGE
$ io-ops plugins:inspect PLUGIN...
ARGUMENTS
PLUGIN [default: .] Plugin to inspect.
FLAGS
-h, --help Show CLI help.
-v, --verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Displays installation properties of a plugin.
EXAMPLES
$ io-ops plugins:inspect myplugin
See code: @oclif/plugin-plugins
Installs a plugin into the CLI.
USAGE
$ io-ops plugins:install PLUGIN...
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
ALIASES
$ io-ops plugins:add
EXAMPLES
$ io-ops plugins:install myplugin
$ io-ops plugins:install https://github.com/someuser/someplugin
$ io-ops plugins:install someuser/someplugin
See code: @oclif/plugin-plugins
Links a plugin into the CLI for development.
USAGE
$ io-ops plugins:link PLUGIN
ARGUMENTS
PATH [default: .] path to plugin
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
EXAMPLES
$ io-ops plugins:link myplugin
See code: @oclif/plugin-plugins
Removes a plugin from the CLI.
USAGE
$ io-ops plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ io-ops plugins:unlink
$ io-ops plugins:remove
Removes a plugin from the CLI.
USAGE
$ io-ops plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ io-ops plugins:unlink
$ io-ops plugins:remove
See code: @oclif/plugin-plugins
Removes a plugin from the CLI.
USAGE
$ io-ops plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ io-ops plugins:unlink
$ io-ops plugins:remove
Update installed plugins.
USAGE
$ io-ops plugins:update [-h] [-v]
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Update installed plugins.
See code: @oclif/plugin-plugins
Delete a profile
USAGE
$ io-ops profiles:delete FISCALCODE [-a] [-p] [-m] [-n] [-s]
FLAGS
-a, --all delete items in all containers
-m, --message delete items in message container
-n, --notification delete items in notification container
-p, --profile delete items in profile container
-s, --service delete items in service container
DESCRIPTION
Delete a profile
See code: src/commands/profiles/delete.ts
Returns the input CSV with a new column that is true if a profile for that fiscal code exists.
USAGE
$ io-ops profiles:exist [-i <value>] [-p <value>]
FLAGS
-i, --input=<value> Input file (CSV, with the CF as first column) - defaults to stdin
-p, --parallel=<value> [default: 1] Number of parallel workers to run
DESCRIPTION
Returns the input CSV with a new column that is true if a profile for that fiscal code exists.
See code: src/commands/profiles/exist.ts
Lists all profiles
USAGE
$ io-ops profiles:list
DESCRIPTION
Lists all profiles
See code: src/commands/profiles/list.ts
USAGE
$ io-ops services:check
See code: src/commands/services/check.ts
Retrieve service info and metadata from a given service ID
USAGE
$ io-ops services:details [-i <value>]
FLAGS
-i, --serviceId=<value> The service ID
DESCRIPTION
Retrieve service info and metadata from a given service ID
See code: src/commands/services/details.ts
List all services in csv format
USAGE
$ io-ops services:list
DESCRIPTION
List all services in csv format
See code: src/commands/services/list.ts
Migrate metadata or logos from github
USAGE
$ io-ops subscriptions:list-delete DELETEFILEPATH [DELAYONDELETE] [OWNEREMAIL]
ARGUMENTS
DELETEFILEPATH CSV Input file containing subscription list
DELAYONDELETE [default: 500] The delay between delete's operations
OWNEREMAIL Email of the subscriptions owner
DESCRIPTION
Migrate metadata or logos from github
EXAMPLES
$ io-ops subscriptions:list-delete -inputListPath=/tmp/input.csv
See code: src/commands/subscriptions/list-delete.ts
Create a new user with a random password in the Active Directory Azure B2C, then create a corresponding user on the API management resource.
USAGE
$ io-ops users:create --payload <value>
FLAGS
--payload=<value> (required) JSON string rapresentation of a user
DESCRIPTION
Create a new user with a random password in the Active Directory Azure B2C, then create a corresponding user on the
API management resource.
EXAMPLES
$ io-ops api-service:create --json='{ "email": "foobar@example.com","first_name": "string","last_name": "string"}'
See code: src/commands/users/create.ts
Gets the user information, that is the complete list of subscription and the complete list of groups for the User identified by the provided email
USAGE
$ io-ops users:get EMAIL
ARGUMENTS
EMAIL email
DESCRIPTION
Gets the user information, that is the complete list of subscription and the complete list of groups for the User
identified by the provided email
EXAMPLES
$ io-ops users:get example@example.it
See code: src/commands/users/get.ts
Get users max 100 per call use cursor for iterating
USAGE
$ io-ops users:get-all [--cursor <value>]
FLAGS
--cursor=<value> Items to skip
DESCRIPTION
Get users max 100 per call use cursor for iterating
EXAMPLES
$ io-ops users:get-all
$ io-ops users:get-all --cursor=100
See code: src/commands/users/get-all.ts
Create a Subscription identified by the provided subscription id for the User identified by the provided email
USAGE
$ io-ops users:subscription EMAIL SUBSCRIPTIONID --product_name <value>
ARGUMENTS
EMAIL email
SUBSCRIPTIONID The id of the Subscription
FLAGS
--product_name=<value> (required) The name of the product
DESCRIPTION
Create a Subscription identified by the provided subscription id for the User identified by the provided email
EXAMPLES
$ io-ops users:subscription example@example.com SUBSCRIPTIONID --product_name=PRODUCTNAME
See code: src/commands/users/subscription.ts
Update the list of groups (permissions) associated to the User identified by the provided email
USAGE
$ io-ops users:update-groups EMAIL --groups <value>
ARGUMENTS
EMAIL email
FLAGS
--groups=<value> (required) A comma separeted list of groups
DESCRIPTION
Update the list of groups (permissions) associated to the User identified by the provided email
EXAMPLES
$ io-ops users:update-groups --groups=ApiInfoRead,ApiLimitedMessageWrite,ApiMessageRead
See code: src/commands/users/update-groups.ts
Update the Token Name attribute associated to the User identified by the provided email
USAGE
$ io-ops users:update_user_token_name EMAIL TOKENNAMEVALUE
ARGUMENTS
EMAIL email
TOKENNAMEVALUE tokenNameValue
DESCRIPTION
Update the Token Name attribute associated to the User identified by the provided email
EXAMPLES
$ io-ops users:update-token-name
See code: src/commands/users/update_user_token_name.ts
Update the list of groups (permissions) associated to the User identified by the provided email
USAGE
$ io-ops users:write-messages EMAIL ACTION
ARGUMENTS
EMAIL email
ACTION action
DESCRIPTION
Update the list of groups (permissions) associated to the User identified by the provided email
EXAMPLES
$ io-ops users:write-messages example@example.it enable
See code: src/commands/users/write-messages.ts
Update the list of groups (permissions) associated to the User identified by the provided email
USAGE
$ io-ops users:write-services EMAIL ACTION
ARGUMENTS
EMAIL email
ACTION action
DESCRIPTION
Update the list of groups (permissions) associated to the User identified by the provided email
EXAMPLES
$ io-ops users:write-services example@example.it enable
See code: src/commands/users/write-services.ts