Skip to content

Import connector

Creates a connector from a JSON payload sent to the import endpoint. The server merges your payload with the resolved connector template for the datasource type (same resolution as connector properties in the UI), then creates the connector.

Authentication uses the x-pcloud-key header; see Authentication.

Connector name in the payload

Review and update the connector name in the JSON body before you import. The request fails if a connector already exists with the same name as the one in the payload (for example when cloning from an export, change the name to a new, unique value unless your operations team confirms replacement semantics).

Sensitive data and secret store

Sensitive fields in the import body must match how your runtime plane secret store is configured. Depending on whether you use Privacera Cloud, Kubernetes secrets, or cloud native stores, you supply values, Kubernetes secret references, or cloud secret references—not always raw secrets in JSON. See How Sensitive Data is Handled.


Endpoint

Method POST
Path /v2/runtime/connector/import

Example request

Bash
1
2
3
4
curl -X POST "https://api.privaceracloud.com/v2/runtime/connector/import" \
  -H "Content-Type: application/json" \
  -H "x-pcloud-key: <api_key>" \
  -d '<json body>'

You can also pass a file:

Bash
1
2
3
4
curl -X POST "https://api.privaceracloud.com/v2/runtime/connector/import" \
  -H "Content-Type: application/json" \
  -H "x-pcloud-key: <api_key>" \
  -d @connector-import.json

Path parameters

None.

Request headers

Header Required Description
x-pcloud-key Yes Privacera API key (see Authentication).
Content type Yes application/json

Request body

The body matches the export JSON shape: name, description, datasourceType, and applications (see Export).

Before create, the service merges each application’s appConfigs and deployConfigs with the resolved template for that appType (template baseline; import payload overrides matching property name rows; extra body-only properties are kept).

Request body — field reference
Field Required Type Description
name Yes string Display name for the new connector (must satisfy naming rules; must be unique on the runtime plane among active connectors).
description No string Optional description (max length enforced by API).
datasourceType Yes string Connector type (must be a supported user datasource type).
ownerType No string If present, must be USER; omit for typical imports from current export JSON.
applications Yes array Non-empty list of applications to create.

Each applications[] element:

Field Required Type Description
appType Yes string Must match a template slice for this datasource type (for example ACCESS_CONTROL).
appConfigs Yes array Property rows (name / value / …); merged with template defaults.
deployConfigs Yes array Deployment rows; merged with template defaults (use [] if none).

Request sample

JSON
{
  "name": "my-new-connector",
  "description": "string",
  "datasourceType": "<CONNECTOR_TYPE>",
  "applications": [
    {
      "appType": "<APPLICATION_TYPE>",
      "appConfigs": [
        {
          "name": "ranger.policysync.connector.0.jdbc.url",
          "value": "string",
        }
      ],
      "deployConfigs": [
        {
          "name": "image.tag",
          "value": "67fg3gs"
        }
      ]
    }
  ]
}

Responses

201 response body — field reference

The success payload follows the connector (datasource) resource returned by create operations. Exact fields and nested applications objects match your product version’s OpenAPI / DatasourceResponse shape.

Common top-level fields:

Field Type Description
id integer New datasource id.
name string Connector name from the request.
description string Description.
datasourceType string Uppercase datasource type.
ownerType string Typically USER for imports.
runtimePlaneId integer Target runtime plane.
applications array Created applications with ids, generated names, status, replicas, image tag, etc.
createdAt, updatedAt string (ISO-8601) Timestamps.
This endpoint may return the following HTTP codes: 201, 400, 403, 409, 500
HTTP code When
201 Connector created successfully; response body describes the new datasource (same general shape as create connector).
400 Validation error, malformed JSON, unsupported app type, missing required fields, invalid ownerType, or missing runtime configuration for the datasource type.
403 Permission or scope mismatch (often from PriaceraCloud when headers or API key do not align).
409 A connector with the same name already exists on the runtime plane.
500 Unexpected or internal errors.

Response samples

JSON
{
  "id": 0,
  "name": "my-new-connector",
  "description": "string",
  "datasourceType": "DATABRICKS_UNITY_CATALOG",
  "ownerType": "USER",
  "runtimePlaneId": 0,
  "autoUpgrade": true,
  "applications": [
    {
      "id": 0,
      "name": "my-new-connector-ac",
      "appType": "ACCESS_CONTROL",
      "status": "CREATED",
      "replicas": 1,
      "imageTag": "string"
    }
  ],
  "createdAt": "2026-05-08T12:00:00Z",
  "updatedAt": "2026-05-08T12:00:00Z"
}
JSON
1
2
3
4
5
{
  "error_code": "ENTITY_ALREADY_EXISTS",
  "message": "Datasource already exists: my-new-connector",
  "timestamp": "2026-05-08T12:00:00.123456789Z"
}
JSON
1
2
3
4
5
{
  "error_code": "VALIDATION_ERROR",
  "message": "Validation error for 'datasourceType': Datasource type is required",
  "timestamp": "2026-05-08T12:00:00.123456789Z"
}