# Target

## Create a Target for a specific Workspace

> This endpoint allows you to create a new Target within a specified Workspace. The request body should contain the necessary details for the new Target.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[{"name":"TargetV","description":"The API provides endpoints for triggering and canceling test runs, and for retrieving detailed information about their execution status and results."}],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"TargetNewCreateRequest":{"required":["connection","settings"],"type":"object","properties":{"connection":{"$ref":"#/components/schemas/IntegrationRequest"},"settings":{"$ref":"#/components/schemas/TargetSettingsCreateRequest"}},"additionalProperties":false,"description":"Request payload to create a new Target."},"IntegrationRequest":{"required":["config","type"],"type":"object","properties":{"type":{"type":"string","description":"Connection type. Options: OPENAI, OPENAI_REST_API, REST_API, DIFY, HUGGING_FACE, MISTRAL, ANTHROPIC, AZURE_OPENAI, AZURE_ML, GEMINI, BEDROCK"},"config":{"description":"Connection configuration object. The structure depends on the connection type.","type":"object","oneOf":[{"$ref":"#/components/schemas/OpenAIRestApiIntegrationConfig"},{"$ref":"#/components/schemas/RestApiIntegrationConfig"},{"$ref":"#/components/schemas/ProxySdkIntegrationConfig"},{"$ref":"#/components/schemas/DifyIntegrationConfig"},{"$ref":"#/components/schemas/OpenAIIntegrationConfig"},{"$ref":"#/components/schemas/HuggingFaceIntegrationConfig"},{"$ref":"#/components/schemas/MistralIntegrationConfig"},{"$ref":"#/components/schemas/AnthropicIntegrationConfig"},{"$ref":"#/components/schemas/AzureOpenAIIntegrationConfig"},{"$ref":"#/components/schemas/AzureMLIntegrationConfig"},{"$ref":"#/components/schemas/GeminiIntegrationConfig"},{"$ref":"#/components/schemas/BedrockIntegrationConfig"},{"$ref":"#/components/schemas/OpenAIAssistantConfig"},{"$ref":"#/components/schemas/DatabricksIntegrationConfig"},{"$ref":"#/components/schemas/CopilotStudioIntegrationConfig"}]}},"additionalProperties":false,"description":"Target connection configuration"},"OpenAIRestApiIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["extraLlmParams","headers","url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI compatible API endpoint URL for sending attack messages."},"model":{"type":"string","description":"OpenAI compatible LLM model name.","nullable":true},"systemPrompt":{"type":"string","description":"System prompt to be used for the LLM.","nullable":true},"headers":{"type":"object","additionalProperties":{},"description":"Key-value pairs necessary for your API Requests (e.g. Authorization).","nullable":true},"extraLlmParams":{"type":"object","additionalProperties":{},"description":"Additional parameters for the LLM inference supported by OpenAI compatible API."},"responsePayload":{"maxLength":512,"minLength":2,"type":"string","description":"The JSON path pointing to the message within your API response to the given request. [CURRENTLY NOT SUPPORTED]","nullable":true},"apiKey":{"type":"string","description":"API Key for authentication.","nullable":true}}}],"additionalProperties":false,"description":"OpenAI compatible API connection configuration. Connection type: OPENAI_REST_API"},"TargetConnectorConfigBase":{"type":"object","additionalProperties":false},"RestApiIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["headers","requestPayloadSample","responsePayload","url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"REST API endpoint URL for sending attack messages."},"requestPayloadSample":{"maxLength":10000,"minLength":2,"type":"string","description":"Sample POST request payload to be used for the REST API integration. Detailed documentation: https://docs.probe.splx.ai/platform/target/index/rest-api"},"responsePayload":{"maxLength":512,"minLength":2,"type":"string","description":"The JSON path pointing to the message within your API response to the given request."},"headers":{"type":"object","additionalProperties":{},"description":"Key-value pairs necessary for your API Requests (e.g. Authorization).","nullable":true},"oauth":{"$ref":"#/components/schemas/RestApiIntegrationOauthConfig"},"openSession":{"$ref":"#/components/schemas/RestApiOpenSessionIntegrationConfig"},"closeSession":{"$ref":"#/components/schemas/RestApiCloseSessionIntegrationConfig"}}}],"additionalProperties":false,"description":"REST API connection configuration. Connection type: REST_API"},"RestApiIntegrationOauthConfig":{"required":["clientId","clientSecret","scope","url"],"type":"object","properties":{"url":{"type":"string","description":"The url that should be used for OAuth."},"clientId":{"type":"string","description":"The client id that should be used for OAuth."},"clientSecret":{"type":"string","description":"The client secret that should be used for OAuth."},"scope":{"type":"string","description":"Space separated list of scopes that should be used for OAuth."},"additionalParameters":{"type":"object","additionalProperties":{},"nullable":true}},"additionalProperties":false},"RestApiOpenSessionIntegrationConfig":{"required":["requestPayloadSample","url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"REST API endpoint URL for opening a session."},"requestPayloadSample":{"maxLength":30000,"minLength":2,"type":"string","description":"Sample POST request payload to be used for opening a session."},"responsePayload":{"maxLength":512,"minLength":2,"type":"string","description":"The JSON path pointing to the session Id within your API response to the given open session request."}},"additionalProperties":false},"RestApiCloseSessionIntegrationConfig":{"required":["requestPayloadSample","url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"REST API endpoint URL for closing a session."},"requestPayloadSample":{"maxLength":30000,"minLength":2,"type":"string","description":"Sample POST request payload to be used for closing a session. Request must contain {session_id} placeholder."}},"additionalProperties":false},"ProxySdkIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"REST API endpoint URL for sending attack messages."},"apiKey":{"maxLength":500,"type":"string","description":"Optional API key to test for the proxy SDK.","nullable":true},"requestPayloadSample":{"maxLength":10000,"type":"string","description":"Sample POST request payload to be used for the Proxy SDK integration. Detailed documentation: https://docs.probe.splx.ai/platform/target/index/rest-api"},"headers":{"type":"object","additionalProperties":{},"description":"Key-value pairs necessary for your API Requests (e.g. Authorization).","nullable":true}}}],"additionalProperties":false,"description":"Proxy SDK connection configuration. Connection type: PROXY_SDK"},"DifyIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"Dify API Key for authentication."}}}],"additionalProperties":false,"description":"Dify connection configuration. Connection type: DIFY"},"OpenAIIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","model"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI API Key for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI LLM model name."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"OpenAI connection configuration. Connection type: OPENAI"},"HuggingFaceIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiType","model","token"],"type":"object","properties":{"token":{"maxLength":256,"minLength":2,"type":"string","description":"Hugging Face API token for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Hugging Face model name."},"apiType":{"type":"string","description":"API type for Hugging Face integration. Currently only supported is TEXT_GENERATION."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Connection configuration for Hugging Face API. Connection type: HUGGING_FACE"},"MistralIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","model"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"Mistral API Key for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Mistral LLM model name."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Mistral connection configuration. Connection type: MISTRAL"},"AnthropicIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","maxTokens","model"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"Anthropic API Key for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Anthropic LLM model name."},"maxTokens":{"type":"integer","description":"Parameter specifies the absolute maximum number of tokens that model can generate and return in the response.","format":"int32"},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Anthropic connection configuration. Connection type: ANTHROPIC"},"AzureOpenAIIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","deploymentName","url"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"API Key for Azure OpenAI authentication."},"url":{"maxLength":256,"minLength":2,"type":"string","description":"Azure OpenAI serverless endpoint URL."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true},"deploymentName":{"maxLength":256,"minLength":2,"type":"string","description":"Configured when setting up your Azure OpenAI model. This is the unique identifier that links to your specific model deployment."},"apiVersion":{"maxLength":50,"minLength":1,"type":"string","nullable":true},"extraLlmParams":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}}}],"additionalProperties":false,"description":"Azure OpenAI connection configuration. Connection type: AZURE_OPENAI"},"AzureMLIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","url"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"API Key for Azure ML authentication."},"url":{"maxLength":256,"minLength":2,"type":"string","description":"Azure ML serverless endpoint URL."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Azure ML connection configuration. Connection type: AZURE_ML"},"GeminiIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","model"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"Google Gemini API Key for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Google Gemini model name."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Google Gemini connection configuration. Connection type: GEMINI"},"BedrockIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["awsAccessKeyId","awsRegion","awsSecretAccessKey","model"],"type":"object","properties":{"model":{"maxLength":256,"minLength":2,"type":"string","description":"AWS Bedrock Model ID."},"awsAccessKeyId":{"maxLength":256,"minLength":2,"type":"string","description":"AWS Access Key ID for authentication."},"awsSecretAccessKey":{"maxLength":256,"minLength":2,"type":"string","description":"AWS Secret Access Key for authentication."},"awsRegion":{"maxLength":256,"minLength":2,"type":"string","description":"AWS region where the model is hosted."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true},"extraLlmParams":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional parameters for the LLM inference supported by AWS Bedrock.","nullable":true}}}],"additionalProperties":false,"description":"AWS Bedrock connection configuration. Connection type: BEDROCK"},"OpenAIAssistantConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","assistantId"],"type":"object","properties":{"assistantId":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI Assistant ID."},"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI API Key for authentication."}}}],"additionalProperties":false,"description":"OpenAI Assistant connection configuration. Connection type: OPENAI_ASSISTANT"},"DatabricksIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["model","workspaceUrl"],"type":"object","properties":{"workspaceUrl":{"maxLength":256,"minLength":2,"type":"string","description":"The base URL of Databricks workspace."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Databricks model endpoint name."},"accessToken":{"type":"string","description":"Databricks PAT for authentication. If OAuth is used, this field should be null."},"oAuth":{"$ref":"#/components/schemas/DatabricksOAuth"},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Databricks connection configuration. Connection type: DATABRICKS"},"DatabricksOAuth":{"required":["clientId","clientSecret"],"type":"object","properties":{"clientId":{"type":"string","description":"OAuth client Id."},"clientSecret":{"type":"string","description":"OAuth client secret."}},"additionalProperties":false,"description":"Databricks OAuth configuration."},"CopilotStudioIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["authenticationType"],"type":"object","properties":{"authenticationType":{"type":"string","nullable":true},"nonAuth":{"$ref":"#/components/schemas/CopilotStudioNonAuthIntegrationConfig"},"auth":{"$ref":"#/components/schemas/CopilotStudioAuthenticatedIntegrationConfig"}}}],"additionalProperties":false},"CopilotStudioNonAuthIntegrationConfig":{"required":["agentSecret","directLineRegion"],"type":"object","properties":{"agentSecret":{"type":"string","nullable":true},"directLineRegion":{"type":"string","nullable":true}},"additionalProperties":false},"CopilotStudioAuthenticatedIntegrationConfig":{"required":["clientId","envId","expiresAtTimestamp","refreshToken","schemaName","tenantId"],"type":"object","properties":{"clientId":{"type":"string","nullable":true},"tenantId":{"type":"string","nullable":true},"envId":{"type":"string","nullable":true},"schemaName":{"type":"string","nullable":true},"refreshToken":{"type":"string","nullable":true},"expiresAtTimestamp":{"type":"integer","format":"int64"}},"additionalProperties":false},"TargetSettingsCreateRequest":{"required":["concurrentRequests","description","environment","language","multiStepAttacks","name","rateLimit","supportedModes"],"type":"object","properties":{"name":{"maxLength":256,"minLength":2,"type":"string","description":"The name of the Target."},"environment":{"type":"string","description":"The environment of the Target. Options: PROD, STAGE, DEV"},"description":{"maxLength":2000,"minLength":2,"type":"string","description":"The description of the Target."},"language":{"type":"string","description":"The language of the Target. Supported languages can be currently found on Platform under Target Settings. Value is two latter language code by ISO 639-1 standard."},"rateLimit":{"type":"integer","description":"Specifies the rate limit for the target, in requests per second. Supported values range from 1 to 3000.","format":"int32"},"supportedModes":{"type":"array","items":{"type":"string"},"description":"The list of supported modes for the Target. Options: TEXT, IMAGE, DOCUMENT, AUDIO."},"concurrentRequests":{"type":"boolean","description":"Configures whether the Target can handle concurrent requests."},"multiStepAttacks":{"type":"boolean","description":"Configures whether multi-message attacks should be used."},"systemPromptConfigurations":{"$ref":"#/components/schemas/TargetSystemPromptConfigurations"},"ragFileId":{"type":"string","description":"The ID of the RAG file associated with the Target.","format":"uuid","nullable":true},"predefinedResponses":{"type":"array","items":{"$ref":"#/components/schemas/TargetPredefinedResponseRequest"},"description":"The list of predefined responses for the Target.","nullable":true},"ragFileNumberOfFacts":{"type":"integer","description":"The number of facts to use from the RAG file for the Target. Required if ragFileId is provided.","format":"int32","nullable":true},"targetPresetId":{"type":"string","description":"The ID of the target preset to use for the Target.","format":"uuid","nullable":true},"workerPoolId":{"type":"string","description":"The ID of the WorkerPool to use for the Target.","format":"uuid","nullable":true}},"additionalProperties":false,"description":"Request payload to update an existing Target's settings."},"TargetSystemPromptConfigurations":{"type":"object","properties":{"systemPromptConfidential":{"maxLength":30000,"type":"string","description":"Confidential part of the system prompt, used for sensitive information.","nullable":true},"systemPromptNotConfidential":{"maxLength":30000,"type":"string","description":"Not Confidential part of the system prompt, used for general information.","nullable":true},"systemPromptTools":{"maxLength":30000,"type":"string","description":"Raw Tools/Functions part of the system prompt, used for defining tools and functions.","nullable":true}},"additionalProperties":false},"TargetPredefinedResponseRequest":{"required":["type","value"],"type":"object","properties":{"type":{"type":"string","description":"Predefined response type. Options: TEXT, REGEX"},"value":{"type":"string","description":"Predefined response value. For type TEXT, a simple case-insensitive substring match is applied. For type REGEX, standard regular expression matching is used."}},"additionalProperties":false,"description":"Request payload for Target predefined response."},"TargetNewDto":{"required":["connection","id","scanId","settings"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"scanId":{"type":"integer","format":"int32"},"connection":{"$ref":"#/components/schemas/IntegrationDto"},"settings":{"$ref":"#/components/schemas/TargetNewSettingsDto"}},"additionalProperties":false},"IntegrationDto":{"required":["config","type"],"type":"object","properties":{"type":{"type":"string","nullable":true},"config":{"nullable":true}},"additionalProperties":false},"TargetNewSettingsDto":{"required":["concurrentRequests","description","environment","language","multiStepAttacks","name","supportedModes","systemPromptConfigurations"],"type":"object","properties":{"name":{"type":"string","nullable":true},"environment":{"type":"string","nullable":true},"supportedModes":{"type":"array","items":{"type":"string"},"nullable":true},"description":{"type":"string","nullable":true},"concurrentRequests":{"type":"boolean"},"multiStepAttacks":{"type":"boolean"},"language":{"type":"string","nullable":true},"rateLimit":{"type":"integer","format":"int32","nullable":true},"targetPresetId":{"type":"string","format":"uuid","nullable":true},"systemPromptConfigurations":{"$ref":"#/components/schemas/TargetSystemPromptConfigurations"},"ragFile":{"$ref":"#/components/schemas/RagFileDto"},"workerPoolId":{"type":"string","format":"uuid","nullable":true},"predefinedResponses":{"type":"array","items":{"$ref":"#/components/schemas/TargetPredefinedResponse"},"nullable":true},"ragFileNumberOfFacts":{"type":"integer","format":"int32","nullable":true}},"additionalProperties":false},"RagFileDto":{"required":["ragFileName","ragFileUrl"],"type":"object","properties":{"ragFileId":{"type":"string","format":"uuid"},"ragFileName":{"type":"string","nullable":true},"ragFileUrl":{"type":"string","nullable":true}},"additionalProperties":false},"TargetPredefinedResponse":{"required":["type","value"],"type":"object","properties":{"value":{"type":"string","nullable":true},"type":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/v2/workspaces/{workspaceId}/target":{"post":{"tags":["TargetV"],"summary":"Create a Target for a specific Workspace","description":"This endpoint allows you to create a new Target within a specified Workspace. The request body should contain the necessary details for the new Target.","parameters":[{"name":"workspaceId","in":"path","description":"Workspace Id.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/TargetNewCreateRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/TargetNewCreateRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/TargetNewCreateRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/TargetNewCreateRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetNewDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```

## Update a Target for a specific Workspace

> This endpoint allows you to update an existing Target within a specified Workspace. The request body should contain the updated details for the Target.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[{"name":"TargetV","description":"The API provides endpoints for triggering and canceling test runs, and for retrieving detailed information about their execution status and results."}],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"TargetNewUpdateRequest":{"type":"object","properties":{"connection":{"$ref":"#/components/schemas/IntegrationRequest"},"settings":{"$ref":"#/components/schemas/TargetSettingsCreateRequest"}},"additionalProperties":false,"description":"Request payload to update an existing Target."},"IntegrationRequest":{"required":["config","type"],"type":"object","properties":{"type":{"type":"string","description":"Connection type. Options: OPENAI, OPENAI_REST_API, REST_API, DIFY, HUGGING_FACE, MISTRAL, ANTHROPIC, AZURE_OPENAI, AZURE_ML, GEMINI, BEDROCK"},"config":{"description":"Connection configuration object. The structure depends on the connection type.","type":"object","oneOf":[{"$ref":"#/components/schemas/OpenAIRestApiIntegrationConfig"},{"$ref":"#/components/schemas/RestApiIntegrationConfig"},{"$ref":"#/components/schemas/ProxySdkIntegrationConfig"},{"$ref":"#/components/schemas/DifyIntegrationConfig"},{"$ref":"#/components/schemas/OpenAIIntegrationConfig"},{"$ref":"#/components/schemas/HuggingFaceIntegrationConfig"},{"$ref":"#/components/schemas/MistralIntegrationConfig"},{"$ref":"#/components/schemas/AnthropicIntegrationConfig"},{"$ref":"#/components/schemas/AzureOpenAIIntegrationConfig"},{"$ref":"#/components/schemas/AzureMLIntegrationConfig"},{"$ref":"#/components/schemas/GeminiIntegrationConfig"},{"$ref":"#/components/schemas/BedrockIntegrationConfig"},{"$ref":"#/components/schemas/OpenAIAssistantConfig"},{"$ref":"#/components/schemas/DatabricksIntegrationConfig"},{"$ref":"#/components/schemas/CopilotStudioIntegrationConfig"}]}},"additionalProperties":false,"description":"Target connection configuration"},"OpenAIRestApiIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["extraLlmParams","headers","url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI compatible API endpoint URL for sending attack messages."},"model":{"type":"string","description":"OpenAI compatible LLM model name.","nullable":true},"systemPrompt":{"type":"string","description":"System prompt to be used for the LLM.","nullable":true},"headers":{"type":"object","additionalProperties":{},"description":"Key-value pairs necessary for your API Requests (e.g. Authorization).","nullable":true},"extraLlmParams":{"type":"object","additionalProperties":{},"description":"Additional parameters for the LLM inference supported by OpenAI compatible API."},"responsePayload":{"maxLength":512,"minLength":2,"type":"string","description":"The JSON path pointing to the message within your API response to the given request. [CURRENTLY NOT SUPPORTED]","nullable":true},"apiKey":{"type":"string","description":"API Key for authentication.","nullable":true}}}],"additionalProperties":false,"description":"OpenAI compatible API connection configuration. Connection type: OPENAI_REST_API"},"TargetConnectorConfigBase":{"type":"object","additionalProperties":false},"RestApiIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["headers","requestPayloadSample","responsePayload","url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"REST API endpoint URL for sending attack messages."},"requestPayloadSample":{"maxLength":10000,"minLength":2,"type":"string","description":"Sample POST request payload to be used for the REST API integration. Detailed documentation: https://docs.probe.splx.ai/platform/target/index/rest-api"},"responsePayload":{"maxLength":512,"minLength":2,"type":"string","description":"The JSON path pointing to the message within your API response to the given request."},"headers":{"type":"object","additionalProperties":{},"description":"Key-value pairs necessary for your API Requests (e.g. Authorization).","nullable":true},"oauth":{"$ref":"#/components/schemas/RestApiIntegrationOauthConfig"},"openSession":{"$ref":"#/components/schemas/RestApiOpenSessionIntegrationConfig"},"closeSession":{"$ref":"#/components/schemas/RestApiCloseSessionIntegrationConfig"}}}],"additionalProperties":false,"description":"REST API connection configuration. Connection type: REST_API"},"RestApiIntegrationOauthConfig":{"required":["clientId","clientSecret","scope","url"],"type":"object","properties":{"url":{"type":"string","description":"The url that should be used for OAuth."},"clientId":{"type":"string","description":"The client id that should be used for OAuth."},"clientSecret":{"type":"string","description":"The client secret that should be used for OAuth."},"scope":{"type":"string","description":"Space separated list of scopes that should be used for OAuth."},"additionalParameters":{"type":"object","additionalProperties":{},"nullable":true}},"additionalProperties":false},"RestApiOpenSessionIntegrationConfig":{"required":["requestPayloadSample","url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"REST API endpoint URL for opening a session."},"requestPayloadSample":{"maxLength":30000,"minLength":2,"type":"string","description":"Sample POST request payload to be used for opening a session."},"responsePayload":{"maxLength":512,"minLength":2,"type":"string","description":"The JSON path pointing to the session Id within your API response to the given open session request."}},"additionalProperties":false},"RestApiCloseSessionIntegrationConfig":{"required":["requestPayloadSample","url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"REST API endpoint URL for closing a session."},"requestPayloadSample":{"maxLength":30000,"minLength":2,"type":"string","description":"Sample POST request payload to be used for closing a session. Request must contain {session_id} placeholder."}},"additionalProperties":false},"ProxySdkIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["url"],"type":"object","properties":{"url":{"maxLength":256,"minLength":2,"type":"string","description":"REST API endpoint URL for sending attack messages."},"apiKey":{"maxLength":500,"type":"string","description":"Optional API key to test for the proxy SDK.","nullable":true},"requestPayloadSample":{"maxLength":10000,"type":"string","description":"Sample POST request payload to be used for the Proxy SDK integration. Detailed documentation: https://docs.probe.splx.ai/platform/target/index/rest-api"},"headers":{"type":"object","additionalProperties":{},"description":"Key-value pairs necessary for your API Requests (e.g. Authorization).","nullable":true}}}],"additionalProperties":false,"description":"Proxy SDK connection configuration. Connection type: PROXY_SDK"},"DifyIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"Dify API Key for authentication."}}}],"additionalProperties":false,"description":"Dify connection configuration. Connection type: DIFY"},"OpenAIIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","model"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI API Key for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI LLM model name."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"OpenAI connection configuration. Connection type: OPENAI"},"HuggingFaceIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiType","model","token"],"type":"object","properties":{"token":{"maxLength":256,"minLength":2,"type":"string","description":"Hugging Face API token for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Hugging Face model name."},"apiType":{"type":"string","description":"API type for Hugging Face integration. Currently only supported is TEXT_GENERATION."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Connection configuration for Hugging Face API. Connection type: HUGGING_FACE"},"MistralIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","model"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"Mistral API Key for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Mistral LLM model name."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Mistral connection configuration. Connection type: MISTRAL"},"AnthropicIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","maxTokens","model"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"Anthropic API Key for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Anthropic LLM model name."},"maxTokens":{"type":"integer","description":"Parameter specifies the absolute maximum number of tokens that model can generate and return in the response.","format":"int32"},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Anthropic connection configuration. Connection type: ANTHROPIC"},"AzureOpenAIIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","deploymentName","url"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"API Key for Azure OpenAI authentication."},"url":{"maxLength":256,"minLength":2,"type":"string","description":"Azure OpenAI serverless endpoint URL."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true},"deploymentName":{"maxLength":256,"minLength":2,"type":"string","description":"Configured when setting up your Azure OpenAI model. This is the unique identifier that links to your specific model deployment."},"apiVersion":{"maxLength":50,"minLength":1,"type":"string","nullable":true},"extraLlmParams":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}}}],"additionalProperties":false,"description":"Azure OpenAI connection configuration. Connection type: AZURE_OPENAI"},"AzureMLIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","url"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"API Key for Azure ML authentication."},"url":{"maxLength":256,"minLength":2,"type":"string","description":"Azure ML serverless endpoint URL."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Azure ML connection configuration. Connection type: AZURE_ML"},"GeminiIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","model"],"type":"object","properties":{"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"Google Gemini API Key for authentication."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Google Gemini model name."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Google Gemini connection configuration. Connection type: GEMINI"},"BedrockIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["awsAccessKeyId","awsRegion","awsSecretAccessKey","model"],"type":"object","properties":{"model":{"maxLength":256,"minLength":2,"type":"string","description":"AWS Bedrock Model ID."},"awsAccessKeyId":{"maxLength":256,"minLength":2,"type":"string","description":"AWS Access Key ID for authentication."},"awsSecretAccessKey":{"maxLength":256,"minLength":2,"type":"string","description":"AWS Secret Access Key for authentication."},"awsRegion":{"maxLength":256,"minLength":2,"type":"string","description":"AWS region where the model is hosted."},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true},"extraLlmParams":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional parameters for the LLM inference supported by AWS Bedrock.","nullable":true}}}],"additionalProperties":false,"description":"AWS Bedrock connection configuration. Connection type: BEDROCK"},"OpenAIAssistantConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["apiKey","assistantId"],"type":"object","properties":{"assistantId":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI Assistant ID."},"apiKey":{"maxLength":256,"minLength":2,"type":"string","description":"OpenAI API Key for authentication."}}}],"additionalProperties":false,"description":"OpenAI Assistant connection configuration. Connection type: OPENAI_ASSISTANT"},"DatabricksIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["model","workspaceUrl"],"type":"object","properties":{"workspaceUrl":{"maxLength":256,"minLength":2,"type":"string","description":"The base URL of Databricks workspace."},"model":{"maxLength":256,"minLength":2,"type":"string","description":"Databricks model endpoint name."},"accessToken":{"type":"string","description":"Databricks PAT for authentication. If OAuth is used, this field should be null."},"oAuth":{"$ref":"#/components/schemas/DatabricksOAuth"},"systemPrompt":{"maxLength":30000,"minLength":2,"type":"string","description":"System prompt to be used for the LLM.","nullable":true}}}],"additionalProperties":false,"description":"Databricks connection configuration. Connection type: DATABRICKS"},"DatabricksOAuth":{"required":["clientId","clientSecret"],"type":"object","properties":{"clientId":{"type":"string","description":"OAuth client Id."},"clientSecret":{"type":"string","description":"OAuth client secret."}},"additionalProperties":false,"description":"Databricks OAuth configuration."},"CopilotStudioIntegrationConfig":{"allOf":[{"$ref":"#/components/schemas/TargetConnectorConfigBase"},{"required":["authenticationType"],"type":"object","properties":{"authenticationType":{"type":"string","nullable":true},"nonAuth":{"$ref":"#/components/schemas/CopilotStudioNonAuthIntegrationConfig"},"auth":{"$ref":"#/components/schemas/CopilotStudioAuthenticatedIntegrationConfig"}}}],"additionalProperties":false},"CopilotStudioNonAuthIntegrationConfig":{"required":["agentSecret","directLineRegion"],"type":"object","properties":{"agentSecret":{"type":"string","nullable":true},"directLineRegion":{"type":"string","nullable":true}},"additionalProperties":false},"CopilotStudioAuthenticatedIntegrationConfig":{"required":["clientId","envId","expiresAtTimestamp","refreshToken","schemaName","tenantId"],"type":"object","properties":{"clientId":{"type":"string","nullable":true},"tenantId":{"type":"string","nullable":true},"envId":{"type":"string","nullable":true},"schemaName":{"type":"string","nullable":true},"refreshToken":{"type":"string","nullable":true},"expiresAtTimestamp":{"type":"integer","format":"int64"}},"additionalProperties":false},"TargetSettingsCreateRequest":{"required":["concurrentRequests","description","environment","language","multiStepAttacks","name","rateLimit","supportedModes"],"type":"object","properties":{"name":{"maxLength":256,"minLength":2,"type":"string","description":"The name of the Target."},"environment":{"type":"string","description":"The environment of the Target. Options: PROD, STAGE, DEV"},"description":{"maxLength":2000,"minLength":2,"type":"string","description":"The description of the Target."},"language":{"type":"string","description":"The language of the Target. Supported languages can be currently found on Platform under Target Settings. Value is two latter language code by ISO 639-1 standard."},"rateLimit":{"type":"integer","description":"Specifies the rate limit for the target, in requests per second. Supported values range from 1 to 3000.","format":"int32"},"supportedModes":{"type":"array","items":{"type":"string"},"description":"The list of supported modes for the Target. Options: TEXT, IMAGE, DOCUMENT, AUDIO."},"concurrentRequests":{"type":"boolean","description":"Configures whether the Target can handle concurrent requests."},"multiStepAttacks":{"type":"boolean","description":"Configures whether multi-message attacks should be used."},"systemPromptConfigurations":{"$ref":"#/components/schemas/TargetSystemPromptConfigurations"},"ragFileId":{"type":"string","description":"The ID of the RAG file associated with the Target.","format":"uuid","nullable":true},"predefinedResponses":{"type":"array","items":{"$ref":"#/components/schemas/TargetPredefinedResponseRequest"},"description":"The list of predefined responses for the Target.","nullable":true},"ragFileNumberOfFacts":{"type":"integer","description":"The number of facts to use from the RAG file for the Target. Required if ragFileId is provided.","format":"int32","nullable":true},"targetPresetId":{"type":"string","description":"The ID of the target preset to use for the Target.","format":"uuid","nullable":true},"workerPoolId":{"type":"string","description":"The ID of the WorkerPool to use for the Target.","format":"uuid","nullable":true}},"additionalProperties":false,"description":"Request payload to update an existing Target's settings."},"TargetSystemPromptConfigurations":{"type":"object","properties":{"systemPromptConfidential":{"maxLength":30000,"type":"string","description":"Confidential part of the system prompt, used for sensitive information.","nullable":true},"systemPromptNotConfidential":{"maxLength":30000,"type":"string","description":"Not Confidential part of the system prompt, used for general information.","nullable":true},"systemPromptTools":{"maxLength":30000,"type":"string","description":"Raw Tools/Functions part of the system prompt, used for defining tools and functions.","nullable":true}},"additionalProperties":false},"TargetPredefinedResponseRequest":{"required":["type","value"],"type":"object","properties":{"type":{"type":"string","description":"Predefined response type. Options: TEXT, REGEX"},"value":{"type":"string","description":"Predefined response value. For type TEXT, a simple case-insensitive substring match is applied. For type REGEX, standard regular expression matching is used."}},"additionalProperties":false,"description":"Request payload for Target predefined response."},"TargetNewDto":{"required":["connection","id","scanId","settings"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"scanId":{"type":"integer","format":"int32"},"connection":{"$ref":"#/components/schemas/IntegrationDto"},"settings":{"$ref":"#/components/schemas/TargetNewSettingsDto"}},"additionalProperties":false},"IntegrationDto":{"required":["config","type"],"type":"object","properties":{"type":{"type":"string","nullable":true},"config":{"nullable":true}},"additionalProperties":false},"TargetNewSettingsDto":{"required":["concurrentRequests","description","environment","language","multiStepAttacks","name","supportedModes","systemPromptConfigurations"],"type":"object","properties":{"name":{"type":"string","nullable":true},"environment":{"type":"string","nullable":true},"supportedModes":{"type":"array","items":{"type":"string"},"nullable":true},"description":{"type":"string","nullable":true},"concurrentRequests":{"type":"boolean"},"multiStepAttacks":{"type":"boolean"},"language":{"type":"string","nullable":true},"rateLimit":{"type":"integer","format":"int32","nullable":true},"targetPresetId":{"type":"string","format":"uuid","nullable":true},"systemPromptConfigurations":{"$ref":"#/components/schemas/TargetSystemPromptConfigurations"},"ragFile":{"$ref":"#/components/schemas/RagFileDto"},"workerPoolId":{"type":"string","format":"uuid","nullable":true},"predefinedResponses":{"type":"array","items":{"$ref":"#/components/schemas/TargetPredefinedResponse"},"nullable":true},"ragFileNumberOfFacts":{"type":"integer","format":"int32","nullable":true}},"additionalProperties":false},"RagFileDto":{"required":["ragFileName","ragFileUrl"],"type":"object","properties":{"ragFileId":{"type":"string","format":"uuid"},"ragFileName":{"type":"string","nullable":true},"ragFileUrl":{"type":"string","nullable":true}},"additionalProperties":false},"TargetPredefinedResponse":{"required":["type","value"],"type":"object","properties":{"value":{"type":"string","nullable":true},"type":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/v2/workspaces/{workspaceId}/target/{targetId}":{"patch":{"tags":["TargetV"],"summary":"Update a Target for a specific Workspace","description":"This endpoint allows you to update an existing Target within a specified Workspace. The request body should contain the updated details for the Target.","parameters":[{"name":"workspaceId","in":"path","description":"Workspace Id.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"targetId","in":"path","description":"Target Id.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/TargetNewUpdateRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/TargetNewUpdateRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/TargetNewUpdateRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/TargetNewUpdateRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetNewDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```

## Retrieve a Target for a specific Workspace

> This endpoint allows you to retrieve details of a specific Target within a specified Workspace.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[{"name":"TargetV","description":"The API provides endpoints for triggering and canceling test runs, and for retrieving detailed information about their execution status and results."}],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"TargetNewDto":{"required":["connection","id","scanId","settings"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"scanId":{"type":"integer","format":"int32"},"connection":{"$ref":"#/components/schemas/IntegrationDto"},"settings":{"$ref":"#/components/schemas/TargetNewSettingsDto"}},"additionalProperties":false},"IntegrationDto":{"required":["config","type"],"type":"object","properties":{"type":{"type":"string","nullable":true},"config":{"nullable":true}},"additionalProperties":false},"TargetNewSettingsDto":{"required":["concurrentRequests","description","environment","language","multiStepAttacks","name","supportedModes","systemPromptConfigurations"],"type":"object","properties":{"name":{"type":"string","nullable":true},"environment":{"type":"string","nullable":true},"supportedModes":{"type":"array","items":{"type":"string"},"nullable":true},"description":{"type":"string","nullable":true},"concurrentRequests":{"type":"boolean"},"multiStepAttacks":{"type":"boolean"},"language":{"type":"string","nullable":true},"rateLimit":{"type":"integer","format":"int32","nullable":true},"targetPresetId":{"type":"string","format":"uuid","nullable":true},"systemPromptConfigurations":{"$ref":"#/components/schemas/TargetSystemPromptConfigurations"},"ragFile":{"$ref":"#/components/schemas/RagFileDto"},"workerPoolId":{"type":"string","format":"uuid","nullable":true},"predefinedResponses":{"type":"array","items":{"$ref":"#/components/schemas/TargetPredefinedResponse"},"nullable":true},"ragFileNumberOfFacts":{"type":"integer","format":"int32","nullable":true}},"additionalProperties":false},"TargetSystemPromptConfigurations":{"type":"object","properties":{"systemPromptConfidential":{"maxLength":30000,"type":"string","description":"Confidential part of the system prompt, used for sensitive information.","nullable":true},"systemPromptNotConfidential":{"maxLength":30000,"type":"string","description":"Not Confidential part of the system prompt, used for general information.","nullable":true},"systemPromptTools":{"maxLength":30000,"type":"string","description":"Raw Tools/Functions part of the system prompt, used for defining tools and functions.","nullable":true}},"additionalProperties":false},"RagFileDto":{"required":["ragFileName","ragFileUrl"],"type":"object","properties":{"ragFileId":{"type":"string","format":"uuid"},"ragFileName":{"type":"string","nullable":true},"ragFileUrl":{"type":"string","nullable":true}},"additionalProperties":false},"TargetPredefinedResponse":{"required":["type","value"],"type":"object","properties":{"value":{"type":"string","nullable":true},"type":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/v2/workspaces/{workspaceId}/target/{targetId}":{"get":{"tags":["TargetV"],"summary":"Retrieve a Target for a specific Workspace","description":"This endpoint allows you to retrieve details of a specific Target within a specified Workspace.","parameters":[{"name":"workspaceId","in":"path","description":"Workspace Id.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"targetId","in":"path","description":"Target Id.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetNewDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```

## Delete Target from Workspace.

> Delete Target from the Workspace.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"TargetNewDto":{"required":["connection","id","scanId","settings"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"scanId":{"type":"integer","format":"int32"},"connection":{"$ref":"#/components/schemas/IntegrationDto"},"settings":{"$ref":"#/components/schemas/TargetNewSettingsDto"}},"additionalProperties":false},"IntegrationDto":{"required":["config","type"],"type":"object","properties":{"type":{"type":"string","nullable":true},"config":{"nullable":true}},"additionalProperties":false},"TargetNewSettingsDto":{"required":["concurrentRequests","description","environment","language","multiStepAttacks","name","supportedModes","systemPromptConfigurations"],"type":"object","properties":{"name":{"type":"string","nullable":true},"environment":{"type":"string","nullable":true},"supportedModes":{"type":"array","items":{"type":"string"},"nullable":true},"description":{"type":"string","nullable":true},"concurrentRequests":{"type":"boolean"},"multiStepAttacks":{"type":"boolean"},"language":{"type":"string","nullable":true},"rateLimit":{"type":"integer","format":"int32","nullable":true},"targetPresetId":{"type":"string","format":"uuid","nullable":true},"systemPromptConfigurations":{"$ref":"#/components/schemas/TargetSystemPromptConfigurations"},"ragFile":{"$ref":"#/components/schemas/RagFileDto"},"workerPoolId":{"type":"string","format":"uuid","nullable":true},"predefinedResponses":{"type":"array","items":{"$ref":"#/components/schemas/TargetPredefinedResponse"},"nullable":true},"ragFileNumberOfFacts":{"type":"integer","format":"int32","nullable":true}},"additionalProperties":false},"TargetSystemPromptConfigurations":{"type":"object","properties":{"systemPromptConfidential":{"maxLength":30000,"type":"string","description":"Confidential part of the system prompt, used for sensitive information.","nullable":true},"systemPromptNotConfidential":{"maxLength":30000,"type":"string","description":"Not Confidential part of the system prompt, used for general information.","nullable":true},"systemPromptTools":{"maxLength":30000,"type":"string","description":"Raw Tools/Functions part of the system prompt, used for defining tools and functions.","nullable":true}},"additionalProperties":false},"RagFileDto":{"required":["ragFileName","ragFileUrl"],"type":"object","properties":{"ragFileId":{"type":"string","format":"uuid"},"ragFileName":{"type":"string","nullable":true},"ragFileUrl":{"type":"string","nullable":true}},"additionalProperties":false},"TargetPredefinedResponse":{"required":["type","value"],"type":"object","properties":{"value":{"type":"string","nullable":true},"type":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/workspaces/{workspaceId}/target/{targetId}":{"delete":{"tags":["Target"],"summary":"Delete Target from Workspace.","description":"Delete Target from the Workspace.","parameters":[{"name":"targetId","in":"path","description":"Target Id.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"workspaceId","in":"path","description":"Workspace Id.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetNewDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```

## Get Target types.

> Retrieves a list of available Target Types (e.g. Private With RAG), including metadata and associated probe settings.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[{"name":"TargetV","description":"The API provides endpoints for triggering and canceling test runs, and for retrieving detailed information about their execution status and results."}],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"RiskScorePresetDto":{"required":["details","id","label"],"type":"object","properties":{"id":{"type":"string","description":"Target type Id.","format":"uuid"},"label":{"type":"string","description":"Target type label/name."},"details":{"type":"array","items":{"$ref":"#/components/schemas/RiskScorePresetDetailsDto"},"description":"A list of information for each Probe, including whether it is recommended and its associated Risk Level."}},"additionalProperties":false,"description":"Defines various target configurations and their key characteristics. It helps determine which Probes are most appropriate and what Risk Levels apply, ensuring accurate analysis based on the specific setup."},"RiskScorePresetDetailsDto":{"required":["isRecommended","probeId","weight"],"type":"object","properties":{"probeId":{"type":"integer","description":"Probe Id.","format":"int32"},"isRecommended":{"type":"boolean","description":"Boolean indicating whether the Probe is recommended for the given Target type."},"weight":{"$ref":"#/components/schemas/RiskScoreWeight"}},"additionalProperties":false},"RiskScoreWeight":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"],"type":"string"},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/target/types":{"get":{"tags":["TargetV"],"summary":"Get Target types.","description":"Retrieves a list of available Target Types (e.g. Private With RAG), including metadata and associated probe settings.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RiskScorePresetDto"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```

## Retrieve overall scores and category breakdown for a Target

> Returns the overall score and scores per category for a specific Target within a Workspace. Scores are calculated based on the latest probe run results and provide insights into security vulnerabilities, compliance issues, and other risk factors.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[{"name":"TargetV","description":"The API provides endpoints for triggering and canceling test runs, and for retrieving detailed information about their execution status and results."}],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"ScanScoreOverviewDto":{"required":["latestExecutionDate","overallScore","simulatedAttacks","successfulAttacks"],"type":"object","properties":{"simulatedAttacks":{"type":"integer","description":"Total number of simulated attacks executed during the probe runs.","format":"int32"},"successfulAttacks":{"type":"integer","description":"Number of attacks that successfully exploited vulnerabilities or weaknesses.","format":"int32"},"overallScore":{"type":"integer","description":"Current overall score calculated from all probe results. Scale: 0-100 (0 = Critical Risk, 100 = Low Risk).","format":"int32"},"scores":{"type":"object","additionalProperties":{"type":"number","format":"double","nullable":true},"description":"Overall score broken down by category (e.g., 'Safety', 'Security', 'Business Alignment', 'Hallucination & Trustworthiness' and 'Custom').","nullable":true},"latestExecutionDate":{"type":"string","description":"Timestamp of the most recent probe execution used in this overall score calculation.","format":"date-time"}},"additionalProperties":false,"description":"Response payload containing overall score overview and detailed category breakdown from probe scan results."},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/workspaces/{workspaceId}/target/{targetId}/scores":{"get":{"tags":["TargetV"],"summary":"Retrieve overall scores and category breakdown for a Target","description":"Returns the overall score and scores per category for a specific Target within a Workspace. Scores are calculated based on the latest probe run results and provide insights into security vulnerabilities, compliance issues, and other risk factors.","parameters":[{"name":"workspaceId","in":"path","description":"Workspace Id.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"targetId","in":"path","description":"Target Id.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanScoreOverviewDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```

## Retrieve test runs for a Target

> Returns a list of test runs for a specific Target within a Workspace. This includes all test runs with their execution status, progress, probes and result summaries.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[{"name":"TargetV","description":"The API provides endpoints for triggering and canceling test runs, and for retrieving detailed information about their execution status and results."}],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"ScanRunExecutionDto":{"required":["id","name","probes","startedBy","status"],"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the test run execution.","format":"int32"},"name":{"type":"string","description":"Name of the test run execution.","nullable":true},"executionDate":{"type":"string","description":"Timestamp when the test run was executed. Null if not yet executed.","format":"date-time","nullable":true},"startedBy":{"type":"string","description":"Email of the user who initiated this test run.","nullable":true},"errorCount":{"type":"integer","description":"Number of test cases that encountered execution errors.","format":"int32"},"passedCount":{"type":"integer","description":"Number of test cases that passed (no risk found).","format":"int32"},"failedCount":{"type":"integer","description":"Number of test cases that failed (potential risk detected).","format":"int32"},"totalCount":{"type":"integer","description":"Total number of test cases planned for execution.","format":"int32"},"progress":{"type":"number","description":"Test run progress.","format":"float"},"status":{"type":"string","description":"Current status of the test run (e.g., 'RUNNING', 'COMPLETED', 'FAILED' and 'CANCELLED').","nullable":true},"probes":{"type":"array","items":{"type":"string"},"description":"List of probe names included in this test run.","nullable":true}},"additionalProperties":false,"description":"Response payload containing execution details and status information for a test run."},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/workspaces/{workspaceId}/target/{targetId}/test-runs":{"get":{"tags":["TargetV"],"summary":"Retrieve test runs for a Target","description":"Returns a list of test runs for a specific Target within a Workspace. This includes all test runs with their execution status, progress, probes and result summaries.","parameters":[{"name":"workspaceId","in":"path","description":"Workspace Id.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"targetId","in":"path","description":"Target Id.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScanRunExecutionDto"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.probe.splx.ai/platform-api/api-reference/target.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
