Skip to content
Weik.ioDocs
2026.2
Try Weik.io

Invoke a route

Weik.io 2026.2

weikio invoke and the admin UI's Invoke dialog send a message into a running route, on any endpoint whose component accepts one, and show the reply. Video

Watch: Deploy it, and see a file move, 3:33

The video deploys the transfer to devtest and watches a file move.

On this page

weikio invoke sends one message into a route of a running deployment and prints the reply. Use it to test a route, or to run a schedule or a transfer outside its times.

It works like Camel’s camel cmd send and reaches the route without an inbound port on the agent’s host.

Send a message#

Terminal
$ weikio invoke finance/erp-invoice-export --env devtest --endpoint direct:run-export
You see
Target: https://hub.example, project finance (argument), environment devtest (--env)
200 replied in 1.9 s
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-03
{"exported":14}

To see this message's trace, run:
  weikio trace 4bf92f3577b34da6a3ce929d0e0e4736

The reply’s headers and body are as the route left them.

Status What it means
200 The route replied.
500 The reply has the text of the exception the route failed with.
504 No reply came within --timeout, 30 seconds by default.

On Camel 4.18.5 the trace shows every step the message went through. On 4.22.1 it shows the route’s run and the calls it made, but not the steps between them. To keep the steps, add -Dcamel.opentelemetry2.disableCoreProcessors=false to jvm.options in integration.yaml.

--body and --header set what the message carries:

Flag What it does
--body @order.json Sends the file as the body
--body '...' Sends the text as the body
--header k=v Adds a header

To send in a production environment, confirm at the prompt or give -y.

Which endpoints accept a message#

An endpoint accepts a message when its component can produce one. That’s every component Camel doesn’t mark as consumer only, such as direct: and seda:.

A route that starts from timer: or quartz: accepts no message. When you invoke one, the CLI prints how to reach the work behind it:

Terminal
$ weikio invoke finance/nightly-payroll --env devtest
You see
Target: https://hub.example, project finance (argument), environment devtest (--env)
error: No endpoint of version '1.0.0' of 'finance/nightly-payroll' accepts a message.
       'quartz:payroll/nightly' doesn't accept a message.
       Add a direct: route that this route calls:
         - from: uri: quartz:payroll/nightly    steps: [{ to: "direct:run-nightly-payroll" }]
         - from: uri: direct:run-nightly-payroll  steps: [ ... ]
       Then invoke that route with:
         weikio invoke finance/nightly-payroll --env devtest --endpoint direct:run-nightly-payroll

A route that starts from platform-http: accepts no message either. It answers on its agent’s host, on port 8080 unless the integration sets its own server settings, or through an API in front of it.

Without --endpoint, the CLI sends to the endpoint the routes start from when only one of them accepts a message. When several do, it lists them:

Terminal
$ weikio invoke finance/orders --env devtest
You see
Target: https://hub.example, project finance (argument), environment devtest (--env)
error: Version '1.2.0' of 'finance/orders' has 3 endpoints that accept a message. Choose one with --endpoint:
         direct:new-order                 route new-order   routes/orders.camel.yaml
         seda:retry                       route retry       routes/orders.camel.yaml
         kamelet:timer-source?message=go  route nightly     routes/nightly.camel.yaml
       Not listed: 'platform-http:/orders' is an HTTP endpoint, which invoke can't send to. Call it on its agent's host (port 8080 by default), or through an API routed to it.

Run schedules and transfers now#

weikio invoke <project>/<name> runs a schedule’s command outside its cron. The reply is what the command printed.

For a transfer, weikio invoke with --endpoint direct:mft-run starts a run and returns without waiting for it. When a run is already in progress, the new run starts after it.

Which copy gets it#

For an integration that runs one copy at a time, the message goes to the copy that leads. Otherwise it goes to one of the running copies, unless you pick the agent with --agent.

In the admin UI#

To send a message from the admin UI, pick Invoke in the menu of a deployment that accepts messages, or Run now for a schedule or a transfer.

/integrations/finance/erp-invoice-export
The Invoke dialog of finance/erp-invoice-export in devtest with the endpoint direct:run-export. A note says the timer endpoint doesn't accept a message. The dialog has fields for the body, headers, timeout and agent, and the matching weikio invoke line.The Invoke dialog of finance/erp-invoice-export in devtest with the endpoint direct:run-export. A note says the timer endpoint doesn't accept a message. The dialog has fields for the body, headers, timeout and agent, and the matching weikio invoke line.The Invoke dialog of finance/erp-invoice-export in devtest with the endpoint direct:run-export. A note says the timer endpoint doesn't accept a message. The dialog has fields for the body, headers, timeout and agent, and the matching weikio invoke line.The Invoke dialog of finance/erp-invoice-export in devtest with the endpoint direct:run-export. A note says the timer endpoint doesn't accept a message. The dialog has fields for the body, headers, timeout and agent, and the matching weikio invoke line.
In a deployment's Invoke dialog, you send one message to the endpoint you pick and see the matching weikio invoke line.

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo