io.enterpriseai.resources.ConnectorsClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/ConnectorsClient.java. Back to the Java SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class ConnectorsClient
Connectors, credentials and synchronization.
Constructor ConnectorsClient
ConnectorsClient(Transport transport)
Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
transport | Transport | yes | Transport shared by the sub-clients of one client. |
ConnectorsClient.create
JsonNode create(Object body)
Register a connector. Applies a Connector manifest: creates or updates the connector (apply_status: created or updated). The URLs must be allowed by the egress policy; OAuth2 needs auth.token_url; unsigned webhooks are refused (422 invalid_manifest). Needs tenant_admin, developer or application_owner. Audited as connector.apply.
Route: /v1/connectors (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Connector manifest (kind: Connector, metadata, spec with base URL, auth, resources, scopes, sync and webhooks). |
Returns: JsonNode. Decoded JSON answer of the operation "Register a connector".
Raises: the typed errors of the transport (Errors).
ConnectorsClient.create
JsonNode create(Object body, RequestOptions options)
Register a connector. Applies a Connector manifest: creates or updates the connector (apply_status: created or updated). The URLs must be allowed by the egress policy; OAuth2 needs auth.token_url; unsigned webhooks are refused (422 invalid_manifest). Needs tenant_admin, developer or application_owner. Audited as connector.apply.
Route: /v1/connectors (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Connector manifest (kind: Connector, metadata, spec with base URL, auth, resources, scopes, sync and webhooks). | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Register a connector".
Raises: the typed errors of the transport (Errors).
ConnectorsClient.delete
void delete(String name)
Delete a connector. Deletes the connector and its credentials in the secret store. Needs tenant_admin. 404 connector_not_found. Audited as connector.delete.
Route: /v1/connectors/{name} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. |
Returns: void.
Raises: the typed errors of the transport (Errors).
ConnectorsClient.get
JsonNode get(String name)
Get a connector. Returns the connector with its manifest, status, owner and configured credentials (kind, field names, update date). 404 connector_not_found.
Route: /v1/connectors/{name} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. |
Returns: JsonNode. Decoded JSON answer of the operation "Get a connector".
Raises: the typed errors of the transport (Errors).
ConnectorsClient.list
Page<JsonNode> list()
List the connectors. Connectors of the tenant in name order, each with the kinds of credentials configured (never their values). One page only.
Route: /v1/connectors (GET).
This element takes no parameter.
Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).
Raises: the typed errors of the transport (Errors).
ConnectorsClient.setCredentials
JsonNode setCredentials(String name, Object body)
Store connector credentials. Stores credentials in the secret store and returns only the kind and the field names (201). Needs tenant_admin or security_officer. Body: kind plus its fields: - oauth2_client: client_id, client_secret; - oauth2_code: code, redirect_uri, optional code_verifier; the code is exchanged at once at the token URL (needs a stored oauth2_client, else 409 credential_unavailable) and kept as oauth2_token; - api_key: api_key, optional header; - service_account: private_key or token, optional client_email, client_id; - basic: username, password; - webhook_secret: secret. Unknown kinds and missing fields answer 400 invalid_request. Audited as connector.credentials.write.
Route: /v1/connectors/{name}/credentials (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. | |
body | Object | yes | Credential kind and its fields. Write only: values are never returned. |
Returns: JsonNode. Decoded JSON answer of the operation "Store connector credentials".
Raises: the typed errors of the transport (Errors).
ConnectorsClient.setCredentials
JsonNode setCredentials(String name, Object body, RequestOptions options)
Store connector credentials. Stores credentials in the secret store and returns only the kind and the field names (201). Needs tenant_admin or security_officer. Body: kind plus its fields: - oauth2_client: client_id, client_secret; - oauth2_code: code, redirect_uri, optional code_verifier; the code is exchanged at once at the token URL (needs a stored oauth2_client, else 409 credential_unavailable) and kept as oauth2_token; - api_key: api_key, optional header; - service_account: private_key or token, optional client_email, client_id; - basic: username, password; - webhook_secret: secret. Unknown kinds and missing fields answer 400 invalid_request. Audited as connector.credentials.write.
Route: /v1/connectors/{name}/credentials (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. | |
body | Object | yes | Credential kind and its fields. Write only: values are never returned. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Store connector credentials".
Raises: the typed errors of the transport (Errors).
ConnectorsClient.sync
JsonNode sync(String name)
Start a synchronisation. Queues a sync run (202) and publishes connectors.<name>.sync for the worker. The manifest must declare a sync mode (409 sync_disabled), the connector must be active (409 connector_disabled), resources must be readable (400 invalid_request) and no other run may be queued or running (409 sync_in_progress). An incremental sync starts from the cursor of the last successful run unless full. The policy connector.sync is evaluated. Needs tenant_admin, developer or agent. Audited as connector.sync.
Route: /v1/connectors/{name}/sync (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. |
Returns: JsonNode. Decoded JSON answer of the operation "Start a synchronisation".
Raises: the typed errors of the transport (Errors).
ConnectorsClient.sync
JsonNode sync(String name, Object body)
Start a synchronisation. Queues a sync run (202) and publishes connectors.<name>.sync for the worker. The manifest must declare a sync mode (409 sync_disabled), the connector must be active (409 connector_disabled), resources must be readable (400 invalid_request) and no other run may be queued or running (409 sync_in_progress). An incremental sync starts from the cursor of the last successful run unless full. The policy connector.sync is evaluated. Needs tenant_admin, developer or agent. Audited as connector.sync.
Route: /v1/connectors/{name}/sync (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. | |
body | Object | yes | Optional resources and full flag. |
Returns: JsonNode. Decoded JSON answer of the operation "Start a synchronisation".
Raises: the typed errors of the transport (Errors).
ConnectorsClient.syncRuns
Page<JsonNode> syncRuns(String name)
List the sync runs of a connector. Synchronisation runs of the connector, newest first: mode, status, resources, cursor and dates.
Route: /v1/connectors/{name}/sync-runs (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. |
Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).
Raises: the typed errors of the transport (Errors).
ConnectorsClient.syncRuns
Page<JsonNode> syncRuns(String name, Map<String, ?> query)
List the sync runs of a connector. Synchronisation runs of the connector, newest first: mode, status, resources, cursor and dates.
Route: /v1/connectors/{name}/sync-runs (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. | |
query | Map<String, ?> | yes | Query string parameters of the route. |
Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).
Raises: the typed errors of the transport (Errors).
ConnectorsClient.test
JsonNode test(String name)
Test a connector. Builds the authentication headers from the stored credentials and, when the manifest has a base URL, sends a GET to it. Returns ok, credentials, http_status, latency_ms and an error code on failure (egress_denied, upstream_unavailable, credential errors); a failed test is a 200 with ok: false. The policy connector.test is evaluated. Needs tenant_admin, developer or application_owner. Audited as connector.test.
Route: /v1/connectors/{name}/test (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. |
Returns: JsonNode. Decoded JSON answer of the operation "Test a connector".
Raises: the typed errors of the transport (Errors).
ConnectorsClient.update
JsonNode update(String name, Object body)
Update a connector. Changes the status or the owner. Disabling a connector revokes its credential leases at once. Needs tenant_admin, developer or application_owner. Audited as connector.update.
Route: /v1/connectors/{name} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. | |
body | Object | yes | Fields to change; the omitted ones are kept. |
Returns: JsonNode. Decoded JSON answer of the operation "Update a connector".
Raises: the typed errors of the transport (Errors).
ConnectorsClient.update
JsonNode update(String name, Object body, RequestOptions options)
Update a connector. Changes the status or the owner. Disabling a connector revokes its credential leases at once. Needs tenant_admin, developer or application_owner. Audited as connector.update.
Route: /v1/connectors/{name} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the connector. | |
body | Object | yes | Fields to change; the omitted ones are kept. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Update a connector".
Raises: the typed errors of the transport (Errors).