Shadow Experiment Service

Create a shadow experiment

POST
/projects/{projectId}/endpoints/{endpointId}/shadowExperiments

Creates an experiment that mirrors a sampled portion of endpoint traffic to one or more target deployments without returning their responses to clients. Add a description with the update operation after creation.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Project identifier.

endpointId*string

Endpoint identifier.

Request Body

application/json

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

name*string

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

source*

Endpoint source and sampling configuration for the experiment.

targets?array<>

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

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/projects/string/endpoints/string/shadowExperiments" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "source": {      "endpoint": {        "sampling": {          "uniform": {            "rate": 0          }        }      }    }  }'
{  "id": "string",  "projectId": "string",  "endpointId": "string",  "name": "string",  "description": "string",  "source": {    "endpoint": {      "sampling": {        "uniform": {          "rate": 0        }      }    }  },  "targets": [    {      "id": "string",      "experimentId": "string",      "name": "string",      "targetDeploymentId": "string",      "description": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "etag": "string"    }  ],  "createdBy": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "etag": "string",  "state": "SHADOW_EXPERIMENT_STATE_ACTIVE"}