Getting Started

This quick start guide helps you authenticate and make your first API request to Crosswork Workflow Manager (CWM) 2.1.

The CWM API supports standard REST methods (GET, POST, PUT, PATCH, DELETE) over HTTPS. All requests and responses use JSON. Authentication must be provided for all endpoints.

Key capabilities of the CWM API include:

  • Workflow management: Create, update, retrieve, delete, and schedule workflows. Workflows are defined according to the Serverless Workflow specification and represent sequences of automated network tasks.

  • Job execution and monitoring: Trigger workflow executions (jobs), monitor their progress, retrieve execution results, and cancel active jobs.

  • Adapter management: Deploy and manage adapters that facilitate communication between workflows and external systems or platforms.

  • Worker management: Register and monitor worker processes that execute workflow steps across supported environments.

  • Secret and resource management: Manage credentials and external references securely for use during workflow execution.

  • Payload management: Retrieve stored payloads by key, with optional automatic decryption. This enables secure storage and controlled access to workflow inputs, outputs, and integration data.

  • Public key management: List, create, update, and delete RSA public keys (PKCS#1 and PKCS#8 formats) used for adapter verification and secure communication.

  • Model Context Protocol (MCP) access: Discover and invoke CWM APIs as MCP tools via JSON-RPC 2.0 endpoints. This enables standardized integration with AI agents and external orchestration systems.

  • System function discovery: Retrieve information about built-in and system-provided functions and their activities, enabling dynamic capability discovery and advanced automation scenarios.

  • Event integration: Define and manage events that can trigger workflows in response to changes in the environment or external systems.

  • System settings: Configure system defaults related to timeouts and retry policies.

Base URL

Every API request to Crosswork Workflow Manager 2.1 begins with the following base URL and base path:

https://<crosswork_host:port>/crosswork/cwm/v2

Note: Replace <crosswork-host:port> with the IP address or hostname of your CWM instance and with the appropriate service port (typically 30603 if using the default configuration).

Authentication

The CWM API authentication and authorization process uses Cisco Crosswork’s centralized token service. To authenticate and authorize your API requests, refer to the Authentication section of this guide.

First Steps with the API

Before using the API, authenticate and obtain a JWT token using your Crosswork credentials.

1. Upload a New Adapter

Upload a .tar.gz adapter file:

curl --request POST '{{baseurl}}/crosswork/cwm/v2/adapter' \
  --header 'Authorization: Bearer {{jwt}}' \
  --form 'file=your-adapter.tar.gz'

2. List Existing Adapters

Retrieve a list of uploaded adapters and find the adapterId for the one you just uploaded:

curl --request GET '{{baseurl}}/crosswork/cwm/v2/adapter' \
  --header 'Authorization: Bearer {{jwt}}' \
  --header 'Accept: application/json'

3. Deploy the Adapter

Deploy the uploaded adapter as a plugin using the adapterId from step 2:

curl --request POST '{{baseurl}}/crosswork/cwm/v2/adapter/{adapterId}/deploy' \
  --header 'Authorization: Bearer {{jwt}}' \
  --form 'createWorker=true' \
  --form 'defaultStatus=true'

4. Get Adapter Details

Retrieve info about the adapter, including available activities:

curl --request GET '{{baseurl}}/crosswork/cwm/v2/adapter/adapter/{adapterId}' \
  --header 'Authorization: Bearer {{jwt}}' \
  --header 'Accept: application/json'