Cases
The Testify API is still in alpha and is subject to change without notice. Please contact us if you have any questions.
Create a new case, update an existing case, or delete a case.
GET /v1/cases/:projectId
Get all cases for a project.
Query Parameters
Relations should be specified as a comma-separated list of values. Valid relations for this endpoint are:
comments
{
limit?: number;
offset?: number;
relations?: string;
customFields?: { [key: string]: string };
}
Response
{
cases: {
id: string;
createdAt: Date;
createdBy: string;
updatedAt: Date;
updatedBy: string;
displayId: number;
name: string;
preconditions: string;
comments?: {
id: string;
createdAt: Date;
createdBy: string;
updatedAt: Date;
updatedBy: string;
content: string;
}[];
steps: {
action: string;
expectation: string;
}[];
customFields: { [key: string]: any };
}[];
pagination: {
total: number;
limit: number;
offset: number;
};
}
PUT /v1/cases/:projectId
Create a new case for the given project.
Request Body
{
name: string;
preconditions: string;
steps: {
action: string;
expectation: string;
}[];
customFields?: { [key: string]: any };
}
Response
{
case: {
id: string;
createdAt: Date;
createdBy: string;
updatedAt: Date;
updatedBy: string;
displayId: number;
name: string;
preconditions: string;
steps: {
action: string;
expectation: string;
}[];
customFields: { [key: string]: any };
};
}
POST /v1/cases/:caseId
Update an existing case.
Request Body
{
name?: string;
preconditions?: string;
steps?: {
action: string;
expectation: string;
}[];
customFields?: { [key: string]: any };
}
Response Body
{
case: {
id: string;
createdAt: Date;
createdBy: string;
updatedAt: Date;
updatedBy: string;
displayId: number;
name: string;
preconditions: string;
steps: {
action: string;
expectation: string;
}[];
customFields: { [key: string]: any };
};
}
DELETE /v1/cases/:caseId
Delete an existing case.
Response Body
A successful response will return a response with a status code of 200
and no data
parameter:
{
"ok": true,
"requestId": string,
"duration": number,
}
GET /v1/cases/case/:identifier
Get a specific case by its identifier. An identifier is different from the case ID and is in the form of PROJ-C###
, where PROJ
is the project identifier.
Query Parameters
Relations should be specified as a comma-separated list of values. Valid relations for this endpoint are:
project
comments
{
relations?: string;
}
Response
{
case: {
id: string;
createdAt: Date;
createdBy: string;
updatedAt: Date;
updatedBy: string;
displayId: number;
name: string;
preconditions: string;
comments?: {
id: string;
createdAt: Date;
createdBy: string;
updatedAt: Date;
updatedBy: string;
content: string;
}[];
steps: {
action: string;
expectation: string;
}[];
customFields: { [key: string]: any };
project?: {
id: string;
createdAt: Date;
createdBy: string;
updatedAt: Date;
updatedBy: string;
name: string;
identifier: string;
icon: string;
color: string;
};
};
}