AI Gateway Datastores

Update an AI Gateway Datastore

Changed on

Updates the configuration of an existing AI Gateway Datastore. name and type are immutable after creation; attempting to change either is rejected.

Write-only fields in config, such as passwords and cloud credentials, are never returned in responses. On update, each write-only field follows these rules:

  • Omit the field to keep the stored value. A request built from a GET response therefore keeps every stored secret.
  • Set the field to null to clear the stored value.
  • Set the field to a new value to replace the stored value.

If the request changes config.cloud_authentication.auth_provider, the stored cloud secrets of the previous provider are not kept.

put/v1/ai-gateways/{gatewayId}/datastores/{datastoreIdOrName}

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

gatewayId, string uuid required

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

The unique ID of the AI Gateway.

datastoreIdOrName, string required

Identifier for an AI Gateway entity. In some cases, this may be the entity name or ID.

Example:my-entity-name

The unique ID or name of the AI Gateway Datastore.

Request body

union required

Configuration for an AI Gateway Datastore.

RedisCEDatastore required
OR
RedisEEDatastore required
OR
VectorDBDatastore required

Carries the pgvector connection only. strategy, dimensions, distance_metric, and threshold belong to the policy or model referencing this Datastore, not the Datastore itself.

OR
TokenVaultDatastore required

Example request

{
  "name": "shared-redis",
  "display_name": "Shared Redis",
  "description": "Redis shared by rate limiting and semantic cache",
  "labels": {
    "category": "finance"
  },
  "managed_by": {
    "owner": "terraform"
  },
  "config": {
    "host": "127.0.0.1",
    "cloud_authentication": {
      "auth_provider": "{vault://hcv/redis/auth_provider}"
    }
  }
}

Response

Datastore updated successfully.

union required

Configuration for an AI Gateway Datastore.

intersection required
OR
intersection required
OR
intersection required
OR
intersection required

Example response

{
  "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z",
  "konnect_managed": true,
  "name": "shared-redis",
  "display_name": "Shared Redis",
  "description": "Redis shared by rate limiting and semantic cache",
  "labels": {
    "category": "finance"
  },
  "managed_by": {
    "owner": "terraform"
  },
  "config": {
    "host": "127.0.0.1",
    "cloud_authentication": {
      "auth_provider": "{vault://hcv/redis/auth_provider}"
    }
  }
}

Changes

    • breaking

      the type request property const value redis-ce was added

    • breaking

      the type request property const value redis-ee was added

    • breaking

      the type request property const value token-vault was added

    13 more changes in this revision