View all methods

importFilters.setMode

Set the selective import mode for an SCM or Jira connection.

Facts

Method POST https://yourinstance.getdx.net/api/connections/
:connection_id/importFilters.setMode

Arguments

Name Type Description
token Token Auth token passed as an HTTP header.
connection_id Integer The connection ID. Substitute this value for :connection_id in the URL path.

Example:
123
mode String The import filter mode: allow_all, allowlist, or denylist.

Usage info

Changing the mode re-includes every excluded resource before applying the new mode. This creates a safe starting state and never purges resource data:

  • allow_all imports every resource.
  • allowlist starts with every resource on the allowlist. Use importFilters.remove to remove resources from the allowlist.
  • denylist starts with an empty denylist. Use importFilters.add to add resources to the denylist.

Calling this method with the current mode is a no-op. It preserves the current allowlist or denylist.

The response’s included_count is the number of previously excluded resources that were re-included. When resources are re-included, DX schedules a connection backfill.

Example request

curl -X POST "https://yourinstance.getdx.net/api/connections/123/importFilters.setMode" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer xxxx-xxxxxxxxx-xxxx" \
  --data '{
    "mode": "allowlist"
  }'

Success response

{
  "ok": true,
  "status": "success",
  "previous_mode": "allow_all",
  "mode": "allowlist",
  "included_count": 0
}

Errors

Error Description
not_authed The request did not include a valid API key.
connection_not_found No connection exists for the given connection_id.
unsupported_connection_type The connection does not support selective import filters.
invalid_mode mode is not allow_all, allowlist, or denylist.
import_filter_configuration_in_progress Another selective import configuration request holds the connection lock. This response uses HTTP status 409.