View all methods

snapshots.settings.drivers.create

Create an unselected custom driver; use snapshots.settings.driverSelection.set to select them.

Facts

Method POST https://api.getdx.com/snapshots.settings.drivers.create
Required scope snapshots:admin

Arguments

Name Type Description
token Token Auth token passed as an HTTP header.
name Text Required. Driver name.
prompt Text Required. Survey question.
ranking_item Text Required nonblank text on create. Priority-ranking label; may be null on update.
target_role Text Required. dev, nondev, or all.
translations Object Optional locale-to-fields map, e.g. {"fr": {"name": "Exemple"}}. Uses enabled translation locales.

Translations support name, prompt, and ranking_item.

Example request

curl -X POST https://api.getdx.com/snapshots.settings.drivers.create \
  -H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx' \
  -H 'Content-Type: application/json' \
  --data '{
  "name": "Toolchain efficiency",
  "prompt": "My tools help me work efficiently.",
  "ranking_item": "Improve tools",
  "target_role": "all"
}'

Example response

{
  "ok": true,
  "driver": {
    "id": "NTIxNDc",
    "name": "Toolchain efficiency",
    "prompt": "My tools help me work efficiently.",
    "ranking_item": "Improve tools",
    "target_role": "all",
    "custom": true,
    "scale_points": 5,
    "translations": {}
  }
}

Errors

not_authed or not_authorized for missing authentication or access. 422 validation_error for invalid input (error_details explains why); 409 snapshot_live while a snapshot is live.