Captures
Get All Captures
Gets information for all of the captures that a user has access to.
GET /api/captures
Permissions
User must be logged in. User must be a member of the environment.
Success Response
200 OK
[
{
"id": 1,
"name": "myCapture",
"start": "2018-05-19T22:06:53.000Z",
"scheduledStart": null,
"scheduledEnd": null,
"end": "2018-05-19T22:20:39.000Z",
"status": "DONE",
"envId": 1,
"type": "CAPTURE",
"reason": null
}
]
Error Response
404 NOT FOUND
{
"code": 404,
"message": "Environment does not exist"
}
Get a Specific Capture
Gets the information of a specific capture associated with an environment.
GET /api/captures/{id}
Permissions
User must be logged in. User must be a member of the environment.
Query Params
Param
Description
Optional/Required
id=[number]
id of the capture to get
Required
Success Response
200 OK
{
"id": 1,
"name": "myCapture",
"start": "2018-05-19T22:06:53.000Z",
"scheduledStart": null,
"scheduledEnd": null,
"end": "2018-05-19T22:20:39.000Z",
"status": "DONE",
"envId": 1,
"type": "CAPTURE",
"reason": null
}
Error Response
404 NOT FOUND
{
"code": 404,
"message": "Capture's environment not found"
}
Get Metrics for a Specific Capture
Gets the CloudWatch metrics associated with specific capture associated with an environment.
GET /api/captures/{id}/metrics
Permissions
User must be logged in. User must be a member of the environment.
Query Params
Param
Description
Optional/Required
id=[number]
id of the capture to get metrics for
Required
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": "Capture's environment not found"
}
Stop a Capture
Stops a specific capture associated with a given environment. The capture must be in the “Running” state before it is stopped.
POST /api/captures/{id}/stop
Permissions
User must be logged in. User must either be the owner of the capture or be an admin of the environment.
Query Params
Param
Description
Optional/Required
id=[number]
id of the capture to stop
Required
Success Response
200 OK
Error Response
404 NOT FOUND
{
"code": 404,
"message": "Capture not found"
}
409 CONFLICT
{
"code": 409,
"message": "This capture has already been stopped"
}
{
"code": 409,
"message": "This capture failed and is no longer running"
}
{
"code": 409,
"message": "Cannot stop a capture until it has started completely. Try again soon."
}
Edit a Capture
Edits the information of a specific capture associated with an environment.
PUT /api/captures/{id}
Permissions
User must be logged in. User must either be the owner of the capture or be an admin of the environment.
Query Params
Param
Description
Optional/Required
id=[number]
id of the capture to edit
Required
Sample Request Body
{
"name" : "newName"
}
Success Response
200 OK
Error Response
400 BAD REQUEST
{
"code": 400,
"message": "Capture with the same name already exists in this environment"
}
404 NOT FOUND
{
"code": 404,
"message": "Capture not found"
}
Post a New Capture
Creates a new capture in an environment.
POST /api/captures
Permissions
User must be logged in. User must be a member of the environment.
Body Params
Param
Description
Optional/Required
name=[string]
Name of the capture that will be displayed in the UI
Required
envId=[number]
id of the environment that the capture belongs to
Required
status=[string]
Status of the capture. Must be ‘SCHEDULED’, ‘STARTED’, or ‘STARTING’
Optional
start=[date]
Time that the capture actually started
Optional
scheduledStart=[date]
Time that the capture is scheduled for
Optional
duration=[number]
How long the capture will run for
Optional
Sample Request Body
{
"name" : "myCapture",
"start" : "2018-05-19 12:00:00",
"end" : null,
"envId" : 1,
"scheduledStart": null
}
Success Response
200 OK
{
"id": 1,
"name": "myCapture",
"start": "2018-05-19 12:00:00",
"scheduledStart": null,
"scheduledEnd": null,
"end": null,
"status": "STARTED",
"envId": 1,
"type": "CAPTURE",
"reason": null
}
Error Response
400 BAD REQUEST
{
"code": 400,
"message": "Capture with the same name already exists in this environment"
}
{
"code": 400,
"message": "Duration must be at least 60 seconds"
}
{
"code": 400,
"message": "Cannot schedule without a schedule start time"
}
Delete a Capture
Deletes a specific capture associated with an environment.
DELETE /api/captures/{id}
Permissions
User must be logged in. User must either be the owner of the capture or be an admin of the environment.
Query Params
Param
Description
Optional/Required
id=[number]
id of the capture to delete
Required
Success Response
200 OK
Error Response
404 NOT FOUND
{
"code": 404,
"message": "Capture not found"
}
Last updated