Target
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.
Workspace Id.
Request payload to create a new Target.
POST /api/v2/workspaces/{workspaceId}/target HTTP/1.1
Host:
X-Api-Key: YOUR_API_KEY
Content-Type: application/*+json
Accept: */*
Content-Length: 890
{
"connection": {
"config": {
"apiKey": "api_key",
"deploymentName": "gpt-4o-deployment",
"systemPrompt": null,
"url": "https://your-azure-openai-endpoint.openai.azure.com/"
},
"type": "AZURE_OPENAI"
},
"settings": {
"concurrentRequests": true,
"description": "This is an example target for demonstration purposes.",
"environment": "PROD",
"language": "en",
"name": "Example Target",
"predefinedResponses": [
{
"type": "text",
"value": "This is a predefined response."
}
],
"ragFileId": "c1d2e29b-ca87-492a-ae38-565c106cfff5",
"ragFileNumberOfFacts": 5,
"rateLimit": 100,
"supportedModes": [
"text",
"video"
],
"systemPromptConfigurations": {
"systemPromptConfidential": "This is a confidential part of the system prompt.",
"systemPromptNotConfidential": "This is a non-confidential part of the system prompt.",
"systemPromptTools": "These are the tools available for the system prompt."
},
"targetPresetId": "666b268f-e999-4c79-ad8c-c646f33c4506"
}
}
{
"connection": {
"config": null,
"type": "text"
},
"id": 1,
"scanId": 1,
"settings": {
"concurrentRequests": true,
"description": "text",
"environment": "text",
"language": "text",
"name": "text",
"predefinedResponses": [
{
"type": "text",
"value": "text"
}
],
"ragFile": {
"ragFileId": "123e4567-e89b-12d3-a456-426614174000",
"ragFileName": "text",
"ragFileUrl": "text"
},
"ragFileNumberOfFacts": 1,
"rateLimit": 1,
"supportedModes": [
"text"
],
"systemPromptConfigurations": {
"systemPromptConfidential": "text",
"systemPromptNotConfidential": "text",
"systemPromptTools": "text"
},
"targetPresetId": "123e4567-e89b-12d3-a456-426614174000",
"workerPoolId": "123e4567-e89b-12d3-a456-426614174000"
}
}
This endpoint allows you to update an existing Target within a specified Workspace. The request body should contain the updated details for the Target.
Workspace Id.
Target Id.
Request payload to update an existing Target.
PATCH /api/v2/workspaces/{workspaceId}/target/{targetId} HTTP/1.1
Host:
X-Api-Key: YOUR_API_KEY
Content-Type: application/*+json
Accept: */*
Content-Length: 890
{
"connection": {
"config": {
"apiKey": "api_key",
"deploymentName": "gpt-4o-deployment",
"systemPrompt": null,
"url": "https://your-azure-openai-endpoint.openai.azure.com/"
},
"type": "AZURE_OPENAI"
},
"settings": {
"concurrentRequests": true,
"description": "This is an example target for demonstration purposes.",
"environment": "PROD",
"language": "en",
"name": "Example Target",
"predefinedResponses": [
{
"type": "text",
"value": "This is a predefined response."
}
],
"ragFileId": "9e9833b2-b264-4a86-9e93-363730bd416d",
"ragFileNumberOfFacts": 5,
"rateLimit": 100,
"supportedModes": [
"text",
"video"
],
"systemPromptConfigurations": {
"systemPromptConfidential": "This is a confidential part of the system prompt.",
"systemPromptNotConfidential": "This is a non-confidential part of the system prompt.",
"systemPromptTools": "These are the tools available for the system prompt."
},
"targetPresetId": "f9c8fd18-5868-41af-ad78-f34300e0a15f"
}
}
{
"connection": {
"config": null,
"type": "text"
},
"id": 1,
"scanId": 1,
"settings": {
"concurrentRequests": true,
"description": "text",
"environment": "text",
"language": "text",
"name": "text",
"predefinedResponses": [
{
"type": "text",
"value": "text"
}
],
"ragFile": {
"ragFileId": "123e4567-e89b-12d3-a456-426614174000",
"ragFileName": "text",
"ragFileUrl": "text"
},
"ragFileNumberOfFacts": 1,
"rateLimit": 1,
"supportedModes": [
"text"
],
"systemPromptConfigurations": {
"systemPromptConfidential": "text",
"systemPromptNotConfidential": "text",
"systemPromptTools": "text"
},
"targetPresetId": "123e4567-e89b-12d3-a456-426614174000",
"workerPoolId": "123e4567-e89b-12d3-a456-426614174000"
}
}
This endpoint allows you to retrieve details of a specific Target within a specified Workspace.
Workspace Id.
Target Id.
GET /api/v2/workspaces/{workspaceId}/target/{targetId} HTTP/1.1
Host:
X-Api-Key: YOUR_API_KEY
Accept: */*
{
"connection": {
"config": null,
"type": "text"
},
"id": 1,
"scanId": 1,
"settings": {
"concurrentRequests": true,
"description": "text",
"environment": "text",
"language": "text",
"name": "text",
"predefinedResponses": [
{
"type": "text",
"value": "text"
}
],
"ragFile": {
"ragFileId": "123e4567-e89b-12d3-a456-426614174000",
"ragFileName": "text",
"ragFileUrl": "text"
},
"ragFileNumberOfFacts": 1,
"rateLimit": 1,
"supportedModes": [
"text"
],
"systemPromptConfigurations": {
"systemPromptConfidential": "text",
"systemPromptNotConfidential": "text",
"systemPromptTools": "text"
},
"targetPresetId": "123e4567-e89b-12d3-a456-426614174000",
"workerPoolId": "123e4567-e89b-12d3-a456-426614174000"
}
}
Delete Target from the Workspace.
Target Id.
Workspace Id.
DELETE /api/workspaces/{workspaceId}/target/{targetId} HTTP/1.1
Host:
X-Api-Key: YOUR_API_KEY
Accept: */*
{
"connection": {
"config": null,
"type": "text"
},
"id": 1,
"scanId": 1,
"settings": {
"concurrentRequests": true,
"description": "text",
"environment": "text",
"language": "text",
"name": "text",
"predefinedResponses": [
{
"type": "text",
"value": "text"
}
],
"ragFile": {
"ragFileId": "123e4567-e89b-12d3-a456-426614174000",
"ragFileName": "text",
"ragFileUrl": "text"
},
"ragFileNumberOfFacts": 1,
"rateLimit": 1,
"supportedModes": [
"text"
],
"systemPromptConfigurations": {
"systemPromptConfidential": "text",
"systemPromptNotConfidential": "text",
"systemPromptTools": "text"
},
"targetPresetId": "123e4567-e89b-12d3-a456-426614174000",
"workerPoolId": "123e4567-e89b-12d3-a456-426614174000"
}
}
Generate a PDF report of target overview, which includes target details and a summary of the passed and failed test cases for each latest probe run execution.
Target Id.
Workspace Id.
GET /api/workspaces/{workspaceId}/target/{id}/report HTTP/1.1
Host:
X-Api-Key: YOUR_API_KEY
Accept: */*
binary
Last updated