air_sdk.endpoints.trainings
air_sdk.endpoints.trainings
Classes
Module Contents
Bases: typing.TypedDict
External user group data from NGC for a training event.
This data is retrieved from the NGC API and includes information about the user group, its members, and invitation status.
Bases: air_sdk.air_model.AirModel
Training model representing a training event with NGC group and cloned simulation.
Timing Constraints:
- event_time must be at least 5h in the future
- sim_start_time must be at least 1h in the future and 4h before event_time
- sim_end_time must be at least 24h after event_time
Update Restrictions: Only event_time, sim_start_time, and sim_end_time can be updated. Name, parent simulation, checkpoint, and attendees cannot be modified after creation.
The training_simulation field is a lazy-loaded foreign key. Accessing it will automatically fetch the full Simulation object from the API.
Unique identifier for the training event
Name of the training event (also NGC user group name, must be kebab-case)
Timestamp when the training was created
Timestamp when the training was last modified
Email of the client that created the training
Organization UUID associated with this training
Foreign key to template simulation (lazy loaded)
Name of the training simulation (read-only)
State of the training simulation (read-only)
When the training event will occur (must be 5h+ in future)
NGC external user group ID (must be kebab-case)
When workbenches are created/started (1h+ future, 4h before event_time)
When workbenches expire/destroyed (24h+ after event_time)
List of validated attendee email addresses
Whether workbenches have been created
Update individual fields of the training event.
Only event_time, sim_start_time, and sim_end_time can be updated. Name, parent simulation, checkpoint, and attendees cannot be modified via this endpoint after creation.
Timing Constraints:
- event_time: Must be at least 5h in the future
- sim_start_time: Must be 1h+ in future and 4h before event_time
- sim_end_time: Must be at least 24h after event_time
Parameters:
event_time– When the training event will occursim_start_time– When workbenches are created/startedsim_end_time– When workbenches expire/destroyed**kwargs– Additional fields for future API compatibility
Raises:
ValidationError– If timing constraints are violated
Example:
Add attendees to the training event.
Parameters:
attendees– List of email addresses to add as attendees**kwargs– Additional parameters
Example:
Remove attendees from the training event.
Parameters:
attendees– List of email addresses to remove from attendees**kwargs– Additional parameters
Example:
Get NGC external user group information.
Makes an external API call to NGC to retrieve full details about the training’s user group, including confirmed users and pending invitations.
Parameters:
**kwargs– Additional parameters
Returns:
NGC user group data including members and invitation status
Example:
Bases: air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.trainings.Training]
Endpoint API for managing training events.
Provides methods for listing, creating, retrieving, updating, and deleting training events, as well as managing attendees and retrieving NGC user group information.
List all training events.
Parameters:
limit– Number of results to return per pagename– Filter by training namengc_group_id– Filter by NGC external user group IDoffset– Initial index from which to return resultsordering– Order by field (prefix with ”-” for desc). Options: -created, -creator, -event_time, -modified, -name, -ngc_group_id, -sim_end_time, -sim_start_time, -training_simulation_name, -training_simulation_state, -workbenches_created, created, creator, event_time, modified, name, ngc_group_id, sim_end_time, sim_start_time, training_simulation_name, training_simulation_state, workbenches_createdsearch– Search by name, creator, training_simulation_name, training_simulation_state, event_time, sim_start_time, sim_end_time, createdtraining_simulation– Filter by template simulation IDworkbenches_created– Filter by workbenches creation status**params– Additional filter parameters
Returns:
Iterator of Training instances
Example:
Create a new training event with NGC group and cloned simulation.
The simulation will be cloned when creating the training. After cloning completes, the parent_simulation transitions to INACTIVE state and is no longer associated with the training. A dedicated training_simulation is created for the training session.
Parameters:
name– Name of the training event (must be kebab-case, used as NGC user group name)parent_simulation– Simulation to clone for the training (transitions to INACTIVE after cloning)attendees– List of attendee email addresses (required, case-sensitive, no duplicates)event_time– When the training event will occur (must be 5h+ in future, sim_end_time must be 24h+ after this)sim_start_time– When workbenches are created/started (must be 1h+ in future and 4h before event_time)sim_end_time– When workbenches expire/destroyed (must be 24h+ after event_time)parent_simulation_checkpoint– Checkpoint from parent_simulation to clone onto training_simulation (optional)**kwargs– Additional fields for future API compatibility
Returns:
Created Training instance
Example:
Retrieve a specific training event.
Parameters:
pk– Training ID**params– Additional query parameters
Returns:
Training instance
Example:
Update individual fields of a training event.
Only event_time, sim_start_time, and sim_end_time can be updated.
Parameters:
pk– Training IDevent_time– When the training event will occursim_start_time– When workbenches are created/startedsim_end_time– When workbenches expire/destroyed**kwargs– Additional fields for future API compatibility
Returns:
Updated Training instance
Example:
Delete a training event and its associated NGC user group.
Parameters:
pk– Training ID**kwargs– Additional parameters
Example:
Update individual fields of a training event.
Only event_time, sim_start_time, and sim_end_time can be updated. Name, parent simulation, checkpoint, and attendees cannot be modified after creation.
Timing Constraints:
- event_time: Must be at least 5h in the future
- sim_start_time: Must be 1h+ in future and 4h before event_time
- sim_end_time: Must be at least 24h after event_time
Parameters:
training– Training instance or training IDevent_time– When the training event will occursim_start_time– When workbenches are created/startedsim_end_time– When workbenches expire/destroyed**kwargs– Additional fields for future API compatibility
Returns:
Updated Training instance
Raises:
ValidationError– If timing constraints are violated
Example:
Add attendees to an existing training event.
Parameters:
training– Training instance or training IDattendees– List of email addresses to add**kwargs– Additional parameters
Example:
Remove attendees from an existing training event.
Parameters:
training– Training instance or training IDattendees– List of email addresses to remove**kwargs– Additional parameters
Example:
Get NGC external user group data for a training.
Makes an external API call to NGC to retrieve full details about the training’s user group, including confirmed users and pending invitations.
Requires AIR_INSTRUCTOR, AIR_ORG_ADMIN, or USER_ADMIN roles.
Parameters:
training– Training instance or ID**kwargs– Additional parameters
Returns:
NGC user group data including members and invitation status
Example: