Managing Integrations with apictl¶
WSO2 API Controller, apictl allows you to monitor the Synapse artifacts (deployed in a specified Micro Integrator server) and perform various management and administration tasks from the command line.
Info
Before you begin
-
Ensure that WSO2 Micro Integrator is started. See the instructions on installing the Micro Integrator.
-
Make sure the apictl is downloaded and initialized, if not follow the steps in Download and Initialize the apictl.
-
Ensure that the Micro Integrator management endpoint is added to the environment configurations of CTL, before you start working with the following CTL commands. For more information, see Add an Environment.
Login to a Micro Integrator¶
After adding an environment, you can login to the Micro Integrator instance of that environment using credentials.
-
Run any of the following CTL commands to login to a Micro Integrator.
-
Command
Tip
If you run
apictl mi login <environment-name>you are prompted to provide both the username and the password. If you runapictl mi login <environment-name> --username <username>, you are prompted to provide the password.Info
Flags:
- Optional :
--usernameor-u: Username for login
--passwordor-p: Password for login
--password-stdin: Get password from stdin
- Optional :
-
Response
-
Logout from a Micro Integrator¶
-
Run the following command to logout from the current session of the Micro Integrator.
-
Command
-
Response
-
Manage Users¶
You can view details of users stored in the external user store. If you are logged in to the apictl with administrator credentials, you can also add new users, and remove users from the user store.
Get information about users¶
-
List users of the Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
--patternor-p: Filter users by regex
--roleor-r: Filter users by role
- Required :
-
Response
-
-
Get information on a specific user.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--domainor-d: Domain name of the secondary user store to be searched
--format: pretty-print using templates
- Required :
-
Response
-
Add a new user¶
You can use the command below to add a new user to a Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
Note
To add a new user to a secondary user store, provide the corresponding user store domain when prompted.
Delete a user¶
You can use the command below to remove a user from the Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator - Optional :
--domainor-d: The domain of the secondary user store from which the user should be deleted
- Required :
-
Response
Manage Roles¶
The Micro Integrator has limited role support without fine-grained permission tree support as in the Enterprise Integrator.
In Micro Integrator, we have one admin role and all the other roles from primary and secondary user stores are considered non-admin roles.
Get information about roles¶
-
List roles of the Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
-
-
Get information on a specific role.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--domainor-d: Domain of the secondary user store to be searched
- Required :
-
Response
-
Note
To get hybrid roles (application/internal) specify the role type as the domain.
Add a new role¶
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator
- Response
- Required :
Note
To add a new role to a secondary user store, provide the corresponding user store domain when prompted.
Note
To add hybrid roles (application/internal) specify the type in the role name.
Delete a role¶
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator - Optional :
--domainor-d: The domain of the secondary user store from which the role should be deleted
- Response
- Required :
Note
To delete hybrid roles (application/internal) specify the role type as domain.
Assign/revoke roles to/from users¶
-
Command
Info
Flags:
- Required : `--environment` or `-e` : Environment of the Micro Integrator -
Response
Note
Use a space-separated list of role names when entering the added/removed roles
Monitor Integration Artifacts¶
Follow the instructions below to display a list of artifacts or get information about a specific artifact in an environment using CTL:
Composite Applications (CApps)¶
-
List composite applications (CApps) in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific composite application in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
Name - HealthCareCompositeExporter Version - 1.0.0 Artifacts : NAME TYPE sample-local-entry local-entry email-connector lib in-memory-message-store message-store GrandOakEndpoint endpoint sample_seq_template template scheduled-msg-processor message-processors sample_template template HealthcareAPI api sample-sequence sequence PineValleyEndpoint endpoint StockQuoteProxy proxy-service sample-cron-task task httpInboundEP inbound-endpoint
-
Integration APIs¶
-
List integration APIs in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific integration API in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
Connectors¶
-
List connectors in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
Data Services¶
-
List data services in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific data service in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
Name - RESTDataService Group Name - RESTDataService Description - Exposing the data service as a REST service. WSDL 1.1 - http://localhost:8290/services/RESTDataService?wsdl WSDL 2.0 - http://localhost:8290/services/RESTDataService?wsdl2 Queries : ID NAMESPACE ReadStudents http://ws.wso2.org/dataservice/ReadStudents DeleteStudent http://ws.wso2.org/dataservice
-
Endpoints¶
-
List endpoints in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific endpoint in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
Inbound Endpoints¶
-
List inbound endpoints in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific inbound endpoint in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
Name - httpInboundEP Type - http Stats - enabled Tracing - enabled Parameters : NAME VALUE inbound.http.port 8697 inbound.worker.pool.size.core 400 inbound.worker.pool.size.max 500 inbound.worker.thread.keep.alive.sec 60 inbound.worker.pool.queue.length -1 inbound.thread.id PassThroughInboundWorkerPool
-
Local Entries¶
-
List local entries in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific local entry in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
Message Processors¶
-
List message processors in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific message processor in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
Name - scheduled-msg-processor Type - Scheduled-message-forwarding-processor File Name - scheduled-msg-processor-1.0.0.xml Message Store - in-memory-message-store Artifact Container - [ Deployed From Artifact Container: HealthCareCompositeExporter ] Status - active Parameters : client.retry.interval = 1000 interval = 1000 is.active = true max.delivery.attempts = 4 max.delivery.drop = Disabled max.store.connection.attempts = -1 member.count = 1 store.connection.retry.interval = 1000 target.endpoint = PineValleyEndpoint throttle = false
-
Message Stores¶
-
List message stores in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific message store in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
Name - in-memory-message-store File Name - in-memory-message-store-1.0.0.xml Container - [ Deployed From Artifact Container: HealthCareCompositeExporter ] Producer - org.apache.synapse.message.store.impl.memory.InMemoryProducer@3d288f9e Consumer - org.apache.synapse.message.store.impl.memory.InMemoryConsumer@5e6443d6 Size - 0 Properties : No Properties found
-
Proxy Services¶
-
List proxy services in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific proxy service in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
Sequences¶
-
List sequences in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific sequence in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
Scheduled Tasks¶
-
List scheduled tasks in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific scheduled task in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
Templates¶
-
List all templates in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
List a specific type of template in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
-
Get information on a specific template in an environment.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
-
Change status of an Artifact¶
You can use the commands below to activate or deactivate endpoints, message processors or proxy services deployed in a Micro Integrator.
Endpoint¶
-
Activate an endpoint deployed in a Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
-
-
Deactivate an endpoint deployed in a Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
-
Message Processor¶
-
Activate a message processor deployed in a Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
-
-
Deactivate a message processor deployed in a Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
-
Proxy Service¶
-
Activate a proxy service deployed in a Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
-
-
Deactivate a proxy service deployed in a Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
-
Manage Loggers used in Micro Integrator¶
Get information on a specific logger¶
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
Add a new logger¶
You can use the command below to add a new logger to a Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
Update a logger¶
You can use the command below to update the log level of an existing logger.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched
- Required :
-
Response
Download log files¶
List available log files¶
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
Download a specific log file¶
-
Command
Info
Flags:
-
Required :
--environmentor-e: Environment of the Micro Integrator to be searched -
Optional :
--pathor-p: Path the file should be downloaded (default is current executable directory)
-
-
Response
Monitor transactions¶
Transaction Counts¶
You can use the command below to get information about the inbound transactions received by the Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--format: pretty-print using templates
- Required :
-
Response
Transaction Reports¶
You can use the command below to generate the transaction count summary report based on the inbound transactions received by the Micro Integrator.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator to be searched - Optional :
--pathor-p: Path the file should be downloaded (default is current executable directory)
- Required :
-
Response
Update HashiCorp AppRole Pull secret ID¶
You can use the command below to update the HashiCorp AppRole Pull secret ID that is used by the Micro Integrator to connect with HashiCorp.
Note
- The HashiCorp secret ID is only applicable when AppRole Pull authentication is used between the Micro Integrator and HashiCorp.
- This command only updates the SecretId for the current session of the Micro Integrator. To persist the Secret Id, you need to update the
deployment.tomlfile and restart the Micro Integrator.
See Using HashiCorp Secrets for details.
-
Command
Info
Flags:
- Required :
--environmentor-e: Environment of the Micro Integrator for which the HashiCorp secret ID should be updated.
- Required :
-
Response