---
title: "POST /get-target"
method: POST
path: "/get-target"
tags: ["v2"]
---

# POST /get-target

`POST /get-target`

## Request body

- GetTarget — getTarget is a command that returns target. [Deprecated: Use target-get command]
  - `json` boolean — Set output format to JSON
  - `name` string, required — Target name
  - `show-versions` boolean — Include all target versions in reply
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication

## Response `200`

getTargetResponse wraps response body.

- Target
  - `access_date` string, date-time
  - `access_date_display` string
  - `access_request_status` string
  - `attributes` object — this is not "omitempty" since an empty value causes no update while an empty map will clear the attributes
  - `client_permissions` string[]
  - `comment` string
  - `creation_date` string, date-time
  - `delete_protection` boolean
  - `is_access_request_enabled` boolean
  - `last_version` integer
  - `locking_info` LockingInfo
    - `actions` string[]
    - `expire_at` integer
    - `locked_by` string
    - `unique_identifier` string
  - `modification_date` string, date-time
  - `parent_target_name` string
  - `protection_key_name` string
  - `target_details` string
  - `target_id` integer
  - `target_items_assoc` TargetItemAssociation[]
    - `assoc_id` string
    - `attributes` object
    - `cluster_id` integer
    - `item_id` integer
    - `item_name` string
    - `item_type` string
    - `relationship` string
  - `target_name` string
  - `target_sub_type` string
  - `target_type` string
  - `target_versions` ItemVersion[]
    - `access_date` string, date-time
    - `access_date_display` string
    - `access_id` string
    - `certificate_version_info` CertificateVersionInfo
      - `not_after` string, date-time
      - `not_before` string, date-time
      - `status` string
    - `creation_date` string, date-time
    - `customer_fragment_id` string
    - `deletion_date` string, date-time
    - `item_version_state` string — ItemState defines the different states an Item can be in
    - `modification_date` string, date-time
    - `protection_key_name` string
    - `unique_identifier` string
    - `version` integer
    - `with_customer_fragment` boolean
  - `with_customer_fragment` boolean

## Other responses

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

---

[API](https://skmtc.net/akeyless/apis/akeyless-api.md) · [All operations](https://skmtc.net/akeyless/apis/akeyless-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeyless/akeyless-api/versions/0ceb25634501/schema)
