---
title: "POST /update-db-target-details"
method: POST
path: "/update-db-target-details"
tags: ["Targets"]
---

# POST /update-db-target-details

`POST /update-db-target-details`

## Request

- Base URL: `https://api.akeyless.io`
- URL: `https://api.akeyless.io/update-db-target-details`
- Auth: none declared

## Request body

- UpdateDBTargetDetails
  - `db-type` string
  - `host` string
  - `json` boolean: Set output format to JSON
  - `keep-prev-version` string: Whether to keep previous version [true/false]. If not set, use default according to account settings
  - `mongo-db-name` string
  - `mongo-uri` string
  - `name` string, required: Target name
  - `new-version` boolean: Deprecated
  - `port` string
  - `protection_key` string: The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
  - `pwd` string
  - `token` string: Authentication token (see `/auth` and `/configure`)
  - `uid-token` string: The universal identity token, Required only for universal_identity authentication
  - `user-name` string

## Response `200`

updateTargetResponse wraps response body.

- UpdateTargetOutput
  - `updated` boolean

## Other responses

- `default`: errorResponse wraps any error to return it as a JSON object with one "error" field.

---

[API](https://skmtc.dev/akeyless/apis/infrastructure-connectivity.md) - [All operations](https://skmtc.dev/akeyless/apis/infrastructure-connectivity/llms.txt) - [OpenAPI document](https://skmtc.dev/akeyless/apis/infrastructure-connectivity/revisions/62dc62fea89d?raw)
