Retrieve a paginated list of targets with optional filtering by kind, managed status, and organization
Parameters
Number of items per page
Pagination cursor
Filter by target kind (postgres, kubernetes, mysql, clickhouse, mongodb).
Filter by managed status
Search by target id prefix, name, description, kind, or organization name (case-insensitive)
ETag of a list this caller read before. When the list fits in one page and has not changed since, the answer is 304 Not Modified without a body.
Responses
OK
ListTargetsResponse · 4 fields
True when another page follows. The list ends when it is false.
55 fields
The service account of a MariaDB target as its last check found it (access model MD-P1): the account Principal connects with, the privileges of the contract it lacks with what each one breaks, and the command a database administrator runs. The sentences come from the static contract. Only the account name and the command built from it come from the target. A target response carries it from GET /targets/{id} and from an update (PUT or PATCH /targets/{id}), which answers with the check of a replaced connection, and not before the first check.
6 fields
The target whose service account was checked. "Check again" checks it.
ready when the account holds every privilege of the contract. Incomplete blocks changes.
readyincompleteThe account as MariaDB writes it, for example "principal@%".
The GRANT statements a database administrator runs to meet the contract. Absent when ready or when the account name can't be written into a command safely.
When the check ran.
Discovery and drift check state of a target with failed runs since the last success, one entry per such operation. Absent when both last succeeded or never ran. GET /targets and GET /targets/{id} fill it.
8 fields
discoverydriftRuns are refused and scheduled runs skipped until paused_until.
When the pause ends by itself. Present only while paused. Nothing starts at that moment.
Failed runs in a row since the last successful one.
Safe operation failure. Explanation and recommended_action come from the static failure-code registry. The only text not written by Principal is cluster_answer.
The last passing connection check of the saved target.
A connection check passed after the last failure, so a run a person starts ends the pause.
Whether the saved PostgreSQL configuration has one endpoint, multiple endpoints, cannot be parsed, or names TLS files the installation does not allow.
single_host multi_host unparseabletls_files_not_allowed Safe operation failure. Explanation and recommended_action come from the static failure-code registry. The only text not written by Principal is cluster_answer.
8 fields
Closed registry of asynchronous operation failure causes, independent of HTTP problem codes.
ACCESS_PROFILE_STALE AMBIGUOUS_TARGET_OUTCOME APPLY_INTERRUPTED AUTHENTICATION_FAILED CLICKHOUSE_REPLICAS_OUT_OF_SYNC CLICKHOUSE_USER_NAME_RESERVED CONNECTION_FAILED CONNECTION_REFUSED CONNECTION_TIMEOUT CONNECTOR_CREDENTIALS_MISSING CONNECTOR_PAUSED CONNECTOR_SOURCE_CHANGED CONNECTOR_TYPE_UNAVAILABLE CONSTRAINT_VIOLATION CREDENTIAL_EXPIRED CREDENTIAL_NOT_FOUND DATABASE_NOT_FOUND DRIFT_BINDING_NOT_FOUND DRIFT_DEFAULT_INHERITED_SKIPPED DRIFT_NO_EXECUTABLE_DIFF DRIFT_PARTIAL_APPLY DRIFT_PLAN_GENERATION_FAILED DRIFT_RESOURCE_MISMATCH DRIFT_RULE_DELETING DRIFT_RUN_OUTDATED DRIFT_SCOPE_MISMATCH GROUP_EXPANSION_LIMIT_EXCEEDED HANDLER_NOT_FOUND K8S_CHANGE_REJECTED K8S_CLUSTER_UNREACHABLE K8S_NAMESPACE_FORBIDDEN K8S_NAMESPACE_NOT_FOUND K8S_RBAC_FORBIDDEN KUBERNETES_MEMBER_CREDENTIALS_PENDING KUBERNETES_SERVICE_ACCOUNT_KUBECONFIG_NOT_ISSUED MARIADB_TRUNCATE_UNSUPPORTED MARIADB_USAGE_UNSUPPORTED MARIADB_GRANTS_AMBIGUOUS MUTATION_LOCKED MYSQL_MANAGEMENT_PRIVILEGES_MISSING 34 more values
NOT_FOUND OPERATION_BACKOFF OPERATION_CANCELLED OPERATION_TIMEOUT OWNED_OBJECTS_DECISION_REQUIRED PERMISSION_DENIED PLAN_APPLY_ARTIFACT_INVALID PLAN_APPLY_ORPHANED_LOCK PLAN_APPLY_ROLLBACK_BASELINE_INVALID PLAN_APPLY_RULE_CHANGED PLAN_APPLY_TARGET_STATE_CHANGED PLAN_APPLY_ACCESS_IMPACT_CHANGED POSTGRES_FUTURE_OBJECT_CREATORS_MISSING POSTGRES_GRANT_AUTHORITY_MISSING POSTGRES_MANAGEMENT_PRIVILEGES_MISSING POSTGRES_ROLE_ATTRIBUTE_UNSUPPORTED POSTGRES_ROLE_NAME_RESERVED POSTGRES_TLS_FILE_NOT_ALLOWED PROVIDER_REQUEST_FAILED RATE_LIMITED ROLE_EXISTS ROLE_NOT_FOUND ROTATION_CHECK_REQUIRED SECRET_STORE_UNAVAILABLE SERIALIZATION_ERROR TARGET_ACCOUNT_IDENTITY_MISMATCH TARGET_ACCOUNT_IDENTITY_UNVERIFIED TARGET_ACCOUNT_IMPORT_PENDING TARGET_ACCOUNT_PRINCIPAL_LOGIN TARGET_ACCOUNT_TAKEN TARGET_CONNECTION_MISSING TARGET_REPAIR_REQUIRED UNKNOWN_ERROR VALIDATION_FAILED Short name of the failure from the same registry, for lists and queues where the explanation is too long. Absent on failures saved before the field existed.
Whether the failed attempt was eligible for an automatic retry under the actual queue policy.
Known operation phase at failure, when available.
Stable code of the action that can resolve this failure, the same vocabulary as a problem's resolution.code, for example upstream.check_connection. Absent when no single action does. A screen that offers the action shows it next to the failure, otherwise it shows recommended_action.
The Kubernetes cluster's own answer to a change its admission policy or webhook refused: the policy or webhook name and its message. Only a step failure with code K8S_CHANGE_REJECTED carries it, as plain text without control characters, cut to 500 characters. The cluster administrator writes it, not Principal. Given only to callers with access:read in the rule's organization. Absent for runs saved before the field existed.
Pins Principal-managed SSO gate (oauth2-proxy) pods to schedulable nodes. Required for Kubernetes clusters where every node carries a taint. On update, a supplied empty object clears the configuration.
2 fields
Kubernetes user kubeconfig connection, independent of the management connection. Omit to preserve the current setting on update. An empty object restores management defaults. A custom server with no CA uses the client system trust store. TLS verification is always enabled.
3 fields
HTTPS Kubernetes API URL reachable by users. Required for a nonempty override.
Base64-encoded PEM CA bundle. Omit to use the client system trust store.
Optional TLS certificate server name override.
delete_requested cleanup_running cleanup_failed cleanup_completed When the deletion was requested, present while the cleanup task has not started within its grace period
2 fields
singleon_cluster Settings of an SSH target. A host has its own connection. A fleet names hosts by list and labels.
4 fields
hostfleetLifetime of the certificates Principal issues for this target, 5 to 1440 minutes. Default 480.
11 fields
deckhouse_car rbac_groups legacy_groups federated_snapshot Which Dex the target signs kubectl in through. bundled is this Principal's own Dex: the response shows its current issuer, client and management address, and the target follows a change of it. custom is a Dex or OIDC provider the target names itself. Principal can't manage its clients. Read-only: a request chooses the bundled Dex by leaving out oidc_issuer_url and oidc_client_id (or sending the bundled Dex's own), and a custom Dex by sending another pair.
bundledcustomCompatibility block for clients of the previous release. Use applications_on_bundled_dex. A response shows the management address of this Principal's Dex only when the target's SSO applications are managed there and kubectl also signs in through this Principal's Dex, so older clients that read any address as "kubectl signs in through this Principal's Dex" stay right. In a request, the address of this Principal's Dex turns that management on. An empty object or an omitted block changes nothing (before this release an empty object turned it off). Any other address is refused. When a request carries applications_on_bundled_dex, that field decides and this block only has to name no other address. The target does not store this block.
4 fields
Whether the SSO applications of a Kubernetes target are managed in this Principal's own Dex. It is independent of kubectl sign-in (dex_custom): a target may have such applications without any kubectl sign-in, and they always use this Principal's Dex issuer and management address. In a request, true or false changes it. Omitted, it stays as it is (a new target gets true when kubectl signs in through this Principal's Dex). Only Kubernetes targets have it: a response carries it for them and omits it for other kinds, and a request for another kind is refused.
Whether Principal protects every Ingress created in the Kubernetes target after this setting is turned on: the Ingress gets the SSO gate annotations at creation, Principal adds it as an application with its own Dex client and SSO gate, and only people with a rule on that application sign in. Ingresses that existed before stay as they are. System namespaces, Principal and Dex objects, cert-manager ACME solvers and Ingresses with the annotation principal.io/protect: "false" are not touched. Turning it off stops protecting new Ingresses and keeps the gates already created. It needs the target's SSO applications managed in this Principal's Dex. In a request, true or false changes it, omitted it stays as it is (a new target created without it has it off). Only Kubernetes targets have it.
When Principal started protecting new Ingresses of the Kubernetes target. Ingresses created earlier are not protected automatically.
11 fields
deckhouse_car rbac_groups legacy_groups federated_snapshot Which Dex the target signs kubectl in through. bundled is this Principal's own Dex: the response shows its current issuer, client and management address, and the target follows a change of it. custom is a Dex or OIDC provider the target names itself. Principal can't manage its clients. Read-only: a request chooses the bundled Dex by leaving out oidc_issuer_url and oidc_client_id (or sending the bundled Dex's own), and a custom Dex by sending another pair.
bundledcustom6 fields
postgreskubernetesmysqlclickhousemongodbapplicationsshValue for the principal.io/managed-by label on K8s RBAC objects.
Monotonically increasing revision used for optimistic concurrency control.
The replica set name of the saved MongoDB connection. Empty for other kinds.
Whether the saved MongoDB connection string has options the target form doesn't show: several hosts, a CA certificate, an authentication mechanism or custom timeouts. The form then keeps the connection as it is. Change such a connection through the API. Absent for other kinds.
Whether the saved connection of a PostgreSQL, MariaDB, ClickHouse or MongoDB target holds a password. False for other kinds and when the connection is missing. Only GET /targets/{id} reads the connection and returns the field. The list, create and update responses omit it, and so does the detail while Principal's secret store gives no answer.
Whether the target has an inline SSH tunnel configured. Only GET /targets/{id} returns the field. The list, create and update responses omit it.
4 fields
Whether OpenBao holds the kubeconfig at the connection reference of a Kubernetes target. False for other kinds. Only GET /targets/{id} reads secrets and returns the field. The list, create and update responses omit it, and so does the detail while Principal's secret store gives no answer.
Kubernetes targets whose cluster Principal has identified (UID of the kube-system namespace, read when the connection is saved and at discovery): unique when no other target of the installation registers the cluster, duplicate when another one does (targets saved before the one-registration rule, or test installations in the shared cluster registration mode). Absent for other targets and before the cluster is identified.
uniqueduplicateOpaque cursor of the next page, present only when has_more is true. Send it unchanged as the cursor query parameter with the same filters.
Full number of items that match the request, present only when the list counts them. It is never the size of the page.
The list this caller sees has not changed since the ETag in If-None-Match.
Common errors: 400 401 403 429 504. They mean the same for every operation, see Errors.