Endpoint: Searching Tasks

Endpoint: Searching Tasks
February, 2025
POST /api/integration/rest/tasks/filter

This endpoint lets you search for your own tasks. You can apply pagination using the query parameters and apply filters using the request body.

Query ParametersExpected TypeDefault
mode"basic" | "detailed""basic"
limitnumber10
pagenumber1

Request Body

{
  folder?: string[];
  labels?: string[];
  favorite?: boolean;
  title?: string;
}
  • title: The value to filter tasks by their titles (case insensitive). The tests whose title contain the filter value will be returned.

    Response

    {
      tasks: (Basic | Detailed)[];
      pagination: {
        totalItems: number;
        totalPages: number;
        currentPage: number;
        limit: number;
        next: string | null;
        previous: string | null;
      }
    }

    The response will include only the tests that satisfy all of the filters provided in the request body.

    The type of the tasks depends on the value of mode provided in the query parameters. If the value of mode is "basic", the task object in the response will be in this type:

    // "basic" task object:
    {
        taskId: string;
        title: string;
        createdAt: number;// seconds
    }

    If the value of mode is "detailed", you will receive all of the properties from "basic" and also these properties:

    // "detailed" task object:
    Basic & {
      organizationId: string;
      favorite: boolean;
      folder: string;
      labels: string[];
      tags: Record;
    
      lang: "default" | "tr" | "en" | "es" | "fr" | "nl" | "it" | "sr" | "sv" | "de" | "no" | "ru" | "pt";
    
      accessMethod: "invitation-code" | "single-credential" | "double-credential" | "no-auth";
      active: boolean;
      activeAfter: number | null; // seconds
      activeBefore: number | null; // seconds
    
      steps: {
        id: string;
        title: string;
        active: boolean;
        activeBefore: number | null; // seconds
        activeAfter: number | null; // seconds
        attemptLimit: number;
        test: {
          testId: string;
          organizationId: string;
          source: "own-test" | "marketplace" | "talent-library-test" | "recruitment-test-library" 
          | "free-recruitment-test-library" | "free-talent-library-test"| "trial" | "unknown";
        };
        webcamRecording: "NONE" | "PHOTO" | "VIDEO";
        screenRecording: "NONE" | "SCREENSHOT" | "SCREENCAPTURE";
        fullscreen: boolean;
        postAiProctoring: boolean;
        practiceMode: boolean;
      }[];
    
      programs: {
        uuid: string;
        name: string;
      }[];
    
      stages: {
        uuid: string;
        name: string;
      }[];
    
      emailTemplates: {
        name: string;
        subject: string;
      }[];
    
      privateChatEnabled: boolean;
    }
    Go Back
    Talk to a representative
    Figure out if TestInvite is a good match for your organization
    Book a demo