This endpoint lets you list multiple test instances under a task of your organization. You can apply pagination to your request using query parameters and apply filters using the request body.
Query Parameters | Expected Types | Default |
mode | "basic" | "detailed" | "basic" |
limit | number | 10 |
lastDocId | string |
The body can be of 2 types:
{
kind: "meta";
group?: string;
label?: string;
stepId?: string;
status?: "STARTED" | "COMPLETE" | "RESETUP";
from?: number; // millisecond
to?: number; // millisecond
} | {
kind: "info";
displayName?: string;
email?: string;
credential1?: string;
code?: string;
uniqId?: string;
}
With meta kind, more general filters can be applied, and the test instances that fit all of the filters will be returned. The info kind is used to make a pinpoint search with the candidate's information.
{
testInstances: (Basic | Detailed)[];
pagination: {
limit: number;
lastDocId: string | null;
next: 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;
}[]
}[]
}
}