REFERENCE

API reference

Mirrored from prt-experiment-admin 0.3.0. Generated from the live OpenAPI document, so it cannot drift from what the backend serves.

Admin requires a Keycloak service Bearer token. Evaluation requires the X-ExpSvc-Caller service-name header. The caller must match the feature owner to participate in an experiment.

Every write also requires Action-User-Id, which is stored verbatim as by on the intent log. Errors carry { source, message }, where source separates a rejection by this service from one by the experimentation platform behind it.

other

GET/api/v1/experimentsBearer token

Experiments

Responses
  • 200Successful Response

Writes also require Action-User-Id, stored verbatim in the intent log.

POST/api/v1/experimentsBearer token

Create

Parameters
FieldTypeNotes
action-user-idstring or nullheader
idempotency-keystring or nullheader
Request body — Create
FieldTypeNotes
publisher_id*stringPublisher Id
publisher_group_id*stringPublisher Group Id
name*stringName
descriptionstringDescription
feature_key*stringFeature Key
targetingCondition*object<string, any>Targetingcondition
hashAttributestringHashattribute
cohorts*Cohort[]Cohorts
metrics*Metrics
start_atstring or nullStart At
duration*Duration
Responses
  • 201Successful Response
  • 422Validation Error(HTTPValidationError)

Writes also require Action-User-Id, stored verbatim in the intent log.

GET/api/v1/experiments/{identity}Bearer token

Get

Parameters
FieldTypeNotes
identity*stringpath
Responses
  • 200Successful Response
  • 422Validation Error(HTTPValidationError)

Writes also require Action-User-Id, stored verbatim in the intent log.

PATCH/api/v1/experiments/{identity}Bearer token

Patch

Parameters
FieldTypeNotes
identity*stringpath
action-user-idstring or nullheader
idempotency-keystring or nullheader
Request body — Patch
FieldTypeNotes
publisher_idstring or nullPublisher Id
publisher_group_idstring or nullPublisher Group Id
namestring or nullName
descriptionstring or nullDescription
targetingConditionobject<string, any> or nullTargetingcondition
hashAttributestring or nullHashattribute
cohortsCohort[] or nullCohorts
metricsMetrics or null
start_atstring or nullStart At
durationDuration or null
expected_base_version*integerExpected Base Version
Responses
  • 200Successful Response
  • 422Validation Error(HTTPValidationError)

Writes also require Action-User-Id, stored verbatim in the intent log.

DELETE/api/v1/experiments/{identity}Bearer token

Archive

Parameters
FieldTypeNotes
identity*stringpath
action-user-idstring or nullheader
idempotency-keystring or nullheader
Responses
  • 204Successful Response
  • 422Validation Error(HTTPValidationError)

Writes also require Action-User-Id, stored verbatim in the intent log.

POST/api/v1/experiments/{identity}/actionBearer token

Action

Parameters
FieldTypeNotes
identity*stringpath
action-user-idstring or nullheader
idempotency-keystring or nullheader
Request body — Action
FieldTypeNotes
expected_base_version*integerExpected Base Version
action*"start" | "stop" | "schedule" | "unschedule"Action
start_atstring or nullStart At
Responses
  • 200Successful Response
  • 422Validation Error(HTTPValidationError)

Writes also require Action-User-Id, stored verbatim in the intent log.

POST/api/v1/experiments/{identity}/cloneBearer token

Clone

Parameters
FieldTypeNotes
identity*stringpath
action-user-idstring or nullheader
idempotency-keystring or nullheader
Request body — Clone
FieldTypeNotes
publisher_idstring or nullPublisher Id
publisher_group_idstring or nullPublisher Group Id
namestring or nullName
descriptionstring or nullDescription
targetingConditionobject<string, any> or nullTargetingcondition
hashAttributestring or nullHashattribute
cohortsCohort[] or nullCohorts
metricsMetrics or null
start_atstring or nullStart At
durationDuration or null
Responses
  • 201Successful Response
  • 422Validation Error(HTTPValidationError)

Writes also require Action-User-Id, stored verbatim in the intent log.

