Endpoint: Dynamically Fetch a Test Session & Result

Endpoint: Dynamically Fetch a Test Session & Result
February, 2025
POST /api/integration/rest/tasks/:taskId/test-instances/:id/expand

This endpoint lets you fetch a test instance under a task of your organization. More information about the tests instance can be obtained.

Request Body

A list of keywords can be provided with the expand property in the request body. For each keyword provided, extra information about the test instance will be returned in the response.

{
  expand: ("test" | "uniqId" | "creditCost" | "roomForm" | "identityPhoto")[];
}

Response

By default, a "detailed" test instance object will be returned. Additional properties can will be added on top of the detailed object.

Detailed & {
  creditCost?: number;
  uniqId?: string;
  test?: {
    source: "own-test" | "marketplace" | "talent-library-test" | "free-talent-library-test" | "recruitment-test-library" | 
"free-recruitment-test-library" | "trial" | "unknown";
    testId: string;
    organizationId: string
  },
  roomForm?: Record;
  identityPhoto?: { url: string | null };
}
  • creditCost: The amount of credits used to conduct this test instance.
    • uniqId: The unique ID assigned to the candidate to whom this test instance belongs to.
      • test: The ID of the test, organization ID of the test's owner, and the source of the test.
        • roomForm: The form fields and the candidate's responses to them. If the form is enabled in task settings, candidate will be asked to fill a form when they first enter the assessment
          • identityPhoto: The URL to the identity photo taken of the candidate when they start a test. If identity photo is enabled in task settings, candidates will need to have their photo taken with their webcam before they can start a test in their assessment.
            Go Back
            Talk to a representative
            Figure out if TestInvite is a good match for your organization
            Book a demo