Replays

Get All Replays for a Capture

Gets all replays for a given capture within an environment.

GET /api/replays?captureId={id}

Permissions

User must be logged in. User must be a member of the environment.

Body Params

Success Response

200 OK
[
  {
    "id": 1,
    "captureId": 1,
    "dbId": 2,
    "name": "Replay 1",
    "start": "2018-05-19T22:12:46.000Z",
    "end": "2018-05-19T22:12:58.000Z",
    "status": "DONE",
    "type": "REPLAY",
    "reason": null
  }
]

Error Response

404 NOT FOUND
{
    "code": 404,
    "message": "Capture was not Found"
}
{
    "code": 404,
    "message": "Environment was not Found"
}

Get a Specific Replay

Gets the information of a specific replay associated with an environment.

GET /api/replays/{id}

Permissions

User must be logged in. User must be a member of the environment.

Query Params

Success Response

200 OK
{
    "id": 1,
    "captureId": 1,
    "dbId": 2,
    "name": "Replay 1",
    "start": "2018-05-19T22:12:46.000Z",
    "end": "2018-05-19T22:12:58.000Z",
    "status": "DONE",
    "type": "REPLAY",
    "reason": null
}

Error Response

404 NOT FOUND
{
    "code": 404,
    "message": "Replay was not Found"
}

Get Metrics for a Replay

Gets the CloudWatch metrics associated with specific replay associated with an environment.

GET /api/replays/{id}/metrics

Permissions

User must be logged in. User must be a member of the environment.

Query Params

Success Response

200 OK
[
    {
        "label": "ReadIOPS",
        "type": "READ IOPS",
        "displayName": "READ IOPS",
        "dataPoints": [
            {
                "Timestamp": "2018-05-17T00:53:00.000Z",
                "Maximum": 0.06666888896296544,
                "Unit": "Count/Second"
            }
    }
]

Error Response

404 NOT FOUND
{
    "code": 404,
    "message": "Replay was not Found"
}

Edit a Replay

Edits the information of a replay.

PUT /api/replays/{id}

Permissions

User must be logged in. User must either be the owner of the replay or be an admin of the environment.

Query Params

Sample Request Body

{
 "name" : "newName"
}

Success Response

200 OK

Error Response

400 BAD REQUEST
{
    "code": 400,
    "message": "Replay's capture does not exist"
}
{
    "code": 404,
    "message": "Replay with the same name already exists on this capture"
}

Post a New Replay

Creates a new replay to be run on a capture.

POST /api/replays

Permissions

User must be logged in. User must be a member of the environment.

Body Params

Sample Request Body

{
 "name" : "myReplay",
      "captureId" : "1",
      "dbName" : "myDB",
      "host" : "xxxxx.xxxxx.us-east-2.rds.amazonaws.com",
      "user" : "user",
      "pass" : "pass",
      "parameterGroup" : "paramGroup",      "instance" : "XXXXX",
 "start" : "2018-05-19 12:00:00",
 "scheduledStart": null
}

Success Response

200 OK

Error Response

400 BAD REQUEST
{
    "code": 400,
    "message": "Replay's capture does not exist"
}
{
    "code": 400,
    "message": "Cannot schedule without a schedule start time"
}
{
    "code": 400,
    "message": "Replay with the same name already exists for this capture"
}

Delete a Replay

Deletes a specific replay associated with an environment and capture.

DELETE /api/replays/{id}

Permissions

User must be logged in. User must either be an owner of the replay or be an admin of the environment.

Query Params

Success Response

200 OK

Error Response

400 BAD REQUEST
{
    "code": 400,
    "message": "Replay's capture does not exist"
}
401 UNAUTHORIZED
{
    "code": 401,
    "message": "Admin login required"
}
404 NOT FOUND
{
    "code": 404,
    "message": "Replay not found"
}

Last updated