Skip to main content
POST
Create a shadow experiment

Authorizations

Authorization
string
header
default:default
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

projectId
string
required

Project identifier.

endpointId
string
required

Endpoint identifier.

Body

application/json

Sampling strategy and optional initial targets for mirroring endpoint requests without affecting client responses.

name
string
required

Human-readable shadow experiment name, unique within the endpoint. At most 256 characters.

source
object
required

Endpoint source and sampling configuration for the experiment.

targets
object[]

Optional initial target deployments. At most 100 targets; manage later changes through the target APIs.

Response

OK

Experiment that mirrors sampled endpoint requests to target deployments without changing client responses.

id
string
required
read-only

Output only. Unique shadow experiment identifier.

projectId
string
required
read-only

Output only. Project that owns the parent endpoint.

endpointId
string
required
read-only

Output only. Endpoint whose traffic this experiment samples.

name
string
required

Human-readable shadow experiment name, unique within the endpoint. At most 256 characters.

source
object
required

Endpoint source and sampling configuration for mirrored requests.

targets
object[]
required

Target deployments that receive mirrored traffic.

createdBy
string
required
read-only

Identifier of the principal that created the experiment.

createdAt
string<date-time>
required
read-only

Timestamp when the experiment was created.

updatedAt
string<date-time>
required
read-only

Timestamp when the experiment was last updated.

etag
string
required

Opaque version tag for optimistic concurrency control. Returned on read; set it on update or delete requests for consistent read-modify-write.

state
enum<string>
required
read-only

Derived serving state, active when the experiment has at least one target.

Available options:
SHADOW_EXPERIMENT_STATE_ACTIVE,
SHADOW_EXPERIMENT_STATE_INACTIVE
description
string

User defined description.