---
updatedAt: 2026-10-06T17:40:07.000Z
agentTools:
  projectIndex: https://docs.akeyless.io/llms.txt
---

# /target-list

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "email": "support@akeyless.io",
      "name": "Akeyless",
      "url": "http://akeyless.io"
    },
    "description": "The purpose of this application is to provide access to Akeyless API.",
    "title": "Infrastructure & connectivity",
    "version": "3.0"
  },
  "paths": {
    "/target-list": {
      "post": {
        "operationId": "targetList",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/targetList"
              }
            }
          },
          "required": true,
          "x-go-name": "Body"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/targetListResponse"
          },
          "default": {
            "$ref": "#/components/responses/errorResponse"
          }
        },
        "tags": [
          "Targets"
        ],
        "x-docs-category": "Infrastructure & connectivity",
        "x-docs-group": "Targets"
      }
    }
  },
  "tags": [
    {
      "name": "Targets"
    }
  ],
  "x-readme": {
    "apply-tag-changes": true
  },
  "servers": [
    {
      "url": "https://api.akeyless.io"
    }
  ],
  "components": {
    "responses": {
      "errorResponse": {
        "description": "errorResponse wraps any error to return it as a JSON object with one \"error\"\nfield.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JSONError"
            }
          }
        }
      },
      "targetListResponse": {
        "description": "targetListResponse wraps response body.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListTargetsOutput"
            }
          }
        }
      }
    },
    "schemas": {
      "AccessRequestStatus": {
        "type": "string",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "AssocRelationship": {
        "type": "string",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "CertificateStatus": {
        "type": "string",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "CertificateVersionInfo": {
        "properties": {
          "not_after": {
            "format": "date-time",
            "type": "string",
            "x-go-name": "NotAfter"
          },
          "not_before": {
            "format": "date-time",
            "type": "string",
            "x-go-name": "NotBefore"
          },
          "status": {
            "$ref": "#/components/schemas/CertificateStatus"
          }
        },
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "ItemState": {
        "description": "ItemState defines the different states an Item can be in",
        "type": "string",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "ItemType": {
        "title": "ItemType defines types supported by AKEYLESS.",
        "type": "string",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "ItemVersion": {
        "properties": {
          "access_date": {
            "format": "date-time",
            "type": "string",
            "x-go-name": "AccessDate"
          },
          "access_date_display": {
            "type": "string",
            "x-go-name": "AccessDateDisplay"
          },
          "access_id": {
            "type": "string",
            "x-go-name": "AccessId"
          },
          "certificate_version_info": {
            "$ref": "#/components/schemas/CertificateVersionInfo"
          },
          "creation_date": {
            "format": "date-time",
            "type": "string",
            "x-go-name": "CreationDate"
          },
          "customer_fragment_id": {
            "type": "string",
            "x-go-name": "CustomerFragmentId"
          },
          "deletion_date": {
            "format": "date-time",
            "type": "string",
            "x-go-name": "DeletionDate"
          },
          "item_version_state": {
            "$ref": "#/components/schemas/ItemState"
          },
          "modification_date": {
            "format": "date-time",
            "type": "string",
            "x-go-name": "ModificationDate"
          },
          "protection_key_name": {
            "type": "string",
            "x-go-name": "ProtectionKeyName"
          },
          "unique_identifier": {
            "type": "string",
            "x-go-name": "UniqueIdentifier"
          },
          "version": {
            "format": "int32",
            "type": "integer",
            "x-go-name": "Version"
          },
          "with_customer_fragment": {
            "type": "boolean",
            "x-go-name": "WithCustomerFragment"
          }
        },
        "title": "ItemVersion describes an item version in AKEYLESS.",
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "JSONError": {
        "properties": {
          "error": {
            "type": "string",
            "x-go-name": "Err"
          }
        },
        "title": "JSONError wraps an error with JSON object.",
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/client"
      },
      "ListTargetsOutput": {
        "properties": {
          "next_page": {
            "type": "string",
            "x-go-name": "NextPage"
          },
          "targets": {
            "items": {
              "$ref": "#/components/schemas/Target"
            },
            "type": "array",
            "x-go-name": "Targets"
          }
        },
        "title": "ListTargetsOutput is a list of targets.",
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "LockingInfo": {
        "properties": {
          "actions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "x-go-name": "Actions"
          },
          "expire_at": {
            "format": "int64",
            "type": "integer",
            "x-go-name": "ExpireAt"
          },
          "lock_origin": {
            "type": "string",
            "x-go-name": "LockOrigin"
          },
          "locked_at": {
            "format": "int64",
            "type": "integer",
            "x-go-name": "LockedAt"
          },
          "locked_by": {
            "type": "string",
            "x-go-name": "LockedBy"
          },
          "unique_identifier": {
            "type": "string",
            "x-go-name": "UniqueIdentifier"
          }
        },
        "title": "LockingInfo defines item locking information for check-out style locking.",
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "Target": {
        "properties": {
          "access_date": {
            "format": "date-time",
            "type": "string",
            "x-go-name": "AccessDate"
          },
          "access_date_display": {
            "type": "string",
            "x-go-name": "AccessDateDisplay"
          },
          "access_request_status": {
            "type": "string",
            "x-go-name": "AccessRequestStatus"
          },
          "attributes": {
            "additionalProperties": {},
            "description": "this is not \"omitempty\" since an empty value causes no update\nwhile an empty map will clear the attributes",
            "type": "object",
            "x-go-name": "Attributes"
          },
          "client_permissions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "x-go-name": "ClientPermissions"
          },
          "comment": {
            "type": "string",
            "x-go-name": "Comment"
          },
          "creation_date": {
            "format": "date-time",
            "type": "string",
            "x-go-name": "CreationDate"
          },
          "delete_protection": {
            "type": "boolean",
            "x-go-name": "DeleteProtection"
          },
          "is_access_request_enabled": {
            "type": "boolean",
            "x-go-name": "IsAccessRequestEnabled"
          },
          "last_access_request_status": {
            "$ref": "#/components/schemas/AccessRequestStatus"
          },
          "last_version": {
            "format": "int32",
            "type": "integer",
            "x-go-name": "LastVersion"
          },
          "locking_info": {
            "$ref": "#/components/schemas/LockingInfo"
          },
          "modification_date": {
            "format": "date-time",
            "type": "string",
            "x-go-name": "ModificationDate"
          },
          "parent_target_name": {
            "type": "string",
            "x-go-name": "ParentTargetName"
          },
          "protection_key_name": {
            "type": "string",
            "x-go-name": "ProtectionKeyName"
          },
          "target_details": {
            "type": "string",
            "x-go-name": "TargetDetails"
          },
          "target_id": {
            "format": "int64",
            "type": "integer",
            "x-go-name": "TargetID"
          },
          "target_items_assoc": {
            "items": {
              "$ref": "#/components/schemas/TargetItemAssociation"
            },
            "type": "array",
            "x-go-name": "TargetItemsAssoc"
          },
          "target_name": {
            "type": "string",
            "x-go-name": "TargetName"
          },
          "target_sub_type": {
            "$ref": "#/components/schemas/TargetSubType"
          },
          "target_type": {
            "$ref": "#/components/schemas/TargetType"
          },
          "target_versions": {
            "items": {
              "$ref": "#/components/schemas/ItemVersion"
            },
            "type": "array",
            "x-go-name": "TargetVersions"
          },
          "with_customer_fragment": {
            "type": "boolean",
            "x-go-name": "WithCustomerFragment"
          }
        },
        "title": "Target includes target details.",
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "TargetItemAssociation": {
        "description": "TargetItemAssociation includes details of an association between a target\nand an item. Also, between targets in case of child target or Linked target.",
        "properties": {
          "assoc_id": {
            "type": "string",
            "x-go-name": "AssociationID"
          },
          "attributes": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "x-go-name": "Attributes"
          },
          "cluster_id": {
            "format": "int64",
            "type": "integer",
            "x-go-name": "GWClusterID"
          },
          "item_id": {
            "format": "int64",
            "type": "integer",
            "x-go-name": "ItemID"
          },
          "item_name": {
            "type": "string",
            "x-go-name": "ItemName"
          },
          "item_type": {
            "$ref": "#/components/schemas/ItemType"
          },
          "relationship": {
            "$ref": "#/components/schemas/AssocRelationship"
          }
        },
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "TargetSubType": {
        "title": "TargetSubType ..",
        "type": "string",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "TargetType": {
        "title": "TargetType ..",
        "type": "string",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/infra/types"
      },
      "targetList": {
        "description": "targetList is a command that returns a list of targets",
        "properties": {
          "filter": {
            "description": "Filter by auth method name or part of it",
            "type": "string",
            "x-go-name": "Filter"
          },
          "json": {
            "default": false,
            "description": "Set output format to JSON",
            "type": "boolean",
            "x-go-name": "Json"
          },
          "pagination-token": {
            "description": "Next page reference",
            "type": "string",
            "x-go-name": "PaginationToken"
          },
          "token": {
            "description": "Authentication token (see `/auth` and `/configure`)",
            "type": "string",
            "x-go-name": "Profile"
          },
          "type": {
            "description": "The target types list . In case it is empty, all\ntypes of targets will be returned. options: [hanadb cassandra aws alicloud ssh gke eks mysql mongodb snowflake mssql redshift artifactory azure rabbitmq k8s venafi gcp oracle dockerhub cloudflare ldap github chef web salesforce postgres]",
            "items": {
              "type": "string"
            },
            "type": "array",
            "x-go-name": "Types"
          },
          "uid-token": {
            "description": "The universal identity token, Required only for universal_identity authentication",
            "type": "string",
            "x-go-name": "UIDToken"
          }
        },
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/client/commands"
      }
    }
  }
}
```