Docs
Live demo
POST/api/v2/connectors

Create a new identity connector for external user synchronization

Paused without enabled: true (409 connector.paused on sync). coming_soon types (kubernetes, custom) return 422 connector.type_unavailable.

Request body application/json · CreateConnectorRequest

Connector creation request

Required4 of 8 fields
credentialsmap of string → stringrequired
namestringrequired
min length 1 · max length 100
specmap of string → anyrequired

Provider settings. GitLab and GitHub use canonical names: base_url, groups, excluded_group_suffixes, page_size, root_ca and insecure_skip_verify (GitLab: a PEM CA certificate of a self-managed server and whether to accept any server certificate. Changing either needs a new token), include_outside_collaborators and sync_bot_and_service_accounts (GitHub). Old names (url, baseUrl, api_url, group, pageSize, excludedGroups, excluded_groups, exclude_group_suffixes, includeOutsideCollaborators, syncBotAndServiceAccounts) are deprecated and accepted until 2027-01-01: they are saved under the canonical names, and names of one setting with different values are rejected with 400. LDAP uses url (ldap:// or ldaps://), start_tls, insecure_skip_verify, root_ca, directory_type (active_directory or openldap), bind_dn, user_base_dn, user_filter, group_base_dn, group_filter, groups and excluded_group_suffixes. Its credential is bind_password.

typestring (ConnectorType)required
gitlabgooglegithubldapkubernetescustom
Optional4 fields
descriptionstring
max length 1000
enabledboolean
2 fields
groupmap of string → string
usermap of string → string
schedulestring

Interval of scheduled syncs as an ISO 8601 duration (PT15M, PT1H, P1D, P1W), at least 5 minutes: a shorter one, PT0M or P0D included, is rejected with 400.

max length 50

Responses

201

Created

ConnectorResponse · 17 fields
created_atstring
descriptionstring
enabledboolean
idstring
last_sync_atstring
last_sync_statusstring
pendingrunningcompletedfailedrequires_approval
2 fields
groupmap of string → string
usermap of string → string
mapping_defaultboolean

True when the field mapping is the provider default Principal stores for a new connector.

namestring
organization_idstring
schedulestring
secret_refstring
specmap of string → any

The settings the connector uses, under canonical names only (base_url, groups, excluded_group_suffixes, page_size, include_outside_collaborators, sync_bot_and_service_accounts): a value stored under an old name is shown under its canonical name, and where names disagree the value the connector uses is shown. Clients show and send this form.

spec_conflictsarray of string

Canonical settings the stored spec names under several names with different values. Spec shows the value the connector uses for each. Saving the connector with the shown settings resolves them.

typestring (ConnectorType)
gitlabgooglegithubldapkubernetescustom
updated_atstring

The sync a connector has not finished, whoever queued it (Run sync now, an approval or the schedule): its state, its attempts and, after a failed attempt the queue retries, when the next one may start and why the last one failed. Reads of connectors carry it. A connector without an unfinished sync has none.

8 fields
job_idstring · uuidrequired
statusstring (entity.OperationLifecycle)required

Where a background operation is in the shared lifecycle (decision S1). outcome says how a finished operation ended and substate qualifies the state.

queuedrunningfinished
terminalbooleanrequired
outcomestring (entity.OperationOutcome)required

Final operation result, or null while the operation is active.

successfailurecancelledpartial
can be null
attemptsintegerrequired

Attempts that ran and failed.

max_attemptsintegerrequired
next_retry_atstring · date-time

When the next attempt may start after a failed 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.

8 fields
codestring (JobFailureCode)required

Closed registry of asynchronous operation failure causes, independent of HTTP problem codes.

ACCESS_PROFILE_STALEAMBIGUOUS_TARGET_OUTCOMEAPPLY_INTERRUPTEDAUTHENTICATION_FAILEDCLICKHOUSE_REPLICAS_OUT_OF_SYNCCLICKHOUSE_USER_NAME_RESERVEDCONNECTION_FAILEDCONNECTION_REFUSEDCONNECTION_TIMEOUTCONNECTOR_CREDENTIALS_MISSINGCONNECTOR_PAUSEDCONNECTOR_SOURCE_CHANGEDCONNECTOR_TYPE_UNAVAILABLECONSTRAINT_VIOLATIONCREDENTIAL_EXPIREDCREDENTIAL_NOT_FOUNDDATABASE_NOT_FOUNDDRIFT_BINDING_NOT_FOUNDDRIFT_DEFAULT_INHERITED_SKIPPEDDRIFT_NO_EXECUTABLE_DIFFDRIFT_PARTIAL_APPLYDRIFT_PLAN_GENERATION_FAILEDDRIFT_RESOURCE_MISMATCHDRIFT_RULE_DELETINGDRIFT_RUN_OUTDATEDDRIFT_SCOPE_MISMATCHGROUP_EXPANSION_LIMIT_EXCEEDEDHANDLER_NOT_FOUNDK8S_CHANGE_REJECTEDK8S_CLUSTER_UNREACHABLEK8S_NAMESPACE_FORBIDDENK8S_NAMESPACE_NOT_FOUNDK8S_RBAC_FORBIDDENKUBERNETES_MEMBER_CREDENTIALS_PENDINGKUBERNETES_SERVICE_ACCOUNT_KUBECONFIG_NOT_ISSUEDMARIADB_TRUNCATE_UNSUPPORTEDMARIADB_USAGE_UNSUPPORTEDMARIADB_GRANTS_AMBIGUOUSMUTATION_LOCKEDMYSQL_MANAGEMENT_PRIVILEGES_MISSING
34 more values
NOT_FOUNDOPERATION_BACKOFFOPERATION_CANCELLEDOPERATION_TIMEOUTOWNED_OBJECTS_DECISION_REQUIREDPERMISSION_DENIEDPLAN_APPLY_ARTIFACT_INVALIDPLAN_APPLY_ORPHANED_LOCKPLAN_APPLY_ROLLBACK_BASELINE_INVALIDPLAN_APPLY_RULE_CHANGEDPLAN_APPLY_TARGET_STATE_CHANGEDPLAN_APPLY_ACCESS_IMPACT_CHANGEDPOSTGRES_FUTURE_OBJECT_CREATORS_MISSINGPOSTGRES_GRANT_AUTHORITY_MISSINGPOSTGRES_MANAGEMENT_PRIVILEGES_MISSINGPOSTGRES_ROLE_ATTRIBUTE_UNSUPPORTEDPOSTGRES_ROLE_NAME_RESERVEDPOSTGRES_TLS_FILE_NOT_ALLOWEDPROVIDER_REQUEST_FAILEDRATE_LIMITEDROLE_EXISTSROLE_NOT_FOUNDROTATION_CHECK_REQUIREDSECRET_STORE_UNAVAILABLESERIALIZATION_ERRORTARGET_ACCOUNT_IDENTITY_MISMATCHTARGET_ACCOUNT_IDENTITY_UNVERIFIEDTARGET_ACCOUNT_IMPORT_PENDINGTARGET_ACCOUNT_PRINCIPAL_LOGINTARGET_ACCOUNT_TAKENTARGET_CONNECTION_MISSINGTARGET_REPAIR_REQUIREDUNKNOWN_ERRORVALIDATION_FAILED
titlestring

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.

max length 32
explanationstringrequired
recommended_actionstringrequired
retryablebooleanrequired

Whether the failed attempt was eligible for an automatic retry under the actual queue policy.

phasestring

Known operation phase at failure, when available.

resolution_codestring

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.

max length 128 · pattern ^[a-z][a-z0-9_-]*(\.[a-z0-9_-]+)*$
cluster_answerstring

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.

max length 500
409

Conflict - connector already exists

422

Unprocessable Entity - connector.type_unavailable when Principal can't sync this connector type yet (coming_soon in GET /connectors/types, today kubernetes and custom). Nothing was created.

Common errors: 400 401 403 413 429 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close