View a markdown version of this page

GetABTest - Amazon Bedrock AgentCore Data Plane

GetABTest

Retrieves detailed information about an A/B test, including its configuration, status, and statistical results.

Request Syntax

GET /ab-tests/abTestId HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

abTestId

The unique identifier of the A/B test to retrieve.

Pattern: [a-zA-Z][a-zA-Z0-9-_]{0,99}-[a-zA-Z0-9]{10}

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "abTestArn": "string", "abTestId": "string", "createdAt": number, "currentRunId": "string", "description": "string", "errorDetails": [ "string" ], "evaluationConfig": { ... }, "executionStatus": "string", "gatewayArn": "string", "gatewayFilter": { "targetPaths": [ "string" ] }, "maxDurationExpiresAt": number, "name": "string", "results": { "analysisTimestamp": number, "evaluatorMetrics": [ { "controlStats": { "mean": number, "sampleSize": number, "variantName": "string" }, "evaluatorArn": "string", "variantResults": [ { "absoluteChange": number, "confidenceInterval": { "lower": number, "upper": number }, "isSignificant": boolean, "mean": number, "percentChange": number, "pValue": number, "sampleSize": number, "variantName": "string" } ] } ] }, "roleArn": "string", "startedAt": number, "status": "string", "stoppedAt": number, "updatedAt": number, "variants": [ { "name": "string", "variantConfiguration": { "configurationBundle": { "bundleArn": "string", "bundleVersion": "string" }, "target": { "name": "string" } }, "weight": number } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

abTestArn

The Amazon Resource Name (ARN) of the A/B test.

Type: String

Pattern: arn:aws[a-zA-Z-]*:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:ab-test/[a-zA-Z][a-zA-Z0-9-_]{0,99}-[a-zA-Z0-9]{10}

abTestId

The unique identifier of the A/B test.

Type: String

Pattern: [a-zA-Z][a-zA-Z0-9-_]{0,99}-[a-zA-Z0-9]{10}

createdAt

The timestamp when the A/B test was created.

Type: Timestamp

currentRunId

The identifier of the current run of the A/B test.

Type: String

description

The description of the A/B test.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 200.

errorDetails

The error details if the A/B test encountered failures.

Type: Array of strings

Array Members: Minimum number of 0 items. Maximum number of 1 item.

Length Constraints: Minimum length of 0. Maximum length of 1000.

evaluationConfig

The evaluation configuration for measuring variant performance.

Type: ABTestEvaluationConfig object

Note: This object is a Union. Only one member of this object can be specified or returned.

executionStatus

The execution status indicating whether the A/B test is currently running.

Type: String

Valid Values: PAUSED | RUNNING | STOPPED | NOT_STARTED

gatewayArn

The Amazon Resource Name (ARN) of the gateway used for traffic splitting.

Type: String

Pattern: arn:aws(|-cn|-us-gov):bedrock-agentcore:[a-z0-9-]{1,20}:[0-9]{12}:gateway/([0-9a-z][-]?){1,48}-[a-z0-9]{10}

gatewayFilter

The gateway filter restricting which target paths are included.

Type: GatewayFilter object

maxDurationExpiresAt

The timestamp when the A/B test will automatically expire.

Type: Timestamp

name

The name of the A/B test.

Type: String

Pattern: [a-zA-Z][a-zA-Z0-9_]{0,47}

results

The statistical results of the A/B test, including per-evaluator metrics and significance analysis.

Type: ABTestResults object

roleArn

The IAM role ARN used by the A/B test.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+

startedAt

The timestamp when the A/B test was started.

Type: Timestamp

status

The current status of the A/B test.

Type: String

Valid Values: CREATING | ACTIVE | CREATE_FAILED | UPDATING | UPDATE_FAILED | DELETING | DELETE_FAILED | FAILED

stoppedAt

The timestamp when the A/B test was stopped.

Type: Timestamp

updatedAt

The timestamp when the A/B test was last updated.

Type: Timestamp

variants

The list of variants in the A/B test.

Type: Array of Variant objects

Array Members: Fixed number of 2 items.

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.

HTTP Status Code: 403

InternalServerException

The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.

HTTP Status Code: 500

ResourceNotFoundException

The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.

HTTP Status Code: 404

ThrottlingException

The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.

HTTP Status Code: 429

UnauthorizedException

This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access

HTTP Status Code: 401

ValidationException

The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: