Amazon Bedrock Bedrock Test Cases API

The Bedrock Test Cases API from Amazon Bedrock — 2 operation(s) for bedrock test cases.

GitHub OpenAPI

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /automated-reasoning-policies/{policyArn}/test-cases Add a test to an automated reasoning policy · Create Automated Reasoning Policy Test Case #
Ask an LLM
“How do I test that my automated reasoning policy returns the right answer?”
“Can I set a confidence threshold on a reasoning policy test?”
Tell an agent
Create a reasoning policy test on {policyArn} with expected result {expectedAggregatedFindingsResult} and content {guardContent}.
Add a reasoning test to {policyArn} with confidence threshold {confidenceThreshold}.
GET /automated-reasoning-policies/{policyArn}/test-cases List automated reasoning policy tests · List Automated Reasoning Policy Test Cases #
Ask an LLM
“What sample inputs and expected outcomes does my automated reasoning policy have?”
“Can I page through an automated reasoning policy's tests?”
Tell an agent
List the automated reasoning policy tests for {policyArn}.
Show up to {maxResults} reasoning policy tests on {policyArn}.
DELETE /automated-reasoning-policies/{policyArn}/test-cases/{testCaseId} Delete an automated reasoning policy test · Delete Automated Reasoning Policy Test Case #
Ask an LLM
“Can I remove a reasoning test from my policy?”
“Is deleting a reasoning test idempotent?”
Tell an agent destructive · confirm first
Delete reasoning test {testCaseId} from {policyArn}.
Remove test {testCaseId} on policy {policyArn} if it was last updated at {updatedAt}.
GET /automated-reasoning-policies/{policyArn}/test-cases/{testCaseId} Get an automated reasoning policy test · Get Automated Reasoning Policy Test Case #
Ask an LLM
“What input and expected outcome does one reasoning policy test have?”
“Can I fetch a single automated reasoning test by ID?”
Tell an agent
Get reasoning test {testCaseId} on {policyArn}.
Show the expected outcome of test {testCaseId} for policy {policyArn}.
PATCH /automated-reasoning-policies/{policyArn}/test-cases/{testCaseId} Update an automated reasoning policy test · Update Automated Reasoning Policy Test Case #
Ask an LLM
“Can I change the expected result of a reasoning test?”
“How do I raise the confidence threshold on an existing reasoning test?”
Tell an agent
Update reasoning test {testCaseId} on {policyArn} to expect {expectedAggregatedFindingsResult} with content {guardContent}.
Set the confidence threshold of reasoning test {testCaseId} on {policyArn} to {confidenceThreshold}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-bedrock:amazon-bedrock-test-cases-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-bedrock-test-cases-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Bedrock Test Cases API
  version: '2023-04-20'
  description: Generated from AWS's published Smithy model for Amazon Bedrock. 5 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://bedrock.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /automated-reasoning-policies/{policyArn}/test-cases:
    post:
      operationId: CreateAutomatedReasoningPolicyTestCase
      summary: Create Automated Reasoning Policy Test Case
      description: Creates a test for an Automated Reasoning policy. Tests validate that your policy works as expected by
        providing sample inputs and expected outcomes. Use tests to verify policy behavior before deploying to production.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAutomatedReasoningPolicyTestCaseResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '400':
          description: ConflictException; ServiceQuotaExceededException; ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      parameters:
      - name: policyArn
        in: path
        required: true
        schema:
          type: string
        description: The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to create the test.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                guardContent:
                  type: string
                  description: The output content that's validated by the Automated Reasoning policy. This represents the
                    foundation model response that will be checked for accuracy.
                queryContent:
                  type: string
                  description: The input query or prompt that generated the content. This provides context for the validation.
                expectedAggregatedFindingsResult:
                  type: string
                  enum:
                  - VALID
                  - INVALID
                  - SATISFIABLE
                  - IMPOSSIBLE
                  - TRANSLATION_AMBIGUOUS
                  - TOO_COMPLEX
                  - NO_TRANSLATION
                  description: 'The expected result of the Automated Reasoning check. Valid values include: , TOO_COMPLEX,
                    and NO_TRANSLATIONS. VALID - The claims are true. The claims are implied by the premises and the Automated
                    Reasoning policy. Given the Automated Reasoning policy and premises, it is not possible for these claims
                    to be false. In other words, there are no alternative answers that are true that contradict the claims.
                    INVALID - The claims are false. The claims are not implied by the premises and Automated Reasoning policy.
                    Furthermore, there exists different claims that are consistent with the premises and A'
                clientRequestToken:
                  type: string
                  description: A unique, case-sensitive identifier to ensure that the operation completes no more than one
                    time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return
                    an error.
                confidenceThreshold:
                  type: number
                  description: The minimum confidence level for logic validation. Content that meets the threshold is considered
                    a high-confidence finding that can be validated.
              required:
              - guardContent
              - expectedAggregatedFindingsResult
      tags:
      - Test Cases
    get:
      operationId: ListAutomatedReasoningPolicyTestCases
      summary: List Automated Reasoning Policy Test Cases
      description: Lists tests for an Automated Reasoning policy. We recommend using pagination to ensure that the operation
        returns quickly and successfully.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAutomatedReasoningPolicyTestCasesResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      parameters:
      - name: policyArn
        in: path
        required: true
        schema:
          type: string
        description: The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to list tests.
      - name: nextToken
        in: query
        schema:
          type: string
        description: The pagination token from a previous request to retrieve the next page of results.
      - name: maxResults
        in: query
        schema:
          type: integer
        description: The maximum number of tests to return in a single call.
      tags:
      - Test Cases
  /automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}:
    delete:
      operationId: DeleteAutomatedReasoningPolicyTestCase
      summary: Delete Automated Reasoning Policy Test Case
      description: Deletes an Automated Reasoning policy test. This operation is idempotent; if you delete a test more than
        once, each call succeeds.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteAutomatedReasoningPolicyTestCaseResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '400':
          description: ConflictException; ResourceInUseException; ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      parameters:
      - name: policyArn
        in: path
        required: true
        schema:
          type: string
        description: The Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test.
      - name: testCaseId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the test to delete.
      - name: updatedAt
        in: query
        required: true
        schema:
          type: string
          format: date-time
        description: The timestamp when the test was last updated. This is used as a concurrency token to prevent conflicting
          modifications.
      tags:
      - Test Cases
    get:
      operationId: GetAutomatedReasoningPolicyTestCase
      summary: Get Automated Reasoning Policy Test Case
      description: Retrieves details about a specific Automated Reasoning policy test.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAutomatedReasoningPolicyTestCaseResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      parameters:
      - name: policyArn
        in: path
        required: true
        schema:
          type: string
        description: The Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test.
      - name: testCaseId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the test to retrieve.
      tags:
      - Test Cases
    patch:
      operationId: UpdateAutomatedReasoningPolicyTestCase
      summary: Update Automated Reasoning Policy Test Case
      description: Updates an existing Automated Reasoning policy test. You can modify the content, query, expected result,
        and confidence threshold.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateAutomatedReasoningPolicyTestCaseResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '400':
          description: ConflictException; ResourceInUseException; ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      parameters:
      - name: policyArn
        in: path
        required: true
        schema:
          type: string
        description: The Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test.
      - name: testCaseId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the test to update.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                guardContent:
                  type: string
                  description: The updated content to be validated by the Automated Reasoning policy.
                queryContent:
                  type: string
                  description: The updated input query or prompt that generated the content.
                lastUpdatedAt:
                  type: string
                  format: date-time
                  description: The timestamp when the test was last updated. This is used as a concurrency token to prevent
                    conflicting modifications.
                expectedAggregatedFindingsResult:
                  type: string
                  enum:
                  - VALID
                  - INVALID
                  - SATISFIABLE
                  - IMPOSSIBLE
                  - TRANSLATION_AMBIGUOUS
                  - TOO_COMPLEX
                  - NO_TRANSLATION
                  description: The updated expected result of the Automated Reasoning check.
                confidenceThreshold:
                  type: number
                  description: The updated minimum confidence level for logic validation. If null is provided, the threshold
                    will be removed.
                clientRequestToken:
                  type: string
                  description: A unique, case-sensitive identifier to ensure that the operation completes no more than one
                    time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return
                    an error.
              required:
              - guardContent
              - lastUpdatedAt
              - expectedAggregatedFindingsResult
      tags:
      - Test Cases
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: bedrock
  schemas:
    AccessDeniedException:
      type: object
      properties:
        message:
          type: string
    AutomatedReasoningPolicyTestCase:
      type: object
      properties:
        testCaseId:
          type: string
          description: The unique identifier of the test.
        guardContent:
          type: string
          description: The output content to be validated by the policy, typically representing a foundation model response.
        queryContent:
          type: string
          description: The input query or prompt that generated the content. This provides context for the validation.
        expectedAggregatedFindingsResult:
          type: string
          enum:
          - VALID
          - INVALID
          - SATISFIABLE
          - IMPOSSIBLE
          - TRANSLATION_AMBIGUOUS
          - TOO_COMPLEX
          - NO_TRANSLATION
          description: The expected result of the Automated Reasoning check for this test.
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the test was created.
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the test was last updated.
        confidenceThreshold:
          type: number
          description: The minimum confidence level for logic validation. Content meeting this threshold is considered high-confidence
            and can be validated.
      required:
      - testCaseId
      - guardContent
      - createdAt
      - updatedAt
    ConflictException:
      type: object
      properties:
        message:
          type: string
    CreateAutomatedReasoningPolicyTestCaseResponse:
      type: object
      properties:
        policyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the policy for which the test was created.
        testCaseId:
          type: string
          description: The unique identifier of the created test.
      required:
      - policyArn
      - testCaseId
    DeleteAutomatedReasoningPolicyTestCaseResponse:
      type: object
      properties: {}
    GetAutomatedReasoningPolicyTestCaseResponse:
      type: object
      properties:
        policyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the policy that contains the test.
        testCase:
          $ref: '#/components/schemas/AutomatedReasoningPolicyTestCase'
      required:
      - policyArn
      - testCase
    InternalServerException:
      type: object
      properties:
        message:
          type: string
    ListAutomatedReasoningPolicyTestCasesResponse:
      type: object
      properties:
        testCases:
          type: array
          items:
            $ref: '#/components/schemas/AutomatedReasoningPolicyTestCase'
          description: A list of tests for the specified policy.
        nextToken:
          type: string
          description: The pagination token to use in a subsequent request to retrieve the next page of results.
      required:
      - testCases
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
    ThrottlingException:
      type: object
      properties:
        message:
          type: string
    UpdateAutomatedReasoningPolicyTestCaseResponse:
      type: object
      properties:
        policyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the policy that contains the updated test.
        testCaseId:
          type: string
          description: The unique identifier of the updated test.
      required:
      - policyArn
      - testCaseId
    ValidationException:
      type: object
      properties:
        message:
          type: string
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/bedrock/service/2023-04-20/bedrock-2023-04-20.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)