Skip to content

113. Warmup Limitations API

The Warmup Limitations API provides two command-line interfaces to query and update the warmup limitations configuration.

113.1 Prerequisites

The latest version of Smart Replay Warmup Limitations API tools is located in the <installation-folder>/smart_replay_tools/bin directory.

You must install the Smart Replay Warmup Limitations API tools on your computer with access to Foretify Manager where the warmup limitations will be configured.

Before using the Warmup Limitations API tools, ensure you have the following:

  1. Python 3.9 or above installed on your system
  2. Foretify Manager Python SDK installed

Note

All tool executions (e.g., ./smart_replay_warmup_limitations_api) should be run using paths relative to the <installation-folder>/smart_replay_tools/bin directory.

113.2 Common CLI connection and authentication parameters

All CLI commands in the Warmup Limitations API share the following required connection and authentication parameters:

./smart_replay_warmup_limitations_api \
 --host <hostname>
 --port <port>
 --user <username> \
 [--https] 
 [--use_token] 
 [--debug] 

Common connection and authentication parameters

Parameter Requireement Description
--host Required The hostname or IP address of the FManager server
--port Required The port number on which FManager is running
--user Required The username for authentication with FManager
--https Optional Flag to use HTTPS instead of HTTP for connection
--use_token Optional Flag to use token-based authentication (default: True)
--debug Optional Flag to enable detailed debug information (default: False)

113.3 Managing warmup limitations

The Warmup limitations CLI provides a command line interface for managing warmup limitations.

113.3.1 Creating a new warmup limitation

The create command creates a new warmup limitation with specified parameters.

./smart_replay_warmup_limitations_api \
 --host <hostname> --port <port> --user <username> --https \
 create
 --name <name> 
 --interval_name <interval_name> 
 --limitation_message <message>

Parameters

Parameter Requirement Description
--name Required The name for the new limitation
--interval_name Required The interval name for the limitation
--limitation_message Required A message describing the limitation

113.3.1.1 Example of creating a new warmup limitation

./smart_replay_warmup_limitations_api \
 --host fmanager.example.com --port 8080 --user user@fmanager.com --https \
 create 
 --name "speed_limit" 
 --interval_name "simulation_time" 
 --limitation_message "Speed should not exceed 50 km/h"

Example output

Created limitation:
#######################
Limitation ID: limitation-123
Name: speed_limit
Interval Name: simulation_time
Limitation Message: Speed should not exceed 50 km/h
#######################

113.3.2 Getting a warmup limitation by ID

The get_by_id command retrieves a specific warmup limitation by its ID.

Parameters

Parameter Requirement Description
--limitation_id Required The ID of the warmup limitation to retrieve

113.3.2.1 Example of getting a warmup limitation by ID

./smart_replay_warmup_limitations_api \
 --host fmanager.example.com --port 8080 --user user@fmanager.com --https \
 get_by_id
 --limitation_id "limitation-123"

Example output

Limitation by ID:
#######################
Limitation ID: limitation-123
Name: speed_limit
Interval Name: simulation_time
Limitation Message: Speed should not exceed 50 km/h
#######################

113.3.3 Updating a warmup limitation

The update command updates an existing warmup limitation with new values.

./smart_replay_warmup_limitations_api \
 --host <hostname> --port <port> --user <username> --https \
 update
 --limitation_id <limitation_id> 
 --name <current_name>
 [--updated_name <new_name>] 
 [--updated_interval_name <new_interval>]
 [--updated_limitation_message <new_message>]

Parameters

Parameter Requirement Description
--limitation_id Optional The ID of the limitation to update. Either limitation_id or name must be provided
--name Optional The current name of the limitation. Either name or limitation_id must be provided
--updated_name Optional The new name for the limitation
--updated_interval_name Optional The new interval name
--updated_limitation_message Optional The new limitation message

113.3.3.1 Example of updating a warmup limitation

./smart_replay_warmup_limitations_api \
 --host fmanager.example.com --port 8080 --user user@fmanager.com --https \
 update
 --limitation_id "limitation-123" 
 --name "speed_limit"
 --updated_name "highway_speed_limit"
 --updated_limitation_message "Speed should not exceed 120 km/h on highways"

Example output

Updated limitation:
#######################
Limitation ID: limitation-123
Name: highway_speed_limit
Interval Name: simulation_time
Limitation Message: Speed should not exceed 120 km/h on highways
#######################

113.3.4 Deleting a warmup limitation

The delete command deletes a warmup limitation.

./smart_replay_warmup_limitations_api \
 --host <hostname> --port <port> --user <username> --https \
 delete
 --limitation_id <limitation_id>
 --name <name> [--remove_from_groups]
Parameter Requirement Description
--limitation_id Optional The ID of the limitation to update. Either limitation_id or name must be provided
--name Optional The current name of the limitation. Either name or limitation_id must be provided
--remove_from_groups Optional Flag to remove the limitation from all groups

113.3.4.1 Example of deleting a warmup limitation

./smart_replay_warmup_limitations_api \
 --host fmanager.example.com --port 8080 --user user@fmanager.com --https \
 delete
 --limitation_id "limitation-123" 
 --name "speed_limit" 
 --remove_from_groups

Example output

Limitation limitation-123 deleted.

113.3.5 Getting all warmup limitations

The get_all command retrieves all warmup limitations in the system.

./smart_replay_warmup_limitations_api \
 --host <hostname> --port <port> --user <username> --https \
 get_all

113.3.5.1 Example of getting all warmup limitations

./smart_replay_warmup_limitations_api \
 --host fmanager.example.com --port 8080 --user user@fmanager.com --https \
 get_all

Example output

Found 2 limitations:
#######################
Limitation ID: limitation-123
Name: highway_speed_limit
Interval Name: simulation_time
Limitation Message: Speed should not exceed 120 km/h on highways
#######################
#######################
Limitation ID: limitation-789
Name: speed_warning
Interval Name: vehicle_time
Limitation Message: Vehicle approaching speed limit zone
#######################

113.3.6 Getting run limitations

The get_run_limitations command retrieves warmup limitations for a specific run and limitation group.

./smart_replay_warmup_limitations_api \
 --host <hostname> --port <port> --user <username> --https \
 get_run_limitations
 --run_id <run_id> 
 --warmup_limitation_group_id <group_id>
Parameter Requirement Description
--run_id Required The ID of the run
--warmup_limitation_group_id Required The ID of the warmup limitation group

113.3.6.1 Example of getting run limitations

./smart_replay_warmup_limitations_api \
 --host fmanager.example.com --port 8080 --user user@fmanager.com --https \
 get_run_limitations 
 --run_id "run-123" 
 --warmup_limitation_group_id "group-456"

Example output

Run limitations:
#######################
Limitation ID: limitation-123
Name: highway_speed_limit
Interval Name: simulation_time
Limitation Message: Speed should not exceed 120 km/h on highways
#######################
#######################
Limitation ID: limitation-789
Name: speed_warning
Interval Name: vehicle_time
Limitation Message: Vehicle approaching speed limit zone
#######################

113.4 Managing groups of warmup limitations

The Warmup Limitations Groups CLI provides a command line interface to manage groups of warmup limitations. To avoid listing all limitations in every Smart Replay extraction configuration, you can create warmup limitation groups and link each Smart Replay extraction configuration to one of these groups.

The same common CLI connection and authentication parameters are used.

113.4.1 Creating a group of warmup limitations

The create command creates a new warmup limitations group, with the option to immediately add limitations to the group.

./smart_replay_warmup_limitation_groups_api \
 --host <hostname> --port <port> --user <username> --https \
 create
 --name <group_name> 
 [--limitation_ids <limitation_ids>]
Parameter Requirement Description
--name Required The name for the new warmup limitations group
--limitation_ids Optional A comma-separated list of limitation IDs to add to the group immediately after creation

