> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/hypersim/automation-api-and-scripting/hypersim-api-references/target.md).

# Target

## Function: addTargetToManager

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Add target to HYPERSIM target manager          |
| **Parameters** | **targetHostName** (*str*) – target IP         |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |

## Function: diagnosticTarget

| **Section**    | **Description**                                         |
| -------------- | ------------------------------------------------------- |
| **Action**     | Prints a diagnostic report of the target configuration. |
| **Parameters** | **targetHostName** (*str*) – target IP                  |
| **Returns**    | Diagnostic report on the target (str)                   |
| **Raises**     | None                                                    |

## Function: getAllTargetsName

| **Section**    | **Description**                                  |
| -------------- | ------------------------------------------------ |
| **Action**     | Get all known targets by HYPERSIM target manager |
| **Parameters** | None                                             |
| **Returns**    | List of all known targets (str)                  |
| **Raises**     | None                                             |

## Function: getCurrentVersionOnTarget

| **Section**    | **Description**                        |
| -------------- | -------------------------------------- |
| **Action**     | Get current HYPERSIM version on target |
| **Parameters** | **targetHostName** (*str*) – target IP |
| **Returns**    | HYPERSIM version (str)                 |
| **Raises**     | None                                   |

## Function: getInstalledVersionOnTarget

| **Section**    | **Description**                               |
| -------------- | --------------------------------------------- |
| **Action**     | Get all HYPERSIM versions installed on target |
| **Parameters** | **targetHostName** (*str*) – target IP        |
| **Returns**    | List of all HYPERSIM versions (str)           |
| **Raises**     | None                                          |

## Function: installHypersimOnTarget

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Install HYPERSIM version on target             |
| **Parameters** | **targetHostName** (*str*) – target IP         |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |

## Function: isTargetReady

| **Section**    | **Description**                             |
| -------------- | ------------------------------------------- |
| **Action**     | Determine if target is ready for simulation |
| **Parameters** | **targetHostName** (*str*) – target IP      |
| **Returns**    | Ready status (bool)                         |
| **Raises**     | None                                        |

## Function: removeTargetFromManager

| **Section**    | **Description**                                |
| -------------- | ---------------------------------------------- |
| **Action**     | Remove target from HYPERSIM target manager     |
| **Parameters** | **targetHostName** (*str*) – target IP         |
| **Returns**    | Error value (int)                              |
| **Raises**     | **AssertionError** – Raises exception on error |

## Function: switchVersionOnTarget

| **Section**    | **Description**                                                                                                                                      |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Action**     | Switch HYPERSIM versions on target                                                                                                                   |
| **Parameters** | <p><strong>targetHostName</strong> (<em>str</em>) – target IP<br><strong>switchToVersion</strong> (<em>str</em>) – HYPERSIM version to switch to</p> |
| **Returns**    | Error value (int)                                                                                                                                    |
| **Raises**     | **AssertionError** – Raises exception on error                                                                                                       |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/hypersim/automation-api-and-scripting/hypersim-api-references/target.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
