Skip to main content

Orders API tutorial scope and prerequisites

This tutorial follows one example from end to end. You start with a few lines of an Apache Camel route typed into the console, and finish with an API that is published on a gateway, served over HTTPS and protected so that only the callers you chose can reach it.

Each step adds one thing to the previous one. You can stop after any step and have something that works.

The example, from the caller to the integration

The orders REST service used as an example​

An orders service:

  • it answers GET /orders with a small JSON document;
  • it reads a greeting from a property file, a region from an environment variable, and a catalog from a file;
  • it calls a partner over HTTPS, signed by a private certificate authority;
  • it is published as https://orders.example.com, then protected.

Tutorial steps​

Each step is one page and adds one capability to the same integration.

StepTaskConcepts
1. Create a Camel integrationType a REST route in the consoleInline source, route DSLs, dependency resolution
2. DeployBind to an environment and applyImage build, rollout, phases, revisions
3. Externalize configurationAdd properties, variables and a mounted fileProperty placeholders, stored configurations, restart without rebuild
4. Private CA in the JVM truststoreTrust a partner signed by a private CAJVM setting, PEM bundle, truststore build
5. ScaleSize the integration and autoscale itRequests and limits, heap sizing, KEDA triggers, disruption budget
6. Persistent volumeMount storage that survives restartsEmptyDir, persistent volumes, access modes
7. Build from a Git repositoryBuild the same integration from a repositoryGit source mode, branch and release builds
8. Expose the integrationCreate a gateway and an API instanceListeners, TLS termination, host names, HTTP routes
9. Secure the APIAdd API key, Basic, JWT, external authorizationAuthentication method per client type
10. ObserveRead logs, metrics and tracesOTLP pipeline, resource attributes, PromQL
11. Production readinessReview before real trafficSizing, availability, environments, RBAC
How to use this tutorial

Follow the steps in order the first time: each one changes the integration built in the previous one. Afterwards, each page stands on its own as a worked example of one concept.

Prerequisites​

You need:

  • access to the console, in a business unit where you may create integrations and gateways;
  • an environment whose Camel Integration service is activated. See Camel Integration Service. Without it, nothing can be built or run there.

If you only have a few minutes, steps 1, 2 and 6 give you a working API.

Console application per task​

The tutorial moves between applications of the console. This table says which one each kind of task belongs to.

You want toGo to
Write, deploy and configure an integrationRuntime Manager
Store properties, files, credentials, certificatesSecret Manager
Create a gateway, publish and protect an APIAPI Manager
Prepare an environmentInfrastructure
Read logs, metrics and tracesMonitoring

Start with step 1.