labvanced logoLabVanced
Contact
    • Remote Physiological Measurements
    • Eye Tracking
    • Head & Face-Tracking
    • Emotion Detection
    • Heart Rate Detection (rPPG)
    • Generative AI
    • Audio Transcription
    • EEG & Hardware Integrations
    • Decision Making
    • Reaction Times
    • Keyboard Inputs
    • Mouse Tracking
    • Mobile / Touch
    • Questionnaires
    • Gamepad / Joystick Integration
    • Audio Recordings
    • Audio Transcription
    • Video Recordings
    • Screen Recordings
    • Photos / Snapshots
    • Video Conferencing
    • Canvas Drawings
    • Build with AI
    • Build with Spreadsheets
    • Using the Experiment Editor
    • Coding
    • Creating Questionnaires
    • Balancing & Randomization
    • UX & Website Testing
    • Single Session Studies
    • Factorial Designs
    • Longitudinal & Multi-session Studies
    • Individual & Case Studies
    • Real-time Multi-user Studies
    • Interviews & Video Calls
    • Surveys & Questionnaires
    • Experience Sampling & Diaries
    • Classroom & Group Testing
    • Interventions & Clinical Trials
    • In the Browser
    • Mobile App
    • Desktop App
    • WebBridge Chrome Extension
    • Stroop Test
    • Flanker Task
    • N-back Task
    • Implicit Association Test
    • Trail Making Test
    • Digit Span
    • Corsi Block Tapping
    • Tower of London
    • Balloon Analog Risk Task
    • Preferential Looking
    • Browse more →
    • DASS-21
    • GAD-7
    • Rosenberg Self-Esteem Scale
    • PHQ-9
    • Ten-Item Personality Inventory
    • Big Five Personality Test
    • Adult ADHD Self-Report Scale
    • Browse more →
    • Building a Multi-user Study
    • Webcam Eye Tracking with AOIs
    • Website Frame Eye Tracking
    • Conditional Eye Tracking Opt-in
    • ChatGPT Study
    • Desktop App Study with EEG
    • Between-subjects Group Balancing
    • Building a Reading Study
    • Stroop Task
    • Lexical Decision Task
    • Browse more →
    Public Experiment Library
    • Arts Research
    • Clinical Psychology & Neuropsychology Medicine
    • Cognitive Psychology
    • Developmental Psychology
    • Behavioral Economics & Decision Science
    • Educational Research & Psychology
    • HCI & Human Factors
    • Linguistics & Language Sciences
    • Consumer & Marketing Research
    • Social & Personality Psychology
    • Sport & Movement Science
    • UX & Website Testing
    • Executive Functions
    • Language & Reading
    • Decision-Making & Reasoning
    • Attention
    • Overview
    • HCI & Human Factors
    • UX & Website Testing
    • Consumer & Marketing Research
    • White-Label App
    • PageGazer
    • Webcam vs. Lab Eye Tracking in InfantsAnna Banki & Gabriela Markova
    • Eye Tracking for Influencer MarketingDr. Alexander Edeling
    • Eye Tracking Infant Word ComprehensionDr. Giulia Calignano
    • Sentence Reading and Grammar JudgmentsDr. Jonathan Mirault
    • Regulating Emotions with MusicDr. Katrin Starcke
    • Game-Based Grammar Learning in ChildrenDr. Mireia Marimon
    • Gaze Cueing and AutismMax Soares Miehstein
    • Personality and Hearing in NoiseDr. Malte Wöstmann
    • All interviews →
    • Lab Notes
    • How to Cite Labvanced
    • Labvanced Platform Paper (2017)
    • Webcam Eye Tracking Validation (2024)
    • Webcam Eye Tracking Studies
    • Cognitive Psychology Studies
    • Developmental Psychology Studies
    • Linguistics Studies
    • See all publications →
    • Getting Started
    • Guide
    • Video Tutorials
    • Walkthroughs
    • Live Chat
    • Webinars & Onboarding Calls
    • AI Assistant
    • FAQ
    • Importing Templates Guide
    • Test Templates
    • Live Eye Tracking Metrics
    • Mouse Tracking Demo
    • ChatGPT Demo
    • Audio Recording Object Demo
    • Adding Image Stimuli Demo
    • Score & Feedback Demo
    • Browse all technical demos →
    • Timing Precision
    • Stimuli Presentation
    • Headphone Checks
    • Bot Checks
    • Participant Management
    • Comparisons
    • Research Blog
    • Prolific Integration
    • CloudResearch Integration
    • Sona Systems Integration
    • BeSample Integration
    • Panelabs Integration
    • Clickworker Integration
    • Labvanced Webhook API
    • Labvanced REST API
    • About Us
    • Newsletter Archive
    • Terms & Conditions
    • Data Security & Data Privacy
    • Technical & Organisational Measures
    • Accessibility
    • W-8BEN-E Form
    • Data Processing Agreement Template
    LinkedInYouTubeDiscord
    • Individual
    • Lab
    • Department / Consortium
    • Teaching
    • Campus
    • Commercial
    • Browse recording top-ups →
    • Browse AI token top-ups →
    • Overview
    • Study Building
    • Subject Recruitment
    • Dedicated Support
    Checkout
  • Contact
    • EN
      • 中國人
      • Deutsch
      • Français
      • Español
      • English
      • 日本語
    • Logout
    • Loginlogin icon
    Platform
    Labvanced makes it easy to implement the most advanced study design and reliably collect your data.
    Biosignals & AI
    Remote Physiological MeasurementsEye TrackingHead & Face-TrackingEmotion DetectionHeart Rate Detection (rPPG)Generative AIAudio TranscriptionEEG & Hardware Integrations
    Behavioral Recordings
    Decision MakingReaction TimesKeyboard InputsMouse TrackingMobile / TouchQuestionnairesGamepad / Joystick Integration
    Media Recordings
    Audio RecordingsAudio TranscriptionVideo RecordingsScreen RecordingsPhotos / SnapshotsVideo ConferencingCanvas Drawings
    Implementation Techniques
    Build with AIBuild with SpreadsheetsUsing the Experiment EditorCodingCreating QuestionnairesBalancing & RandomizationUX & Website Testing
    Study Formats

    Your study can take whatever format your research needs. Here are a few popular examples.

    Single Session StudiesFactorial DesignsLongitudinal & Multi-session StudiesIndividual & Case StudiesReal-time Multi-user StudiesInterviews & Video CallsSurveys & QuestionnairesExperience Sampling & DiariesClassroom & Group TestingInterventions & Clinical Trials
    Where Studies Run

    Run your study online in the browser, on mobile or tablet with the mobile app, or in-lab with the desktop app.

    In the BrowserMobile AppDesktop AppWebBridge Chrome Extension
    Tests
    Explore cognitive tests, questionnaires, walkthroughs, and our public experiment library: a starting point for your next study.
    Popular Cognitive Tests
    Stroop TestFlanker TaskN-back TaskImplicit Association TestTrail Making TestDigit SpanCorsi Block TappingTower of LondonBalloon Analog Risk TaskPreferential Looking
    Browse more →
    Questionnaires & Scales
    DASS-21GAD-7Rosenberg Self-Esteem ScalePHQ-9Ten-Item Personality InventoryBig Five Personality TestAdult ADHD Self-Report Scale
    Browse more →
    Public Experiment Library

    Take a look at what other researchers in the community are doing through our extensive, open catalog of shared studies.

    Open the public library →
    Walkthroughs

    Step-by-step builds of complete studies, from a blank project to a running experiment, that you can follow along or adapt.

    Building a Multi-user StudyWebcam Eye Tracking with AOIsWebsite Frame Eye TrackingConditional Eye Tracking Opt-inChatGPT StudyDesktop App Study with EEGBetween-subjects Group BalancingBuilding a Reading StudyStroop TaskLexical Decision Task
    Browse more →
    Research
    One platform for students, academics, and industry researchers studying human behavior.
    Harvard UniversityStanford UniversityCambridge UniversityUCLNYUMax Planck InstituteUCLATU Munich

    Trusted by researchers at 1,500+ universities worldwide

    Academic Research
    Arts ResearchClinical Psychology & Neuropsychology MedicineCognitive PsychologyDevelopmental PsychologyBehavioral Economics & Decision ScienceEducational Research & PsychologyHCI & Human FactorsLinguistics & Language SciencesConsumer & Marketing ResearchSocial & Personality PsychologySport & Movement ScienceUX & Website Testing
    Research Areas
    Executive FunctionsLanguage & ReadingDecision-Making & ReasoningAttention
    Industry / Commercial
    OverviewHCI & Human FactorsUX & Website TestingConsumer & Marketing ResearchWhite-Label AppPageGazer
    Researcher Interviews

    Conversations with researchers about the studies they ran with Labvanced, what worked, and what they learned.

    Webcam vs. Lab Eye Tracking in InfantsAnna Banki & Gabriela MarkovaEye Tracking for Influencer MarketingDr. Alexander EdelingEye Tracking Infant Word ComprehensionDr. Giulia CalignanoSentence Reading and Grammar JudgmentsDr. Jonathan MiraultRegulating Emotions with MusicDr. Katrin StarckeGame-Based Grammar Learning in ChildrenDr. Mireia MarimonGaze Cueing and AutismMax Soares MiehsteinPersonality and Hearing in NoiseDr. Malte Wöstmann
    All interviews →
    Our Research
    Lab NotesHow to Cite Labvanced
    Peer Reviewed Studies

    A selection of peer-reviewed work built on Labvanced: our own platform and validation papers, and studies by the research community grouped by area. Hundreds more are listed on the full publications page.

    Labvanced Platform Paper (2017)Webcam Eye Tracking Validation (2024)Webcam Eye Tracking StudiesCognitive Psychology StudiesDevelopmental Psychology StudiesLinguistics Studies
    See all publications →
    Resources
    Valuable resources to help you learn the platform, stay updated, and more.
    Documentation
    Getting StartedGuideVideo TutorialsWalkthroughs
    Support
    Live ChatWebinars & Onboarding CallsAI AssistantFAQ
    Templates & Demos

    These are a few popular examples. Browse our guide and a selection of technical demos to get started with implementation.

    Importing Templates GuideTest TemplatesLive Eye Tracking MetricsMouse Tracking DemoChatGPT DemoAudio Recording Object DemoAdding Image Stimuli DemoScore & Feedback Demo
    Browse all technical demos →
    Methodology
    Timing PrecisionStimuli PresentationHeadphone ChecksBot ChecksParticipant ManagementComparisonsResearch Blog
    Integrations & APIs
    Prolific IntegrationCloudResearch IntegrationSona Systems IntegrationBeSample IntegrationPanelabs IntegrationClickworker IntegrationLabvanced Webhook APILabvanced REST API
    Company & Legal
    About UsNewsletter ArchiveTerms & ConditionsData Security & Data PrivacyTechnical & Organisational MeasuresAccessibilityW-8BEN-E FormData Processing Agreement Template
    LinkedInYouTubeDiscord
    Pricing
    Our licenses and additional services at a glance.
    Licenses
    IndividualLabDepartment / ConsortiumTeachingCampusCommercial
    Top-Ups

    Need more recordings for your lab or your own research? Simply use one of these recording top-up packages.

    Browse recording top-ups →

    Need more AI tokens for the AI assistant and study translations? Simply use one of these AI token top-up packages.

    Browse AI token top-ups →
    Additional Services

    Hire Labvanced’s expert team to quickly bring your project to the level of rigor it needs.

    OverviewStudy BuildingSubject RecruitmentDedicated Support
    Checkout

    Ready to purchase a license or top-up? Head straight to checkout.

    Go to checkout →
    • 中國人
    • Deutsch
    • Français
    • Español
    • English
    • 日本語
    • Getting Started
    • Guide
      • GETTING STARTED

        • Task Editor
        • Frames
          • Canvas Frame
          • Page Frame
          • Website Frame
          • Overlays & Dialogs | Labvanced
        • Trial Timeline
        • Stimulus Presentation
        • Correctness of Response
        • Objects
        • Events
        • Variables
        • Task Wizard
        • AI Assistant
        • Trial System
        • Experiment Design
          • Creating a Study
          • Importing Templates in Labvanced
          • Data Frame Patterns
          • Multi-user Experiment Design
          • Longitudinal Experiment Design
      • FEATURED TOPICS

        • Randomization & Balance
        • Eye Tracking
          • Presenting Stimuli in an Eye Tracking Task
          • How to Choose Eye Tracking Calibration Settings
          • Setting Up Eye Tracking in a Task
          • Recording and Exporting Gaze Data
          • Using Shapes as Areas of Interest (AOI) for Eye Tracking
          • The Participant Calibration Experience
        • Web Bridge
          • Selecting Website AOIs | Anchor, Adjust, and Verify AOI Tracking
          • Tracking Mouse Behavior on a Website AOI | Web Bridge Guide
        • Questionnaires
        • Desktop App
        • Sample Studies
        • Participant Recruitment
        • API Access
          • REST API
          • Webhook API
          • WebSocket API
        • Other Topics

          • Precise Stimulus Timings
          • Multi User Studies
          • Head Tracking in Labvanced | Guide
      • MAIN APP TABS

        • Overview: Main Tabs
        • Dashboard
        • My Studies
        • Shared Studies
        • My Files
        • Experiment Library
        • My Account
        • License & Services
      • STUDY TABS

        • Overview: Study-Specific Tabs
        • Study Design
          • Tasks
          • Blocks
          • Sessions
          • Groups
        • Task Editor
          • Task Controls
          • The Trial System
          • Frame Types
          • Objects
          • Object Property Tables
          • Variables
          • System Variables Table
          • The Event System
          • Text Editor Functions
          • Eye Tracking Options in the Task Editor
          • Head Tracking in a Task
          • Multi-User Studies
        • Settings
        • Variables
        • Media
        • Texts & Translate
        • Launch & Participate
        • Subject Management
        • Dataview and Export
    • Video Tutorials
      • Video Overview
      • Getting Started in Labvanced
      • Creating Tasks
      • Element Videos
      • Events & Variables
      • Advanced Topics
    • Walkthroughs
      • Introduction
      • Stroop Task
      • Lexical Decision Task
      • Posner Gaze Cueing Task
      • Change Blindness Flicker Paradigm
      • Eye-tracking Sample Study
      • Infant Eye-tracking Study
      • Attentional Capture Study with Mouse Tracking
      • Rapid Serial Visual Presentation
      • ChatGPT Study
      • Eye Tracking Demo: SVGs as AOIs
      • Multi-User Demo: Show Subjects' Cursors
      • Gamepad / Joystick Controller- Basic Set Up
      • Desktop App Study with EEG Integration
      • Between-subjects Group Balancing and Variable Setup
      • Building a Multi-user Study
      • Website Frame Eye Tracking Walkthrough
      • Conditional Webcam Eye Tracking
      • Text Segmentation Study Building
      • Building a Study with AI
    • FAQ
      • Features
      • Support Policy & Guidelines
      • Security & Data Privacy
      • Licensing
      • Precision of Labvanced
      • Programmatic Use & API
      • Using Labvanced Offline
      • Troubleshooting
      • Study Creation Questions

    Webhook API

    Usage: ​The main use case for the Labvanced External Data Storage Webhook API is to transfer participant data in “real time” to an external / remote server, instead of hosting the recorded data on the Labvanced servers.

    PLEASE NOTE: ​Contrary to many API use cases, what is described here is NOT how to call the Labvanced API / endpoints (such a functionality does not exist for now), but rather how you must configure/implement your backend, such that our platform will be able to automatically call the endpoints you have implemented to sent the participants data directly to your backend/database instead of ours.

    Availability: ​This functionality is only available to Labvanced Lab license holders.

    1. Setting up the Webhook API

    To use the Webhook API, one first has to activate the “external data storage” option in “Study Settings” of the respective Labvanced study under the “Experiment Features” section.

    1.1 Parameters:

    • IP Address: E​nter your static IP address where your external server is running / publicly available.
    • Port: The port which should be used to send the data
    • URL Path​: The URL path which should be appended after the port. This is particularly useful to “namespace” your projects / incoming data, such that data from different experiments are sent to a different URL path. The URL path is optional, but we strongly recommend using it.

    2. Create the Server / Script for Receiving the Data from the Webhook API

    Based on your settings in step 1, you have to implement a server which is available at the specified IP address, port, and url path. A simplified version / example of such a server is available on our Github page at here.

    2.1 Data format: D​ata is sent in JSON format for all routes but the “/file_upload” route. The “/file_upload” route (used for uploading binary files such as recorded videos or audio) is encoded as “multipart/form-data” so please make sure you parse the incoming data correctly as JSON or multipart/form-data / binary data.

    2.2. CORS Settings: When implementing your backend you have to implement / allow Cross Origin Resource Sharing (CORS). Particularly, you have to set the following headers: “Access-Control-Allow-Origin” (include ​https://www.labvanced.com/​), “Access-Control-Allow-Methods” (include POST and OPTIONS), “Access-Control-Allow-Headers” (include Content-Type)

    2.3 Request Types: ​All request types are POST requests as they are used to send data out. At this point, a return value is only required for the “/file_upload” route. All other routes do not need a special return value.

    2.4 Types of requests / routes: ​Each time a participant takes part in a study, in total 8 different ​types​ of POST requests will be sent to the (external /your) server. The “/file_upload” route will only be used if your study includes an action to upload some recorded binary data (e.g. audio or video). Each type of POST request has a different route (url path), which will be appended to the specified URL path in step 1. Also each type of request has a different structure/payload, which should be accounted for when parsing and storing the data. See details in section 3.

    3. Webhook API Endpoint Definitions / Routes:

    In the following, you will see a detailed explanation of each route / endpoint that is used/called when a participant takes part in the experiment. Ideally we suggest that you implement all of these endpoints (besides 3.1), and make sure all the data is appropriately parsed and stored in your database.

    Which endpoints are used, which server is called when?

    • Endpoint 3.1 “/startExpPlayer” is only sent to the Labvanced server to load the experiment definition/JSON file and associated stimuli from our server.
    • Endpoints 3.2, 3.3, 3.4, 3.7, and 3.8 are sent both to the Labvanced server (needed for group balancing and general experiment flow) and the external/your server.
    • Endpoints 3.5 and 3.6 are only sent to the external/your server. Please note all trial/participant data is sent via route 3.6, which therefore is the most important endpoint to implement.
    • Endpoint 3.9 is only sent to the external/your server and called every time an ”upload action” is executed to upload binary (audio or video) data.

    3.1 Loading of the experiment

    • Route: /startExpPlayer
    • Type: POST
    • Called when: The participant visits a certain experiment URL on labvanced.com Main function on Lavanced server: Initializes the loading of the experiment.
    • Payload: JSON with the following fields:
    Field NameDescriptionData TypeRequired
    expIdUnique identifier for the studyIntegerYES
    isTestrunWhether the data is recorded or noteBooleanNO
    subject_codeIdentifier of the subject via URL paramStringNO
    tokenA unique identifier for participants in longitudinal studiesToken identifierNO
    askSubjDataWhether to show an initial survey, used to put subjects into different groupsBooleanYES

    NOTE: Does not need to be implemented on external servers, as this only initializes the loading of the experiment from the Labvanced server to the client computer


    3.2 Group and session selection

    • Route: /startFirstPlayerSession
    • Type: POST
    • Called when: Route 3.1 “ /startExpPlayer” returns successfully from the Labvanced server.
    • Main function on Lavanced server: Used to assign group and session numbers to a subject (server side balancing)
    • Payload: JSON with the following fields:
    Field NameDescriptionData TypeRequired
    expIdUnique identifier for the studyIntegerYES
    expSessionNrUnique identifier for the recording session for this participant (counting upwards)StringYES
    subject_codeIdentifier of the subject via URL paramStringNO
    tokenA unique identifier for participants in longitudinal studiesToken identifierNO
    survey_dataJSON of the pre-study questionnaire, fields described below.JSONNO
    survey_data.selectedGenderSelected gender of the participantStringNO
    survey_data.selectedAgeSelected age of the participantIntegerNO
    survey_data.selectedCountrySelected country/location of the participantStringNO
    survey_data.selectedLanguageSelected (first) language of the participantStringNO
    isTestrunWhether data is recorded or notBooleanYES
    runOnlyGroupNrOnly used to test run a certain group number without data recordingsInteger / FalseNO
    runOnlySessionNrOnly used to test run a certain session number without data recordingsInteger / FalseNO
    groupNrGroup number for this subjectIntegerYES
    sessionNrSession number in a longitudinal studyIntegerYES
    group_nameThe name of the group for this subjectStringYES
    session_nameThe name of the session for this subjectStringYES
    experiment_nameThe experiment name (not the publication name)StringYES

    3.3 ​Start of the experiment

    • Route: /setPlayerSessionStartedTime
    • Type: POST
    • Called when: The participant presses “Start Experiment”
    • Function on Lavanced Server: Saves the start time, session and group name of the experiment and starts the experiment.
    • Payload: JSON with the following fields:
    Field NameDescriptionData TypeRequired
    expIdUnique identifier for the studyIntegerYES
    expSessionNrUnique identifier for the recording session for this participant (counting upwards)StringYES
    start_timeStart time of the experimentUNIX TimestampYES
    sessionNrSession number in a longitudinal studyIntegerYES
    groupNrGroup number for this subjectIntegerYES
    tokenA unique identifier for participants in longitudinal studiesToken identifierNO

    3.4 Add metadata information

    • Route: /addMetaInfo
    • Type: POST
    • Called when: The participant presses “Start Experiment”
    • Function on Lavanced Server: Saves the meta information on the server.
    • Payload: JSON with the following fields:
    Field NameDescriptionData TypeRequired
    expIdUnique identifier for the studyIntegerYES
    expSessionNrUnique identifier for the recording session for this participant (counting upwards)StringYES
    var_dataThe JSON holding the meta informationJSONYES
    var_data.browserSpecThe browser which is used by the subjectStringNO
    var_data.versionSpecThe browser version which is used by the subjectStringNO
    var_data.systemSpecThe device type / OS which is used by the subjectStringNO
    var_data.agentSpecThe complete user agent stringStringNO
    var_data.fullscreenIndicates if the study is always in fullscreenBooleanNO
    var_data.timeDelayMeanThe JavaScript callback precision mean offset in millisecondsFloatNO
    var_data.timeDelayStdThe JavaScript callback precision standard deviation in millisecondsFloatNO
    var_data.crowdsourcingCodeThe crowdsourcing / completion code for subjectsStringNO
    var_data.crowdsourcinSubjIdThe crowdsourcing / worker ID of the subjectStringNO
    var_data.subjCounterGlobalA global subject counter for number of subject in the studyIntegerNO
    var_data.subjCounterPer GroupA subject counter per group in the studyArray of IntegersNO
    var_data.roleIdThe unique role ID for multi-user studies of the subjectIntegerNO
    var_data.multiUserGroupIdThe global unique multi-user group ID for multi-user studiesUuidNO
    var_data.displayedLanguageThe selected display language for multi-language studiesStringNO
    var_data.pixelDensityPerMMThe pixel density of the screenFloatNO
    var_data.screenHeightThe screens’ height in pixelsIntegerNO
    var_data.screenWidthThe screens’ width in pixelsIntegerNO
    var_data.windowHeightThe window /viewport height in pixelsIntegerNO
    var_data.windowWidthThe window/viewport width in pixelsIntegerNO

    3.5 Record information about a task

    • Route: /recordStartTask
    • Type: POST
    • Called when: A new tasks starts in the experiment flow
    • Function on Lavanced Server: Not called when external API requests are activated
    • Payload: JSON with the following fields:
    Field NameDescriptionData TypeRequired
    expIdUnique identifier for the studyIntegerYES
    expSessionNrUnique identifier for the recording session for this participant (counting upwards)StringYES
    blockNrCurrent block number (increasing counter)IntegerYES
    blockIdUnique ID of the current blockUuidYES
    blockNameName of the blockStringYES
    taskNrCurrent task number (increasing counter)IntegerYES
    taskIdID of the current task as defined in the editor (same between subjects)UuidYES
    recTaskIdServer-generated ID for the current recording task (different between subjects)IntegerYES
    taskNameName of the current taskStringYES
    start_timeStart time of the taskUNIX TimestampYES

    3.6 Record trial data

    • Route: /recordTrial
    • Type: POST
    • Called when: A trial is finished OR a custom record action is executed
    • Function on Lavanced Server: Not called when external API requests are activated.
    • Payload: JSON with the following fields:
    Field NameDescriptionData TypeRequired
    expIdUnique identifier for the studyIntegerYES
    expSessionNrUnique identifier for the recording session for this participant (counting upwards)StringYES
    recTaskIdServer-generated ID for the current recording task (different between subjects)IntegerYES
    taskIdID of the current task as defined in the editor (same between subjects)UuidYES
    trailNrTrial numberIntegerYES
    recDataThe main data / all user-created variables per trial are stored hereJSONYES

    NOTE: The exact data which is recorded per trial depends on the specific experiment and task. An overview for each study is available under the "Variables" tab of the specific experiment (see screenshot). Also please note that the external API variable names will be used as a key in the JSON structure. So please make sure that variable names are unique. Otherwise you would overwrite the data. The Labvanced system usually enforces the user to use unique variable names.

    Overview of the Variables tab in Labvanced

    3.7 Finish the experiment with success

    • Route: /finishExpSession
    • Type: POST
    • Called when: The experiment is finished successfully
    • Function on Lavanced Server: Finishes the study and flags the data set as completed (important for balancing).
    • Payload: JSON with the following fields:
    Field NameDescriptionData TypeRequired
    expIdUnique identifier for the studyIntegerYES
    expSessionNrUnique identifier for the recording session for this participant (counting upwards)StringYES
    end_timeTime when the experiment finishedUNIX TimestampYES
    var_dataSame as the var data in the “/​addMetaInfo​” route (updated info)JSONYES
    nextStartTimeNext start time (for longitudinal studies only)UNIX TimestampNO
    nextEndTimeNext end time (for longitudinal studies only)UNIX TimestampNO
    reminderTimeTime until next start time (for longitudinal studies only)Time StringNO
    selectedEmailEmail to send participation reminder (for longitudinal studies only)Email AddressNO
    emailReminderWhen to send the reminder (for longitudinal studies only)StringNO

    3.8 Finish the experiment with failure

    • Route: /errExpSession
    • Type: POST
    • Called when: The experiment is aborted with an error
    • Function on Lavanced Server: Aborts the study and flags the data set as incomplete
    • Payload: JSON with the following fields:
    Field NameDescriptionData TypeRequired
    expIdUnique identifier for the studyIntegerYES
    expSessionNrUnique identifier for the recording session for this participant (counting upwards)StringYES
    err_msgThe error messageStringYES

    3.9 Upload binary (audio or video) data

    • Route: /file_upload
    • Type: POST
    • Called when: An upload action is executed in the event system associated with some audio or video recording object. Function on Lavanced Server: Not called when external API requests are activated.
    • NOTE: The server must send return values for this route (explained below). If this is not done the “onUploadComplete” trigger is not executed and the experiment cannot propagate correctly. Also note that the data in this route is encoded as “multipart/form-data” as it includes both binary and non-binary data.
    • Payload: JSON with the following fields:
    Field NameDescriptionData TypeRequired
    expSessionNrUnique identifier for the recording session for this participant (counting upwards)StringYES
    newFileNameThe suggested file name to store the file. The file name includes the associated variable name, and the current, block, task and trial number.StringYES
    myFileThe actual file / binary dataBinaryYES

    Required Response:

    Field NameDescriptionData TypeRequired
    file_guidGlobal Unique Identifier (guid) for the recorded file. This has to be generated server side and will be saved in the variable associated with the file such that later it is easy to understand which file came from which recording object.UuidYES
    file_nameThe resulting filename the server used to save the file. This can be (but does not have to be) the same file name suggested by the client in the request. This will also be stored in the associated variable.StringYES
    Prev
    REST API
    Next
    WebSocket API