View all methods

customFields.set

Replace a Jira connection’s entire custom field allowlist with the supplied field keys.

Facts

Method POST https://yourinstance.getdx.net/api/connections/
:connection_id/customFields.set

Arguments

Required arguments

Name Type Description
token Token Data Cloud API key passed in the Authorization: Bearer HTTP header. See Authentication.
connection_id Integer The Jira connection ID. Substitute this value for :connection_id in the URL path. Find it with connections.list.
field_keys Array<String> Zero to 10,000 Jira field keys. Each value must be a nonblank string. An explicitly empty array clears the allowlist; a missing array is invalid. The limit counts duplicate entries.

Optional arguments

Name Type Description
force Boolean Defaults to false. Set to true to apply recognized keys and report unmatched keys in the response. A nonempty request with no recognized keys is rejected even when force is true.

Usage info

This method supports Jira Cloud and Jira Data Center connections. It does not support Jira extractor connections. Find the connection ID with connections.list and field keys with customFields.list.

Use Jira field keys, not field names. A key must be discovered for the connection’s Jira instance or already present in its saved allowlist. Duplicate keys are collapsed and surrounding whitespace is trimmed.

The 10,000-key limit applies per request, not to the total saved allowlist. To allowlist more fields, send multiple customFields.add requests with up to 10,000 keys each. Do not split the list across multiple customFields.set requests: each request replaces the entire allowlist.

The supplied keys become the entire allowlist. Existing selections omitted from the request are removed. The allowlist is saved during the request; additions trigger a resync and removals delete imported custom field values in the background. Replacing the list with the same keys does not trigger another historical update.

These methods manage the explicit custom field allowlist. Dedicated story point and sprint settings are configured separately. Project selection is managed through importFilters.list and its related methods.

Note: set replaces the entire list. Send {"field_keys":[]} only when you intend to clear the allowlist. With force: true, the replacement contains only the recognized supplied keys; existing keys omitted from that replacement are removed.

Unmatched keys

By default, any unmatched key rejects the entire request without changing the allowlist. With force: true, recognized keys are applied and the response returns status: "partial_success". The unmatched array contains one object per skipped key, with identifier set to the submitted key and reason: "not_found".

If no supplied key resolves, the request fails with no_fields_resolved even when force is true.

Example request

curl -X POST "https://yourinstance.getdx.net/api/connections/123/customFields.set" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer xxxx-xxxxxxxxx-xxxx" \
  --data '{
  "field_keys": [
    "customfield_10001",
    "customfield_10003"
  ]
}'

Success response

This example starts with customfield_10001 and customfield_10002 selected.

{
  "ok": true,
  "connection_id": 123,
  "status": "success",
  "unmatched": [],
  "field_keys": ["customfield_10001", "customfield_10003"],
  "added": ["customfield_10003"],
  "removed": ["customfield_10002"]
}
Field Type Description
ok Boolean true when the request succeeds.
connection_id Integer The Jira connection ID.
status String success when all keys resolve, or partial_success when force: true skips unmatched keys.
field_keys Array<String> The complete resulting allowlist, including selections preserved by this operation.
added Array<String> Keys added to the allowlist by this request.
removed Array<String> Keys removed from the allowlist by this request.
unmatched Array<Object> Skipped keys, each with identifier and reason. Empty when every key resolves.

Errors

Error Description
not_authed The request did not include a valid Data Cloud API key.
connection_not_found No connection exists for the given connection_id. Returns HTTP 404.
invalid_custom_fields The connector is unsupported, or field_keys is missing, malformed, contains blank values, or exceeds 10,000 entries. An empty array is valid only for set. Returns HTTP 422.
unresolved_fields Some keys resolved and others did not, and force was not true. The response includes unmatched; no changes were made. Returns HTTP 422.
no_fields_resolved None of the keys in a nonempty request resolved. The response includes unmatched; no changes were made, even with force: true. Returns HTTP 422.
invalid_json The request body is not valid JSON. Returns HTTP 422.