[{"data":1,"prerenderedAt":702,"buildId":703},["ShallowReactive",2],{"\u002Freference\u002Flive-updates":3,"\u002Freference\u002Flive-updates-surround":387,"navigation":398},{"id":4,"title":5,"body":6,"description":379,"extension":380,"meta":381,"navigation":382,"path":383,"seo":384,"stem":385,"__hash__":386},"docs\u002F8.reference\u002F3.live-updates.md","Live updates API",{"type":7,"value":8,"toc":372},"minimark",[9,21,42,47,71,75,78,292,352,358,362],[10,11,12],"warning",{},[13,14,15,16,20],"p",{},"This stream is ",[17,18,19],"strong",{},"experimental",". Event names and fields may change between releases. It's meant for the Avenvail web app; build on it at your own risk.",[13,22,23,24,28,29,36,37,41],{},"The web app opens ",[25,26,27],"code",{},"GET \u002Fapi\u002Fv1\u002Fevents",", a ",[30,31,35],"a",{"href":32,"rel":33},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FServer-sent_events",[34],"nofollow","Server-Sent Events"," stream that says ",[38,39,40],"em",{},"what"," changed, never what it now contains. After an event, fetch the current state through the normal API.",[43,44,46],"h2",{"id":45},"who-can-connect","Who can connect",[48,49,50,54,57,68],"ul",{},[51,52,53],"li",{},"Only a signed-in browser session, from the same origin. API tokens are refused, and credentials in the URL are ignored.",[51,55,56],{},"You only ever hear about your own files and runs, administrators included.",[51,58,59,60,63,64,67],{},"Each user can have 8 streams open, and the server 500. Past that the request gets ",[25,61,62],{},"429"," with ",[25,65,66],{},"Retry-After","; open streams are never closed to make room.",[51,69,70],{},"A stream ends when you sign out of that session, change your password, are disabled or deleted, after 30 minutes, or when the sign-in expires. Browsers reconnect on their own.",[43,72,74],{"id":73},"events","Events",[13,76,77],{},"Every event's data is a JSON object. Ignore events and fields you don't know.",[79,80,81,97],"table",{},[82,83,84],"thead",{},[85,86,87,91,94],"tr",{},[88,89,90],"th",{},"Event",[88,92,93],{},"Means",[88,95,96],{},"Data",[98,99,100,116,130,149,165,180,205,219,233,247,263,278],"tbody",{},[85,101,102,108,111],{},[103,104,105],"td",{},[25,106,107],{},"ready",[103,109,110],{},"Connected. Anything may have changed since your last connection, so refetch what you show.",[103,112,113],{},[25,114,115],{},"{}",[85,117,118,123,126],{},[103,119,120],{},[25,121,122],{},"heartbeat",[103,124,125],{},"Nothing happened; the connection is alive.",[103,127,128],{},[25,129,115],{},[85,131,132,137,140],{},[103,133,134],{},[25,135,136],{},"files.changed",[103,138,139],{},"Files were added, changed, moved, tagged, restored, processed or imported.",[103,141,142,145,146],{},[25,143,144],{},"fileIds",", ",[25,147,148],{},"reasons",[85,150,151,156,159],{},[103,152,153],{},[25,154,155],{},"files.removed",[103,157,158],{},"Files were trashed or deleted.",[103,160,161,145,163],{},[25,162,144],{},[25,164,148],{},[85,166,167,172,175],{},[103,168,169],{},[25,170,171],{},"folders.changed",[103,173,174],{},"Folders were created, renamed, moved, trashed or restored.",[103,176,177],{},[25,178,179],{},"folderIds",[85,181,182,187,193],{},[103,183,184],{},[25,185,186],{},"runs.changed",[103,188,189,190,192],{},"Workflow runs started, made progress, changed state or finished, or an event was handled without starting one. ",[25,191,144],{}," is only set when a run's state changed.",[103,194,195,145,198,145,201,145,203],{},[25,196,197],{},"runIds",[25,199,200],{},"workflowIds",[25,202,144],{},[25,204,148],{},[85,206,207,212,215],{},[103,208,209],{},[25,210,211],{},"tags.changed",[103,213,214],{},"Tags were created, renamed, merged or deleted.",[103,216,217],{},[25,218,115],{},[85,220,221,226,229],{},[103,222,223],{},[25,224,225],{},"fields.changed",[103,227,228],{},"Field definitions changed.",[103,230,231],{},[25,232,115],{},[85,234,235,240,243],{},[103,236,237],{},[25,238,239],{},"workflows.changed",[103,241,242],{},"Workflows were created, changed, enabled or disabled.",[103,244,245],{},[25,246,200],{},[85,248,249,254,257],{},[103,250,251],{},[25,252,253],{},"quarantine.changed",[103,255,256],{},"An upload held by an intake workflow was quarantined, retried, released, saved, discarded or expired.",[103,258,259,145,261],{},[25,260,144],{},[25,262,148],{},[85,264,265,270,273],{},[103,266,267],{},[25,268,269],{},"imports.changed",[103,271,272],{},"An import was created, scanned, made progress, finished or was canceled.",[103,274,275],{},[25,276,277],{},"importRunIds",[85,279,280,285,288],{},[103,281,282],{},[25,283,284],{},"resync",[103,286,287],{},"Too much changed to list. Refetch everything you show.",[103,289,290],{},[25,291,115],{},[13,293,294,295,297,298,145,301,145,304,145,307,145,310,145,313,145,316,145,319,145,322,145,325,328,329,332,333,145,336,145,339,145,342,145,345,328,348,351],{},"Changes are collected for about a quarter second and sent together, with ids listed once. ",[25,296,148],{}," are hints such as ",[25,299,300],{},"created",[25,302,303],{},"updated",[25,305,306],{},"moved",[25,308,309],{},"tagged",[25,311,312],{},"fields",[25,314,315],{},"attachments",[25,317,318],{},"restored",[25,320,321],{},"processed",[25,323,324],{},"imported",[25,326,327],{},"trashed"," and ",[25,330,331],{},"deleted",", and for quarantine ",[25,334,335],{},"quarantined",[25,337,338],{},"retried",[25,340,341],{},"released",[25,343,344],{},"saved",[25,346,347],{},"discarded",[25,349,350],{},"expired",". Their order means nothing.",[13,353,354,355,357],{},"Events have no ids and are not replayed. An event can be missed, for example while reconnecting, which is why every connection starts with ",[25,356,107],{},".",[43,359,361],{"id":360},"example","Example",[363,364,370],"pre",{"className":365,"code":367,"language":368,"meta":369},[366],"language-text","event: ready\ndata: {}\n\nevent: files.changed\ndata: {\"fileIds\":[\"0193b0c4-5e1a-7c2d-9a4f-3b8e6d2c1f00\"],\"reasons\":[\"created\"]}\n\nevent: heartbeat\ndata: {}\n","text","",[25,371,367],{"__ignoreMap":369},{"title":369,"searchDepth":373,"depth":374,"links":375},2,3,[376,377,378],{"id":45,"depth":373,"text":46},{"id":73,"depth":373,"text":74},{"id":360,"depth":373,"text":361},"The experimental event stream the web app uses to hear about changes, and what its events mean.","md",{},true,"\u002Freference\u002Flive-updates",{"title":5,"description":379},"8.reference\u002F3.live-updates","7DTJ3G7_N0lyk3B1fYeU2zgU3AMiyUTIhRCgKKbK6ZQ",[388,393],{"title":389,"path":390,"stem":391,"description":392,"children":-1},"Limits and errors","\u002Freference\u002Flimits","8.reference\u002F2.limits","Default limits, the settings administrators can change, and what common error codes mean.",{"title":394,"path":395,"stem":396,"description":397,"children":-1},"HTTP API","\u002Freference\u002Fapi","8.reference\u002F4.api","Call your Avenvail instance from scripts and other apps with API tokens, and find every endpoint in the generated API reference.",[399,419,458,502,521,540,551,594,641,654,670],{"title":400,"path":401,"stem":402,"children":403,"icon":418},"Getting started","\u002Fgetting-started","1.getting-started\u002F1.index",[404,406,410,414],{"title":405,"path":401,"stem":402},"Introduction",{"title":407,"path":408,"stem":409},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":411,"path":412,"stem":413},"Configure ShareX","\u002Fgetting-started\u002Fsharex","1.getting-started\u002F3.sharex",{"title":415,"path":416,"stem":417},"Updating Avenvail","\u002Fgetting-started\u002Fupdating","1.getting-started\u002F4.updating","i-lucide-rocket",{"title":420,"icon":421,"path":422,"stem":423,"children":424,"page":457},"Library","i-lucide-folder","\u002Flibrary","2.library",[425,429,433,437,441,445,449,453],{"title":426,"path":427,"stem":428},"Uploading files","\u002Flibrary\u002Fuploading","2.library\u002F1.uploading",{"title":430,"path":431,"stem":432},"Files and folders","\u002Flibrary\u002Ffiles-and-folders","2.library\u002F2.files-and-folders",{"title":434,"path":435,"stem":436},"Sharing files","\u002Flibrary\u002Fsharing","2.library\u002F3.sharing",{"title":438,"path":439,"stem":440},"Tags","\u002Flibrary\u002Ftags","2.library\u002F4.tags",{"title":442,"path":443,"stem":444},"Fields","\u002Flibrary\u002Ffields","2.library\u002F5.fields",{"title":446,"path":447,"stem":448},"Attachments","\u002Flibrary\u002Fattachments","2.library\u002F6.attachments",{"title":450,"path":451,"stem":452},"Search","\u002Flibrary\u002Fsearch","2.library\u002F7.search",{"title":454,"path":455,"stem":456},"Trash and recovery","\u002Flibrary\u002Ftrash","2.library\u002F8.trash",false,{"title":459,"path":460,"stem":461,"children":462,"icon":501},"Automations","\u002Fautomations","3.automations\u002F01.index",[463,465,469,473,477,481,485,489,493,497],{"title":464,"path":460,"stem":461},"Overview",{"title":466,"path":467,"stem":468},"Your first workflow","\u002Fautomations\u002Ffirst-workflow","3.automations\u002F02.first-workflow",{"title":470,"path":471,"stem":472},"The editor","\u002Fautomations\u002Feditor","3.automations\u002F03.editor",{"title":474,"path":475,"stem":476},"Values and templates","\u002Fautomations\u002Fvalues","3.automations\u002F04.values",{"title":478,"path":479,"stem":480},"Conditions and branching","\u002Fautomations\u002Fbranching","3.automations\u002F05.branching",{"title":482,"path":483,"stem":484},"Upload intake","\u002Fautomations\u002Fintake","3.automations\u002F06.intake",{"title":486,"path":487,"stem":488},"Testing","\u002Fautomations\u002Ftesting","3.automations\u002F07.testing",{"title":490,"path":491,"stem":492},"Runs and history","\u002Fautomations\u002Fruns","3.automations\u002F08.runs",{"title":494,"path":495,"stem":496},"Quarantine and failures","\u002Fautomations\u002Fquarantine","3.automations\u002F09.quarantine",{"title":498,"path":499,"stem":500},"Workflow templates","\u002Fautomations\u002Ftemplates","3.automations\u002F10.templates","i-lucide-workflow",{"title":503,"path":504,"stem":505,"children":506,"icon":520},"Connections","\u002Fconnections","4.connections\u002F1.index",[507,508,512,516],{"title":464,"path":504,"stem":505},{"title":509,"path":510,"stem":511},"AI providers","\u002Fconnections\u002Fai-providers","4.connections\u002F2.ai-providers",{"title":513,"path":514,"stem":515},"File storage","\u002Fconnections\u002Fstorage","4.connections\u002F3.storage",{"title":517,"path":518,"stem":519},"Photos and documents","\u002Fconnections\u002Fphotos-and-documents","4.connections\u002F4.photos-and-documents","i-lucide-plug",{"title":522,"path":523,"stem":524,"children":525,"icon":539},"AI","\u002Fai","5.ai\u002F1.index",[526,527,531,535],{"title":464,"path":523,"stem":524},{"title":528,"path":529,"stem":530},"AI classify and extract","\u002Fai\u002Fclassify-and-extract","5.ai\u002F2.classify-and-extract",{"title":532,"path":533,"stem":534},"AI describe, summarize and write","\u002Fai\u002Fdescribe-and-write","5.ai\u002F3.describe-and-write",{"title":536,"path":537,"stem":538},"AI detect and suggest tags","\u002Fai\u002Fdetect-and-tag","5.ai\u002F4.detect-and-tag","i-lucide-sparkles",{"title":541,"path":542,"stem":543,"children":544,"icon":550},"OCR","\u002Focr","5.ocr\u002F1.index",[545,546],{"title":464,"path":542,"stem":543},{"title":547,"path":548,"stem":549},"Setup","\u002Focr\u002Fsetup","5.ocr\u002F2.setup","i-lucide-scan-text",{"title":552,"path":553,"stem":554,"children":555,"icon":593},"Self-hosting","\u002Fself-hosting","6.self-hosting\u002F1.index",[556,557,561,565,569,573,577,581,585,589],{"title":464,"path":553,"stem":554},{"title":558,"path":559,"stem":560},"Troubleshooting","\u002Fself-hosting\u002Ftroubleshooting","6.self-hosting\u002F10.troubleshooting",{"title":562,"path":563,"stem":564},"Configuration","\u002Fself-hosting\u002Fconfiguration","6.self-hosting\u002F2.configuration",{"title":566,"path":567,"stem":568},"Reverse proxies and HTTPS","\u002Fself-hosting\u002Freverse-proxy","6.self-hosting\u002F3.reverse-proxy",{"title":570,"path":571,"stem":572},"DigitalOcean","\u002Fself-hosting\u002Fdigitalocean","6.self-hosting\u002F4.digitalocean",{"title":574,"path":575,"stem":576},"Backups and restoration","\u002Fself-hosting\u002Fbackups","6.self-hosting\u002F5.backups",{"title":578,"path":579,"stem":580},"Users and roles","\u002Fself-hosting\u002Fusers","6.self-hosting\u002F6.users",{"title":582,"path":583,"stem":584},"Single sign-on","\u002Fself-hosting\u002Fsingle-sign-on","6.self-hosting\u002F7.single-sign-on",{"title":586,"path":587,"stem":588},"Two-factor and passkeys","\u002Fself-hosting\u002Ftwo-factor-and-passkeys","6.self-hosting\u002F8.two-factor-and-passkeys",{"title":590,"path":591,"stem":592},"Importing","\u002Fself-hosting\u002Fimporting","6.self-hosting\u002F9.importing","i-lucide-server",{"title":595,"path":596,"stem":597,"children":598,"icon":640},"Guides","\u002Fguides","7.guides\u002F1.index",[599,600,604,608,612,616,620,624,628,632,636],{"title":464,"path":596,"stem":597},{"title":601,"path":602,"stem":603},"File scans in Paperless","\u002Fguides\u002Ffile-scans-in-paperless","7.guides\u002F10.file-scans-in-paperless",{"title":605,"path":606,"stem":607},"Send photos to Immich","\u002Fguides\u002Fphotos-to-immich","7.guides\u002F11.photos-to-immich",{"title":609,"path":610,"stem":611},"Optimize ShareX uploads","\u002Fguides\u002Fcompress-uploads","7.guides\u002F2.compress-uploads",{"title":613,"path":614,"stem":615},"Send Discord notifications","\u002Fguides\u002Fdiscord-notifications","7.guides\u002F3.discord-notifications",{"title":617,"path":618,"stem":619},"Organize screenshots with AI","\u002Fguides\u002Fcategorize-screenshots","7.guides\u002F4.categorize-screenshots",{"title":621,"path":622,"stem":623},"Extract receipts with AI","\u002Fguides\u002Fextract-receipts","7.guides\u002F5.extract-receipts",{"title":625,"path":626,"stem":627},"Name screenshots with AI","\u002Fguides\u002Fai-file-names","7.guides\u002F6.ai-file-names",{"title":629,"path":630,"stem":631},"Run AI locally with Ollama","\u002Fguides\u002Flocal-ai-ollama","7.guides\u002F7.local-ai-ollama",{"title":633,"path":634,"stem":635},"Make screenshots searchable","\u002Fguides\u002Fsearchable-screenshots","7.guides\u002F8.searchable-screenshots",{"title":637,"path":638,"stem":639},"Back up to Nextcloud","\u002Fguides\u002Fback-up-to-nextcloud","7.guides\u002F9.back-up-to-nextcloud","i-lucide-book-open",{"title":642,"icon":643,"path":644,"stem":645,"children":646,"page":457},"Reference","i-lucide-library","\u002Freference","8.reference",[647,651,652,653],{"title":648,"path":649,"stem":650},"Step reference","\u002Freference\u002Fsteps","8.reference\u002F1.steps",{"title":389,"path":390,"stem":391},{"title":5,"path":383,"stem":385},{"title":394,"path":395,"stem":396},{"title":655,"path":656,"stem":657,"children":658,"icon":669},"Development","\u002Fdevelopment","9.development\u002F1.index",[659,661,665],{"title":660,"path":656,"stem":657},"Local development",{"title":662,"path":663,"stem":664},"Plugin development","\u002Fdevelopment\u002Fplugins","9.development\u002F2.plugins",{"title":666,"path":667,"stem":668},"Writing documentation","\u002Fdevelopment\u002Fdocumentation","9.development\u002F3.documentation","i-lucide-code",{"title":671,"path":672,"stem":673,"children":674,"icon":701},"Comparisons","\u002Fcomparisons","99.comparisons\u002F1.index",[675,677,681,685,689,693,697],{"title":676,"path":672,"stem":673},"Comparing Avenvail",{"title":678,"path":679,"stem":680},"Avenvail and Zipline","\u002Fcomparisons\u002Fzipline","99.comparisons\u002F2.zipline",{"title":682,"path":683,"stem":684},"Avenvail and XBackBone","\u002Fcomparisons\u002Fxbackbone","99.comparisons\u002F3.xbackbone",{"title":686,"path":687,"stem":688},"Avenvail and chibisafe","\u002Fcomparisons\u002Fchibisafe","99.comparisons\u002F4.chibisafe",{"title":690,"path":691,"stem":692},"Avenvail and Slink","\u002Fcomparisons\u002Fslink","99.comparisons\u002F5.slink",{"title":694,"path":695,"stem":696},"Avenvail and Pingvin Share","\u002Fcomparisons\u002Fpingvin-share","99.comparisons\u002F6.pingvin-share",{"title":698,"path":699,"stem":700},"Avenvail and PicoShare","\u002Fcomparisons\u002Fpicoshare","99.comparisons\u002F7.picoshare","i-lucide-scale",1796391526261,"50da0f49-5ffe-418d-9ada-20d446e1504e"]