Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/zitadel/zitadel/llms.txt

Use this file to discover all available pages before exploring further.

Lists all targets matching the specified criteria. By default, all targets of the instance are returned.

HTTP Request

POST /v2/actions/targets/search

Permissions

Requires action.target.read permission.

Request Body

pagination
object
List limitations and ordering.
offset
integer
Number of results to skip.
limit
integer
Maximum number of results to return.
asc
boolean
Sort order: true for ascending, false for descending.
sorting_column
enum
The field to sort by. Default is TARGET_FIELD_NAME_CREATION_DATE. Options:
  • TARGET_FIELD_NAME_CREATION_DATE
  • TARGET_FIELD_NAME_NAME
filters
array
Array of filter criteria.
target_name_filter
object
Filter by target name.
target_name
string
The name to search for.
method
enum
Comparison method:
  • TEXT_FILTER_METHOD_EQUALS
  • TEXT_FILTER_METHOD_CONTAINS
  • TEXT_FILTER_METHOD_STARTS_WITH
  • TEXT_FILTER_METHOD_ENDS_WITH
in_target_ids_filter
object
Filter by target IDs.
target_ids
array
List of target IDs to include.

Response

pagination
object
Pagination information.
total_result
integer
Total number of targets matching the filters.
targets
array
Array of targets matching the query.
id
string
Unique identifier of the target.
creation_date
timestamp
When the target was created.
change_date
timestamp
When the target was last modified.
name
string
Display name of the target.
target_type
object
The target type configuration (rest_webhook, rest_call, or rest_async).
timeout
string
Request timeout duration.
endpoint
string
The endpoint URL.
signing_key
string
Current signing key for the target.
payload_type
enum
Payload format: PAYLOAD_TYPE_JSON, PAYLOAD_TYPE_JWT, or PAYLOAD_TYPE_JWE.

Example Request

curl -X POST 'https://api.zitadel.cloud/v2/actions/targets/search' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
    "pagination": {
      "offset": 0,
      "limit": 10,
      "asc": true
    },
    "sorting_column": "TARGET_FIELD_NAME_CREATION_DATE",
    "filters": [
      {
        "target_name_filter": {
          "target_name": "ip_allow_list",
          "method": "TEXT_FILTER_METHOD_EQUALS"
        }
      },
      {
        "in_target_ids_filter": {
          "target_ids": [
            "69629023906488334",
            "69622366012355662"
          ]
        }
      }
    ]
  }'

Example Response

{
  "pagination": {
    "total_result": 1
  },
  "targets": [
    {
      "id": "69629023906488334",
      "creation_date": "2024-12-18T07:50:47.492Z",
      "change_date": "2025-01-23T10:34:18.051Z",
      "name": "ip_allow_list",
      "rest_webhook": {
        "interrupt_on_error": true
      },
      "timeout": "10s",
      "endpoint": "https://example.com/hooks/ip_check",
      "signing_key": "98KmsU67",
      "payload_type": "PAYLOAD_TYPE_JSON"
    }
  ]
}

Error Responses

Status CodeDescription
400Invalid query or feature flag actions not enabled
401Unauthorized - missing or invalid authentication
403Forbidden - insufficient permissions

Notes

  • Results are paginated - use offset and limit for pagination
  • Filters are combined with AND logic
  • Default sorting is by creation date in ascending order
  • The signing_key is included in the response for existing targets