Skip to main content
This example demonstrates a complete workflow for running a network simulation, including custom configurations and result analysis.

Scenario

We’ll simulate a data center network with:
  • A leaf-spine topology
  • Multiple host nodes

1. Set Up Environment

First, set your API token and base URL:
See Authentication for how to obtain a token.

2. Explore Available Components

List component schemas to understand available network elements:
Get detailed schema for a component:

3. Create a Custom Configuration

Build a configuration with topology, components, and applications
The response is the full configuration. This example shows only its summary fields. The full response also carries components, containers, applications, links, topology, and globalParameters.

4. Validate Configuration

If there are validation issues, fix them and update. Pass the configuration’s current version, in quotes, as If-Match. A version that no longer matches returns 412.

5. Start the Simulation

With a validated configuration, start the simulation:
The simulation is created asynchronously—this endpoint returns immediately after queuing. The initial status is validating or provisioning. Some simulations skip validating and start in provisioning while resources are prepared.
Save the simulation ID for subsequent calls:

6. Monitor Simulation Progress

Check Status

Fetch Logs

Response:

Polling Script

7. Terminate If Needed

If you need to terminate the simulation:
The response is the simulation’s details. A simulation that has already finished keeps the status it ended with. Otherwise the status can keep reading running for a while after the request, until the run stops; it then becomes terminated, and results written up to that point stay available.

8. Retrieve and Analyze Results

List Result Files

The list returns at most 100 files at a time. When pagination.hasMore is true, pass pagination.nextCursor as the next query parameter to get the next page. Simulation output files describes each file.

Download Result Files

Set FILE_NAME to a name from the list:

Get Computed Results

The platform can compute results from the files for you. The response links to a zstd-compressed JSON document:

9. Cleanup

Delete the simulation when done:

Error Handling Best Practices

Always check response status codes and handle errors:

Next Steps