General

Update experiment rule

Changed on
put/api/experimental/experiments/rules/{experiment}

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/experimental/experiments/rules/{experiment}
  • Auth
    API key in header Coder-Session-Token

Path parameters

experimentstring required

Experiment name

Request body

conditionstring

Condition is required for the condition mode and must be empty otherwise.

expected_revisioninteger

ExpectedRevision must equal the current revision of the stored rule, or zero when no rule is stored or the stored rule has no readable positive revision. A different revision fails with 409 Conflict.

mode'inherit' | 'on' | 'off' | 'condition'

Response

OK

conditionstring

Condition is the CEL expression of a condition rule.

modestring

Mode is one of the ExperimentRuleMode values, or empty when the stored rule is malformed. A malformed rule decides off until it is replaced. It is a plain string so that clients can represent the malformed state.

revisioninteger

Revision increases on every change and starts at 1. Zero means the stored rule has no readable positive revision, so it is malformed.

updated_atstring date-time
updated_bystring uuid

Changes