This endpoint lets you fetch multiple test instances. You apply filters and pagination using query parameters.
Query Parameters | Expected Types | Default |
mode | "basic" | "detailed" | "basic" |
limit | number | 10 |
page | number | 1 |
ticketId | string | |
externalId | string |
{
testInstances: (Basic | Detailed)[];
pagination: {
totalItems: number;
totalPages: number;
currentPage: number;
limit: number;
next: string | null;
previous: string | null;
}
}
The type of the test instances depends on the value of mode provided in the query parameters. If the value of mode is "basic", the test object in the response will be in this type:
"basic" test instance object
{
testInstanceId: string;
taskId: string;
stepId: string;
ticketId: string;
status: "STARTED" | "COMPLETE" | "RESETUP";
ignored: boolean;
result: false | {
completedAt: number;//seconds
scoreboard: {
pointsAchieved: number;
maxAchievablePoints: number;
achievementRatio: number;
};
};
}
If the value of mode is "detailed", you will receive all of the properties from "basic" and also these properties:
// "detailed" user object:
Basic & {
organizationId: string;
candidate: {
id: string;
kind: "user" | "temp";
};
folder: string;
group: string;
labels: string[];
tags: Record;
result: false | {
completedAt: number; // seconds
scoreboard: {
pointsAchieved: number;
maxAchievablePoints: number;
achievementRatio: number;
noOfQuestions: number;
};
sections: {
uuid: string;
scoreboard: {
pointsAchieved: number;
maxAchievablePoints: number;
achievementRatio: number;
noOfQuestions: number;
}
}[];
dimensions: {
name: string;
scoreboard: {
pointsAchieved: number;
maxAchievablePoints: number;
achievementRatio: number;
noOfQuestions: number;
}
subDimensions: {
name: string;
scoreboard: {
pointsAchieved: number;
maxAchievablePoints: number;
achievementRatio: number;
noOfQuestions: number;
}
}[]
}[];
effects: {
name: string;
score: number;
subEffects: {
name: string;
score: number;
}[]
}[]
}
}