Data Hub
Watchers

Change a watcher's config

Requires a token that lists `watchers:admin` explicitly; legacy tokens with `*` or `watchers:write` get 403. Browser sessions must belong to an admin. Stores a pending revision that the watcher applies after its next heartbeat. Returns 409 when `base_revision` isn't the latest revision (`details.reason: stale_revision`) or the watcher runs a version older than 1.4.0 (`details.reason: watcher_update_required`).

POST
/watchers/{watcherId}/config-revisions

Requires a token that lists watchers:admin explicitly; legacy tokens with * or watchers:write get 403. Browser sessions must belong to an admin. Stores a pending revision that the watcher applies after its next heartbeat. Returns 409 when base_revision isn't the latest revision (details.reason: stale_revision) or the watcher runs a version older than 1.4.0 (details.reason: watcher_update_required).

Authorization

bearerAuth
AuthorizationBearer <token>

Personal access tokens begin with dhub_… and are restricted by their assigned scopes.

In: header

Path Parameters

watcherId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/watchers/497f6eca-6276-4993-bfeb-53cbbbba6f08/config-revisions" \  -H "Content-Type: application/json" \  -d '{    "base_revision": 1,    "settings": {      "watch_directory": "string",      "file_patterns": [        "string"      ],      "run_detection": {        "pattern": "string",        "recursive": true      },      "upload_mode": "auto",      "stability_period_seconds": 1,      "max_stability_wait_seconds": 1,      "upload_parallelism": 1    }  }'
{  "revision": 1,  "source": "web",  "status": "pending",  "status_reason": "string",  "settings": {    "watch_directory": "string",    "file_patterns": [      "string"    ],    "run_detection": {      "pattern": "string",      "recursive": true    },    "upload_mode": "auto",    "stability_period_seconds": 1,    "max_stability_wait_seconds": 1,    "upload_parallelism": 1  },  "created_at": "2019-08-24T14:15:22Z",  "resolved_at": "2019-08-24T14:15:22Z",  "created_by": {    "id": "string",    "name": "string",    "email": "string"  },  "created_by_token": {    "id": "string",    "name": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}
{  "error": {    "code": "string",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}