Skip to main content
The server SDK supports JavaScript and TypeScript with ESM or CommonJS imports. The examples show how your server launches and manages a lab.

Requirements

The examples require:
  • An organization account with Cybr Labs
  • An organization API key
  • A server runtime with fetch, such as Node.js 18 or later.

Install the SDK

The public SDK package is coming soon. We will add installation instructions here when the package is available.
The examples use the intended @cybr/labs-sdk import. They document the integration flow without assuming that you can install the package yet. For a direct HTTP integration, see the REST API quickstart.

Create a server client

Read the API key from secure server configuration. Pass that value as apiKey:
The configuration source depends on your server runtime. The examples do not require a particular hosting provider.

Launch a lab

  1. List the available labs:
  1. Select an activated lab from your catalog.
  2. Resolve the learner ID from your server session.
  3. Launch the lab:
  1. Store deployment.id with the learner session.
  2. Wait for the environment:
  1. Return the required connection details from ready.outputs to that learner.
Outputs can contain passwords or other secrets. They do not belong in application logs or analytics.

End the lab

When the learner selects your end action, call destroy():
Cybr also ends the environment at its time limit. An ended environment does not count as learner completion.

Next steps

The launch guide covers saved deployments and outputs. The terminal guide adds a browser terminal. The completion guide explains completion and CTF verification.