Target

Create a Target for a specific Workspace

post

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.

Authorizations
Path parameters
workspaceIdinteger · int32Required

Workspace Id.

Body

Request payload to create a new Target.

Responses
200
OK
application/json
post
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"
  }
}

Update a Target for a specific Workspace

patch

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

Authorizations
Path parameters
workspaceIdinteger · int32Required

Workspace Id.

targetIdinteger · int32Required

Target Id.

Body

Request payload to update an existing Target.

Responses
200
OK
application/json
patch
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"
  }
}

Retrieve a Target for a specific Workspace

get

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

Authorizations
Path parameters
workspaceIdinteger · int32Required

Workspace Id.

targetIdinteger · int32Required

Target Id.

Responses
200
OK
application/json
get
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 Workspace.

delete

Delete Target from the Workspace.

Authorizations
Path parameters
targetIdinteger · int32Required

Target Id.

workspaceIdinteger · int32Required

Workspace Id.

Responses
200
OK
application/json
delete
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"
  }
}

Target overview PDF report

get

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.

Authorizations
Path parameters
idinteger · int32Required

Target Id.

workspaceIdinteger · int32Required

Workspace Id.

Responses
200
OK
Responsestring · binary
get
GET /api/workspaces/{workspaceId}/target/{id}/report HTTP/1.1
Host: 
X-Api-Key: YOUR_API_KEY
Accept: */*
binary

Last updated