Amazon Bedrock Bedrock Retrievalinstructions API

The Bedrock Retrievalinstructions API from Amazon Bedrock — 2 operation(s) for bedrock retrievalinstructions.

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 /retrievalinstructions/ Create a retrieval instruction · Create Retrieval Instruction #
Ask an LLM
“How do I add a retrieval instruction to my account?”
“Can I encrypt a retrieval instruction with a customer-managed key?”
Tell an agent
Create retrieval instruction {name} with instruction {instruction}.
Create retrieval instruction {name} using customer key {customerEncryptionKeyArn}.
GET /retrievalinstructions/ List retrieval instructions · List Retrieval Instructions #
Ask an LLM
“Which retrieval instructions exist in my account?”
“Can I list only the retrieval instructions that are active?”
Tell an agent
List my retrieval instructions.
List retrieval instructions with status {status}.
GET /retrievalinstructions/{retrievalInstructionId} Get a retrieval instruction · Get Retrieval Instruction #
Ask an LLM
“What does a specific retrieval instruction say?”
“How do I check whether a retrieval instruction is ready?”
Tell an agent
Get retrieval instruction {retrievalInstructionId}.
Get version {retrievalInstructionVersion} of retrieval instruction {retrievalInstructionId}.
PUT /retrievalinstructions/{retrievalInstructionId} Update a retrieval instruction · Update Retrieval Instruction #
Ask an LLM
“How do I change the content of an existing retrieval instruction?”
“Is updating a retrieval instruction immediate or does it need review?”
Tell an agent
Update retrieval instruction {retrievalInstructionId} with instruction {instruction}.
Replace the description of retrieval instruction {retrievalInstructionId} with {description}.
DELETE /retrievalinstructions/{retrievalInstructionId} Delete a retrieval instruction · Delete Retrieval Instruction #
Ask an LLM
“How do I delete a retrieval instruction?”
“Can I delete just one version of a retrieval instruction?”
Tell an agent destructive · confirm first
Delete retrieval instruction {retrievalInstructionId}.
Delete version {retrievalInstructionVersion} of retrieval instruction {retrievalInstructionId}.

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-retrievalinstructions-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-retrievalinstructions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Bedrock Retrievalinstructions 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-agent.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /retrievalinstructions/:
    post:
      operationId: CreateRetrievalInstruction
      summary: Create Retrieval Instruction
      description: Creates a new retrieval instruction. The retrieval instruction is usable once its status becomes ACTIVE.
        Use GetRetrievalInstruction to check whether it is ready.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRetrievalInstructionResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '409':
          description: ConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '402':
          description: ServiceQuotaExceededException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceQuotaExceededException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentValidationException'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                clientToken:
                  type: string
                  description: A caller-supplied token that makes a retried create return the existing resource rather than
                    a second one. The window is 8 hours.
                name:
                  type: string
                  description: Specifies the name of the retrieval instruction.
                instruction:
                  $ref: '#/components/schemas/RetrievalInstructionContent'
                description:
                  type: string
                  description: Specifies a description of the retrieval instruction.
                customerEncryptionKeyArn:
                  type: string
                  description: The Amazon Resource Name (ARN) of a customer managed AWS Key Management Service (AWS KMS) key
                    used to encrypt the instruction content at rest. If you omit it, the service uses an AWS owned key. You
                    fix the key at create and cannot change it later.
                tags:
                  type: object
                  additionalProperties:
                    type: string
                  description: Tags for the retrieval instruction.
              required:
              - name
              - instruction
      tags:
      - Retrievalinstructions
    get:
      operationId: ListRetrievalInstructions
      summary: List Retrieval Instructions
      description: Lists the retrieval instructions in the caller's account. Results are paginated. Use the nextToken parameter
        to retrieve additional results.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRetrievalInstructionsResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentValidationException'
      parameters:
      - name: status
        in: query
        schema:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
        description: Return only instructions with this availability status.
      - name: maxResults
        in: query
        schema:
          type: integer
        description: The maximum number of results to return in a single page. The effective upper bound is enforced service-side.
      - name: nextToken
        in: query
        schema:
          type: string
        description: The pagination token from a previous ListRetrievalInstructions response.
      tags:
      - Retrievalinstructions
  /retrievalinstructions/{retrievalInstructionId}:
    get:
      operationId: GetRetrievalInstruction
      summary: Get Retrieval Instruction
      description: Gets a retrieval instruction. Also used to poll the terminal reporting of an asynchronous create or update.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRetrievalInstructionResponse'
        '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/BedrockAgentValidationException'
      parameters:
      - name: retrievalInstructionId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the retrieval instruction to get.
      - name: retrievalInstructionVersion
        in: query
        schema:
          type: string
        description: 'The version to return: a version number, or DRAFT for the retrieval instruction''s current reviewed
          content. When omitted, DRAFT is used. This default is permanent: omitting retrievalInstructionVersion will never
          resolve to a numbered version.'
      tags:
      - Retrievalinstructions
    put:
      operationId: UpdateRetrievalInstruction
      summary: Update Retrieval Instruction
      description: Updates the content of a retrieval instruction. The update is processed asynchronously; the stored content
        is a candidate until content review passes, and the served content does not change while the update is in flight.
        The service rejects the request with ConflictException while lastTransitionStatus is CREATING or UPDATING.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateRetrievalInstructionResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '409':
          description: ConflictException
          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'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentValidationException'
      parameters:
      - name: retrievalInstructionId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the retrieval instruction to update.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                instruction:
                  $ref: '#/components/schemas/RetrievalInstructionContent'
                description:
                  type: string
                  description: A replacement description; applied together with the content when the review passes. Omit to
                    clear.
              required:
              - instruction
      tags:
      - Retrievalinstructions
    delete:
      operationId: DeleteRetrievalInstruction
      summary: Delete Retrieval Instruction
      description: Deletes a retrieval instruction or a single version of it. Omit retrievalInstructionVersion to delete the
        retrieval instruction itself; the service rejects that request with ConflictException while the retrieval instruction
        has versions or while lastTransitionStatus is CREATING or UPDATING. Specify retrievalInstructionVersion to delete
        only that version; the retrieval instruction and its other versions are unaffected.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteRetrievalInstructionResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '409':
          description: ConflictException
          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'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentValidationException'
      parameters:
      - name: retrievalInstructionId
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the retrieval instruction to delete.
      - name: retrievalInstructionVersion
        in: query
        schema:
          type: string
        description: The version to delete. Omit this field to delete the retrieval instruction itself, which you can do only
          when it has no versions; while any version exists the service rejects the request with ConflictException. You cannot
          delete DRAFT on its own; deleting the retrieval instruction removes it.
      tags:
      - Retrievalinstructions
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
    BedrockAgentValidationException:
      type: object
      properties:
        message:
          type: string
        fieldList:
          type: array
          items:
            $ref: '#/components/schemas/ValidationExceptionField'
          description: A list of objects containing fields that caused validation errors and their corresponding validation
            error messages.
    ConflictException:
      type: object
      properties:
        message:
          type: string
    CreateRetrievalInstructionResponse:
      type: object
      properties:
        retrievalInstructionId:
          type: string
          description: The identifier of the newly created retrieval instruction.
        retrievalInstructionArn:
          type: string
          description: The ARN of the newly created retrieval instruction.
        name:
          type: string
          description: The name of the retrieval instruction.
        status:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
          description: Always INACTIVE on this response. The content review has not run when this call returns, so the resource
            is not yet usable.
        lastTransitionStatus:
          type: string
          enum:
          - CREATING
          - UPDATING
          - CREATE_SUCCESSFUL
          - CREATE_FAILED
          - UPDATE_SUCCESSFUL
          - UPDATE_FAILED
          description: Always CREATING on this response. Poll GetRetrievalInstruction until this member is neither CREATING
            nor UPDATING, then read the outcome from it.
        createdAt:
          type: string
          format: date-time
          description: When you created the retrieval instruction.
        updatedAt:
          type: string
          format: date-time
          description: When the retrieval instruction was last updated.
      required:
      - retrievalInstructionId
      - retrievalInstructionArn
      - name
      - status
      - lastTransitionStatus
      - createdAt
      - updatedAt
    DeleteRetrievalInstructionResponse:
      type: object
      properties:
        retrievalInstructionId:
          type: string
          description: The identifier of the deleted retrieval instruction.
        retrievalInstructionArn:
          type: string
          description: The ARN of the retrieval instruction.
        version:
          type: string
          description: The version that you deleted. Absent when you deleted the whole retrieval instruction.
      required:
      - retrievalInstructionId
      - retrievalInstructionArn
    GetRetrievalInstructionResponse:
      type: object
      properties:
        retrievalInstructionId:
          type: string
          description: The identifier of the retrieval instruction.
        retrievalInstructionArn:
          type: string
          description: The ARN of the retrieval instruction.
        name:
          type: string
          description: The name of the retrieval instruction.
        status:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
          description: 'Specifies whether you can use the instruction. You can resolve only an ACTIVE instruction at retrieval
            time. Monotone: INACTIVE to ACTIVE once, never back. Numbered versions are always ACTIVE.'
        lastTransitionStatus:
          type: string
          enum:
          - CREATING
          - UPDATING
          - CREATE_SUCCESSFUL
          - CREATE_FAILED
          - UPDATE_SUCCESSFUL
          - UPDATE_FAILED
          description: 'The outcome or in-progress state of the most recent create or update. CREATING or UPDATING means the
            operation is still running. Independent of status. Always has a value from the create 202 onward. On a numbered
            version this is always CREATE_SUCCESSFUL: a version is created once, from reviewed content, and is immutable.'
        instruction:
          $ref: '#/components/schemas/RetrievalInstructionContent'
        createdAt:
          type: string
          format: date-time
          description: When the retrieval instruction was created. On a numbered version, when that version was created.
        updatedAt:
          type: string
          format: date-time
          description: When the retrieval instruction was last updated. Equal to createdAt on a numbered version, which is
            immutable.
        description:
          type: string
          description: A description of the retrieval instruction. On a numbered version, the description of that version.
        customerEncryptionKeyArn:
          type: string
          description: The ARN of the customer managed KMS key protecting this content, when one was supplied at create.
        lastTransitionStatusReasons:
          type: array
          items:
            $ref: '#/components/schemas/RetrievalInstructionFailureReason'
          description: Why the most recent create or update was rejected. One entry for each rejected field, or a single entry
            when the review itself failed. Each entry has a machine-readable code and a message, and names the field when
            it applies to one. The service includes this field only when lastTransitionStatus is CREATE_FAILED or UPDATE_FAILED.
            Never present on a numbered version.
        version:
          type: string
          description: 'The version this response describes: a version number, or DRAFT.'
        latestVersion:
          type: string
          description: 'The largest version number that currently exists for this retrieval instruction, that is, the newest
            version you can retrieve. Present only on a DRAFT read, and only when at least one version exists. Because version
            numbers are never reused, deleting versions can leave gaps: this is the newest existing version, not a count and
            not the highest number ever created.'
      required:
      - retrievalInstructionId
      - retrievalInstructionArn
      - name
      - status
      - lastTransitionStatus
      - createdAt
      - updatedAt
    InternalServerException:
      type: object
      properties:
        message:
          type: string
    ListRetrievalInstructionsResponse:
      type: object
      properties:
        retrievalInstructionSummaries:
          type: array
          items:
            $ref: '#/components/schemas/RetrievalInstructionSummary'
          description: The retrieval instruction summaries in this page.
        nextToken:
          type: string
          description: The pagination token to pass to the next ListRetrievalInstructions call, absent on the last page.
      required:
      - retrievalInstructionSummaries
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
    RetrievalInstructionContent:
      type: object
      properties:
        retrievalGuidance:
          type: string
          description: How to interpret and decompose the question, and what to prioritise when searching.
        persona:
          type: string
          description: 'Who the assistant is: identity, tone and language.'
        answerFormat:
          type: string
          description: How the answer is structured, including how sources are cited.
        answerPolicy:
          type: string
          description: 'Whether and how to answer: how strongly an answer must be supported, and what to do with questions
            outside scope.'
    RetrievalInstructionFailureReason:
      type: object
      properties:
        fieldName:
          type: string
          enum:
          - RETRIEVAL_GUIDANCE
          - PERSONA
          - ANSWER_FORMAT
          - ANSWER_POLICY
          description: The instruction field this entry is about. Present on review rejections of a specific field; absent
            when the failure applies to the whole review, because a client-side execution failure or a service fault has no
            single field.
        code:
          type: string
          enum:
          - CONTENT_REJECTED
          - CLIENT_ERROR
          - INTERNAL_ERROR
          description: 'Stable, machine-readable classification by fault attribution. Valid values: CONTENT_REJECTED – The
            review rejected the named field''s content; revise the text and resubmit. CLIENT_ERROR – The review could not
            run for a customer-side reason, for example the customer managed AWS KMS key could not be used; fix the configuration
            and resubmit. INTERNAL_ERROR – The review could not complete due to a service fault; retry the create or update.
            New values may be added over time; your client should tolerate values it does not recognize and treat them as
            a failure.'
        message:
          type: string
          description: Human-readable explanation of the specific cause. Never contains the customer's own text.
      required:
      - code
      - message
    RetrievalInstructionSummary:
      type: object
      properties:
        retrievalInstructionId:
          type: string
          description: The identifier of the retrieval instruction.
        retrievalInstructionArn:
          type: string
          description: The ARN of the retrieval instruction.
        name:
          type: string
          description: The name of the retrieval instruction.
        status:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
          description: Whether the instruction can be used. Only ACTIVE is resolvable at retrieval time.
        lastTransitionStatus:
          type: string
          enum:
          - CREATING
          - UPDATING
          - CREATE_SUCCESSFUL
          - CREATE_FAILED
          - UPDATE_SUCCESSFUL
          - UPDATE_FAILED
          description: The outcome or in-progress state of the most recent create or update of the retrieval instruction.
        createdAt:
          type: string
          format: date-time
          description: When you created the retrieval instruction.
        updatedAt:
          type: string
          format: date-time
          description: When the retrieval instruction was last updated.
        description:
          type: string
          description: A description of the retrieval instruction.
      required:
      - retrievalInstructionId
      - retrievalInstructionArn
      - name
      - status
      - lastTransitionStatus
      - createdAt
      - updatedAt
    ServiceQuotaExceededException:
      type: object
      properties:
        message:
          type: string
    ThrottlingException:
      type: object
      properties:
        message:
          type: string
    UpdateRetrievalInstructionResponse:
      type: object
      properties:
        retrievalInstructionId:
          type: string
          description: The identifier of the retrieval instruction.
        retrievalInstructionArn:
          type: string
          description: The ARN of the retrieval instruction.
        name:
          type: string
          description: The name of the retrieval instruction.
        status:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
          description: Whether the instruction can be used. An update never lowers status. Unchanged from the previous value
            on this response.
        lastTransitionStatus:
          type: string
          enum:
          - CREATING
          - UPDATING
          - CREATE_SUCCESSFUL
          - CREATE_FAILED
          - UPDATE_SUCCESSFUL
          - UPDATE_FAILED
          description: Always UPDATING on this response. Poll GetRetrievalInstruction until this member is neither CREATING
            nor UPDATING, then read the outcome from it.
        createdAt:
          type: string
          format: date-time
          description: When you created the retrieval instruction.
        updatedAt:
          type: string
          format: date-time
          description: When the retrieval instruction was last updated.
      required:
      - retrievalInstructionId
      - retrievalInstructionArn
      - name
      - status
      - lastTransitionStatus
      - createdAt
      - updatedAt
    ValidationExceptionField:
      type: object
      properties:
        name:
          type: string
          description: The name of the field.
        message:
          type: string
          description: A message describing why this field failed validation.
      required:
      - name
      - message
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/bedrock-agent/service/2023-06-05/bedrock-agent-2023-06-05.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)