GET/api/v1/featuresBearer token

Features

Responses
  • 200Successful Response

Writes also require Action-User-Id, stored verbatim in the intent log.

GET/api/v1/attributesBearer token

Attributes

Responses
  • 200Successful Response

Writes also require Action-User-Id, stored verbatim in the intent log.

GET/api/v1/metricsBearer token

List Metrics

Responses
  • 200Successful Response

Writes also require Action-User-Id, stored verbatim in the intent log.

GET/api/v1/metrics/{identity}Bearer token

Metrics

Parameters
FieldTypeNotes
identity*stringpath
Responses
  • 200Successful Response
  • 422Validation Error(HTTPValidationError)

Writes also require Action-User-Id, stored verbatim in the intent log.

GET/api/v1/metrics/{identity}/timeseriesBearer token

Timeseries

Parameters
FieldTypeNotes
identity*stringpath
Responses
  • 200Successful Response
  • 422Validation Error(HTTPValidationError)

Writes also require Action-User-Id, stored verbatim in the intent log.

POST/api/v1/metrics/{identity}/refreshBearer token

Refresh

Parameters
FieldTypeNotes
identity*stringpath
action-user-idstring or nullheader
Responses
  • 202Successful Response
  • 422Validation Error(HTTPValidationError)

Writes also require Action-User-Id, stored verbatim in the intent log.

GET/api/v1/livenone

Live

Responses
  • 200Successful Response

Health probes do not require authentication.

GET/livenone

Live

Responses
  • 200Successful Response

Health probes do not require authentication.

GET/api/v1/readynone

Ready

Responses
  • 200Successful Response

Health probes do not require authentication.

GET/readynone

Ready

Responses
  • 200Successful Response

Health probes do not require authentication.

GET/api/v1/healthnone

Health

Responses
  • 200Successful Response

Health probes do not require authentication.

GET/healthnone

Health

Responses
  • 200Successful Response

Health probes do not require authentication.

Schemas

Referenced by the operations above. A * marks a required field.

Action
FieldTypeNotes
expected_base_version*integerExpected Base Version
action*"start" | "stop" | "schedule" | "unschedule"Action
start_atstring or nullStart At
Clone
FieldTypeNotes
publisher_idstring or nullPublisher Id
publisher_group_idstring or nullPublisher Group Id
namestring or nullName
descriptionstring or nullDescription
targetingConditionobject<string, any> or nullTargetingcondition
hashAttributestring or nullHashattribute
cohortsCohort[] or nullCohorts
metricsMetrics or null
start_atstring or nullStart At
durationDuration or null
Cohort
FieldTypeNotes
name*stringName
weight*numberWeight
value*stringValue
Create
FieldTypeNotes
publisher_id*stringPublisher Id
publisher_group_id*stringPublisher Group Id
name*stringName
descriptionstringDescription
feature_key*stringFeature Key
targetingCondition*object<string, any>Targetingcondition
hashAttributestringHashattribute
cohorts*Cohort[]Cohorts
metrics*Metrics
start_atstring or nullStart At
duration*Duration
Duration
FieldTypeNotes
unit*"hours" | "days"Unit
count*integerCount
HTTPValidationError
FieldTypeNotes
detailValidationError[]Detail
Metric
FieldTypeNotes
id*stringId
version*integerVersion
Metrics
FieldTypeNotes
goal*Metric[]Goal
guardrailsMetric[]Guardrails
Patch
FieldTypeNotes
publisher_idstring or nullPublisher Id
publisher_group_idstring or nullPublisher Group Id
namestring or nullName
descriptionstring or nullDescription
targetingConditionobject<string, any> or nullTargetingcondition
hashAttributestring or nullHashattribute
cohortsCohort[] or nullCohorts
metricsMetrics or null
start_atstring or nullStart At
durationDuration or null
expected_base_version*integerExpected Base Version
ValidationError
FieldTypeNotes
loc*string | integer[]Location
msg*stringMessage
type*stringError Type

live Read from the backend on every request. Nothing here is written by hand.