# Getting Started

## Hierarchy Of Concepts

To fully understand all the features available, keep in mind the **hierarchy of concepts** from higher to lower level:

* Workspace - the essential base required to create targets, perform tests, and configure probes, allowing all other actions and processes to be carried out within the platform.
  * [**Target**](https://docs.probe.splx.ai/ai-red-teaming/probe/target) - your **generative AI application being** tested by executing Test Runs.
    * [**Test Run**](https://docs.probe.splx.ai/ai-red-teaming/probe/test-run) **-** consist of one or more [**Probes**](https://docs.probe.splx.ai/ai-red-teaming/probe). When a Test Run is started, the associated Probe Runs are executed sequentially.
      * [**Probe Run**](https://docs.probe.splx.ai/ai-red-teaming/probe/probe-run) (e.g. Context Leakage, Jailbreak etc.) - all Test Cases **associated with the specific vulnerability** that the Probe is designed to detect. It cannot be triggered independently, it can only be triggered through a Test Run.
        * [**Test Case**](https://docs.probe.splx.ai/ai-red-teaming/probe/probe-run/test-case-details) **-** an adversarial attempt defined by a strategy, a red-teamer, and a variation. It is executed against the target and validated to determine whether the attack attempt succeeded. Based on the outcome the Test Case status is marked Passed (attack did not succeed) or Failed (attack succeeded, vulnerability found).

## AI Red Teaming

The REST API enables you to automate the same [testing workflow available through the Platform](https://docs.probe.splx.ai/ai-red-teaming/probe#getting-started). This section walks you through the typical steps of performing an AI system validation using the API.

1. **Authenticate**

* All users, including those on free accounts, [must generate a Personal Access Token and include it in a request header](https://docs.probe.splx.ai/platform-api/authentication) to interact with the Platform API. You can try your Authentication with a request a simple endpoint:\
  get `/api/workspace`

&#x20;

2. **Aquire your WorkspaceId**

* New Workspace - must be created through GUI.&#x20;

or

* [Get list of Workspaces (and their Targets) accessible to the user](https://docs.probe.splx.ai/api-reference/workspace#get-api-workspace):\
  get `/api/workspace`&#x20;

3. **Aquire your TargetId**

* [Create a Target for a specific Workspace](https://docs.probe.splx.ai/api-reference/target#post-api-v2-workspaces-workspaceid-target):\
  post `/api/v2/workspaces/{workspaceId}/target`

or

* Get TargetId from a step 2: Aquire your WorkspaceId.

{% hint style="info" %}
WorkspaceId, TargetId and ProbeId also can be checked [through GUI URL](https://docs.probe.splx.ai/platform-api/platform-url-s).
{% endhint %}

5. **Configure your Probes**

* [Check what is already configured on your Target](https://docs.probe.splx.ai/api-reference/workspace#get-api-workspace)\
  get `/api/workspaces/{workspaceId}/target/{targetId}/probe-settings`
* [Check which predefined probes can be configured (grouped by Probe Category)](https://docs.probe.splx.ai/api-reference/probe#get-api-probe-predefined)\
  get `/api/probe/predefined`
* [Activate new Probes for a Target, predefined or custom (Create a new Probe Settings)](https://docs.probe.splx.ai/api-reference/probe-settings#post-api-workspaces-workspaceid-target-targetid-probe-settings)\
  post `/api/workspaces/{workspaceId}/target/{targetId}/probe-settings`
* [Update existing Probes for a Target (Update Probe Settings)](https://docs.probe.splx.ai/api-reference/probe-settings#patch-api-workspaces-workspaceid-target-targetid-probe-settings-probesettingsid)\
  patch `/api/workspaces/{workspaceId}/target/{targetId}/probe-settings/{probeSettingsId}`

4. **Get your Target Connection information**

* [Check your Target's Connection Configuration](https://docs.probe.splx.ai/api-reference/target#get-api-v2-workspaces-workspaceid-target-targetid)\
  get `/api/v2/workspaces/{workspaceId}/target/{targetId}`
* Check your Target's connectivity (Ping)\
  \<todo>

6. **Execute a Test Run**

* [Trigger Test Run for a specific Target](https://docs.probe.splx.ai/api-reference/probe-settings#post-api-workspaces-workspaceid-target-targetid-probe-settings)\
  post `/api/workspaces/{workspaceId}/test-run/trigger`
* [Get Test Run status](https://docs.probe.splx.ai/api-reference/test-run#get-api-workspaces-workspaceid-test-run-id-status)\
  get `/api/workspaces/{workspaceId}/test-run/{id}/status`