113.4.2 Creating an empty group of warmup limitations

./smart_replay_warmup_limitation_groups_api \
 --host fmanager.example.com --port 8080 --user user@fmanager.com --https \
 create 
 --name "my_new_empty_group"

Example output

Created group:
#######################
Group ID: group-789
Name: my_new_empty_group
Limitations: []
#######################

113.4.3 Creating a group with warmup limitations

./smart_replay_warmup_limitation_groups_api \
--host fmanager.example.com --port 8080 --user user@fmanager.com --https \
create
 --name "my_new_group" 
 --limitation_ids "1k46c9428deb72483,733a82977b2mbb863529"

Example output

Created group with limitations:
#######################
Group ID: group-789
Name: my_new_group
Limitations:
  - ID: 1k46c9428deb72483, Name: speed_limit_120
  - ID: 733a82977b2mbb863529, Name: Limitation 2
#######################

113.4.4 Retrieving a warmup limitations group by name

The get_by_name command retrieves a warmup limitations group by name.

Parameter Requirement Description
--name Required The name of the warmup limitations group

113.4.4.1 Example of retrieving a warmup limitations group by name

./smart_replay_warmup_limitation_groups_api \
  --host localhost --port 8080 --user user@fmanager.com --https \
  get_by_name
  --name "highway_safety_limitations"

Example output

Group by name:
#######################
Group ID: a1b2c3d4e5f6g7h8
Name: highway_safety_limitations
Limitations:
  - ID: 7f8a9b3c4d2e1f0e, Name: speed_limit_80
  - ID: 1a2b3c4d5e6f7g8h, Name: lane_deviation
#######################

113.4.5 Renaming a warmup limitations group

The rename command renames a warmup limitations group.

Parameter Requirement Description
--group_id Required The ID of the warmup limitations group to rename
--name Required The name of the warmup limitations group to rename
--updated_name Required The new name for the warmup limitations group

113.4.5.1 Example of renaming a warmup limitations group

./smart_replay_warmup_limitation_groups_api \
  --host localhost --port 8080 --user user@fmanager.com --https \
  rename
  --group_id a1b2c3d4e5f6g7h8
  --name "driver_v1.2-v1.5"
  --updated_name "highway_safety_limitations"

Example output

Renamed group:
#######################
Group ID: a1b2c3d4e5f6g7h8
Name: highway_safety_limitations
Limitations:
  - ID: 7f8a9b3c4d2e1f0e, Name: speed_limit_80
  - ID: 1a2b3c4d5e6f7g8h, Name: lane_deviation
#######################

113.4.5.2 Adding warmup limitations to a group

The add_to_group command adds specified warmup limitations to an existing group.

Parameter Requirement Description
--group_id Required The ID of the warmup limitations group
--name Optional The name of the warmup limitations group. Either name or limitation_ids must be provided
--limitation_ids Optional A comma-separated list of limitation IDs to remove from the group. Either limitation_ids or name must be provided
113.4.5.2.1 Example of adding warmup limitations to a group
./smart_replay_warmup_limitation_groups_api \
 --host localhost --port 8080 --user user@fmanager.com --https \
 add_to_group
 --group_id a1b2c3d4e5f6g7h8 
 --limitation_ids "7f8a9b3c4d2e1f0e,1a2b3c4d5e6f7g8h,1k46c9428deb72483"

Example output

Updated group after adding limitations:
#######################
Group ID: a1b2c3d4e5f6g7h8
Name: highway_safety_limitations
Limitations:
  - ID: 1a2b3c4d5e6f7g8h, Name: lane_deviation
  - ID: 7f8a9b3c4d2e1f0e, Name:  speed_limit_80
  - ID: 1k46c9428deb72483, Name: speed_limit_120
#######################

113.4.5.3 Removing warmup limitations from a group

The remove_from_group command removes warmup limitations from a warmup limitations group.

Parameter Requirement Description
--group_id Required The ID of the warmup limitations group
--limitation_ids Required A comma-separated list of limitation IDs to remove from the group
113.4.5.3.1 Example of removing warmup limitations from a group
./smart_replay_warmup_limitation_groups_api \
  --host localhost --port 8080 --user user@fmanager.com --https \
  remove_from_group
  --group_id a1b2c3d4e5f6g7h8 
  --limitation_ids "7f8a9b3c4d2e1f0e"

Example output

Updated group after removing limitations:
#######################
Group ID: a1b2c3d4e5f6g7h8
Name: highway_safety_limitations
Limitations:
  - ID: 1a2b3c4d5e6f7g8h, Name: lane_deviation
  - ID: 1k46c9428deb72483, Name: speed_limit_120
#######################

113.4.5.4 Updating all warmup limitations in a group

The update command replaces all warmup limitations in a group with a new set of limitations. This command completely replaces any existing limitations in the group with the new set provided in the limitation_ids parameter.

./smart_replay_warmup_limitation_groups_api \
 --host <hostname> --port <port> --user <username> --https \
 update
 --group_id <group_id> 
 --limitation_ids <limitation_ids>
Parameter Requirement Description
--group_id Required The ID of the warmup limitations group to update
--limitation_ids Required A comma-separated list of limitation IDs to replace the existing limitations
113.4.5.4.1 Example of updating all warmup limitations in a group
./smart_replay_warmup_limitation_groups_api \
 --host fmanager.example.com --port 8080 --user admin --https \
 update
 --group_id "group-123" 
 --limitation_ids "4b99b74694d3bde38437,6452u77928d2fgw674337,9642b52829d5gwb22342"

Example output

Group with updated limitations:
#######################
Group ID: group-123
Name: my_group
Limitations:
  - ID: 4b99b74694d3bde38437
  - ID: 6452u77928d2fgw67437
  - ID: 9642b52829d5gwb22342
#######################

113.4.5.5 Deleting a group

The delete command deletes a warmup limitations group.

Parameter Requirement Description
--group_id Required The group ID to delete
--remove_from_export_configs Optional Flag to remove the groups from export configurations
113.4.5.5.1 Example
./smart_replay_warmup_limitation_groups_api \
  --host localhost --port 8080 --user user@fmanager.com --https \
  delete
  --group_id a1b2c3d4e5f6g7h8

Example output

Group a1b2c3d4e5f6g7h8 deleted.

113.4.5.6 Deleting multiple groups

The delete_multiple command deletes multiple warmup limitations groups in a single operation.

Parameter Requirement Description
--group_ids Required A comma-separated list of group IDs to delete
--remove_from_export_configs Optional Flag to remove the groups from export configurations
113.4.5.6.1 Example of deleting multiple groups
./smart_replay_warmup_limitation_groups_api \
 --host fmanager.example.com --port 8080 --user user@fmanager.com --https \
 delete_multiple
 --group_ids "a1b2c3d4e5f6g7h8,z9y8x7w6v5u4t3s2,y678j7w6v5u45t67" 
 --remove_from_export_configs

Example output

Found 1 group:
#######################
Group ID: lop2c3d4e5f6g78j
Name: safety_limitations_urban
Limitations:
  - ID: 8ji8a9b3c4d2euji, Name: speed_limit_100
#######################

113.4.5.7 Retrieving all groups

The get_all command retrieves all warmup limitations groups in the system.

113.4.5.7.1 Example of retrieving all groups
./smart_replay_warmup_limitation_groups_api \
  --host localhost --port 8080 --user user@fmanager.com --https \
  get_all

Example output

Found 1 group:
#######################
Group ID: y7u8x7w6v5u47uy8
Name: city_checks
Limitations:
  - ID: 2b3c4d5e6f7g8h9i0, Name: pedestrian_check
  - ID: 3c4d5e6f7g8h9i0j1, Name: traffic_light_check
#######################