[{"data":1,"prerenderedAt":4550},["ShallowReactive",2],{"content-navigation":3,"$fY4mAj2l3kRkTDttxn6FGzqBc2O9HAJ2qp-_8LmMX7aw":1825,"/tutorials/projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie":1830},[4,112,119,224,333,429,481,1087,1113,1142],{"title":5,"path":6,"stem":7,"children":8,"page":89},"Partials","/_partials","_partials",[9,15,20,25,29,33,38,42,47,51,56,60,64,68,90,94,98,103,108],{"title":10,"path":11,"stem":12,"description":13,"icon":14,"links":14},"Advanced Field Creation Mode","/_partials/advanced-field-creation-mode","_partials/advanced-field-creation-mode","You can use these advanced options to automatically set the values of fields at specific events by clicking on \"Continue in Advanced Field Creation Mode\".",null,{"title":16,"path":17,"stem":18,"description":19,"icon":14,"links":14},"Authentication","/_partials/authentication","_partials/authentication","While the Public role can be configured to make data available without authentication, anything that is not public requires a user to authenticate their requests.",{"title":21,"path":22,"stem":23,"description":24,"icon":14,"links":14},"Config Env Vars","/_partials/config-env-vars","_partials/config-env-vars","",{"title":26,"path":27,"stem":28,"description":24,"icon":14,"links":14},"Deployment Public Instance","/_partials/deployment-public-instance","_partials/deployment-public-instance",{"title":30,"path":31,"stem":32,"description":24,"icon":14,"links":14},"Engine Studio Box","/_partials/engine-studio-box","_partials/engine-studio-box",{"title":34,"path":35,"stem":36,"description":37,"icon":14,"links":14},"Extension Hook Footguns","/_partials/extension-hook-footguns","_partials/extension-hook-footguns","Directus reads system collections to operate. Be careful when modifying the output of system collection read or query events. Also ensure not to directly or indirectly emit the same event your hook is handling or you will create an infinite loop.",{"title":39,"path":40,"stem":41,"description":24,"icon":14,"links":14},"Extension Hook System Collections","/_partials/extension-hook-system-collections","_partials/extension-hook-system-collections",{"title":43,"path":44,"stem":45,"description":46,"icon":14,"links":14},"Extensions Api","/_partials/extensions-api","_partials/extensions-api","This extension type is loaded into the Directus process. They can use the provided services exported by the @directus/extensions-sdk package and can be written in JavaScript or TypeScript.",{"title":48,"path":49,"stem":50,"description":24,"icon":14,"links":14},"Extensions Api Internals","/_partials/extensions-api-internals","_partials/extensions-api-internals",{"title":52,"path":53,"stem":54,"description":55,"icon":14,"links":14},"Extensions App","/_partials/extensions-app","_partials/extensions-app","This extension type is loaded into the Directus Data Studio. They are are built with Vue 3, and can use the provided composables exported by the @directus/extensions-sdk package. Extensions can be written in JavaScript or TypeScript.",{"title":57,"path":58,"stem":59,"description":24,"icon":14,"links":14},"Extensions App Internals","/_partials/extensions-app-internals","_partials/extensions-app-internals",{"title":61,"path":62,"stem":63,"description":24,"icon":14,"links":14},"Extensions Theme","/_partials/extensions-theme","_partials/extensions-theme",{"title":65,"path":66,"stem":67,"description":24,"icon":14,"links":14},"Extensions Uid","/_partials/extensions-uid","_partials/extensions-uid",{"title":69,"path":70,"stem":71,"children":72,"page":89},"Home Hero","/_partials/home-hero","_partials/home-hero",[73,77,81,85],{"title":74,"path":75,"stem":76,"description":24,"icon":14,"links":14},"Auth","/_partials/home-hero/auth","_partials/home-hero/auth",{"title":78,"path":79,"stem":80,"description":24,"icon":14,"links":14},"Data","/_partials/home-hero/data","_partials/home-hero/data",{"title":82,"path":83,"stem":84,"description":24,"icon":14,"links":14},"File","/_partials/home-hero/file","_partials/home-hero/file",{"title":86,"path":87,"stem":88,"description":24,"icon":14,"links":14},"Realtime","/_partials/home-hero/realtime","_partials/home-hero/realtime",false,{"title":91,"path":92,"stem":93,"description":24,"icon":14,"links":14},"Json Function","/_partials/json-function","_partials/json-function",{"title":95,"path":96,"stem":97,"description":24,"icon":14,"links":14},"License","/_partials/license","_partials/license",{"title":99,"path":100,"stem":101,"description":102,"icon":14,"links":14},"Query Functions","/_partials/query-functions","_partials/query-functions","Functions accept a field and return a modified value. Functions can be used in any query parameter you'd normally supply a field key, including fields, aggregation, and filters.",{"title":104,"path":105,"stem":106,"description":107,"icon":14,"links":14},"Quickstart Making Calls","/_partials/quickstart-making-calls","_partials/quickstart-making-calls","You can use a visual API testing tool like Postman or Hoppscotch, a terminal-based based tool like curl or HTTPie, or make HTTP requests directly in a script written in your programming language of choice.",{"title":109,"path":110,"stem":111,"description":24,"icon":14,"links":14},"Snippet Auth Token","/_partials/snippet-auth-token","_partials/snippet-auth-token",{"title":113,"path":114,"stem":115,"children":116,"description":118,"icon":14,"links":14},"Directus API Reference","/api","api/index",[117],{"title":113,"path":114,"stem":115,"description":118,"icon":14,"links":14},"Learn how to use our API",{"title":120,"path":121,"stem":122,"children":123,"page":89},"Cloud","/cloud","cloud",[124,144,174,204],{"title":125,"path":126,"stem":127,"children":128,"page":89},"Getting Started","/cloud/getting-started","cloud/1.getting-started",[129,134,139],{"title":130,"path":131,"stem":132,"description":133,"icon":14,"links":14},"Introduction","/cloud/getting-started/introduction","cloud/1.getting-started/1.introduction","Whether you're a hobbyist, startup, or enterprise, our flexible Directus Cloud platform lets you get up and running with Directus quickly.",{"title":135,"path":136,"stem":137,"description":138,"icon":14,"links":14},"Cloud Teams","/cloud/getting-started/teams","cloud/1.getting-started/2.teams","A team is an organizational system that groups accounts together as team members and provides consolidated billing for projects.",{"title":140,"path":141,"stem":142,"description":143,"icon":14,"links":14},"Managing Cloud Accounts","/cloud/getting-started/accounts","cloud/1.getting-started/3.accounts","An account is your portal to Directus Cloud. You can use it to manage your teams, team members, projects and billing.",{"title":145,"path":146,"stem":147,"children":148,"page":89},"Projects","/cloud/projects","cloud/2.projects",[149,154,159,164,169],{"title":150,"path":151,"stem":152,"description":153,"icon":14,"links":14},"Create a Project","/cloud/projects/create","cloud/2.projects/1.create","Create a project in Directus Cloud.",{"title":155,"path":156,"stem":157,"description":158,"icon":14,"links":14},"Destroy a Project","/cloud/projects/destroy","cloud/2.projects/2.destroy","Destroy a Directus Cloud project and cancel your subscription.",{"title":160,"path":161,"stem":162,"description":163,"icon":14,"links":14},"Version Upgrades","/cloud/projects/version-upgrades","cloud/2.projects/3.version-upgrades","Learn about automatic upgrades and version locking in Directus Cloud.",{"title":165,"path":166,"stem":167,"description":168,"icon":14,"links":14},"Monitoring Projects","/cloud/projects/monitoring","cloud/2.projects/4.monitoring","Learn how to monitor your Directus Cloud project.",{"title":170,"path":171,"stem":172,"description":173,"icon":14,"links":14},"Backups","/cloud/projects/backups","cloud/2.projects/5.backups","Learn about automatic backups in Directus Cloud.",{"title":175,"path":176,"stem":177,"children":178,"page":89},"Configuration","/cloud/configuration","cloud/3.configuration",[179,184,189,194,199],{"title":180,"path":181,"stem":182,"description":183,"icon":14,"links":14},"Custom Domains","/cloud/configuration/custom-domains","cloud/3.configuration/1.custom-domains","Learn how to set up a custom domain for your Directus Enterprise Cloud project.",{"title":185,"path":186,"stem":187,"description":188,"icon":14,"links":14},"Environment Variables","/cloud/configuration/environment-variables","cloud/3.configuration/2.environment-variables","Learn about environment variables in Directus Cloud.",{"title":190,"path":191,"stem":192,"description":193,"icon":14,"links":14},"Direct Database Access","/cloud/configuration/direct-database-access","cloud/3.configuration/3.direct-database-access","Learn how to directly access your Directus Cloud project's database.",{"title":195,"path":196,"stem":197,"description":198,"icon":14,"links":14},"Custom Extensions","/cloud/configuration/custom-extensions","cloud/3.configuration/4.custom-extensions","Learn how to deploy custom extensions to your Directus Cloud project.",{"title":200,"path":201,"stem":202,"description":203,"icon":14,"links":14},"Datacenter Regions","/cloud/configuration/datacenter-regions","cloud/3.configuration/5.datacenter-regions","Learn where datacenters for cloud projects are located.",{"title":205,"path":206,"stem":207,"children":208,"page":89},"Billing","/cloud/billing","cloud/4.billing",[209,214,219],{"title":210,"path":211,"stem":212,"description":213,"icon":14,"links":14},"Manage Billing","/cloud/billing/manage-billing","cloud/4.billing/1.manage-billing","Learn how to manage billing for your Directus Cloud project.",{"title":215,"path":216,"stem":217,"description":218,"icon":14,"links":14},"Changing Your Tier","/cloud/billing/changing-tier","cloud/4.billing/2.changing-tier","Learn how to change the tier of your Directus Cloud project.",{"title":220,"path":221,"stem":222,"description":223,"icon":14,"links":14},"Cancel Your Subscription","/cloud/billing/cancel-subscription","cloud/4.billing/3.cancel-subscription","Learn how to cancel your Directus Cloud project subscription.",{"title":225,"path":226,"stem":227,"children":228,"page":89},"Community","/community","community",[229,249,274,293,318],{"title":230,"path":231,"stem":232,"children":233,"page":89},"Overview","/community/overview","community/1.overview",[234,239,244],{"title":235,"path":236,"stem":237,"description":238,"icon":14,"links":14},"Welcome","/community/overview/welcome","community/1.overview/1.welcome","Welcome to the Directus community!",{"title":240,"path":241,"stem":242,"description":243,"icon":14,"links":14},"Code of Conduct","/community/overview/conduct","community/1.overview/2.conduct","Our standards, responsibilities, and enforcement guidelines to create a positive community.",{"title":245,"path":246,"stem":247,"description":248,"icon":14,"links":14},"Moderation Guidelines","/community/overview/moderation","community/1.overview/3.moderation","Guidelines we give to community moderators.",{"title":250,"path":251,"stem":252,"children":253,"page":89},"Contribution","/community/contribution","community/2.contribution",[254,259,264,269],{"title":255,"path":256,"stem":257,"description":258,"icon":14,"links":14},"Translations","/community/contribution/translations","community/2.contribution/1.translations","How to contribute to translating the Data Studio.",{"title":260,"path":261,"stem":262,"description":263,"icon":14,"links":14},"Documentation","/community/contribution/documentation","community/2.contribution/2.documentation","How to contribute to the Directus documentation.",{"title":265,"path":266,"stem":267,"description":268,"icon":14,"links":14},"Feature Requests","/community/contribution/feature-requests","community/2.contribution/3.feature-requests","How to add feature requests, and our process for reviewing them.",{"title":270,"path":271,"stem":272,"description":273,"icon":14,"links":14},"Pull Requests","/community/contribution/pull-requests","community/2.contribution/4.pull-requests","Our process for contributing pull requests to Directus.",{"title":275,"path":276,"stem":277,"children":278,"page":89},"Codebase","/community/codebase","community/3.codebase",[279,283,288],{"title":275,"path":280,"stem":281,"description":282,"icon":14,"links":14},"/community/codebase/overview","community/3.codebase/1.overview","Overview of the Directus codebase for new contributors",{"title":284,"path":285,"stem":286,"description":287,"icon":14,"links":14},"Development Environment","/community/codebase/dev-environment","community/3.codebase/2.dev-environment","How to set up and run a development environment for Directus so that you can work on the platform's source code.",{"title":289,"path":290,"stem":291,"description":292,"icon":14,"links":14},"Testing","/community/codebase/testing","community/3.codebase/3.testing","How to run unit and blackbox tests in the Directus codebase.",{"title":294,"path":295,"stem":296,"children":297,"page":89},"Reporting And Support","/community/reporting-and-support","community/4.reporting-and-support",[298,303,308,313],{"title":299,"path":300,"stem":301,"description":302,"icon":14,"links":14},"Troubleshooting Steps","/community/reporting-and-support/troubleshooting-steps","community/4.reporting-and-support/1.troubleshooting-steps","If you're experiencing issues or think you have found a problem in Directus, be sure to follow these steps.",{"title":304,"path":305,"stem":306,"description":307,"icon":14,"links":14},"Bug Reporting","/community/reporting-and-support/bug-reporting","community/4.reporting-and-support/2.bug-reporting","How to report bugs in Directus.",{"title":309,"path":310,"stem":311,"description":312,"icon":14,"links":14},"Security Reporting","/community/reporting-and-support/security-reporting","community/4.reporting-and-support/3.security-reporting","How to report security issues in Directus.",{"title":314,"path":315,"stem":316,"description":317,"icon":14,"links":14},"Customer Support","/community/reporting-and-support/customer-support","community/4.reporting-and-support/4.customer-support","How to get help with Directus as a user and customer.",{"title":319,"path":320,"stem":321,"children":322,"page":89},"Programs","/community/programs","community/5.programs",[323,328],{"title":324,"path":325,"stem":326,"description":327,"icon":14,"links":14},"Guest Authors","/community/programs/guest-authors","community/5.programs/1.guest-authors","Our guest author program invites authors to join and get paid to write tutorials for the Directus community.",{"title":329,"path":330,"stem":331,"description":332,"icon":14,"links":14},"Directus Labs","/community/programs/directus-labs","community/5.programs/2.directus-labs","Directus Labs is the official organization for Directus templates, settings and experimental projects.",{"title":175,"path":334,"stem":335,"children":336,"page":89},"/configuration","configuration",[337,341,346,351,356,361,366,371,376,381,386,391,396,401,406,410,415,420,425],{"title":130,"path":338,"stem":339,"description":340,"icon":14,"links":14},"/configuration/intro","configuration/0.intro","Environment variables are used for all configuration within a Directus project. These variables can be defined in a number of ways, which we cover below.",{"title":342,"path":343,"stem":344,"description":345,"icon":14,"links":14},"General","/configuration/general","configuration/1.general","Configuration for the general system, server, first admin user, and telemetry.",{"title":347,"path":348,"stem":349,"description":350,"icon":14,"links":14},"AI","/configuration/ai","configuration/ai","Configuration for AI Assistant and Model Context Protocol (MCP) features.",{"title":352,"path":353,"stem":354,"description":355,"icon":14,"links":14},"Auth & SSO","/configuration/auth-sso","configuration/auth-sso","Configuration for authentication methods, including local email/password, OAuth 2.0, OpenID, LDAP, and SAML.",{"title":357,"path":358,"stem":359,"description":360,"icon":14,"links":14},"Cache","/configuration/cache","configuration/cache","Configuration for internal and output caching.",{"title":362,"path":363,"stem":364,"description":365,"icon":14,"links":14},"Database","/configuration/database","configuration/database","Configuration for database connections.",{"title":367,"path":368,"stem":369,"description":370,"icon":14,"links":14},"Email","/configuration/email","configuration/email","Configuration for email settings and templates.",{"title":372,"path":373,"stem":374,"description":375,"icon":14,"links":14},"Extensions","/configuration/extensions","configuration/extensions","Configuration for extensions and the Directus Marketplace.",{"title":377,"path":378,"stem":379,"description":380,"icon":14,"links":14},"Files","/configuration/files","configuration/files","Configuration for storage locations, metadata, upload limits, and transformations.",{"title":382,"path":383,"stem":384,"description":385,"icon":14,"links":14},"Flows","/configuration/flows","configuration/flows","Configure environment variables, memory, and timeout for Flows.",{"title":387,"path":388,"stem":389,"description":390,"icon":14,"links":14},"Logging","/configuration/logging","configuration/logging","Configuration for general and Realtime logging.",{"title":392,"path":393,"stem":394,"description":395,"icon":14,"links":14},"Metrics","/configuration/metrics","configuration/metrics","Configuration for metrics.",{"title":397,"path":398,"stem":399,"description":400,"icon":14,"links":14},"Migrations","/configuration/migrations","configuration/migrations","Creation of custom migration files to automate database changes.",{"title":402,"path":403,"stem":404,"description":405,"icon":14,"links":14},"PM2","/configuration/pm2","configuration/pm2","Configuration for PM2, the process manager for Directus.",{"title":86,"path":407,"stem":408,"description":409,"icon":14,"links":14},"/configuration/realtime","configuration/realtime","Configuration for WebSockets and GraphQL Subscriptions.",{"title":411,"path":412,"stem":413,"description":414,"icon":14,"links":14},"Security & Limits","/configuration/security-limits","configuration/security-limits","Configuration for access tokens, cookies, CSP, hashing, CORS, rate limiting, and request limits.",{"title":416,"path":417,"stem":418,"description":419,"icon":14,"links":14},"Synchronization","/configuration/synchronization","configuration/synchronization","Configuration around synchronization and Redis.",{"title":421,"path":422,"stem":423,"description":424,"icon":14,"links":14},"Theming","/configuration/theming","configuration/theming","Configuration of the Data Studio's theming engine and appearance settings.",{"title":255,"path":426,"stem":427,"description":428,"icon":14,"links":14},"/configuration/translations","configuration/translations","Directus supports translations for both the Data Studio UI and authored content.",{"title":125,"description":14,"icon":14,"links":14,"path":430,"stem":431,"children":432,"page":89},"/getting-started","getting-started",[433,437,442,446,451,456,461,466,471,476],{"title":230,"path":434,"stem":435,"description":436,"icon":14,"links":14},"/getting-started/overview","getting-started/1.overview","Learn about the Directus Data Engine and Studio, when to use it, and a how it works.",{"title":438,"path":439,"stem":440,"description":441,"icon":14,"links":14},"Accessibility","/getting-started/accessibility","getting-started/10.accessibility","We are always looking for ways to make Directus Studio more accessible. Here are some of the methods we currently support.",{"title":150,"path":443,"stem":444,"description":445,"icon":14,"links":14},"/getting-started/create-a-project","getting-started/2.create-a-project","Learn about how to create a managed Directus project or self-host with Docker.",{"title":447,"path":448,"stem":449,"description":450,"icon":14,"links":14,"label":447},"Configure a Data Model","/getting-started/data-model","getting-started/3.data-model","This guide will cover creating a collection in Directus via the Data Studio, creating fields, and configuring relationships.",{"title":452,"path":453,"stem":454,"description":455,"icon":14,"links":14},"Use the API","/getting-started/use-the-api","getting-started/4.use-the-api","Get started with Directus APIs. Learn to interact with collections, fetch, and create data.",{"title":457,"path":458,"stem":459,"description":460,"icon":14,"links":14},"Authenticate a User","/getting-started/authenticate-user","getting-started/5.authenticate-user","Get started with Directus Auth. Learn how to register, login, create users, and make authenticated requests.",{"title":462,"path":463,"stem":464,"description":465,"icon":14,"links":14},"Upload & Access Files","/getting-started/upload-files","getting-started/6.upload-files","This guide will cover importing a file via URL, requesting assets, and using transformation parameters.",{"title":467,"path":468,"stem":469,"description":470,"icon":14,"links":14},"Create an Automation","/getting-started/create-an-automation","getting-started/7.create-an-automation","Get started using flows, triggers, operations and the data chain in Directus Automate.",{"title":472,"path":473,"stem":474,"description":475,"icon":14,"links":14},"Connect to Realtime Data","/getting-started/connect-to-realtime","getting-started/8.connect-to-realtime","This guide will cover connecting to Directus via WebSockets on the web, subscribing to changes, and creating new items over the connection.",{"title":477,"path":478,"stem":479,"description":480,"icon":14,"links":14},"Resources & Links","/getting-started/resources","getting-started/9.resources","Key links across the Directus ecosystem.",{"title":482,"path":483,"stem":484,"children":485,"page":89},"Guides","/guides","guides",[486,512,595,642,677,707,732,756,771,886,899,988],{"title":487,"description":14,"icon":488,"links":14,"path":489,"stem":490,"children":491,"page":89},"Data Model","directus-explore","/guides/data-model","guides/01.data-model",[492,497,502,507],{"title":493,"path":494,"stem":495,"description":496,"icon":14,"links":14},"Collections","/guides/data-model/collections","guides/01.data-model/1.collections","Directus collections help you manage your data. Create custom collections, define fields, configure relationships, and leverage features like content versioning and access control. Learn how to create, configure, and manage collections in Directus.",{"title":498,"path":499,"stem":500,"description":501,"icon":14,"links":14},"Fields","/guides/data-model/fields","guides/01.data-model/2.fields","Directus fields let you define how your data is stored and displayed. Learn about creating fields, data types, interfaces, validations, relationships, and more. Discover how to configure fields to perfectly suit your data modeling needs in Directus.",{"title":503,"path":504,"stem":505,"description":506,"icon":14,"links":14},"Interfaces","/guides/data-model/interfaces","guides/01.data-model/3.interfaces","Manage your data effectively with Directus fields. Discover various field types, interfaces, validations, and relationships to perfectly suit your data modeling needs.",{"title":508,"path":509,"stem":510,"description":511,"icon":14,"links":14},"Relationships","/guides/data-model/relationships","guides/01.data-model/4.relationships","Leverage Directus relationships to create powerful data connections. Explore Many to One, One to Many, Many to Many, and Many to Any relationships, along with Translations for multilingual content management.",{"title":513,"description":14,"icon":514,"links":14,"path":515,"stem":516,"children":517,"page":89},"Content","directus-editor","/guides/content","guides/02.content",[518,523,528,533,538,543,548,552,574],{"title":519,"path":520,"stem":521,"description":522,"icon":14,"links":14},"Collection Explorer","/guides/content/explore","guides/02.content/1.explore","Learn to filter, layout, batch edit and more with collections in the collection explorer.",{"title":524,"path":525,"stem":526,"description":527,"icon":14,"links":14},"Item Editor","/guides/content/editor","guides/02.content/2.editor","Learn to create, duplicate, archive and perform other actions with items using Directus.",{"title":529,"path":530,"stem":531,"description":532,"icon":14,"links":14},"Layouts","/guides/content/layouts","guides/02.content/3.layouts","Learn to use layouts for viewing and interacting with items in a collection using Directus.",{"title":534,"path":535,"stem":536,"description":537,"icon":14,"links":14},"Import & Export","/guides/content/import-export","guides/02.content/4.import-export","Learn to import and export multiple items stored as files using Directus.",{"title":539,"path":540,"stem":541,"description":542,"icon":14,"links":14},"Live Preview","/guides/content/live-preview","guides/02.content/5.live-preview","Learn to set up your project for live previewing items from your application.",{"title":544,"path":545,"stem":546,"description":547,"icon":14,"links":14},"Content Versioning","/guides/content/content-versioning","guides/02.content/6.content-versioning","This guide covers the process of enabling and utilizing Content Versioning in Directus.",{"title":255,"path":549,"stem":550,"description":551,"icon":14,"links":14},"/guides/content/translations","guides/02.content/7.translations","Both content and the data studio can be translated into multiple languages.",{"title":553,"path":554,"stem":555,"children":556,"description":558,"icon":14,"links":14},"Visual Editor","/guides/content/visual-editor","guides/02.content/8.visual-editor/0.index",[557,559,564,569],{"title":553,"path":554,"stem":555,"description":558,"icon":14,"links":14},"The Directus visual editor module allows you to visually edit the content of your website directly in-place.",{"title":560,"path":561,"stem":562,"description":563,"icon":14,"links":14},"Frontend Library","/guides/content/visual-editor/frontend-library","guides/02.content/8.visual-editor/1.frontend-library","A library that allows your website to communicate with your Directus project and enables Visual Editing.",{"title":565,"path":566,"stem":567,"description":568,"icon":14,"links":14},"Studio Module","/guides/content/visual-editor/studio-module","guides/02.content/8.visual-editor/2.studio-module","Learn how to edit your website's content in place from within the Directus Studio.",{"title":570,"path":571,"stem":572,"description":573,"icon":14,"links":14},"Customization","/guides/content/visual-editor/customization","guides/02.content/8.visual-editor/3.customization","Customize the styling of your Visual Editing experience to suit your brand or website theming.",{"title":575,"path":576,"stem":577,"children":578,"description":580,"icon":14,"links":14},"Collaborative Editing","/guides/content/collaborative-editing","guides/02.content/9.collaborative-editing/0.index",[579,581,585,590],{"title":575,"path":576,"stem":577,"description":580,"icon":14,"links":14},"Directus Collaborative Editing enables real-time data synchronization and collaborative editing across collections, allowing multiple users to edit content simultaneously without conflicts.",{"title":175,"path":582,"stem":583,"description":584,"icon":14,"links":14},"/guides/content/collaborative-editing/configuration","guides/02.content/9.collaborative-editing/1.configuration","Learn how to configure Collaborative Editing in your Directus project.",{"title":586,"path":587,"stem":588,"description":589,"icon":14,"links":14},"Usage Guide","/guides/content/collaborative-editing/usage","guides/02.content/9.collaborative-editing/2.usage","Learn how to use Collaborative Editing for real-time collaboration on content in your Directus project.",{"title":591,"path":592,"stem":593,"description":594,"icon":14,"links":14},"Development & Custom Extensions","/guides/content/collaborative-editing/development","guides/02.content/9.collaborative-editing/3.development","Learn how Custom Interfaces integrate with Collaborative Editing in Directus.",{"title":74,"description":14,"icon":596,"links":14,"path":597,"stem":598,"children":599,"page":89},"directus-auth","/guides/auth","guides/03.auth",[600,605,610,615,620,625,630],{"title":601,"path":602,"stem":603,"description":604,"icon":14,"links":14},"Access Tokens","/guides/auth/tokens-cookies","guides/03.auth/1.tokens-cookies","Learn how to authenticate requests & explore standard, session, and static token types.",{"title":606,"path":607,"stem":608,"description":609,"icon":14,"links":14},"Access Control","/guides/auth/access-control","guides/03.auth/2.access-control","Manage user and role permissions and policies for interacting with data in Directus.",{"title":611,"path":612,"stem":613,"description":614,"icon":14,"links":14},"Creating Users","/guides/auth/creating-users","guides/03.auth/3.creating-users","Learn about creating users in directus, including API creation, inviting users, and seamless invites.",{"title":616,"path":617,"stem":618,"description":619,"icon":14,"links":14},"Email Login","/guides/auth/email-login","guides/03.auth/4.email-login","Learn about user registration, login with standard/session tokens, refresh, logout, and resetting passwords.",{"title":621,"path":622,"stem":623,"description":624,"icon":14,"links":14},"Two-Factor Auth","/guides/auth/2fa","guides/03.auth/5.2fa","Secure your logins with one-time codes! Learn how to generate secrets, enable/disable 2FA.",{"title":626,"path":627,"stem":628,"description":629,"icon":14,"links":14},"Accountability","/guides/auth/accountability","guides/03.auth/6.accountability","Learn to audit user activity and enforce accountability using the activity feed.",{"title":631,"path":632,"stem":633,"children":634,"description":636,"icon":14,"links":14},"Single Sign-On","/guides/auth/sso","guides/03.auth/7.sso/1.index",[635,637],{"title":631,"path":632,"stem":633,"description":636,"icon":14,"links":14},"Single Sign-On is a mechanism which allows to use external providers to login into systems.",{"title":638,"path":639,"stem":640,"description":641,"icon":14,"links":14},"Seamless SSO","/guides/auth/sso/seamless","guides/03.auth/7.sso/2.seamless","Seamless SSO is a setup to allow logging in without the user ever seeing Directus' login page.",{"title":643,"description":14,"icon":644,"links":14,"path":645,"stem":646,"children":647,"page":89},"Connect","directus-connect","/guides/connect","guides/04.connect",[648,652,657,662,667,672],{"title":16,"path":649,"stem":650,"description":651,"icon":14,"links":14},"/guides/connect/authentication","guides/04.connect/1.authentication","Discover how to authenticate Directus Connect requests using authorization headers, session cookies, or query parameters.",{"title":653,"path":654,"stem":655,"description":656,"icon":14,"links":14},"Filter Rules","/guides/connect/filter-rules","guides/04.connect/2.filter-rules","Learn about filter rules in Directus - available operators, filter syntax, relational fields, dynamic variables, logical operators, and functions parameters. Understand how to build complex filters for permissions, validations, and automations.",{"title":658,"path":659,"stem":660,"description":661,"icon":14,"links":14},"Query Parameters","/guides/connect/query-parameters","guides/04.connect/3.query-parameters","Learn about Directus query parameters - fields, filter, search, sort, limit, offset, page, aggregate, groupBy, deep, alias, and export. Understand how to customize your API requests and retrieve specific data from your collections.",{"title":663,"path":664,"stem":665,"description":666,"icon":14,"links":14},"Relational Data","/guides/connect/relations","guides/04.connect/4.relations","Directus enables you to manage and interact with relational data. This section will guide you through the different types of relationships and how to work with them.",{"title":668,"path":669,"stem":670,"description":671,"icon":14,"links":14},"Error Codes","/guides/connect/errors","guides/04.connect/5.errors","Learn about Directus error codes - understand what each code means, from validation failures to rate limits exceeded. Troubleshoot issues with your API requests and resolve errors efficiently.",{"title":673,"path":674,"stem":675,"description":676,"icon":14,"links":14},"Directus SDK","/guides/connect/sdk","guides/04.connect/6.sdk","A JavaScript and TypeScript library that simplifies working with Directus.",{"title":377,"description":14,"icon":678,"links":14,"path":679,"stem":680,"children":681,"page":89},"directus-files","/guides/files","guides/05.files",[682,687,692,697,702],{"title":683,"path":684,"stem":685,"description":686,"icon":14,"links":14},"Upload Files","/guides/files/upload","guides/05.files/1.upload","Learn to upload files to Directus via both the data studio or API.",{"title":688,"path":689,"stem":690,"description":691,"icon":14,"links":14},"Download Files","/guides/files/download","guides/05.files/2.download","Learn to download content from the File Library",{"title":693,"path":694,"stem":695,"description":696,"icon":14,"links":14},"Manage Files","/guides/files/manage","guides/05.files/3.manage","Learn to view, modify, edit and set files' focal points.",{"title":698,"path":699,"stem":700,"description":701,"icon":14,"links":14},"Access Files","/guides/files/access","guides/05.files/4.access","Learn how to access uploaded files, authenticate, provide optional filenames and directly download them.",{"title":703,"path":704,"stem":705,"description":706,"icon":14,"links":14},"Transform Files","/guides/files/transform","guides/05.files/5.transform","Learn how to transform files and set custom presets for these transformations.",{"title":708,"description":14,"icon":709,"links":14,"path":710,"stem":711,"children":712,"page":89},"Automate","directus-automate","/guides/automate","guides/06.automate",[713,717,722,727],{"title":382,"path":714,"stem":715,"description":716,"icon":14,"links":14},"/guides/automate/flows","guides/06.automate/1.flows","Flows enable custom, event-driven data processing and task automation within Directus.",{"title":718,"path":719,"stem":720,"description":721,"icon":14,"links":14},"Data Chain","/guides/automate/data-chain","guides/06.automate/2.data-chain","Data chains are created by each flow and hold information that can be accessed within different operations.",{"title":723,"path":724,"stem":725,"description":726,"icon":14,"links":14},"Triggers","/guides/automate/triggers","guides/06.automate/3.triggers","Triggers define the action or events that start flows.",{"title":728,"path":729,"stem":730,"description":731,"icon":14,"links":14},"Operations","/guides/automate/operations","guides/06.automate/4.operations","Operations are individual customizable actions in a flow.",{"title":86,"description":14,"icon":733,"links":14,"path":734,"stem":735,"children":736,"page":89},"directus-realtime","/guides/realtime","guides/07.realtime",[737,741,746,751],{"title":16,"path":738,"stem":739,"description":740,"icon":14,"links":14},"/guides/realtime/authentication","guides/07.realtime/1.authentication","Learn to implement the three authentication modes.",{"title":742,"path":743,"stem":744,"description":745,"icon":14,"links":14},"Subscriptions","/guides/realtime/subscriptions","guides/07.realtime/2.subscriptions","Learn to manage realtime subscriptions with both websockets and GraphQL.",{"title":747,"path":748,"stem":749,"description":750,"icon":14,"links":14},"Actions","/guides/realtime/actions","guides/07.realtime/3.actions","Learn to execute CRUD actions via websockets.",{"title":752,"path":753,"stem":754,"description":755,"icon":14,"links":14},"Custom WebSocket Handlers","/guides/realtime/custom-handlers","guides/07.realtime/4.custom-handlers","Build custom WebSocket message handlers, push messages to connected clients, and react to WebSocket events using hook extensions.",{"title":757,"description":14,"icon":758,"links":14,"path":759,"stem":760,"children":761,"page":89},"Insights","directus-insights","/guides/insights","guides/08.insights",[762,766],{"title":230,"path":763,"stem":764,"description":765,"icon":14,"links":14},"/guides/insights/overview","guides/08.insights/1.overview","Insights is a module in Directus that allows rapid, no-code build-out of analytics dashboards.",{"title":767,"path":768,"stem":769,"description":770,"icon":14,"links":14},"Panels","/guides/insights/panels","guides/08.insights/2.panels","Panels are the building-blocks you can add onto insights dashboards to create, save and display data analytics.",{"title":372,"description":14,"icon":772,"links":14,"path":773,"stem":774,"children":775,"page":89},"directus-marketplace","/guides/extensions","guides/09.extensions",[776,780,785,817,864,869,881],{"title":230,"path":777,"stem":778,"description":779,"icon":14,"links":14},"/guides/extensions/overview","guides/09.extensions/0.overview","Extensions are used to extend the functionality of Directus.",{"title":781,"path":782,"stem":783,"description":784,"icon":14,"links":14},"Quickstart","/guides/extensions/quickstart","guides/09.extensions/1.quickstart","This guide will cover how to get started with developing an extension for Directus.",{"title":786,"path":787,"stem":788,"children":789,"description":791,"icon":14,"links":14},"API Extensions","/guides/extensions/api-extensions","guides/09.extensions/2.api-extensions/0.index",[790,792,797,802,807,812],{"title":786,"path":787,"stem":788,"description":791,"icon":14,"links":14},"API Extensions extend the functionality of the API.",{"title":793,"path":794,"stem":795,"description":796,"icon":14,"links":14},"Event Hooks","/guides/extensions/api-extensions/hooks","guides/09.extensions/2.api-extensions/1.hooks","Hooks allow running code when during the Directus lifecycle or database events.",{"title":798,"path":799,"stem":800,"description":801,"icon":14,"links":14},"API Endpoints","/guides/extensions/api-extensions/endpoints","guides/09.extensions/2.api-extensions/2.endpoints","Endpoints allow you to register new API routes in your Directus project.",{"title":803,"path":804,"stem":805,"description":806,"icon":14,"links":14},"Flow Operations","/guides/extensions/api-extensions/operations","guides/09.extensions/2.api-extensions/3.operations","Operations are single steps in a Flow - the no-code automation tool part of Directus Automate.",{"title":808,"path":809,"stem":810,"description":811,"icon":14,"links":14},"Services","/guides/extensions/api-extensions/services","guides/09.extensions/2.api-extensions/4.services","When building extensions, you may use internal Directus services directly.",{"title":813,"path":814,"stem":815,"description":816,"icon":14,"links":14},"Sandbox","/guides/extensions/api-extensions/sandbox","guides/09.extensions/2.api-extensions/5.sandbox","Sandboxed Extensions run in an isolated environment and must request permission scopes.",{"title":818,"path":819,"stem":820,"children":821,"description":823,"icon":14,"links":14},"App Extensions","/guides/extensions/app-extensions","guides/09.extensions/3.app-extensions/0.index",[822,824,829,834,839,844,849,854,859],{"title":818,"path":819,"stem":820,"description":823,"icon":14,"links":14},"App Extensions extend the functionality of the Data Studio.",{"title":825,"path":826,"stem":827,"description":828,"icon":14,"links":14},"Editor Interfaces","/guides/extensions/app-extensions/interfaces","guides/09.extensions/3.app-extensions/1.interfaces","Interfaces are form inputs used primarily inside of the Directus Editor.",{"title":830,"path":831,"stem":832,"description":833,"icon":14,"links":14},"Inline Displays","/guides/extensions/app-extensions/displays","guides/09.extensions/3.app-extensions/2.displays","Displays are used to display a single value throughout the Data Studio.",{"title":835,"path":836,"stem":837,"description":838,"icon":14,"links":14},"Explore Layouts","/guides/extensions/app-extensions/layouts","guides/09.extensions/3.app-extensions/3.layouts","Layouts are used to display a list of items in Explore pages in different ways.",{"title":840,"path":841,"stem":842,"description":843,"icon":14,"links":14},"Dashboard Panels","/guides/extensions/app-extensions/panels","guides/09.extensions/3.app-extensions/4.panels","Panels are customizable components within Directus Insights dashboards.",{"title":845,"path":846,"stem":847,"description":848,"icon":14,"links":14},"Custom Modules","/guides/extensions/app-extensions/modules","guides/09.extensions/3.app-extensions/5.modules","Modules are top-level areas of the Data Studio, navigated to from the left-hand module bar.",{"title":850,"path":851,"stem":852,"description":853,"icon":14,"links":14},"Custom Themes","/guides/extensions/app-extensions/themes","guides/09.extensions/3.app-extensions/6.themes","Themes are used to style elements of the Data Studio including colors and fonts.",{"title":855,"path":856,"stem":857,"description":858,"icon":14,"links":14},"UI Library","/guides/extensions/app-extensions/ui-library","guides/09.extensions/3.app-extensions/7.ui-library","Directus offers globally-registered UI components for building extensions.",{"title":860,"path":861,"stem":862,"description":863,"icon":14,"links":14},"Composables","/guides/extensions/app-extensions/composables","guides/09.extensions/3.app-extensions/8.composables","Vue composables for working with Directus services when building extensions.",{"title":865,"path":866,"stem":867,"description":868,"icon":14,"links":14},"Bundling Extensions","/guides/extensions/bundles","guides/09.extensions/4.bundles","Bundles are a way to group extensions together as a single distributable package.",{"title":870,"path":871,"stem":872,"children":873,"description":875,"icon":14,"links":14},"Marketplace Beta","/guides/extensions/marketplace","guides/09.extensions/5.marketplace/0.index",[874,876],{"title":870,"path":871,"stem":872,"description":875,"icon":14,"links":14},"The Directus Marketplace provides a way for users to install extensions in their projects directly the Data Studio.",{"title":877,"path":878,"stem":879,"description":880,"icon":14,"links":14},"Publishing Extensions","/guides/extensions/marketplace/publishing","guides/09.extensions/5.marketplace/1.publishing","Publish extensions to the Directus Marketplace via npm, including required metadata, best practices, and author profile setup.",{"title":882,"path":883,"stem":884,"description":885,"icon":14,"links":14},"CLI","/guides/extensions/cli","guides/09.extensions/6.cli","Using the create-directus-extension to build, validate and manage extensions.",{"title":887,"path":888,"stem":889,"children":890,"description":14,"icon":898,"links":14},"Deployments","/guides/deployments","guides/10.deployments/0.index",[891,893],{"title":230,"path":888,"stem":889,"description":892,"icon":14,"links":14},"Trigger, monitor, and manage frontend deployments directly from Directus.",{"title":894,"path":895,"stem":896,"description":897,"icon":14,"links":14},"Security","/guides/deployments/security","guides/10.deployments/1.security","Access control, permissions, and credential protection for the Deployment module.","directus-deployments",{"title":347,"path":900,"stem":901,"children":902,"description":14,"icon":987,"links":14},"/guides/ai","guides/11.ai/0.index",[903,906,937],{"title":904,"path":900,"stem":901,"description":905,"icon":14,"links":14},"AI + Directus","Use AI to interact with Directus - either through the built-in AI Assistant or by connecting external AI tools via MCP.",{"title":907,"path":908,"stem":909,"children":910,"description":14,"icon":14,"links":14},"AI Assistant","/guides/ai/assistant","guides/11.ai/1.assistant/0.index",[911,913,918,923,928,933],{"title":230,"path":908,"stem":909,"description":912,"icon":14,"links":14},"Chat with an AI assistant directly inside Directus. Create content, manage your schema, trigger automations, and explore your data through natural conversation.",{"title":914,"path":915,"stem":916,"description":917,"icon":14,"links":14},"Setup","/guides/ai/assistant/setup","guides/11.ai/1.assistant/1.setup","Configure AI Assistant by adding your AI provider API keys and customizing assistant behavior.",{"title":919,"path":920,"stem":921,"description":922,"icon":14,"links":14},"Usage","/guides/ai/assistant/usage","guides/11.ai/1.assistant/2.usage","Learn how to use AI Assistant to interact with your Directus instance through natural conversation.",{"title":924,"path":925,"stem":926,"description":927,"icon":14,"links":14},"Tools","/guides/ai/assistant/tools","guides/11.ai/1.assistant/3.tools","Reference of all tools available to AI Assistant for interacting with your Directus instance.",{"title":929,"path":930,"stem":931,"description":932,"icon":14,"links":14},"Best Practices","/guides/ai/assistant/tips","guides/11.ai/1.assistant/4.tips","Get the most out of AI Assistant with practical tips, example prompts, and common pitfalls to avoid.",{"title":894,"path":934,"stem":935,"description":936,"icon":14,"links":14},"/guides/ai/assistant/security","guides/11.ai/1.assistant/5.security","Security considerations for using AI Assistant safely with your Directus data.",{"title":938,"path":939,"stem":940,"children":941,"description":14,"icon":14,"links":14},"MCP Server","/guides/ai/mcp","guides/11.ai/2.mcp/0.index",[942,944,949,954,958,963,968,972],{"title":230,"path":939,"stem":940,"description":943,"icon":14,"links":14},"Connect AI assistants directly to your Directus instance. Let Claude, ChatGPT, and other AI tools manage your content without manual copy-pasting.",{"title":945,"path":946,"stem":947,"description":948,"icon":14,"links":14},"Installation","/guides/ai/mcp/installation","guides/11.ai/2.mcp/1.installation","Set up the Directus MCP server and connect your AI tools in under 5 minutes.",{"title":950,"path":951,"stem":952,"description":953,"icon":14,"links":14},"Use Cases","/guides/ai/mcp/use-cases","guides/11.ai/2.mcp/2.use-cases","Real examples of how to use AI with your Directus content to save time and reduce repetitive work.",{"title":924,"path":955,"stem":956,"description":957,"icon":14,"links":14},"/guides/ai/mcp/tools","guides/11.ai/2.mcp/3.tools","Learn about the tools available in the Directus remote MCP server and how they enable AI-powered content management.",{"title":959,"path":960,"stem":961,"description":962,"icon":14,"links":14},"Prompts","/guides/ai/mcp/prompts","guides/11.ai/2.mcp/4.prompts","Learn how to configure and use stored prompts with the Directus MCP Server.",{"title":964,"path":965,"stem":966,"description":967,"icon":14,"links":14},"Troubleshooting","/guides/ai/mcp/troubleshooting","guides/11.ai/2.mcp/5.troubleshooting","Common issues and solutions when setting up and using the Directus MCP server.",{"title":894,"path":969,"stem":970,"description":971,"icon":14,"links":14},"/guides/ai/mcp/security","guides/11.ai/2.mcp/6.security","Practical security guidelines for using the Directus MCP server safely and protecting your data.",{"title":973,"path":974,"stem":975,"children":976,"description":14,"icon":14,"links":14},"Local MCP","/guides/ai/mcp/local-mcp","guides/11.ai/2.mcp/7.local-mcp/0.index",[977,979,983],{"title":945,"path":974,"stem":975,"description":978,"icon":14,"links":14},"The Directus Content MCP Server allows you to interact with your Directus data through AI tools using the Model Context Protocol.",{"title":924,"path":980,"stem":981,"description":982,"icon":14,"links":14},"/guides/ai/mcp/local-mcp/tools","guides/11.ai/2.mcp/7.local-mcp/1.tools","Learn about the tools available in the local Directus Content MCP Server and how to configure them.",{"title":959,"path":984,"stem":985,"description":986,"icon":14,"links":14},"/guides/ai/mcp/local-mcp/prompts","guides/11.ai/2.mcp/7.local-mcp/2.prompts","Configure stored prompts with the local MCP server using environment variables and manual collection setup.","directus-ai",{"title":989,"description":14,"icon":990,"links":14,"path":991,"stem":992,"children":993},"Integrations","directus-integrations","/guides/integrations","guides/12.integrations/index",[994,996,1003,1024,1046,1065,1076],{"title":989,"path":991,"stem":992,"description":995,"icon":14,"links":14},"Connect Directus with third-party tools and services to extend functionality and automate workflows.",{"title":997,"path":998,"stem":999,"children":1000,"description":14,"icon":14,"links":14},"Framer","/guides/integrations/framer","guides/11.integrations/6.framer/0.index",[1001],{"title":997,"path":998,"stem":999,"description":1002,"icon":14,"links":14},"Connect your Directus collections to Framer's CMS to sync content in both directions using the Directus Framer plugin.",{"title":1004,"path":1005,"stem":1006,"children":1007,"description":14,"icon":14,"links":14},"n8n","/guides/integrations/n8n","guides/12.integrations/1.n8n/0.index",[1008,1011,1015,1020],{"title":1009,"path":1005,"stem":1006,"description":1010,"icon":14,"links":14},"Integration","Connect Directus with n8n to automate workflows, sync data, and integrate your CMS with other services using the Directus community node.",{"title":747,"path":1012,"stem":1013,"description":1014,"icon":14,"links":14},"/guides/integrations/n8n/directus-n8n-actions","guides/12.integrations/1.n8n/directus-n8n-actions","Complete guide for using Directus actions in n8n workflows, including working with items, users, and files.",{"title":1016,"path":1017,"stem":1018,"description":1019,"icon":14,"links":14},"Advanced","/guides/integrations/n8n/directus-n8n-advanced","guides/12.integrations/1.n8n/directus-n8n-advanced","Advanced guide for using Directus raw CRUD operations in n8n, including raw JSON operations, complex filters, relational queries, and query parameters.",{"title":723,"path":1021,"stem":1022,"description":1023,"icon":14,"links":14},"/guides/integrations/n8n/directus-n8n-triggers","guides/12.integrations/1.n8n/directus-n8n-triggers","Complete guide for using Directus triggers in n8n workflows to automate workflows when events happen in Directus.",{"title":1025,"path":1026,"stem":1027,"children":1028,"description":14,"icon":14,"links":14},"Clay","/guides/integrations/clay","guides/12.integrations/2.clay/0.index",[1029,1031,1036,1041],{"title":1009,"path":1026,"stem":1027,"description":1030,"icon":14,"links":14},"Connect Directus with Clay to automate data enrichment and sync content between platforms using webhooks and HTTP API templates.",{"title":1032,"path":1033,"stem":1034,"description":1035,"icon":14,"links":14},"Data Operations","/guides/integrations/clay/directus-clay-data-operations","guides/12.integrations/2.clay/directus-clay-data-operations","Advanced techniques for working with Directus data in Clay, including filters, pagination, common use cases, and best practices.",{"title":1037,"path":1038,"stem":1039,"description":1040,"icon":14,"links":14},"Templates","/guides/integrations/clay/use-clay-templates-with-directus","guides/12.integrations/2.clay/use-clay-templates-with-directus","Learn how to use Clay's pre-built HTTP API templates to connect with Directus for data enrichment and synchronization.",{"title":1042,"path":1043,"stem":1044,"description":1045,"icon":14,"links":14},"Webhooks","/guides/integrations/clay/use-directus-webhooks-with-clay","guides/12.integrations/2.clay/use-directus-webhooks-with-clay","Learn how to set up Directus Flows to automatically send data to Clay webhooks for real-time data synchronization.",{"title":1047,"path":1048,"stem":1049,"children":1050,"description":14,"icon":14,"links":14},"Zapier","/guides/integrations/zapier","guides/12.integrations/3.zapier/0.index",[1051,1053,1057,1061],{"title":1009,"path":1048,"stem":1049,"description":1052,"icon":14,"links":14},"Connect Directus with Zapier to automate workflows, sync data, and integrate your CMS with thousands of other apps using the Directus Zapier integration.",{"title":747,"path":1054,"stem":1055,"description":1056,"icon":14,"links":14},"/guides/integrations/zapier/actions","guides/12.integrations/3.zapier/actions","Complete guide for using Directus actions in Zapier workflows, including working with items, users, and files.",{"title":1016,"path":1058,"stem":1059,"description":1060,"icon":14,"links":14},"/guides/integrations/zapier/advanced","guides/12.integrations/3.zapier/advanced","Advanced guide for using Directus API features in Zapier, including raw request actions, advanced filtering, and custom API calls.",{"title":723,"path":1062,"stem":1063,"description":1064,"icon":14,"links":14},"/guides/integrations/zapier/triggers","guides/12.integrations/3.zapier/triggers","Complete guide for using Directus triggers in Zapier workflows to automatically start Zaps when events happen in Directus.",{"title":1066,"path":1067,"stem":1068,"children":1069,"description":14,"icon":14,"links":14},"Vercel","/guides/integrations/vercel","guides/12.integrations/4.vercel/0.index",[1070,1072],{"title":1066,"path":1067,"stem":1068,"description":1071,"icon":14,"links":14},"Connect Directus with Vercel to trigger deployments, monitor build status, and manage your frontend projects directly from your Directus instance.",{"title":887,"path":1073,"stem":1074,"description":1075,"icon":14,"links":14},"/guides/integrations/vercel/deployments","guides/12.integrations/4.vercel/deployments","Complete guide for triggering deployments, monitoring build status, and viewing logs for your Vercel projects from Directus.",{"title":1077,"path":1078,"stem":1079,"children":1080,"description":14,"icon":14,"links":14},"Netlify","/guides/integrations/netlify","guides/12.integrations/5.netlify/0.index",[1081,1083],{"title":1077,"path":1078,"stem":1079,"description":1082,"icon":14,"links":14},"Integrate Directus with Netlify to deploy your sites, track build progress, and manage frontend projects from within your Directus instance.",{"title":887,"path":1084,"stem":1085,"description":1086,"icon":14,"links":14},"/guides/integrations/netlify/deployments","guides/12.integrations/5.netlify/deployments","Full guide for triggering builds, tracking deployment progress, and viewing logs for your Netlify sites from Directus.",{"title":230,"path":1088,"stem":1089,"children":1090,"description":1092,"icon":14,"links":14},"/releases","releases/1.index",[1091,1093,1098],{"title":230,"path":1088,"stem":1089,"description":1092,"icon":14,"links":14},"Releases are how we roll out new features, updates, and fixes to Directus.",{"title":1094,"path":1095,"stem":1096,"description":1097,"icon":14,"links":14},"Changelog","/releases/changelog","releases/2.changelog","A monthly summary of what's new from the Directus team.",{"title":1099,"path":1100,"stem":1101,"children":1102,"description":1104,"icon":14,"links":14},"Breaking Changes","/releases/breaking-changes","releases/3.breaking-changes/0.index",[1103,1105,1109],{"title":1099,"path":1100,"stem":1101,"description":1104,"icon":14,"links":14},"Breaking changes may require action on your part before upgrading.",{"title":1106,"path":1107,"stem":1108,"description":1104,"icon":14,"links":14},"Version 10","/releases/breaking-changes/version-10","releases/3.breaking-changes/1.version-10",{"title":1110,"path":1111,"stem":1112,"description":1104,"icon":14,"links":14},"Version 11","/releases/breaking-changes/version-11","releases/3.breaking-changes/2.version-11",{"title":1114,"description":14,"icon":14,"links":14,"path":1115,"stem":1116,"children":1117,"page":89},"Self-Hosting","/self-hosting","self-hosting",[1118,1122,1127,1132,1137],{"title":230,"path":1119,"stem":1120,"description":1121,"icon":14,"links":14},"/self-hosting/overview","self-hosting/1.overview","Self-hosting Directus means running the Directus software on your own infrastructure.",{"title":1123,"path":1124,"stem":1125,"description":1126,"icon":14,"links":14},"Requirements","/self-hosting/requirements","self-hosting/2.requirements","This page outlines the requirements for self-hosting Directus.",{"title":1128,"path":1129,"stem":1130,"description":1131,"icon":14,"links":14},"Deployment","/self-hosting/deploying","self-hosting/3.deploying","This section covers the deployment process of Directus, including environment variables, versioning, persistence, and initial admin user setup.",{"title":1133,"path":1134,"stem":1135,"description":1136,"icon":14,"links":14},"Upgrading","/self-hosting/upgrading","self-hosting/4.upgrading","Learn how to upgrade Directus to the latest version.",{"title":1138,"path":1139,"stem":1140,"description":1141,"icon":14,"links":14},"Including Extensions","/self-hosting/including-extensions","self-hosting/5.including-extensions","Learn how to include extensions in your self-hosted Directus project.",{"title":1143,"path":1144,"stem":1145,"children":1146},"Tutorials","/tutorials","tutorials",[1147,1150,1370,1530,1576,1602,1719,1749],{"title":1143,"path":1144,"stem":1148,"description":1149,"icon":14,"links":14},"tutorials/index","This is a collection of step-by-step guides and practical examples to help you get the most out of our platform. Whether you're a beginner or an experienced user, our tutorials are designed to provide you with the knowledge and skills you need to succeed.",{"title":125,"path":1151,"stem":1152,"children":1153,"description":24,"icon":14,"links":14},"/tutorials/getting-started","tutorials/1.getting-started/index",[1154,1155,1160,1165,1170,1175,1180,1185,1190,1195,1200,1205,1210,1215,1220,1225,1230,1235,1240,1245,1250,1255,1260,1265,1270,1275,1280,1285,1290,1295,1300,1305,1310,1315,1320,1325,1330,1335,1340,1345,1350,1355,1360,1365],{"title":125,"path":1151,"stem":1152,"description":24,"icon":14,"links":14},{"title":1156,"path":1157,"stem":1158,"description":1159,"icon":14,"links":14},"Create Reusable Blocks with Many-to-Any Relationships","/tutorials/getting-started/create-reusable-blocks-with-many-to-any-relationships","tutorials/1.getting-started/create-reusable-blocks-with-many-to-any-relationships","Learn how to data model for multiple, repeating sections of content.",{"title":1161,"path":1162,"stem":1163,"description":1164,"icon":14,"links":14},"Fetch Data from Directus in Android with Kotlin","/tutorials/getting-started/fetch-data-from-directus-in-android-with-kotlin","tutorials/1.getting-started/fetch-data-from-directus-in-android-with-kotlin","Learn how to integrate Directus in your Android app with Kotlin.",{"title":1166,"path":1167,"stem":1168,"description":1169,"icon":14,"links":14},"Fetch Data from Directus in iOS with Swift","/tutorials/getting-started/fetch-data-from-directus-in-ios-with-swift","tutorials/1.getting-started/fetch-data-from-directus-in-ios-with-swift","Learn how to integrate Directus in your iOS app with Swift.",{"title":1171,"path":1172,"stem":1173,"description":1174,"icon":14,"links":14},"Fetch Data from Directus with Angular","/tutorials/getting-started/fetch-data-from-directus-with-angular","tutorials/1.getting-started/fetch-data-from-directus-with-angular","Learn how to integrate Directus in your Angular web application.",{"title":1176,"path":1177,"stem":1178,"description":1179,"icon":14,"links":14},"Fetch Data from Directus with Astro","/tutorials/getting-started/fetch-data-from-directus-with-astro","tutorials/1.getting-started/fetch-data-from-directus-with-astro","Learn how to integrate Directus in your Astro web application.",{"title":1181,"path":1182,"stem":1183,"description":1184,"icon":14,"links":14},"Fetch Data from Directus with Django","/tutorials/getting-started/fetch-data-from-directus-with-django","tutorials/1.getting-started/fetch-data-from-directus-with-django","Learn how to integrate Directus in your Django web application.",{"title":1186,"path":1187,"stem":1188,"description":1189,"icon":14,"links":14},"Fetch Data from Directus with Eleventy 3","/tutorials/getting-started/fetch-data-from-directus-with-eleventy-3","tutorials/1.getting-started/fetch-data-from-directus-with-eleventy-3","Learn how to integrate Directus in your 11ty web application.",{"title":1191,"path":1192,"stem":1193,"description":1194,"icon":14,"links":14},"Fetch Data from Directus with Flask","/tutorials/getting-started/fetch-data-from-directus-with-flask","tutorials/1.getting-started/fetch-data-from-directus-with-flask","Learn how to integrate Directus in your Flask web application.",{"title":1196,"path":1197,"stem":1198,"description":1199,"icon":14,"links":14},"Fetch Data from Directus with Flutter","/tutorials/getting-started/fetch-data-from-directus-with-flutter","tutorials/1.getting-started/fetch-data-from-directus-with-flutter","Learn how to integrate Directus in your Flutter app with Dart.",{"title":1201,"path":1202,"stem":1203,"description":1204,"icon":14,"links":14},"Fetch Data from Directus with Laravel","/tutorials/getting-started/fetch-data-from-directus-with-laravel","tutorials/1.getting-started/fetch-data-from-directus-with-laravel","Learn how to integrate Directus in your Laravel web application.",{"title":1206,"path":1207,"stem":1208,"description":1209,"icon":14,"links":14},"Fetch Data from Directus with Next.js","/tutorials/getting-started/fetch-data-from-directus-with-nextjs","tutorials/1.getting-started/fetch-data-from-directus-with-nextjs","Learn how to integrate Directus in your Next.js web application.",{"title":1211,"path":1212,"stem":1213,"description":1214,"icon":14,"links":14},"Fetch Data from Directus with Nuxt","/tutorials/getting-started/fetch-data-from-directus-with-nuxt","tutorials/1.getting-started/fetch-data-from-directus-with-nuxt","Learn how to integrate Directus in your Nuxt web application.",{"title":1216,"path":1217,"stem":1218,"description":1219,"icon":14,"links":14},"Fetch Data from Directus with SolidStart","/tutorials/getting-started/fetch-data-from-directus-with-solidstart","tutorials/1.getting-started/fetch-data-from-directus-with-solidstart","Learn how to integrate Directus in your SolidStart web application.",{"title":1221,"path":1222,"stem":1223,"description":1224,"icon":14,"links":14},"Fetch Data from Directus with Spring Boot","/tutorials/getting-started/fetch-data-from-directus-with-spring-boot","tutorials/1.getting-started/fetch-data-from-directus-with-spring-boot","Learn how to integrate Directus in your Spring Boot web application.",{"title":1226,"path":1227,"stem":1228,"description":1229,"icon":14,"links":14},"Fetch Data from Directus with SvelteKit","/tutorials/getting-started/fetch-data-from-directus-with-sveltekit","tutorials/1.getting-started/fetch-data-from-directus-with-sveltekit","Learn how to integrate Directus in your SvelteKit web application.",{"title":1231,"path":1232,"stem":1233,"description":1234,"icon":14,"links":14},"Implement Directus Auth with iOS","/tutorials/getting-started/implement-directus-auth-with-ios","tutorials/1.getting-started/implement-directus-auth-with-ios","Learn how to register, login, and protect content in your iOS app.",{"title":1236,"path":1237,"stem":1238,"description":1239,"icon":14,"links":14},"Implement Multilingual Content with Directus and SvelteKit","/tutorials/getting-started/implement-multilingual-content-with-directus-and-svelte-kit","tutorials/1.getting-started/implement-multilingual-content-with-directus-and-svelte-kit","Learn how to handle internationalization in your SvelteKit application.",{"title":1241,"path":1242,"stem":1243,"description":1244,"icon":14,"links":14},"Implementing Live Preview in Astro","/tutorials/getting-started/implementing-live-preview-in-astro","tutorials/1.getting-started/implementing-live-preview-in-astro","Learn how to setup Directus live preview with Astro.",{"title":1246,"path":1247,"stem":1248,"description":1249,"icon":14,"links":14},"Implementing Live Preview in Next.js","/tutorials/getting-started/implementing-live-preview-in-next-js","tutorials/1.getting-started/implementing-live-preview-in-next-js","Learn how to setup Directus live preview with Next.js.",{"title":1251,"path":1252,"stem":1253,"description":1254,"icon":14,"links":14},"Implementing Live Preview in Nuxt","/tutorials/getting-started/implementing-live-preview-in-nuxt","tutorials/1.getting-started/implementing-live-preview-in-nuxt","Learn how to setup Directus live preview with Nuxt.",{"title":1256,"path":1257,"stem":1258,"description":1259,"icon":14,"links":14},"Implementing Live Preview in React","/tutorials/getting-started/implementing-live-preview-in-react","tutorials/1.getting-started/implementing-live-preview-in-react","Learn how to setup Directus live preview with React.",{"title":1261,"path":1262,"stem":1263,"description":1264,"icon":14,"links":14},"Implementing Live Preview in SvelteKit","/tutorials/getting-started/implementing-live-preview-in-sveltekit","tutorials/1.getting-started/implementing-live-preview-in-sveltekit","Learn how to setup Directus live preview with SvelteKit.",{"title":1266,"path":1267,"stem":1268,"description":1269,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Astro","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-astro","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-astro","Learn how to access multilingual Directus content using Astro.",{"title":1271,"path":1272,"stem":1273,"description":1274,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Next.js","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-next","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-next","Learn how to access multilingual Directus content using Next.js.",{"title":1276,"path":1277,"stem":1278,"description":1279,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Nuxt","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-nuxt","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-nuxt","Learn how to access multilingual Directus content using Nuxt.",{"title":1281,"path":1282,"stem":1283,"description":1284,"icon":14,"links":14},"Implementing Multilingual Content using Directus and SvelteKit","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-sveltekit","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-sveltekit","Learn how to access multilingual Directus content using SvelteKit.",{"title":1286,"path":1287,"stem":1288,"description":1289,"icon":14,"links":14},"Integrating the Directus Visual Editor with Next.js","/tutorials/getting-started/integrating-the-directus-visual-editor-with-nextjs","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-nextjs","Learn how to integrate the Directus Visual Editor with Next.js.",{"title":1291,"path":1292,"stem":1293,"description":1294,"icon":14,"links":14},"Integrating the Directus Visual Editor with Nuxt","/tutorials/getting-started/integrating-the-directus-visual-editor-with-nuxt","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-nuxt","Learn how to integrate the Directus Visual Editor with Nuxt.",{"title":1296,"path":1297,"stem":1298,"description":1299,"icon":14,"links":14},"Integrating the Directus Visual Editor with SvelteKit","/tutorials/getting-started/integrating-the-directus-visual-editor-with-sveltekit","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-sveltekit","Learn how to integrate the Directus Visual Editor with SvelteKit.",{"title":1301,"path":1302,"stem":1303,"description":1304,"icon":14,"links":14},"Rendering Dynamic Blocks Using Astro","/tutorials/getting-started/rendering-dynamic-blocks-using-astro","tutorials/1.getting-started/rendering-dynamic-blocks-using-astro","Learn how to render dynamic blocks using Astro.",{"title":1306,"path":1307,"stem":1308,"description":1309,"icon":14,"links":14},"Rendering Dynamic Blocks Using Next.js","/tutorials/getting-started/rendering-dynamic-blocks-using-next","tutorials/1.getting-started/rendering-dynamic-blocks-using-next","Learn how to render dynamic blocks using Next.js.",{"title":1311,"path":1312,"stem":1313,"description":1314,"icon":14,"links":14},"Rendering Dynamic Blocks Using Nuxt","/tutorials/getting-started/rendering-dynamic-blocks-using-nuxt","tutorials/1.getting-started/rendering-dynamic-blocks-using-nuxt","Learn how to render dynamic blocks using Nuxt.",{"title":1316,"path":1317,"stem":1318,"description":1319,"icon":14,"links":14},"Rendering Dynamic Blocks Using SvelteKit","/tutorials/getting-started/rendering-dynamic-blocks-using-sveltekit","tutorials/1.getting-started/rendering-dynamic-blocks-using-sveltekit","Learn how to render dynamic blocks using SvelteKit.",{"title":1321,"path":1322,"stem":1323,"description":1324,"icon":14,"links":14},"Set Up Live Preview with Next.js","/tutorials/getting-started/set-up-live-preview-with-next-js","tutorials/1.getting-started/set-up-live-preview-with-next-js","Learn how to confgure Live Preview with Next.js' draft mode.",{"title":1326,"path":1327,"stem":1328,"description":1329,"icon":14,"links":14},"Set Up Live Preview with Nuxt","/tutorials/getting-started/set-up-live-preview-with-nuxt","tutorials/1.getting-started/set-up-live-preview-with-nuxt","Learn how to create a Nuxt preview plugin to configure Live Preview.",{"title":1331,"path":1332,"stem":1333,"description":1334,"icon":14,"links":14},"Submit Forms Using Directus and Next.js","/tutorials/getting-started/submit-forms-using-directus-and-nextjs","tutorials/1.getting-started/submit-forms-using-directus-and-nextjs","Learn how to submit forms using Directus and Next.js.",{"title":1336,"path":1337,"stem":1338,"description":1339,"icon":14,"links":14},"Submit Forms Using Directus and Nuxt","/tutorials/getting-started/submit-forms-using-directus-and-nuxt","tutorials/1.getting-started/submit-forms-using-directus-and-nuxt","Learn how to submit forms using Directus and Nuxt.",{"title":1341,"path":1342,"stem":1343,"description":1344,"icon":14,"links":14},"Submit Forms Using Directus and SvelteKit","/tutorials/getting-started/submit-forms-using-directus-and-sveltekit","tutorials/1.getting-started/submit-forms-using-directus-and-sveltekit","Learn how to submit forms using Directus and SvelteKit.",{"title":1346,"path":1347,"stem":1348,"description":1349,"icon":14,"links":14},"Using Authentication in Astro","/tutorials/getting-started/using-authentication-in-astro","tutorials/1.getting-started/using-authentication-in-astro","Learn how to setup Directus authentication with Astro.",{"title":1351,"path":1352,"stem":1353,"description":1354,"icon":14,"links":14},"Using Authentication in Next.js","/tutorials/getting-started/using-authentication-in-next-js","tutorials/1.getting-started/using-authentication-in-next-js","Learn how to setup Directus authentication with Next.js.",{"title":1356,"path":1357,"stem":1358,"description":1359,"icon":14,"links":14},"Using Authentication in Nuxt","/tutorials/getting-started/using-authentication-in-nuxt","tutorials/1.getting-started/using-authentication-in-nuxt","Learn how to setup Directus authentication with Nuxt.",{"title":1361,"path":1362,"stem":1363,"description":1364,"icon":14,"links":14},"Using Authentication in React","/tutorials/getting-started/using-authentication-in-react","tutorials/1.getting-started/using-authentication-in-react","Learn how to setup Directus authentication with React.",{"title":1366,"path":1367,"stem":1368,"description":1369,"icon":14,"links":14},"Using Authentication in SvelteKit","/tutorials/getting-started/using-authentication-in-sveltekit","tutorials/1.getting-started/using-authentication-in-sveltekit","Learn how to setup Directus authentication with SvelteKit.",{"title":145,"path":1371,"stem":1372,"children":1373,"description":24,"icon":14,"links":14},"/tutorials/projects","tutorials/2.projects/index",[1374,1375,1380,1385,1390,1395,1400,1405,1410,1415,1420,1425,1430,1435,1440,1445,1450,1455,1460,1465,1470,1475,1480,1485,1490,1495,1500,1505,1510,1515,1520,1525],{"title":145,"path":1371,"stem":1372,"description":24,"icon":14,"links":14},{"title":1376,"path":1377,"stem":1378,"description":1379,"icon":14,"links":14},"Build a Multi-User Chat with JavaScript and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-javascript-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-javascript-and-directus-realtime","Learn how to send and receive data over a realtime connection with JavaScript.",{"title":1381,"path":1382,"stem":1383,"description":1384,"icon":14,"links":14},"Build a Multi-User Chat with React and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-react-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-react-and-directus-realtime","Learn how to send and receive data over a realtime connection in React applications.",{"title":1386,"path":1387,"stem":1388,"description":1389,"icon":14,"links":14},"Build a Multi-User Chat with Vue.js and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-vue-js-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-vue-js-and-directus-realtime","Learn how to send and receive data over a realtime connection in a Vue.js application.",{"title":1391,"path":1392,"stem":1393,"description":1394,"icon":14,"links":14},"Build a Notebook Chrome Extension with Directus Auth","/tutorials/projects/build-a-notebook-chrome-extension-with-directus-auth","tutorials/2.projects/build-a-notebook-chrome-extension-with-directus-auth","Learn to build and integrate a Chrome Extension with Directus Auth.",{"title":1396,"path":1397,"stem":1398,"description":1399,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Astro","/tutorials/projects/build-a-realtime-chat-app-using-directus-and-astro","tutorials/2.projects/build-a-realtime-chat-app-using-directus-and-astro","Learn how to setup Directus realtime with Astro.",{"title":1401,"path":1402,"stem":1403,"description":1404,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Nuxt","/tutorials/projects/build-a-realtime-chat-app-using-directus-and-nuxt","tutorials/2.projects/build-a-realtime-chat-app-using-directus-and-nuxt","Learn how to setup Directus realtime with Nuxt.",{"title":1406,"path":1407,"stem":1408,"description":1409,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Next.js","/tutorials/projects/build-a-realtime-chat-app-with-directus-and-next","tutorials/2.projects/build-a-realtime-chat-app-with-directus-and-next","Learn how to setup Directus realtime with Next.js.",{"title":1411,"path":1412,"stem":1413,"description":1414,"icon":14,"links":14},"Build a Realtime Chat App with Directus and SvelteKit","/tutorials/projects/build-a-realtime-chat-app-with-directus-and-sveltekit","tutorials/2.projects/build-a-realtime-chat-app-with-directus-and-sveltekit","Learn how to setup Directus realtime with SvelteKit.",{"title":1416,"path":1417,"stem":1418,"description":1419,"icon":14,"links":14},"Build a Testimonial Widget with SvelteKit and Directus","/tutorials/projects/build-a-testimonial-widget-with-sveltekit-and-directus","tutorials/2.projects/build-a-testimonial-widget-with-sveltekit-and-directus","Learn how to set up a testimonial widget using SvelteKit and Directus.",{"title":1421,"path":1422,"stem":1423,"description":1424,"icon":14,"links":14},"Build a User Feedback Widget with Vue.js","/tutorials/projects/build-a-user-feedback-widget-with-vue-js","tutorials/2.projects/build-a-user-feedback-widget-with-vue-js-","Learn how we built our docs feedback widget with Directus.",{"title":1426,"path":1427,"stem":1428,"description":1429,"icon":14,"links":14},"Build a Video Streaming App with SvelteKit and Directus","/tutorials/projects/build-a-video-streaming-app-with-sveltekit-and-directus","tutorials/2.projects/build-a-video-streaming-app-with-sveltekit-and-directus","Learn how to store and retrieve video metadata, and then build a streaming application.",{"title":1431,"path":1432,"stem":1433,"description":1434,"icon":14,"links":14},"Build an Ecommerce Platform with Next.js, Stripe, and Directus Automate","/tutorials/projects/build-an-ecommerce-platform-with-next-js-stripe-and-directus-automate","tutorials/2.projects/build-an-ecommerce-platform-with-next-js-stripe-and-directus-automate","Learn to integrate Stripe with Directus Automate to build an e-commerce website.",{"title":1436,"path":1437,"stem":1438,"description":1439,"icon":14,"links":14},"Build an Hotel Booking Platform with Next.js, Stripe, and Directus Automate","/tutorials/projects/build-an-hotel-booking-platform-with-next-js-stripe-and-directus-automate","tutorials/2.projects/build-an-hotel-booking-platform-with-next-js-stripe-and-directus-automate","Learn to build a hotel booking site with dynamic availability and payments via Stripe.",{"title":1441,"path":1442,"stem":1443,"description":1444,"icon":14,"links":14},"Build Directus Garden - A Passive Collaborative Event Booth Demo","/tutorials/projects/build-directus-garden-a-passive-collaborative-event-booth-demo","tutorials/2.projects/build-directus-garden-a-passive-collaborative-event-booth-demo","Learn how we built our engagement platform for live in-person events with P5.js.",{"title":1446,"path":1447,"stem":1448,"description":1449,"icon":14,"links":14},"Build Forms Dynamically using Directus and Astro","/tutorials/projects/build-forms-dynamically-using-directus-and-astro","tutorials/2.projects/build-forms-dynamically-using-directus-and-astro","Learn how to setup Directus fields with Astro.",{"title":1451,"path":1452,"stem":1453,"description":1454,"icon":14,"links":14},"Build Forms Dynamically using Directus and Next.js","/tutorials/projects/build-forms-dynamically-using-directus-and-next","tutorials/2.projects/build-forms-dynamically-using-directus-and-next","Learn how to setup Directus fields with Next.js.",{"title":1456,"path":1457,"stem":1458,"description":1459,"icon":14,"links":14},"Build Forms Dynamically using Directus and Nuxt","/tutorials/projects/build-forms-dynamically-using-directus-and-nuxt","tutorials/2.projects/build-forms-dynamically-using-directus-and-nuxt","Learn how to setup Directus fields with Nuxt.",{"title":1461,"path":1462,"stem":1463,"description":1464,"icon":14,"links":14},"Build Forms Dynamically using Directus and SvelteKit","/tutorials/projects/build-forms-dynamically-using-directus-and-sveltekit","tutorials/2.projects/build-forms-dynamically-using-directus-and-sveltekit","Learn how to setup Directus fields with SvelteKit.",{"title":1466,"path":1467,"stem":1468,"description":1469,"icon":14,"links":14},"Build the Leap Week Registration and Referral System","/tutorials/projects/build-the-leap-week-registration-and-referral-system","tutorials/2.projects/build-the-leap-week-registration-and-referral-system-","Learn how we built our referral-based ticketing and raffle system with AI-generated rabbitars.",{"title":1471,"path":1472,"stem":1473,"description":1474,"icon":14,"links":14},"Building AIVenture - An AI-Powered Game with Directus","/tutorials/projects/building-ai-venture-an-ai-powered-game-with-directus","tutorials/2.projects/building-ai-venture-an-ai-powered-game-with-directus","Learn the advanced techniques used with Directus Automate to build a game.",{"title":1476,"path":1477,"stem":1478,"description":1479,"icon":14,"links":14},"Create a CMS using Directus and Astro","/tutorials/projects/create-a-cms-using-directus-and-astro","tutorials/2.projects/create-a-cms-using-directus-and-astro","Learn how to create a CMS using Directus and Astro.",{"title":1481,"path":1482,"stem":1483,"description":1484,"icon":14,"links":14},"Create a CMS using Directus and Next.js","/tutorials/projects/create-a-cms-using-directus-and-nextjs","tutorials/2.projects/create-a-cms-using-directus-and-nextjs","Learn how to create a CMS using Directus and Next.js.",{"title":1486,"path":1487,"stem":1488,"description":1489,"icon":14,"links":14},"Create a CMS using Directus and Nuxt","/tutorials/projects/create-a-cms-using-directus-and-nuxt","tutorials/2.projects/create-a-cms-using-directus-and-nuxt","Learn how to create a CMS using Directus and Nuxt.",{"title":1491,"path":1492,"stem":1493,"description":1494,"icon":14,"links":14},"Create a CMS using Directus and SvelteKit","/tutorials/projects/create-a-cms-using-directus-and-sveltekit","tutorials/2.projects/create-a-cms-using-directus-and-sveltekit","Learn how to create a CMS using Directus and SvelteKit.",{"title":1496,"path":1497,"stem":1498,"description":1499,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Astro","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-astro","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-astro","Learn how to create dynamic pages you can use in your CMS using Directus and Astro.",{"title":1501,"path":1502,"stem":1503,"description":1504,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Next.js","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-nextjs","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-nextjs","Learn how to create dynamic pages you can use in your CMS using Directus and Next.js.",{"title":1506,"path":1507,"stem":1508,"description":1509,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Nuxt","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-nuxt","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-nuxt","Learn how to create dynamic pages you can use in your CMS using Directus and Nuxt.",{"title":1511,"path":1512,"stem":1513,"description":1514,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and SvelteKit","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-sveltekit","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-sveltekit","Learn how to create dynamic pages you can use in your CMS using Directus and SvelteKit.",{"title":1516,"path":1517,"stem":1518,"description":1519,"icon":14,"links":14},"How I Built an AI Open Source Santa Roast App with Directus and Nuxt","/tutorials/projects/how-i-built-an-ai-open-source-santa-roast-app-with-directus-and-nuxt","tutorials/2.projects/how-i-built-an-ai-open-source-santa-roast-app-with-directus-and-nuxt","Bryant breaks down how he built an AI-powered app that roasts developers based on their GitHub contributions.",{"title":1521,"path":1522,"stem":1523,"description":1524,"icon":14,"links":14},"Integrate Directus with ESP32 Hardware Sensors","/tutorials/projects/integrate-directus-with-esp-32-hardware-sensors","tutorials/2.projects/integrate-directus-with-esp-32-hardware-sensors","Learn how to integrate Directus with IoT systems by reading and publishing sensor data.",{"title":1526,"path":1527,"stem":1528,"description":1529,"icon":14,"links":14},"Use Directus as a Baby Health Tracker with Owlet and OpsGenie","/tutorials/projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie","tutorials/2.projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie","Learn how to integrate Directus with hardware sensors and incident repsonse systems.",{"title":1531,"path":1532,"stem":1533,"children":1534,"description":24,"icon":14,"links":14},"Tips & Tricks","/tutorials/tips-and-tricks","tutorials/3.tips-and-tricks/index",[1535,1536,1541,1546,1551,1556,1561,1566,1571],{"title":1531,"path":1532,"stem":1533,"description":24,"icon":14,"links":14},{"title":1537,"path":1538,"stem":1539,"description":1540,"icon":14,"links":14},"Advanced Types with the Directus SDK","/tutorials/tips-and-tricks/advanced-types-with-the-directus-sdk","tutorials/3.tips-and-tricks/advanced-types-with-the-directus-sdk","Learn how to more-easily work with types and the Directus SDK.",{"title":1542,"path":1543,"stem":1544,"description":1545,"icon":14,"links":14},"Build a Monitoring Pipeline For Flows And Extensions","/tutorials/tips-and-tricks/build-a-monitoring-pipeline-for-flows-and-extensions","tutorials/3.tips-and-tricks/build-a-monitoring-pipeline-for-flows-and-extensions-","Learn how to set up complex pipelines to monitor automations and extensions.",{"title":1547,"path":1548,"stem":1549,"description":1550,"icon":14,"links":14},"Configure Okta as a Single Sign-On Provider","/tutorials/tips-and-tricks/configure-okta-as-a-single-sign-on-provider","tutorials/3.tips-and-tricks/configure-okta-as-a-single-sign-on-provider","Learn how to set up Okta SSO with the SAML authentication mechanism.",{"title":1552,"path":1553,"stem":1554,"description":1555,"icon":14,"links":14},"Implement Pagination and Infinite Scrolling in Next.js","/tutorials/tips-and-tricks/implement-pagination-and-infinite-scrolling-in-next-js","tutorials/3.tips-and-tricks/implement-pagination-and-infinite-scrolling-in-next-js-","Learn various techniques to load paginated data in your Next.js application.",{"title":1557,"path":1558,"stem":1559,"description":1560,"icon":14,"links":14},"Importing Files in Directus Automate","/tutorials/tips-and-tricks/importing-files-in-directus-automate","tutorials/3.tips-and-tricks/importing-files-in-directus-automate","Learn how to use the Request URL operation to import files in Directus Automate.",{"title":1562,"path":1563,"stem":1564,"description":1565,"icon":14,"links":14},"Preview Files in Live Preview with Google Docs Previews","/tutorials/tips-and-tricks/preview-files-in-live-preview-with-google-docs-previews","tutorials/3.tips-and-tricks/preview-files-in-live-preview-with-google-docs-previews","Learn how to use Google Gview to preview many file formats in Directus Editor.",{"title":1567,"path":1568,"stem":1569,"description":1570,"icon":14,"links":14},"Search Engine Optimization Best Practices","/tutorials/tips-and-tricks/search-engine-optimization-best-practices","tutorials/3.tips-and-tricks/search-engine-optimization-best-practices","Learn some best practices for enabling SEO in your projects using Directus.",{"title":1572,"path":1573,"stem":1574,"description":1575,"icon":14,"links":14},"Understanding Kubernetes","/tutorials/tips-and-tricks/understanding-kubernetes","tutorials/3.tips-and-tricks/understanding-kubernetes","Learn about key Kubernetes concepts and how they interact with each other.",{"title":1577,"path":1578,"stem":1579,"children":1580,"description":24,"icon":14,"links":14},"Migration","/tutorials/migration","tutorials/4.migration/index",[1581,1582,1587,1592,1597],{"title":1577,"path":1578,"stem":1579,"description":24,"icon":14,"links":14},{"title":1583,"path":1584,"stem":1585,"description":1586,"icon":14,"links":14},"Migrate from Notion to Directus","/tutorials/migration/migrate-from-notion-to-directus","tutorials/4.migration/migrate-from-notion-to-directus","Learn how to migrate data from Notion databases to Directus.",{"title":1588,"path":1589,"stem":1590,"description":1591,"icon":14,"links":14},"Migrate from Nuxt Content to Directus","/tutorials/migration/migrate-from-nuxt-content-to-directus","tutorials/4.migration/migrate-from-nuxt-content-to-directus","Learn how to move from a flat-file CMS to Directus.",{"title":1593,"path":1594,"stem":1595,"description":1596,"icon":14,"links":14},"Migrate from WordPress to Directus","/tutorials/migration/migrate-from-wordpress-to-directus","tutorials/4.migration/migrate-from-wordpress-to-directus","Learn how to migrate posts and images to Directus, with tips on plugins.",{"title":1598,"path":1599,"stem":1600,"description":1601,"icon":14,"links":14},"Promoting Changes Between Environments in Directus","/tutorials/migration/promoting-changes-between-environments-in-directus","tutorials/4.migration/promoting-changes-between-environments-in-directus","Learn the options to migrate schema and data between Directus projects.",{"title":372,"path":1603,"stem":1604,"children":1605,"description":1607,"icon":14,"links":14},"/tutorials/extensions","tutorials/5.extensions/index",[1606,1608,1613,1618,1623,1628,1633,1638,1643,1650,1657,1664,1669,1674,1679,1684,1689,1694,1699,1704,1709,1714],{"title":372,"path":1603,"stem":1604,"description":1607,"icon":14,"links":14},"All about extensions",{"title":1609,"path":1610,"stem":1611,"description":1612,"icon":14,"links":14},"Check Permissions in a Custom Endpoint","/tutorials/extensions/check-permissions-in-a-custom-endpoint","tutorials/5.extensions/check-permissions-in-a-custom-endpoint","Learn how to use internal Directus permissions when creating a custom endpoint.",{"title":1614,"path":1615,"stem":1616,"description":1617,"icon":14,"links":14},"Create Collection Items in Custom Panels","/tutorials/extensions/create-collection-items-in-custom-panels","tutorials/5.extensions/create-collection-items-in-custom-panels","Learn how to use built-in interfaces and composables to create new collections.",{"title":1619,"path":1620,"stem":1621,"description":1622,"icon":14,"links":14},"Create New Customers in Stripe in a Custom Hook","/tutorials/extensions/create-new-customers-in-stripe-in-a-custom-hook","tutorials/5.extensions/create-new-customers-in-stripe-in-a-custom-hook","Learn how to use the Stripe SDK to create data when actions occur in Directus.",{"title":1624,"path":1625,"stem":1626,"description":1627,"icon":14,"links":14},"Display External API Data From Vonage In Custom Panels","/tutorials/extensions/display-external-api-data-from-vonage-in-custom-panels","tutorials/5.extensions/display-external-api-data-from-vonage-in-custom-panels","Learn how to display records from external systems in Directus Insights.",{"title":1629,"path":1630,"stem":1631,"description":1632,"icon":14,"links":14},"Display External Weather API Data In Custom Panels","/tutorials/extensions/display-external-weather-api-data-in-custom-panels","tutorials/5.extensions/display-external-weather-api-data-in-custom-panels","Learn how to display external data in panels with a bundle and endpoint.",{"title":1634,"path":1635,"stem":1636,"description":1637,"icon":14,"links":14},"Format Dates in a Custom Display Extension","/tutorials/extensions/format-dates-in-a-custom-display-extension","tutorials/5.extensions/format-dates-in-a-custom-display-extension","Learn how to build a custom display to format data in Directus.",{"title":1639,"path":1640,"stem":1641,"description":1642,"icon":14,"links":14},"Implement Navigation in Multipage Custom Modules","/tutorials/extensions/implement-navigation-in-multipage-custom-modules","tutorials/5.extensions/implement-navigation-in-multipage-custom-modules","Learn how to navigate between multiple pages in module extensions.",{"title":1644,"path":1645,"stem":1646,"children":1647,"description":1649,"icon":14,"links":14},"Integrate Algolia Indexing with Custom Hooks","/tutorials/extensions/integrate-algolia-indexing-with-custom-hooks","tutorials/5.extensions/integrate-algolia-indexing-with-custom-hooks",[1648],{"title":1644,"path":1645,"stem":1646,"description":1649,"icon":14,"links":14},"Learn how to maintain an Algolia index when data is created, updated, and deleted.",{"title":1651,"path":1652,"stem":1653,"children":1654,"description":1656,"icon":14,"links":14},"Integrate Elasticsearch Indexing with Custom Hooks","/tutorials/extensions/integrate-elasticsearch-indexing-with-custom-hooks","tutorials/5.extensions/integrate-elasticsearch-indexing-with-custom-hooks",[1655],{"title":1651,"path":1652,"stem":1653,"description":1656,"icon":14,"links":14},"Learn how to maintain an Elasticsearch index when data is created, updated, and deleted.",{"title":1658,"path":1659,"stem":1660,"children":1661,"description":1663,"icon":14,"links":14},"Integrate Meilisearch Indexing with Custom Hooks","/tutorials/extensions/integrate-meilisearch-indexing-with-custom-hooks","tutorials/5.extensions/integrate-meilisearch-indexing-with-custom-hooks",[1662],{"title":1658,"path":1659,"stem":1660,"description":1663,"icon":14,"links":14},"Learn how to maintain an Meilisearch index when data is created, updated, and deleted.",{"title":1665,"path":1666,"stem":1667,"description":1668,"icon":14,"links":14},"Monitor and Error Track with Sentry in Custom Hooks","/tutorials/extensions/monitor-and-error-track-with-sentry-in-custom-hooks","tutorials/5.extensions/monitor-and-error-track-with-sentry-in-custom-hooks","Learn how to integrate Sentry error tracking in both your API and Data Studio.",{"title":1670,"path":1671,"stem":1672,"description":1673,"icon":14,"links":14},"Proxy an External API in a Custom Endpoint Extension","/tutorials/extensions/proxy-an-external-api-in-a-custom-endpoint-extension","tutorials/5.extensions/proxy-an-external-api-in-a-custom-endpoint-extension","Learn how to make external APIs available via Directus in a custom endpoint.",{"title":1675,"path":1676,"stem":1677,"description":1678,"icon":14,"links":14},"Read Collection Data in Custom Layouts","/tutorials/extensions/read-collection-data-in-custom-layouts","tutorials/5.extensions/read-collection-data-in-custom-layouts","Learn how to build your first layout with data from a collection.",{"title":1680,"path":1681,"stem":1682,"description":1683,"icon":14,"links":14},"Send SMS Messages with Twilio in Custom Operations","/tutorials/extensions/send-sms-messages-with-twilio-in-custom-operations","tutorials/5.extensions/send-sms-messages-with-twilio-in-custom-operations","Learn how to build a custom operation that uses the Twilio SDK.",{"title":1685,"path":1686,"stem":1687,"description":1688,"icon":14,"links":14},"Send SMS Messages with Twilio in Custom Panels","/tutorials/extensions/send-sms-messages-with-twilio-in-custom-panels","tutorials/5.extensions/send-sms-messages-with-twilio-in-custom-panels","Learn how to build a form inside a panel extension and use external APIs.",{"title":1690,"path":1691,"stem":1692,"description":1693,"icon":14,"links":14},"Summarize Relational Items in a Custom Display Extension","/tutorials/extensions/summarize-relational-items-in-a-custom-display-extension","tutorials/5.extensions/summarize-relational-items-in-a-custom-display-extension","Learn how to work with relational data in display extensions.",{"title":1695,"path":1696,"stem":1697,"description":1698,"icon":14,"links":14},"Understand Available Slots in Custom Modules","/tutorials/extensions/understand-available-slots-in-custom-modules","tutorials/5.extensions/understand-available-slots-in-custom-modules","Learn about all of the slots available in your custom modules.",{"title":1700,"path":1701,"stem":1702,"description":1703,"icon":14,"links":14},"Use Dynamic Values in Custom Email Templates","/tutorials/extensions/use-dynamic-values-in-custom-email-templates","tutorials/5.extensions/use-dynamic-values-in-custom-email-templates","Learn how to inject dynamic data into liquid templates.",{"title":1705,"path":1706,"stem":1707,"description":1708,"icon":14,"links":14},"Use npm Packages in Custom Operations","/tutorials/extensions/use-npm-packages-in-custom-operations","tutorials/5.extensions/use-npm-packages-in-custom-operations","Learn how to expose an npm package as an operation in Directus Automate.",{"title":1710,"path":1711,"stem":1712,"description":1713,"icon":14,"links":14},"Validate Phone Numbers with Twilio in a Custom Hook","/tutorials/extensions/validate-phone-numbers-with-twilio-in-a-custom-hook","tutorials/5.extensions/validate-phone-numbers-with-twilio-in-a-custom-hook","Learn how to prevent an item from saving if it has an invalid phone number.",{"title":1715,"path":1716,"stem":1717,"description":1718,"icon":14,"links":14},"Validating Third-Party JWTs in Directus (with Okta)","/tutorials/extensions/validating-third-party-jwts-in-directus","tutorials/5.extensions/validating-third-party-jwts-in-directus","Learn how to translate third part JWT's to Directus accountability",{"title":1114,"path":1720,"stem":1721,"children":1722,"description":24,"icon":14,"links":14},"/tutorials/self-hosting","tutorials/6.self-hosting/index",[1723,1724,1729,1734,1739,1744],{"title":1114,"path":1720,"stem":1721,"description":24,"icon":14,"links":14},{"title":1725,"path":1726,"stem":1727,"description":1728,"icon":14,"links":14},"Deploy Directus to an Ubuntu Server","/tutorials/self-hosting/deploy-directus-to-an-ubuntu-server","tutorials/6.self-hosting/deploy-directus-to-an-ubuntu-server","Learn how to deploy Directus on a Docker container on an Ubuntu server.",{"title":1730,"path":1731,"stem":1732,"description":1733,"icon":14,"links":14},"Deploy Directus to AWS EC2","/tutorials/self-hosting/deploy-directus-to-aws-ec2","tutorials/6.self-hosting/deploy-directus-to-aws-ec2","Learn how to deploy a Directus to AWS EC2, with a RDS database and a S3 storage bucket.",{"title":1735,"path":1736,"stem":1737,"description":1738,"icon":14,"links":14},"Deploy Directus to Azure Web Apps","/tutorials/self-hosting/deploy-directus-to-azure-web-apps","tutorials/6.self-hosting/deploy-directus-to-azure-web-apps","Learn how to deploy Directus on a Docker container on Azure.",{"title":1740,"path":1741,"stem":1742,"description":1743,"icon":14,"links":14},"Deploy Directus to Digital Ocean","/tutorials/self-hosting/deploy-directus-to-digital-ocean","tutorials/6.self-hosting/deploy-directus-to-digital-ocean","Learn how to deploy Directus on the Digital Ocean App Platform.",{"title":1745,"path":1746,"stem":1747,"description":1748,"icon":14,"links":14},"Deploy Directus to Google Cloud Platform","/tutorials/self-hosting/deploy-directus-to-google-cloud-platform","tutorials/6.self-hosting/deploy-directus-to-google-cloud-platform","Learn how to deploy Directus on GCP with a Cloud SQL database and Cloud Storage Bucket.",{"title":1750,"path":1751,"stem":1752,"children":1753,"description":24,"icon":14,"links":14},"Workflows","/tutorials/workflows","tutorials/7.workflows/index",[1754,1755,1760,1765,1770,1775,1780,1785,1790,1795,1800,1805,1810,1815,1820],{"title":1750,"path":1751,"stem":1752,"description":24,"icon":14,"links":14},{"title":1756,"path":1757,"stem":1758,"description":1759,"icon":14,"links":14},"Build Content Approval Workflows with Custom Permissions","/tutorials/workflows/build-content-approval-workflows-with-custom-permissions","tutorials/7.workflows/build-content-approval-workflows-with-custom-permissions","Learn how to configure roles and permissions for complex automations.",{"title":1761,"path":1762,"stem":1763,"description":1764,"icon":14,"links":14},"Combine Live Preview and Content Versioning with Next.js","/tutorials/workflows/combine-live-preview-and-content-versioning-with-next-js","tutorials/7.workflows/combine-live-preview-and-content-versioning-with-next-js","Learn how to set up Live Preview with different content versions in your Next.js application.",{"title":1766,"path":1767,"stem":1768,"description":1769,"icon":14,"links":14},"Create GitHub Issues with Directus Automate","/tutorials/workflows/create-github-issues-with-directus-automate","tutorials/7.workflows/create-github-issues-with-directus-automate","Learn how to integrate GitHub with Directus Automate to create new issues.",{"title":1771,"path":1772,"stem":1773,"description":1774,"icon":14,"links":14},"Detect High-Risk Phone Numbers with Vonage and Directus Automate","/tutorials/workflows/detect-high-risk-phone-numbers-with-vonage-and-directus-automate","tutorials/7.workflows/detect-high-risk-phone-numbers-with-vonage-and-directus-automate","Learn how to integrate Vonage's Number Insights API with Directus Automate to validate numbers.",{"title":1776,"path":1777,"stem":1778,"description":1779,"icon":14,"links":14},"Enrich User Data with Clearbit and Directus Automate","/tutorials/workflows/enrich-user-data-with-clearbit-and-directus-automate","tutorials/7.workflows/enrich-user-data-with-clearbit-and-directus-automate","Learn how to integrate Clearbit data enrichment with Directus Automate.",{"title":1781,"path":1782,"stem":1783,"description":1784,"icon":14,"links":14},"Generate Images with DALL•E and Directus Automate","/tutorials/workflows/generate-images-with-dall-e-and-directus-automate","tutorials/7.workflows/generate-images-with-dall-e-and-directus-automate","Learn how to integrate OpenAI's Dall•E models with Directus Automate.",{"title":1786,"path":1787,"stem":1788,"description":1789,"icon":14,"links":14},"Generate Social Posts with GPT-4 and Directus Automate","/tutorials/workflows/generate-social-posts-with-gpt-4-and-directus-automate","tutorials/7.workflows/generate-social-posts-with-gpt-4-and-directus-automate","Learn how to integrate OpenAI's GPT-4 model with Directus Automate.",{"title":1791,"path":1792,"stem":1793,"description":1794,"icon":14,"links":14},"Generate Transcripts with Deepgram and Directus Automate","/tutorials/workflows/generate-transcripts-with-deepgram-and-directus-automate","tutorials/7.workflows/generate-transcripts-with-deepgram-and-directus-automate","Learn how to integrate Deepgram's Speech-to-Text API with Directus Automate.",{"title":1796,"path":1797,"stem":1798,"description":1799,"icon":14,"links":14},"Integrating Multilingual Content with Directus and Crowdin","/tutorials/workflows/integrating-multilingual-content-with-directus-and-crowdin","tutorials/7.workflows/integrating-multilingual-content-with-directus-and-crowdin","Learn how to localize content in Directus using Crowdin's connector with Directus.",{"title":1801,"path":1802,"stem":1803,"description":1804,"icon":14,"links":14},"Invincible AI content workflows with Inngest and Directus","/tutorials/workflows/invincible-ai-content-workflows-with-inngest-and-directus","tutorials/7.workflows/invincible-ai-content-workflows-with-inngest-and-directus","Learn how to configure integration Directus and Inngest to build durable workflows for any scale.",{"title":1806,"path":1807,"stem":1808,"description":1809,"icon":14,"links":14},"Schedule Future Content with Directus Automate","/tutorials/workflows/schedule-future-content-with-directus-automate","tutorials/7.workflows/schedule-future-content-with-directus-automate","Learn how to set content to be scheduled on a future date with Directs Automate.",{"title":1811,"path":1812,"stem":1813,"description":1814,"icon":14,"links":14},"Tag Images with Clarifai and Directus Automate","/tutorials/workflows/tag-images-with-clarifai-and-directus-automate","tutorials/7.workflows/tag-images-with-clarifai-and-directus-automate","Learn how to integrate Clarifai's image recognition APIs with Directus Automate.",{"title":1816,"path":1817,"stem":1818,"description":1819,"icon":14,"links":14},"Trigger Netlify Site Builds with Directus Automate","/tutorials/workflows/trigger-netlify-site-builds-with-directus-automate","tutorials/7.workflows/trigger-netlify-site-builds-with-directus-automate","Learn how to trigger new Netlify website builds through Directus Automate.",{"title":1821,"path":1822,"stem":1823,"description":1824,"icon":14,"links":14},"Trigger Vercel Site Builds with Directus Automate","/tutorials/workflows/trigger-vercel-site-builds-with-directus-automate","tutorials/7.workflows/trigger-vercel-site-builds-with-directus-automate","Learn how to trigger new Vercel website builds through Directus Automate.",{"id":1826,"icon":1827,"content":1828,"link":1829},"812bf73d-ebfb-4246-9538-937a09a0c795","connected_tv","Learn more about our native MCP","https://directus.io/mcp",{"id":1831,"title":1526,"authors":1832,"body":1836,"description":1529,"extension":4544,"headline":14,"icon":14,"links":14,"meta":4545,"navigation":3814,"path":1527,"rawbody":4547,"seo":4548,"stem":1528,"technologies":14,"__hash__":4549},"content/tutorials/2.projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie.md",[1833],{"name":1834,"title":1835},"Andreas Morgner","Guest Author",{"type":1837,"value":1838,"toc":4526},"minimark",[1839,1851,1854,1859,1864,1884,1995,1999,2002,2009,2076,2085,2089,2092,2114,2121,2125,2128,2139,2142,2145,2197,2200,2224,2227,2334,2337,2341,2344,2351,2354,2379,2382,2405,2408,2607,2616,2619,2647,2675,2678,2681,2806,2813,3089,3092,3111,3115,3118,3189,3193,3196,3199,3206,3209,3212,3215,3221,3224,3230,3241,3245,3248,3252,3255,3264,3270,3273,3279,3282,3289,3292,3504,3517,3561,3564,3567,3662,3667,3670,3676,3679,3685,3688,3691,3694,3698,3701,3711,4506,4509,4515,4519,4522],[1840,1841,1842,1843,1850],"p",{},"I have a baby and like many parents rely on monitors and sensors to make sure they're ok. In this article, we will explore Directus as a backend for a smart wearable device, and how to extend the functionality of the the apps shipped with the device. I personally use the ",[1844,1845,1849],"a",{"href":1846,"rel":1847},"https://owletcare.com/products/owlet-smart-sock",[1848],"nofollow","Owlet Smart Sock",", but the approaches covered in this article can be adapted for many other sensors.",[1840,1852,1853],{},"We will cover data model configuration, how to grab data from the wearable using Directus Automate, and how to integrate Directus into 3rd party tools for reporting, such as OpsGenie and screen widgets on an iPhone.",[1855,1856,1858],"h2",{"id":1857},"creating-collections","Creating Collections",[1860,1861,1863],"h3",{"id":1862},"sensor-data-collection","Sensor Data Collection",[1840,1865,1866,1867,1871,1872,1875,1876,1879,1880,1883],{},"As we want to track sensor data over time, we will frequently pull the data with some details from the external API. Create a collection called ",[1868,1869,1870],"code",{},"sensor_data"," with a auto-generated UUID as an ID. Allow Directus to create ",[1868,1873,1874],{},"sort",", ",[1868,1877,1878],{},"status",", and ",[1868,1881,1882],{},"date_created"," fields as well.\nFor each element of the data provided by the sensor, we want to save these values. Depending on the used sensor, you may come up with a different set of fields. In our case we've created the following important additional fields:",[1885,1886,1887,1903],"table",{},[1888,1889,1890],"thead",{},[1891,1892,1893,1897,1900],"tr",{},[1894,1895,1896],"th",{},"Field name",[1894,1898,1899],{},"Interface",[1894,1901,1902],{},"Comment",[1904,1905,1906,1918,1929,1938,1947,1957,1968,1977,1986],"tbody",{},[1891,1907,1908,1912,1915],{},[1909,1910,1911],"td",{},"raw_payload",[1909,1913,1914],{},"Code",[1909,1916,1917],{},"We use this to store the JSON payload that we gather from the external API for debugging purposes.",[1891,1919,1920,1923,1926],{},[1909,1921,1922],{},"temperature",[1909,1924,1925],{},"Input, Decimal",[1909,1927,1928],{},"Plain value from the sensor data.",[1891,1930,1931,1934,1936],{},[1909,1932,1933],{},"oxygen",[1909,1935,1925],{},[1909,1937,1928],{},[1891,1939,1940,1943,1945],{},[1909,1941,1942],{},"heart_rate",[1909,1944,1925],{},[1909,1946,1928],{},[1891,1948,1949,1952,1955],{},[1909,1950,1951],{},"battery_level",[1909,1953,1954],{},"Input, Integer",[1909,1956,1928],{},[1891,1958,1959,1962,1965],{},[1909,1960,1961],{},"battery_status",[1909,1963,1964],{},"Dropdown",[1909,1966,1967],{},"To evaluate the sensor data.",[1891,1969,1970,1973,1975],{},[1909,1971,1972],{},"heart_status",[1909,1974,1964],{},[1909,1976,1967],{},[1891,1978,1979,1982,1984],{},[1909,1980,1981],{},"oxygen_state",[1909,1983,1964],{},[1909,1985,1967],{},[1891,1987,1988,1991,1993],{},[1909,1989,1990],{},"thermal_state",[1909,1992,1964],{},[1909,1994,1967],{},[1860,1996,1998],{"id":1997},"opsgenie-alerts-collection","OpsGenie Alerts Collection",[1840,2000,2001],{},"This collection is for integration into the OpsGenie alerting system. As Direcuts provides the fields for sort, creation, and update date as well aw who perfomred the action, we enanled these fields during creation. Next to the id we need the following fields for alerts we want to create later on. Next to the default fields, the most important custom fields are the following ones:",[1840,2003,2004,2005,2008],{},"Create an ",[1868,2006,2007],{},"opsgenie_alert"," collection for integration into the OpsGenie alerting system. As Directus provides the fields for sort, creation, and update date as well as who performed an action, enable these fields during creation. Create the following fields:",[1885,2010,2011,2021],{},[1888,2012,2013],{},[1891,2014,2015,2017,2019],{},[1894,2016,1896],{},[1894,2018,1899],{},[1894,2020,1902],{},[1904,2022,2023,2034,2044,2054,2065],{},[1891,2024,2025,2028,2031],{},[1909,2026,2027],{},"external_id",[1909,2029,2030],{},"Input/String",[1909,2032,2033],{},"Store the Alert ID",[1891,2035,2036,2039,2041],{},[1909,2037,2038],{},"priority",[1909,2040,1964],{},[1909,2042,2043],{},"P1 - Critical to P5 - Informational",[1891,2045,2046,2049,2051],{},[1909,2047,2048],{},"category",[1909,2050,1964],{},[1909,2052,2053],{},"Simple method to deicde if health related or just an info",[1891,2055,2056,2059,2062],{},[1909,2057,2058],{},"message",[1909,2060,2061],{},"String",[1909,2063,2064],{},"The message that should be displayed in OpsGenie",[1891,2066,2067,2070,2073],{},[1909,2068,2069],{},"data",[1909,2071,2072],{},"Many to Many",[1909,2074,2075],{},"foreign key to the data item",[1840,2077,2078,2079,2084],{},"There are also a couple of other fields that we can use and populate such as severity, type, description, tags, links, or alias. To find our more about each field, check out ",[1844,2080,2083],{"href":2081,"rel":2082},"https://docs.opsgenie.com/docs/alert-api",[1848],"the OpsGenie docs",".",[1855,2086,2088],{"id":2087},"authenticating-with-the-sensor","Authenticating with the Sensor",[1840,2090,2091],{},"The Owlet lacks a publicly-documented API, so some reverse-engineering was required. This Flow will roughly follow this workflow:",[2093,2094,2095,2099,2102,2105,2108,2111],"ol",{},[2096,2097,2098],"li",{},"Trigger every minute.",[2096,2100,2101],{},"Authenticate and get all the needed tokens.",[2096,2103,2104],{},"Get a list of connected devices.",[2096,2106,2107],{},"Get the data of our target device.",[2096,2109,2110],{},"Transform the data to our needs.",[2096,2112,2113],{},"Save the data.",[1840,2115,2116,2117,2120],{},"Create a flow with a scheduled trigger that runs every minute (an interval of ",[1868,2118,2119],{},"* * * * *","). Turn off logging to prevent saving a lot of unnecessary data to your database.",[1860,2122,2124],{"id":2123},"authenticate-and-request-tokens","Authenticate and Request Tokens",[1840,2126,2127],{},"For this specific API, the authentication is a bit more complex compared to basic auth or a simple \"request a token\" as we might know it from other platforms. The general process to get a token which can be used to access actual device data contains three steps:",[2093,2129,2130,2133,2136],{},[2096,2131,2132],{},"Use the login credentials used by the mobile app and pass them to an auth service provided by Google. If successfully logged in, we receive a token.",[2096,2134,2135],{},"With this token, authenticate against the actual Owlet server for a second token.",[2096,2137,2138],{},"Using the second token, retrieve a final token that can be used to fetch sensor data.",[1840,2140,2141],{},"::: details Show Operations",[1840,2143,2144],{},"Request 1:",[2146,2147,2148,2154,2160],"ul",{},[2096,2149,2150,2151],{},"Key: ",[1868,2152,2153],{},"verifyPw",[2096,2155,2156,2157],{},"POST ",[1868,2158,2159],{},"https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=##########",[2096,2161,2162,2163],{},"Headers:\n",[2146,2164,2165,2174,2182,2190],{},[2096,2166,2167,2170,2171],{},[1868,2168,2169],{},"X-Android-Package",": ",[1868,2172,2173],{},"com.owletcare.owletcare",[2096,2175,2176,2170,2179],{},[1868,2177,2178],{},"X-Android-Cert",[1868,2180,2181],{},"##some secret value##",[2096,2183,2184,2170,2187],{},[1868,2185,2186],{},"Content-Type",[1868,2188,2189],{},"application/json",[2096,2191,2192,2170,2195],{},[1868,2193,2194],{},"Accept",[1868,2196,2189],{},[1840,2198,2199],{},"Request 2:",[2146,2201,2202,2207,2212],{},[2096,2203,2150,2204],{},[1868,2205,2206],{},"get_mini_token",[2096,2208,2156,2209],{},[1868,2210,2211],{},"https://ayla-sso.eu.owletdata.com/mini/",[2096,2213,2162,2214],{},[2146,2215,2216],{},[2096,2217,2218,2170,2221],{},[1868,2219,2220],{},"Authorization",[1868,2222,2223],{},"{{$last.data.idToken}}",[1840,2225,2226],{},"Request 3:",[2146,2228,2229,2234,2239,2255],{},[2096,2230,2150,2231],{},[1868,2232,2233],{},"token_sign_in",[2096,2235,2156,2236],{},[1868,2237,2238],{},"https://user-field-eu-1a2039d9.aylanetworks.com/api/v1/token_sign_in",[2096,2240,2162,2241],{},[2146,2242,2243,2249],{},[2096,2244,2245,2170,2247],{},[1868,2246,2186],{},[1868,2248,2189],{},[2096,2250,2251,2170,2253],{},[1868,2252,2194],{},[1868,2254,2189],{},[2096,2256,2257,2258],{},"Body:\n",[2259,2260,2264],"pre",{"className":2261,"code":2262,"language":2263,"meta":24,"style":24},"language-json shiki shiki-themes github-light github-light github-dark","{\n  \"app_id\": \"OwletCare-Android-EU-fw-id\",\n  \"app_secret\": \"OwletCare-Android-EU-########\",\n  \"provider\": \"owl_id\",\n  \"token\": \"{{$last.data.mini_token}}\"\n}\n","json",[1868,2265,2266,2275,2291,2304,2317,2328],{"__ignoreMap":24},[2267,2268,2271],"span",{"class":2269,"line":2270},"line",1,[2267,2272,2274],{"class":2273},"sxrX7","{\n",[2267,2276,2278,2282,2284,2288],{"class":2269,"line":2277},2,[2267,2279,2281],{"class":2280},"sBjJW","  \"app_id\"",[2267,2283,2170],{"class":2273},[2267,2285,2287],{"class":2286},"sIIMD","\"OwletCare-Android-EU-fw-id\"",[2267,2289,2290],{"class":2273},",\n",[2267,2292,2294,2297,2299,2302],{"class":2269,"line":2293},3,[2267,2295,2296],{"class":2280},"  \"app_secret\"",[2267,2298,2170],{"class":2273},[2267,2300,2301],{"class":2286},"\"OwletCare-Android-EU-########\"",[2267,2303,2290],{"class":2273},[2267,2305,2307,2310,2312,2315],{"class":2269,"line":2306},4,[2267,2308,2309],{"class":2280},"  \"provider\"",[2267,2311,2170],{"class":2273},[2267,2313,2314],{"class":2286},"\"owl_id\"",[2267,2316,2290],{"class":2273},[2267,2318,2320,2323,2325],{"class":2269,"line":2319},5,[2267,2321,2322],{"class":2280},"  \"token\"",[2267,2324,2170],{"class":2273},[2267,2326,2327],{"class":2286},"\"{{$last.data.mini_token}}\"\n",[2267,2329,2331],{"class":2269,"line":2330},6,[2267,2332,2333],{"class":2273},"}\n",[1840,2335,2336],{},":::",[1860,2338,2340],{"id":2339},"reading-data-from-the-sensor","Reading Data from the Sensor",[1840,2342,2343],{},"Compared to the auth process, fetching actual data from the API is done with fewer requests – just two are needed. As the vendor supports multiple devices, we have to get a list of devices first. In theory, we can also do this in preparation and hard-code the device ID within the next operation. But again, as there is no official documentation of the API this might change or the ID might not that unique and may change within any future updates.",[1840,2345,2346,2347,2350],{},"So let's identify the device name, or ",[1868,2348,2349],{},"dsn"," as it is called by the external API.",[1840,2352,2353],{},"Create a Request operation with the final token we got from the authentication operations.",[1885,2355,2356,2366],{},[1888,2357,2358],{},[1891,2359,2360,2363],{},[1894,2361,2362],{},"Method",[1894,2364,2365],{},"URL",[1904,2367,2368],{},[1891,2369,2370,2373],{},[1909,2371,2372],{},"GET",[1909,2374,2375],{},[1844,2376,2377],{"href":2377,"rel":2378},"https://ads-field-eu-1a2039d9.aylanetworks.com/apiv1/devices.json",[1848],[1840,2380,2381],{},"As header parameter, we set the following:",[1885,2383,2384,2394],{},[1888,2385,2386],{},[1891,2387,2388,2391],{},[1894,2389,2390],{},"Header",[1894,2392,2393],{},"Value",[1904,2395,2396],{},[1891,2397,2398,2400],{},[1909,2399,2220],{},[1909,2401,2402],{},[1868,2403,2404],{},"auth_token {{$last.data.access_token}}",[1840,2406,2407],{},"If everything works so far, the JSON we receive looks something like this, but for security reasons, some data was removed or masked as it also contains coordinates, MAC addresses, IP addresses, and so on:",[2259,2409,2411],{"className":2261,"code":2410,"language":2263,"meta":24,"style":24},"{\n  \"status\": 200,\n  \"statusText\": \"OK\",\n  \"headers\": {\n    ...\n  },\n  \"data\": [\n    {\n      \"device\": {\n        \"dsn\": \"AC00***697\",\n        \"lan_ip\": \"192.168.*.*\",\n        \"lan_enabled\": false,\n        \"has_properties\": true,\n        \"connection_status\": \"Online\",\n        \"lat\": \"********\",\n        \"lng\": \"********\",\n        \"device_type\": \"Wifi\"\n      }\n    }\n  ]\n}\n",[1868,2412,2413,2417,2429,2441,2449,2455,2460,2469,2475,2483,2496,2509,2522,2535,2548,2561,2573,2584,2590,2596,2602],{"__ignoreMap":24},[2267,2414,2415],{"class":2269,"line":2270},[2267,2416,2274],{"class":2273},[2267,2418,2419,2422,2424,2427],{"class":2269,"line":2277},[2267,2420,2421],{"class":2280},"  \"status\"",[2267,2423,2170],{"class":2273},[2267,2425,2426],{"class":2280},"200",[2267,2428,2290],{"class":2273},[2267,2430,2431,2434,2436,2439],{"class":2269,"line":2293},[2267,2432,2433],{"class":2280},"  \"statusText\"",[2267,2435,2170],{"class":2273},[2267,2437,2438],{"class":2286},"\"OK\"",[2267,2440,2290],{"class":2273},[2267,2442,2443,2446],{"class":2269,"line":2306},[2267,2444,2445],{"class":2280},"  \"headers\"",[2267,2447,2448],{"class":2273},": {\n",[2267,2450,2451],{"class":2269,"line":2319},[2267,2452,2454],{"class":2453},"sPrNH","    ...\n",[2267,2456,2457],{"class":2269,"line":2330},[2267,2458,2459],{"class":2273},"  },\n",[2267,2461,2463,2466],{"class":2269,"line":2462},7,[2267,2464,2465],{"class":2280},"  \"data\"",[2267,2467,2468],{"class":2273},": [\n",[2267,2470,2472],{"class":2269,"line":2471},8,[2267,2473,2474],{"class":2273},"    {\n",[2267,2476,2478,2481],{"class":2269,"line":2477},9,[2267,2479,2480],{"class":2280},"      \"device\"",[2267,2482,2448],{"class":2273},[2267,2484,2486,2489,2491,2494],{"class":2269,"line":2485},10,[2267,2487,2488],{"class":2280},"        \"dsn\"",[2267,2490,2170],{"class":2273},[2267,2492,2493],{"class":2286},"\"AC00***697\"",[2267,2495,2290],{"class":2273},[2267,2497,2499,2502,2504,2507],{"class":2269,"line":2498},11,[2267,2500,2501],{"class":2280},"        \"lan_ip\"",[2267,2503,2170],{"class":2273},[2267,2505,2506],{"class":2286},"\"192.168.*.*\"",[2267,2508,2290],{"class":2273},[2267,2510,2512,2515,2517,2520],{"class":2269,"line":2511},12,[2267,2513,2514],{"class":2280},"        \"lan_enabled\"",[2267,2516,2170],{"class":2273},[2267,2518,2519],{"class":2280},"false",[2267,2521,2290],{"class":2273},[2267,2523,2525,2528,2530,2533],{"class":2269,"line":2524},13,[2267,2526,2527],{"class":2280},"        \"has_properties\"",[2267,2529,2170],{"class":2273},[2267,2531,2532],{"class":2280},"true",[2267,2534,2290],{"class":2273},[2267,2536,2538,2541,2543,2546],{"class":2269,"line":2537},14,[2267,2539,2540],{"class":2280},"        \"connection_status\"",[2267,2542,2170],{"class":2273},[2267,2544,2545],{"class":2286},"\"Online\"",[2267,2547,2290],{"class":2273},[2267,2549,2551,2554,2556,2559],{"class":2269,"line":2550},15,[2267,2552,2553],{"class":2280},"        \"lat\"",[2267,2555,2170],{"class":2273},[2267,2557,2558],{"class":2286},"\"********\"",[2267,2560,2290],{"class":2273},[2267,2562,2564,2567,2569,2571],{"class":2269,"line":2563},16,[2267,2565,2566],{"class":2280},"        \"lng\"",[2267,2568,2170],{"class":2273},[2267,2570,2558],{"class":2286},[2267,2572,2290],{"class":2273},[2267,2574,2576,2579,2581],{"class":2269,"line":2575},17,[2267,2577,2578],{"class":2280},"        \"device_type\"",[2267,2580,2170],{"class":2273},[2267,2582,2583],{"class":2286},"\"Wifi\"\n",[2267,2585,2587],{"class":2269,"line":2586},18,[2267,2588,2589],{"class":2273},"      }\n",[2267,2591,2593],{"class":2269,"line":2592},19,[2267,2594,2595],{"class":2273},"    }\n",[2267,2597,2599],{"class":2269,"line":2598},20,[2267,2600,2601],{"class":2273},"  ]\n",[2267,2603,2605],{"class":2269,"line":2604},21,[2267,2606,2333],{"class":2273},[1840,2608,2609,2610,2612,2613,2084],{},"The device object has exactly one tracker and provides us with the ",[1868,2611,2349],{}," as well as the flag for ",[1868,2614,2615],{},"has_properties",[1840,2617,2618],{},"Create one more Request operation to actually, finally, fetch sensor data.",[1885,2620,2621,2629],{},[1888,2622,2623],{},[1891,2624,2625,2627],{},[1894,2626,2362],{},[1894,2628,2365],{},[1904,2630,2631,2640],{},[1891,2632,2633,2635],{},[1909,2634,2372],{},[1909,2636,2637],{},[1868,2638,2639],{},"https://ads-field-eu-1a2039d9.aylanetworks.com/apiv1/dsns/{{$last.data[0].device.dsn}}/properties.json",[1891,2641,2642,2645],{},[1909,2643,2644],{},"As a header parameter, we set the following:",[1909,2646],{},[1885,2648,2649,2657],{},[1888,2650,2651],{},[1891,2652,2653,2655],{},[1894,2654,2390],{},[1894,2656,2393],{},[1904,2658,2659,2668],{},[1891,2660,2661,2663],{},[1909,2662,2220],{},[1909,2664,2665],{},[1868,2666,2667],{},"auth_token {{token_sign_in.data.access_token}}",[1891,2669,2670,2673],{},[1909,2671,2672],{},"As you can see, the named operation becomes handy now.",[1909,2674],{},[1840,2676,2677],{},"This request returns every property the device currently has. In total, we received over 1600 lines of JSON this time. The good thing, we only have a single property object here. All properties have a name attribute.",[1840,2679,2680],{},"Create a Run Script operation to find the properties we need:",[2259,2682,2686],{"className":2683,"code":2684,"language":2685,"meta":24,"style":24},"language-js shiki shiki-themes github-light github-light github-dark","module.exports = async function(data) {\n  let rtnData\n    data.read_dns.data.forEach(p => {\n    if (p.property.name === \"REAL_TIME_VITALS\") {\n      //console.log(JSON.parse(p.property.value))\n      rtnData = JSON.parse(p.property.value)\n    }\n  });\n  return rtnData;\n}\n","js",[1868,2687,2688,2717,2725,2744,2760,2766,2785,2789,2794,2802],{"__ignoreMap":24},[2267,2689,2690,2693,2695,2698,2702,2705,2708,2711,2714],{"class":2269,"line":2270},[2267,2691,2692],{"class":2280},"module",[2267,2694,2084],{"class":2273},[2267,2696,2697],{"class":2280},"exports",[2267,2699,2701],{"class":2700},"s8jYJ"," =",[2267,2703,2704],{"class":2700}," async",[2267,2706,2707],{"class":2700}," function",[2267,2709,2710],{"class":2273},"(",[2267,2712,2069],{"class":2713},"sP4rz",[2267,2715,2716],{"class":2273},") {\n",[2267,2718,2719,2722],{"class":2269,"line":2277},[2267,2720,2721],{"class":2700},"  let",[2267,2723,2724],{"class":2273}," rtnData\n",[2267,2726,2727,2730,2734,2736,2738,2741],{"class":2269,"line":2293},[2267,2728,2729],{"class":2273},"    data.read_dns.data.",[2267,2731,2733],{"class":2732},"snPdu","forEach",[2267,2735,2710],{"class":2273},[2267,2737,1840],{"class":2713},[2267,2739,2740],{"class":2700}," =>",[2267,2742,2743],{"class":2273}," {\n",[2267,2745,2746,2749,2752,2755,2758],{"class":2269,"line":2306},[2267,2747,2748],{"class":2700},"    if",[2267,2750,2751],{"class":2273}," (p.property.name ",[2267,2753,2754],{"class":2700},"===",[2267,2756,2757],{"class":2286}," \"REAL_TIME_VITALS\"",[2267,2759,2716],{"class":2273},[2267,2761,2762],{"class":2269,"line":2319},[2267,2763,2765],{"class":2764},"sCsY4","      //console.log(JSON.parse(p.property.value))\n",[2267,2767,2768,2771,2774,2777,2779,2782],{"class":2269,"line":2330},[2267,2769,2770],{"class":2273},"      rtnData ",[2267,2772,2773],{"class":2700},"=",[2267,2775,2776],{"class":2280}," JSON",[2267,2778,2084],{"class":2273},[2267,2780,2781],{"class":2732},"parse",[2267,2783,2784],{"class":2273},"(p.property.value)\n",[2267,2786,2787],{"class":2269,"line":2462},[2267,2788,2595],{"class":2273},[2267,2790,2791],{"class":2269,"line":2471},[2267,2792,2793],{"class":2273},"  });\n",[2267,2795,2796,2799],{"class":2269,"line":2477},[2267,2797,2798],{"class":2700},"  return",[2267,2800,2801],{"class":2273}," rtnData;\n",[2267,2803,2804],{"class":2269,"line":2485},[2267,2805,2333],{"class":2273},[1840,2807,2808,2809,2812],{},"Within ",[1868,2810,2811],{},"rtnData"," we now store all the relevant values such as battery details, heart rate and oxygen level. As the JSON data is stored as a raw string with the value attribute, the run operation already parses the string and returns the following JSON object back to the Flow",[2259,2814,2816],{"className":2261,"code":2815,"language":2263,"meta":24,"style":24},"{\n  \"ox\": 0,\n  \"hr\": 0,\n  \"mv\": 0,\n  \"sc\": 2,\n  \"st\": 0,\n  \"bso\": 0,\n  \"bat\": 100,\n  \"btt\": 0,\n  \"chg\": 2,\n  \"aps\": 0,\n  \"alrt\": 0,\n  \"ota\": 0,\n  \"srf\": 1,\n  \"rsi\": 18,\n  \"sb\": 0,\n  \"ss\": 0,\n  \"mvb\": 0,\n  \"mst\": 0,\n  \"oxta\": 255,\n  \"onm\": 0,\n  \"bsb\": 4,\n  \"mrs\": 0,\n  \"hw\": \"obl\"\n}\n",[1868,2817,2818,2822,2834,2845,2856,2868,2879,2890,2902,2913,2924,2935,2946,2957,2969,2981,2992,3003,3014,3025,3037,3048,3061,3073,3084],{"__ignoreMap":24},[2267,2819,2820],{"class":2269,"line":2270},[2267,2821,2274],{"class":2273},[2267,2823,2824,2827,2829,2832],{"class":2269,"line":2277},[2267,2825,2826],{"class":2280},"  \"ox\"",[2267,2828,2170],{"class":2273},[2267,2830,2831],{"class":2280},"0",[2267,2833,2290],{"class":2273},[2267,2835,2836,2839,2841,2843],{"class":2269,"line":2293},[2267,2837,2838],{"class":2280},"  \"hr\"",[2267,2840,2170],{"class":2273},[2267,2842,2831],{"class":2280},[2267,2844,2290],{"class":2273},[2267,2846,2847,2850,2852,2854],{"class":2269,"line":2306},[2267,2848,2849],{"class":2280},"  \"mv\"",[2267,2851,2170],{"class":2273},[2267,2853,2831],{"class":2280},[2267,2855,2290],{"class":2273},[2267,2857,2858,2861,2863,2866],{"class":2269,"line":2319},[2267,2859,2860],{"class":2280},"  \"sc\"",[2267,2862,2170],{"class":2273},[2267,2864,2865],{"class":2280},"2",[2267,2867,2290],{"class":2273},[2267,2869,2870,2873,2875,2877],{"class":2269,"line":2330},[2267,2871,2872],{"class":2280},"  \"st\"",[2267,2874,2170],{"class":2273},[2267,2876,2831],{"class":2280},[2267,2878,2290],{"class":2273},[2267,2880,2881,2884,2886,2888],{"class":2269,"line":2462},[2267,2882,2883],{"class":2280},"  \"bso\"",[2267,2885,2170],{"class":2273},[2267,2887,2831],{"class":2280},[2267,2889,2290],{"class":2273},[2267,2891,2892,2895,2897,2900],{"class":2269,"line":2471},[2267,2893,2894],{"class":2280},"  \"bat\"",[2267,2896,2170],{"class":2273},[2267,2898,2899],{"class":2280},"100",[2267,2901,2290],{"class":2273},[2267,2903,2904,2907,2909,2911],{"class":2269,"line":2477},[2267,2905,2906],{"class":2280},"  \"btt\"",[2267,2908,2170],{"class":2273},[2267,2910,2831],{"class":2280},[2267,2912,2290],{"class":2273},[2267,2914,2915,2918,2920,2922],{"class":2269,"line":2485},[2267,2916,2917],{"class":2280},"  \"chg\"",[2267,2919,2170],{"class":2273},[2267,2921,2865],{"class":2280},[2267,2923,2290],{"class":2273},[2267,2925,2926,2929,2931,2933],{"class":2269,"line":2498},[2267,2927,2928],{"class":2280},"  \"aps\"",[2267,2930,2170],{"class":2273},[2267,2932,2831],{"class":2280},[2267,2934,2290],{"class":2273},[2267,2936,2937,2940,2942,2944],{"class":2269,"line":2511},[2267,2938,2939],{"class":2280},"  \"alrt\"",[2267,2941,2170],{"class":2273},[2267,2943,2831],{"class":2280},[2267,2945,2290],{"class":2273},[2267,2947,2948,2951,2953,2955],{"class":2269,"line":2524},[2267,2949,2950],{"class":2280},"  \"ota\"",[2267,2952,2170],{"class":2273},[2267,2954,2831],{"class":2280},[2267,2956,2290],{"class":2273},[2267,2958,2959,2962,2964,2967],{"class":2269,"line":2537},[2267,2960,2961],{"class":2280},"  \"srf\"",[2267,2963,2170],{"class":2273},[2267,2965,2966],{"class":2280},"1",[2267,2968,2290],{"class":2273},[2267,2970,2971,2974,2976,2979],{"class":2269,"line":2550},[2267,2972,2973],{"class":2280},"  \"rsi\"",[2267,2975,2170],{"class":2273},[2267,2977,2978],{"class":2280},"18",[2267,2980,2290],{"class":2273},[2267,2982,2983,2986,2988,2990],{"class":2269,"line":2563},[2267,2984,2985],{"class":2280},"  \"sb\"",[2267,2987,2170],{"class":2273},[2267,2989,2831],{"class":2280},[2267,2991,2290],{"class":2273},[2267,2993,2994,2997,2999,3001],{"class":2269,"line":2575},[2267,2995,2996],{"class":2280},"  \"ss\"",[2267,2998,2170],{"class":2273},[2267,3000,2831],{"class":2280},[2267,3002,2290],{"class":2273},[2267,3004,3005,3008,3010,3012],{"class":2269,"line":2586},[2267,3006,3007],{"class":2280},"  \"mvb\"",[2267,3009,2170],{"class":2273},[2267,3011,2831],{"class":2280},[2267,3013,2290],{"class":2273},[2267,3015,3016,3019,3021,3023],{"class":2269,"line":2592},[2267,3017,3018],{"class":2280},"  \"mst\"",[2267,3020,2170],{"class":2273},[2267,3022,2831],{"class":2280},[2267,3024,2290],{"class":2273},[2267,3026,3027,3030,3032,3035],{"class":2269,"line":2598},[2267,3028,3029],{"class":2280},"  \"oxta\"",[2267,3031,2170],{"class":2273},[2267,3033,3034],{"class":2280},"255",[2267,3036,2290],{"class":2273},[2267,3038,3039,3042,3044,3046],{"class":2269,"line":2604},[2267,3040,3041],{"class":2280},"  \"onm\"",[2267,3043,2170],{"class":2273},[2267,3045,2831],{"class":2280},[2267,3047,2290],{"class":2273},[2267,3049,3051,3054,3056,3059],{"class":2269,"line":3050},22,[2267,3052,3053],{"class":2280},"  \"bsb\"",[2267,3055,2170],{"class":2273},[2267,3057,3058],{"class":2280},"4",[2267,3060,2290],{"class":2273},[2267,3062,3064,3067,3069,3071],{"class":2269,"line":3063},23,[2267,3065,3066],{"class":2280},"  \"mrs\"",[2267,3068,2170],{"class":2273},[2267,3070,2831],{"class":2280},[2267,3072,2290],{"class":2273},[2267,3074,3076,3079,3081],{"class":2269,"line":3075},24,[2267,3077,3078],{"class":2280},"  \"hw\"",[2267,3080,2170],{"class":2273},[2267,3082,3083],{"class":2286},"\"obl\"\n",[2267,3085,3087],{"class":2269,"line":3086},25,[2267,3088,2333],{"class":2273},[1840,3090,3091],{},"Some of the keys are self-speaking while others are not clear. Due to the lack of documentation, I can only compare the values with the data from the original app to identify what is what. Also, the mentioned GitHub projects have some details from other users that were helping to understand the keys here.",[1840,3093,3094,3095,3098,3099,3102,3103,3106,3107,3110],{},"In our case, we are using ",[1868,3096,3097],{},"ox"," as the oxgenlevel, ",[1868,3100,3101],{},"hr"," as heartrate, ",[1868,3104,3105],{},"bat"," as battery level, and ",[1868,3108,3109],{},"st"," as the skin temperature.",[1860,3112,3114],{"id":3113},"saving-the-sensor-data","Saving the Sensor Data",[1840,3116,3117],{},"The last step within the Flow is to save the gathered data within the collection we've set up already. The payload of the create operation looks like this:",[2259,3119,3121],{"className":2261,"code":3120,"language":2263,"meta":24,"style":24},"{\n    \"raw_payload\": \"{{$last}}\",\n    \"oxygen\": \"{{$last.ox}}\",\n    \"heart_rate\": \"{{$last.hr}}\",\n    \"temperature\": \"{{$last.st}}\",\n    \"battery_level\": \"{{$last.bat}}\"\n}\n",[1868,3122,3123,3127,3139,3151,3163,3175,3185],{"__ignoreMap":24},[2267,3124,3125],{"class":2269,"line":2270},[2267,3126,2274],{"class":2273},[2267,3128,3129,3132,3134,3137],{"class":2269,"line":2277},[2267,3130,3131],{"class":2280},"    \"raw_payload\"",[2267,3133,2170],{"class":2273},[2267,3135,3136],{"class":2286},"\"{{$last}}\"",[2267,3138,2290],{"class":2273},[2267,3140,3141,3144,3146,3149],{"class":2269,"line":2293},[2267,3142,3143],{"class":2280},"    \"oxygen\"",[2267,3145,2170],{"class":2273},[2267,3147,3148],{"class":2286},"\"{{$last.ox}}\"",[2267,3150,2290],{"class":2273},[2267,3152,3153,3156,3158,3161],{"class":2269,"line":2306},[2267,3154,3155],{"class":2280},"    \"heart_rate\"",[2267,3157,2170],{"class":2273},[2267,3159,3160],{"class":2286},"\"{{$last.hr}}\"",[2267,3162,2290],{"class":2273},[2267,3164,3165,3168,3170,3173],{"class":2269,"line":2319},[2267,3166,3167],{"class":2280},"    \"temperature\"",[2267,3169,2170],{"class":2273},[2267,3171,3172],{"class":2286},"\"{{$last.st}}\"",[2267,3174,2290],{"class":2273},[2267,3176,3177,3180,3182],{"class":2269,"line":2330},[2267,3178,3179],{"class":2280},"    \"battery_level\"",[2267,3181,2170],{"class":2273},[2267,3183,3184],{"class":2286},"\"{{$last.bat}}\"\n",[2267,3186,3187],{"class":2269,"line":2462},[2267,3188,2333],{"class":2273},[1855,3190,3192],{"id":3191},"reporting","Reporting",[1860,3194,757],{"id":3195},"insights",[1840,3197,3198],{},"As the Insights module is built in Directus, you can create any report with the data just as you need it. In our case, we've created the following dashboard:",[1840,3200,3201],{},[3202,3203],"img",{"alt":3204,"src":3205},"An insights dashboard with three sections. Two of them render a time based graph for the heart rate, oxygen level, and temperature. Another section displays the latest senor data as well as the battery level.","/img/18585ae9-828a-4d11-8e22-06db6515907a.webp",[1840,3207,3208],{},"The dashboard is split into three sections, on the left, the last 30 minutes of data are displayed. On the right, you can select the amount of hours you'd like to review. This is done by a slide that is used as a global variable for the 3 charts underneath. In between, some stats are displayed, in detail, in the very last dataset for the oxygen level, heart rate, temperature and battery stats.",[1840,3210,3211],{},"All the charts are using the \"Time Series\" chart. The left side uses the default values for the data range of 30 minutes. For each measurement, the min and max values are set to render the most common values including some border values. The dynamic charts on the right are set up similarly.",[1840,3213,3214],{},"To achieve the dynamic time window, we have to create the \"Global Variable\" with the name 'last_x_hours' first:",[1840,3216,3217],{},[3202,3218],{"alt":3219,"src":3220},"Configuration screen of a global variable within the inisghts dashboard. Different settings for name, min, max values, or default can be set.","/img/9e204338-aa13-4463-b334-127abbd69366.webp",[1840,3222,3223],{},"Within the dynamic \"Time Series\" charts we can reuse the global variable by adding its name to the date range:",[1840,3225,3226],{},[3202,3227],{"alt":3228,"src":3229},"Usage of the syntax for variables within the dashboard panels.","/img/02d8a4a7-97cc-4690-8c14-2278be350a30.webp",[1840,3231,3232,3233,3236,3237,3240],{},"You can use the ",[1868,3234,3235],{},"{{…}}"," syntax, followed by a lower ",[1868,3238,3239],{},"h"," to identify the value that should work as hours. If you use the same variable for all three slides, they will change altogether once you've selected a new amount of hours within the global variable slider.",[1860,3242,3244],{"id":3243},"_3rd-party-alerting-integration","3rd Party Alerting Integration",[1840,3246,3247],{},"You can integrate this system with external services to get a robust alerting system and a handy quick view of the current status directly on my mobile phone.",[1860,3249,3251],{"id":3250},"creating-an-alert-item","Creating an Alert Item",[1840,3253,3254],{},"For the alerting system, we're using OpsGenie, usually used for system, infrastructure or app health status. But why not for the actual health use case?",[1840,3256,3257,3258,3260,3261,3263],{},"To build this, a new Flow listens to every created event within the ",[1868,3259,1870],{}," collection. Every new record in this collection is evaluated and under certain conditions, a new item is created within an additional collection called ",[1868,3262,2007],{},". The collection looks something like this to store all relevant data that OpsGenie can use:",[1840,3265,3266],{},[3202,3267],{"alt":3268,"src":3269},"Item view of an alert that is created once the battery level is reaching a low level.","/img/6ee06987-7338-412f-bca0-30b76a8b556a.webp",[1840,3271,3272],{},"The related Flow looks like this:",[1840,3274,3275],{},[3202,3276],{"alt":3277,"src":3278},"The complete Flow to create new alert items based on newly created sensor data items. After the trigger more data is read, evaluated within a Run Script operation and based on a condtion new alert items are created or not.","/img/6f659c8c-339e-407c-824d-e434a80d2acb.webp",[1840,3280,3281],{},"Within the Run Script operation the data is evaluated and based on the met conditions, the returning JSON is passed over to the next operation.",[1840,3283,3284,3285,2084],{},"To get more details about the API, please check the ",[1844,3286,3288],{"href":2081,"rel":3287},[1848],"official documentation for OpsGenie",[1840,3290,3291],{},"For checking the battery level the code looks like this:",[2259,3293,3295],{"className":2683,"code":3294,"language":2685,"meta":24,"style":24},"module.exports = async function(data) {\n    var rtn = {\n        \"create_alert\": false\n    }\n    if (data.$trigger.payload.battery_level \u003C 20) {\n        rtn.create_alert = true\n        rtn.alert_data = {\n            \"category\": \"battery\",\n            \"type\": \"info\",\n            \"severity\": \"mid\",\n            \"priority\": \"P3\",\n            \"alias\": \"Low Battery\",\n            \"message\": \"The battery is low. Right now it has \"+data.$trigger.payload.battery_level+\"%\",\n            \"description\": \"The battery is low. Right now it has \"+data.$trigger.payload.battery_level+\"%\"\n        }\n    }\n    // ...\n    return rtn;\n}\n",[1868,3296,3297,3317,3329,3339,3343,3358,3368,3377,3389,3401,3413,3425,3437,3460,3478,3483,3487,3492,3500],{"__ignoreMap":24},[2267,3298,3299,3301,3303,3305,3307,3309,3311,3313,3315],{"class":2269,"line":2270},[2267,3300,2692],{"class":2280},[2267,3302,2084],{"class":2273},[2267,3304,2697],{"class":2280},[2267,3306,2701],{"class":2700},[2267,3308,2704],{"class":2700},[2267,3310,2707],{"class":2700},[2267,3312,2710],{"class":2273},[2267,3314,2069],{"class":2713},[2267,3316,2716],{"class":2273},[2267,3318,3319,3322,3325,3327],{"class":2269,"line":2277},[2267,3320,3321],{"class":2700},"    var",[2267,3323,3324],{"class":2273}," rtn ",[2267,3326,2773],{"class":2700},[2267,3328,2743],{"class":2273},[2267,3330,3331,3334,3336],{"class":2269,"line":2293},[2267,3332,3333],{"class":2286},"        \"create_alert\"",[2267,3335,2170],{"class":2273},[2267,3337,3338],{"class":2280},"false\n",[2267,3340,3341],{"class":2269,"line":2306},[2267,3342,2595],{"class":2273},[2267,3344,3345,3347,3350,3353,3356],{"class":2269,"line":2319},[2267,3346,2748],{"class":2700},[2267,3348,3349],{"class":2273}," (data.$trigger.payload.battery_level ",[2267,3351,3352],{"class":2700},"\u003C",[2267,3354,3355],{"class":2280}," 20",[2267,3357,2716],{"class":2273},[2267,3359,3360,3363,3365],{"class":2269,"line":2330},[2267,3361,3362],{"class":2273},"        rtn.create_alert ",[2267,3364,2773],{"class":2700},[2267,3366,3367],{"class":2280}," true\n",[2267,3369,3370,3373,3375],{"class":2269,"line":2462},[2267,3371,3372],{"class":2273},"        rtn.alert_data ",[2267,3374,2773],{"class":2700},[2267,3376,2743],{"class":2273},[2267,3378,3379,3382,3384,3387],{"class":2269,"line":2471},[2267,3380,3381],{"class":2286},"            \"category\"",[2267,3383,2170],{"class":2273},[2267,3385,3386],{"class":2286},"\"battery\"",[2267,3388,2290],{"class":2273},[2267,3390,3391,3394,3396,3399],{"class":2269,"line":2477},[2267,3392,3393],{"class":2286},"            \"type\"",[2267,3395,2170],{"class":2273},[2267,3397,3398],{"class":2286},"\"info\"",[2267,3400,2290],{"class":2273},[2267,3402,3403,3406,3408,3411],{"class":2269,"line":2485},[2267,3404,3405],{"class":2286},"            \"severity\"",[2267,3407,2170],{"class":2273},[2267,3409,3410],{"class":2286},"\"mid\"",[2267,3412,2290],{"class":2273},[2267,3414,3415,3418,3420,3423],{"class":2269,"line":2498},[2267,3416,3417],{"class":2286},"            \"priority\"",[2267,3419,2170],{"class":2273},[2267,3421,3422],{"class":2286},"\"P3\"",[2267,3424,2290],{"class":2273},[2267,3426,3427,3430,3432,3435],{"class":2269,"line":2511},[2267,3428,3429],{"class":2286},"            \"alias\"",[2267,3431,2170],{"class":2273},[2267,3433,3434],{"class":2286},"\"Low Battery\"",[2267,3436,2290],{"class":2273},[2267,3438,3439,3442,3444,3447,3450,3453,3455,3458],{"class":2269,"line":2524},[2267,3440,3441],{"class":2286},"            \"message\"",[2267,3443,2170],{"class":2273},[2267,3445,3446],{"class":2286},"\"The battery is low. Right now it has \"",[2267,3448,3449],{"class":2700},"+",[2267,3451,3452],{"class":2273},"data.$trigger.payload.battery_level",[2267,3454,3449],{"class":2700},[2267,3456,3457],{"class":2286},"\"%\"",[2267,3459,2290],{"class":2273},[2267,3461,3462,3465,3467,3469,3471,3473,3475],{"class":2269,"line":2537},[2267,3463,3464],{"class":2286},"            \"description\"",[2267,3466,2170],{"class":2273},[2267,3468,3446],{"class":2286},[2267,3470,3449],{"class":2700},[2267,3472,3452],{"class":2273},[2267,3474,3449],{"class":2700},[2267,3476,3477],{"class":2286},"\"%\"\n",[2267,3479,3480],{"class":2269,"line":2550},[2267,3481,3482],{"class":2273},"        }\n",[2267,3484,3485],{"class":2269,"line":2563},[2267,3486,2595],{"class":2273},[2267,3488,3489],{"class":2269,"line":2575},[2267,3490,3491],{"class":2764},"    // ...\n",[2267,3493,3494,3497],{"class":2269,"line":2586},[2267,3495,3496],{"class":2700},"    return",[2267,3498,3499],{"class":2273}," rtn;\n",[2267,3501,3502],{"class":2269,"line":2592},[2267,3503,2333],{"class":2273},[1840,3505,3506,3507,3510,3511,3513,3514,3516],{},"The next Condition Operation within the Flow checks the value of ",[1868,3508,3509],{},"create_alert"," and either stops here if ",[1868,3512,2519],{}," or passes the data to the final Create operation if set to ",[1868,3515,2532],{},". This can be done easily by the following condition rule:",[2259,3518,3520],{"className":2261,"code":3519,"language":2263,"meta":24,"style":24},"{\n    \"$last\": {\n        \"create_alert\": {\n            \"_eq\": true\n        }\n    }\n}\n",[1868,3521,3522,3526,3533,3539,3549,3553,3557],{"__ignoreMap":24},[2267,3523,3524],{"class":2269,"line":2270},[2267,3525,2274],{"class":2273},[2267,3527,3528,3531],{"class":2269,"line":2277},[2267,3529,3530],{"class":2280},"    \"$last\"",[2267,3532,2448],{"class":2273},[2267,3534,3535,3537],{"class":2269,"line":2293},[2267,3536,3333],{"class":2280},[2267,3538,2448],{"class":2273},[2267,3540,3541,3544,3546],{"class":2269,"line":2306},[2267,3542,3543],{"class":2280},"            \"_eq\"",[2267,3545,2170],{"class":2273},[2267,3547,3548],{"class":2280},"true\n",[2267,3550,3551],{"class":2269,"line":2319},[2267,3552,3482],{"class":2273},[2267,3554,3555],{"class":2269,"line":2330},[2267,3556,2595],{"class":2273},[2267,3558,3559],{"class":2269,"line":2462},[2267,3560,2333],{"class":2273},[1840,3562,3563],{},"You can build in several other logic like checking if there is an open alert already and stuff like this. To keep it simple we're skipping this at the moment. (And trust OpsGenie to not raise two alerts for the same incoming data)",[1840,3565,3566],{},"Within the create operation, the following payload is used to create the OpenGenie Alert item:",[2259,3568,3570],{"className":2261,"code":3569,"language":2263,"meta":24,"style":24},"{\n    \"category\": \"{{exec_alert_logic.alert_data.category}}\",\n    \"type\": \"{{exec_alert_logic.alert_data.type}}\",\n    \"severity\": \"{{exec_alert_logic.alert_data.severity}}\",\n    \"priority\": \"{{exec_alert_logic.alert_data.priority}}\",\n    \"alias\": \"{{exec_alert_logic.alert_data.alias}}\",\n    \"message\": \"{{exec_alert_logic.alert_data.message}}\",\n    \"description\": \"{{exec_alert_logic.alert_data.description}}\"\n}\n",[1868,3571,3572,3576,3588,3600,3612,3624,3636,3648,3658],{"__ignoreMap":24},[2267,3573,3574],{"class":2269,"line":2270},[2267,3575,2274],{"class":2273},[2267,3577,3578,3581,3583,3586],{"class":2269,"line":2277},[2267,3579,3580],{"class":2280},"    \"category\"",[2267,3582,2170],{"class":2273},[2267,3584,3585],{"class":2286},"\"{{exec_alert_logic.alert_data.category}}\"",[2267,3587,2290],{"class":2273},[2267,3589,3590,3593,3595,3598],{"class":2269,"line":2293},[2267,3591,3592],{"class":2280},"    \"type\"",[2267,3594,2170],{"class":2273},[2267,3596,3597],{"class":2286},"\"{{exec_alert_logic.alert_data.type}}\"",[2267,3599,2290],{"class":2273},[2267,3601,3602,3605,3607,3610],{"class":2269,"line":2306},[2267,3603,3604],{"class":2280},"    \"severity\"",[2267,3606,2170],{"class":2273},[2267,3608,3609],{"class":2286},"\"{{exec_alert_logic.alert_data.severity}}\"",[2267,3611,2290],{"class":2273},[2267,3613,3614,3617,3619,3622],{"class":2269,"line":2319},[2267,3615,3616],{"class":2280},"    \"priority\"",[2267,3618,2170],{"class":2273},[2267,3620,3621],{"class":2286},"\"{{exec_alert_logic.alert_data.priority}}\"",[2267,3623,2290],{"class":2273},[2267,3625,3626,3629,3631,3634],{"class":2269,"line":2330},[2267,3627,3628],{"class":2280},"    \"alias\"",[2267,3630,2170],{"class":2273},[2267,3632,3633],{"class":2286},"\"{{exec_alert_logic.alert_data.alias}}\"",[2267,3635,2290],{"class":2273},[2267,3637,3638,3641,3643,3646],{"class":2269,"line":2462},[2267,3639,3640],{"class":2280},"    \"message\"",[2267,3642,2170],{"class":2273},[2267,3644,3645],{"class":2286},"\"{{exec_alert_logic.alert_data.message}}\"",[2267,3647,2290],{"class":2273},[2267,3649,3650,3653,3655],{"class":2269,"line":2471},[2267,3651,3652],{"class":2280},"    \"description\"",[2267,3654,2170],{"class":2273},[2267,3656,3657],{"class":2286},"\"{{exec_alert_logic.alert_data.description}}\"\n",[2267,3659,3660],{"class":2269,"line":2477},[2267,3661,2333],{"class":2273},[3663,3664,3666],"h4",{"id":3665},"escalating-to-opsgenie","Escalating to OpsGenie",[1840,3668,3669],{},"Once the alert is created within Directus, of course, it has to be created within OpsGenie as well. For this – again a new Flow is needed. This time we have to use the Timeout operation as OpsGenie queues all incoming requests and does not provide the result immediately.",[1840,3671,3672],{},[3202,3673],{"alt":3674,"src":3675},"A Flow that posts data to the OpsGenie API, sleeps for some time and read out the newly created alert, once OpsGenie fulfilled the initial request. The external alert ID is entered into the related item wihtin Directus.","/img/07db9384-e4f9-4ffa-8740-fa3d944f3eb9.webp",[1840,3677,3678],{},"Once triggered, we read out all the data first and pass the needed data to the OpsGenie API with a user key and the JSON data from the alert collection. As the API does not return the actual result but only an ID of the incoming task, we now wait 2 seconds before requesting the current status of our queued task with the 2nd web request. The request URL gets the returning ID from the first web request:",[1840,3680,3681],{},[3202,3682],{"alt":3683,"src":3684},"A simple GET webrequest with a dynamic value as part of the request URL. The values is using data from another Flow operation and accessed by using the mustache syntax.","/img/e5ca10c2-3072-49e1-809c-276636623212.webp",[1840,3686,3687],{},"This request will return the current status and therefore all the data (including an ID) of this alert. With the update operation, we saved the alert ID to be able to refer to the OpsGenie alert if needed.",[1840,3689,3690],{},"In the moment an actual alert is created within OpsGenie, any connected system is yelling for attention, just as configured in the tool.",[1840,3692,3693],{},"If Directus tries to create a new alert with the same data (in case the battery or oxygen level is still on the same level) no new alert is created by the design of OpsGenie. But it's hard to miss any alert as it sends SMS, critical push notifications, or even calling a phone number if needed and no reaction is noticed.",[1855,3695,3697],{"id":3696},"build-an-ios-widget","Build an iOS Widget",[1840,3699,3700],{},"As a last method of reporting and integration Directus, we can create an iOS widget, that sits right on my lock and home screen. As this is not about iOS development we chose the easy way and used Scriptable for this. This free app can be used to run JavaScript and display the data as a widget. The only downside of these Scriptable widgets is, that iOS decides WHEN to update the content of the widget. So you can not force the widget to reload actively. This is a limitation to prevent battery drainage and high load due to the demanding JavaScript. Usually, the script runs every 1 to 15 minutes. To know how \"outdated\" the displayed data is, we've added the create-timestamp as part of the widgets.",[1840,3702,3703,3704,3707,3708,3710],{},"For the Directus integration this time I have created a new role that can have view access to the data collection only. A user in this role has set a static token that I can use within the widget. Using the query parameter ",[1868,3705,3706],{},"limit"," and ",[1868,3709,1874],{}," I can define to get only the very last entry sorted by the create date column.",[2259,3712,3714],{"className":2683,"code":3713,"language":2685,"meta":24,"style":24},"const url = \"https://my-directus.app/items/sensor_data?limit=1&sort=sort,-date_created\"\nconst token = \"xy-my-static-token\"\nasync function getData(url) {\n  let request = new Request(url);\n  let authHeader = \"Bearer \" + token\n  request.headers = { \"Authorization\": authHeader }\n\n  let data = await request.loadJSON();\n  return data;\n}\nfunction processData(data) {\n  console.log(data)\n  let processedData = {\n    \"placement\": data.data[0].placement,\n    \"battery\": {\n      \"level\": data.data[0].battery_level,\n      \"state\": data.data[0].battery_state\n    },\n    \"termal\": {\n      \"state\": \"\",\n      \"value\": data.data[0].temperature\n    },\n    \"oxygen\": {\n      \"state\": \"\",\n      \"value\": data.data[0].oxygen\n    },\n    \"heart_rate\": {\n      \"state\": \"\",\n      \"value\": data.data[0].heart_rate\n    },\n    \"reldate\": new RelativeDateTimeFormatter().string(new Date(data.data[0].date_created), new Date()),\n    \"datecreated\":\n      new Date(data.data[0].date_created).getHours() + \":\" +\n      String(new Date(data.data[0].date_created).getMinutes()).padStart(2, \"0\")\n  }\n\n  return processedData;\n}\nfunction createWidget(data) {\n  var widget = new ListWidget();\n  console.log(data.placement);\n  switch (data.placement) {\n    case 4:  // Charging\n      var text = widget.addText(\"⚡️ \" + data.battery.level + \"% …\");\n      break;\n    case \"2\":\n      break;\n    default:\n      var text = widget.addText(\"🌡️ \" + data.termal.value + \"°C\");\n      var text = widget.addText(\"🫧 \" + data.oxygen.value + \" ♥️ \" + data.heart_rate.value);\n      break;\n  }\n  var text = widget.addText(data.datecreated);\n  text.font = Font.regularRoundedSystemFont(12);\n  return widget;\n}\nlet data = await getData(url);\nlet processedData = processData(data);\nlet widget = await createWidget(processedData);\nScript.setWidget(widget);\nScript.complete()\n",[1868,3715,3716,3729,3741,3758,3776,3794,3810,3816,3837,3844,3848,3862,3873,3884,3897,3904,3916,3928,3933,3940,3951,3963,3967,3973,3983,3994,3999,4006,4017,4029,4034,4076,4085,4114,4153,4159,4164,4172,4177,4191,4209,4219,4228,4243,4278,4287,4297,4304,4312,4342,4375,4382,4387,4403,4424,4432,4437,4453,4467,4483,4495],{"__ignoreMap":24},[2267,3717,3718,3721,3724,3726],{"class":2269,"line":2270},[2267,3719,3720],{"class":2700},"const",[2267,3722,3723],{"class":2280}," url",[2267,3725,2701],{"class":2700},[2267,3727,3728],{"class":2286}," \"https://my-directus.app/items/sensor_data?limit=1&sort=sort,-date_created\"\n",[2267,3730,3731,3733,3736,3738],{"class":2269,"line":2277},[2267,3732,3720],{"class":2700},[2267,3734,3735],{"class":2280}," token",[2267,3737,2701],{"class":2700},[2267,3739,3740],{"class":2286}," \"xy-my-static-token\"\n",[2267,3742,3743,3746,3748,3751,3753,3756],{"class":2269,"line":2293},[2267,3744,3745],{"class":2700},"async",[2267,3747,2707],{"class":2700},[2267,3749,3750],{"class":2732}," getData",[2267,3752,2710],{"class":2273},[2267,3754,3755],{"class":2713},"url",[2267,3757,2716],{"class":2273},[2267,3759,3760,3762,3765,3767,3770,3773],{"class":2269,"line":2306},[2267,3761,2721],{"class":2700},[2267,3763,3764],{"class":2273}," request ",[2267,3766,2773],{"class":2700},[2267,3768,3769],{"class":2700}," new",[2267,3771,3772],{"class":2732}," Request",[2267,3774,3775],{"class":2273},"(url);\n",[2267,3777,3778,3780,3783,3785,3788,3791],{"class":2269,"line":2319},[2267,3779,2721],{"class":2700},[2267,3781,3782],{"class":2273}," authHeader ",[2267,3784,2773],{"class":2700},[2267,3786,3787],{"class":2286}," \"Bearer \"",[2267,3789,3790],{"class":2700}," +",[2267,3792,3793],{"class":2273}," token\n",[2267,3795,3796,3799,3801,3804,3807],{"class":2269,"line":2330},[2267,3797,3798],{"class":2273},"  request.headers ",[2267,3800,2773],{"class":2700},[2267,3802,3803],{"class":2273}," { ",[2267,3805,3806],{"class":2286},"\"Authorization\"",[2267,3808,3809],{"class":2273},": authHeader }\n",[2267,3811,3812],{"class":2269,"line":2462},[2267,3813,3815],{"emptyLinePlaceholder":3814},true,"\n",[2267,3817,3818,3820,3823,3825,3828,3831,3834],{"class":2269,"line":2471},[2267,3819,2721],{"class":2700},[2267,3821,3822],{"class":2273}," data ",[2267,3824,2773],{"class":2700},[2267,3826,3827],{"class":2700}," await",[2267,3829,3830],{"class":2273}," request.",[2267,3832,3833],{"class":2732},"loadJSON",[2267,3835,3836],{"class":2273},"();\n",[2267,3838,3839,3841],{"class":2269,"line":2477},[2267,3840,2798],{"class":2700},[2267,3842,3843],{"class":2273}," data;\n",[2267,3845,3846],{"class":2269,"line":2485},[2267,3847,2333],{"class":2273},[2267,3849,3850,3853,3856,3858,3860],{"class":2269,"line":2498},[2267,3851,3852],{"class":2700},"function",[2267,3854,3855],{"class":2732}," processData",[2267,3857,2710],{"class":2273},[2267,3859,2069],{"class":2713},[2267,3861,2716],{"class":2273},[2267,3863,3864,3867,3870],{"class":2269,"line":2511},[2267,3865,3866],{"class":2273},"  console.",[2267,3868,3869],{"class":2732},"log",[2267,3871,3872],{"class":2273},"(data)\n",[2267,3874,3875,3877,3880,3882],{"class":2269,"line":2524},[2267,3876,2721],{"class":2700},[2267,3878,3879],{"class":2273}," processedData ",[2267,3881,2773],{"class":2700},[2267,3883,2743],{"class":2273},[2267,3885,3886,3889,3892,3894],{"class":2269,"line":2537},[2267,3887,3888],{"class":2286},"    \"placement\"",[2267,3890,3891],{"class":2273},": data.data[",[2267,3893,2831],{"class":2280},[2267,3895,3896],{"class":2273},"].placement,\n",[2267,3898,3899,3902],{"class":2269,"line":2550},[2267,3900,3901],{"class":2286},"    \"battery\"",[2267,3903,2448],{"class":2273},[2267,3905,3906,3909,3911,3913],{"class":2269,"line":2563},[2267,3907,3908],{"class":2286},"      \"level\"",[2267,3910,3891],{"class":2273},[2267,3912,2831],{"class":2280},[2267,3914,3915],{"class":2273},"].battery_level,\n",[2267,3917,3918,3921,3923,3925],{"class":2269,"line":2575},[2267,3919,3920],{"class":2286},"      \"state\"",[2267,3922,3891],{"class":2273},[2267,3924,2831],{"class":2280},[2267,3926,3927],{"class":2273},"].battery_state\n",[2267,3929,3930],{"class":2269,"line":2586},[2267,3931,3932],{"class":2273},"    },\n",[2267,3934,3935,3938],{"class":2269,"line":2592},[2267,3936,3937],{"class":2286},"    \"termal\"",[2267,3939,2448],{"class":2273},[2267,3941,3942,3944,3946,3949],{"class":2269,"line":2598},[2267,3943,3920],{"class":2286},[2267,3945,2170],{"class":2273},[2267,3947,3948],{"class":2286},"\"\"",[2267,3950,2290],{"class":2273},[2267,3952,3953,3956,3958,3960],{"class":2269,"line":2604},[2267,3954,3955],{"class":2286},"      \"value\"",[2267,3957,3891],{"class":2273},[2267,3959,2831],{"class":2280},[2267,3961,3962],{"class":2273},"].temperature\n",[2267,3964,3965],{"class":2269,"line":3050},[2267,3966,3932],{"class":2273},[2267,3968,3969,3971],{"class":2269,"line":3063},[2267,3970,3143],{"class":2286},[2267,3972,2448],{"class":2273},[2267,3974,3975,3977,3979,3981],{"class":2269,"line":3075},[2267,3976,3920],{"class":2286},[2267,3978,2170],{"class":2273},[2267,3980,3948],{"class":2286},[2267,3982,2290],{"class":2273},[2267,3984,3985,3987,3989,3991],{"class":2269,"line":3086},[2267,3986,3955],{"class":2286},[2267,3988,3891],{"class":2273},[2267,3990,2831],{"class":2280},[2267,3992,3993],{"class":2273},"].oxygen\n",[2267,3995,3997],{"class":2269,"line":3996},26,[2267,3998,3932],{"class":2273},[2267,4000,4002,4004],{"class":2269,"line":4001},27,[2267,4003,3155],{"class":2286},[2267,4005,2448],{"class":2273},[2267,4007,4009,4011,4013,4015],{"class":2269,"line":4008},28,[2267,4010,3920],{"class":2286},[2267,4012,2170],{"class":2273},[2267,4014,3948],{"class":2286},[2267,4016,2290],{"class":2273},[2267,4018,4020,4022,4024,4026],{"class":2269,"line":4019},29,[2267,4021,3955],{"class":2286},[2267,4023,3891],{"class":2273},[2267,4025,2831],{"class":2280},[2267,4027,4028],{"class":2273},"].heart_rate\n",[2267,4030,4032],{"class":2269,"line":4031},30,[2267,4033,3932],{"class":2273},[2267,4035,4037,4040,4042,4045,4048,4051,4054,4056,4058,4061,4064,4066,4069,4071,4073],{"class":2269,"line":4036},31,[2267,4038,4039],{"class":2286},"    \"reldate\"",[2267,4041,2170],{"class":2273},[2267,4043,4044],{"class":2700},"new",[2267,4046,4047],{"class":2732}," RelativeDateTimeFormatter",[2267,4049,4050],{"class":2273},"().",[2267,4052,4053],{"class":2732},"string",[2267,4055,2710],{"class":2273},[2267,4057,4044],{"class":2700},[2267,4059,4060],{"class":2732}," Date",[2267,4062,4063],{"class":2273},"(data.data[",[2267,4065,2831],{"class":2280},[2267,4067,4068],{"class":2273},"].date_created), ",[2267,4070,4044],{"class":2700},[2267,4072,4060],{"class":2732},[2267,4074,4075],{"class":2273},"()),\n",[2267,4077,4079,4082],{"class":2269,"line":4078},32,[2267,4080,4081],{"class":2286},"    \"datecreated\"",[2267,4083,4084],{"class":2273},":\n",[2267,4086,4088,4091,4093,4095,4097,4100,4103,4106,4108,4111],{"class":2269,"line":4087},33,[2267,4089,4090],{"class":2700},"      new",[2267,4092,4060],{"class":2732},[2267,4094,4063],{"class":2273},[2267,4096,2831],{"class":2280},[2267,4098,4099],{"class":2273},"].date_created).",[2267,4101,4102],{"class":2732},"getHours",[2267,4104,4105],{"class":2273},"() ",[2267,4107,3449],{"class":2700},[2267,4109,4110],{"class":2286}," \":\"",[2267,4112,4113],{"class":2700}," +\n",[2267,4115,4117,4120,4122,4124,4126,4128,4130,4132,4135,4138,4141,4143,4145,4147,4150],{"class":2269,"line":4116},34,[2267,4118,4119],{"class":2732},"      String",[2267,4121,2710],{"class":2273},[2267,4123,4044],{"class":2700},[2267,4125,4060],{"class":2732},[2267,4127,4063],{"class":2273},[2267,4129,2831],{"class":2280},[2267,4131,4099],{"class":2273},[2267,4133,4134],{"class":2732},"getMinutes",[2267,4136,4137],{"class":2273},"()).",[2267,4139,4140],{"class":2732},"padStart",[2267,4142,2710],{"class":2273},[2267,4144,2865],{"class":2280},[2267,4146,1875],{"class":2273},[2267,4148,4149],{"class":2286},"\"0\"",[2267,4151,4152],{"class":2273},")\n",[2267,4154,4156],{"class":2269,"line":4155},35,[2267,4157,4158],{"class":2273},"  }\n",[2267,4160,4162],{"class":2269,"line":4161},36,[2267,4163,3815],{"emptyLinePlaceholder":3814},[2267,4165,4167,4169],{"class":2269,"line":4166},37,[2267,4168,2798],{"class":2700},[2267,4170,4171],{"class":2273}," processedData;\n",[2267,4173,4175],{"class":2269,"line":4174},38,[2267,4176,2333],{"class":2273},[2267,4178,4180,4182,4185,4187,4189],{"class":2269,"line":4179},39,[2267,4181,3852],{"class":2700},[2267,4183,4184],{"class":2732}," createWidget",[2267,4186,2710],{"class":2273},[2267,4188,2069],{"class":2713},[2267,4190,2716],{"class":2273},[2267,4192,4194,4197,4200,4202,4204,4207],{"class":2269,"line":4193},40,[2267,4195,4196],{"class":2700},"  var",[2267,4198,4199],{"class":2273}," widget ",[2267,4201,2773],{"class":2700},[2267,4203,3769],{"class":2700},[2267,4205,4206],{"class":2732}," ListWidget",[2267,4208,3836],{"class":2273},[2267,4210,4212,4214,4216],{"class":2269,"line":4211},41,[2267,4213,3866],{"class":2273},[2267,4215,3869],{"class":2732},[2267,4217,4218],{"class":2273},"(data.placement);\n",[2267,4220,4222,4225],{"class":2269,"line":4221},42,[2267,4223,4224],{"class":2700},"  switch",[2267,4226,4227],{"class":2273}," (data.placement) {\n",[2267,4229,4231,4234,4237,4240],{"class":2269,"line":4230},43,[2267,4232,4233],{"class":2700},"    case",[2267,4235,4236],{"class":2280}," 4",[2267,4238,4239],{"class":2273},":  ",[2267,4241,4242],{"class":2764},"// Charging\n",[2267,4244,4246,4249,4252,4254,4257,4260,4262,4265,4267,4270,4272,4275],{"class":2269,"line":4245},44,[2267,4247,4248],{"class":2700},"      var",[2267,4250,4251],{"class":2273}," text ",[2267,4253,2773],{"class":2700},[2267,4255,4256],{"class":2273}," widget.",[2267,4258,4259],{"class":2732},"addText",[2267,4261,2710],{"class":2273},[2267,4263,4264],{"class":2286},"\"⚡️ \"",[2267,4266,3790],{"class":2700},[2267,4268,4269],{"class":2273}," data.battery.level ",[2267,4271,3449],{"class":2700},[2267,4273,4274],{"class":2286}," \"% …\"",[2267,4276,4277],{"class":2273},");\n",[2267,4279,4281,4284],{"class":2269,"line":4280},45,[2267,4282,4283],{"class":2700},"      break",[2267,4285,4286],{"class":2273},";\n",[2267,4288,4290,4292,4295],{"class":2269,"line":4289},46,[2267,4291,4233],{"class":2700},[2267,4293,4294],{"class":2286}," \"2\"",[2267,4296,4084],{"class":2273},[2267,4298,4300,4302],{"class":2269,"line":4299},47,[2267,4301,4283],{"class":2700},[2267,4303,4286],{"class":2273},[2267,4305,4307,4310],{"class":2269,"line":4306},48,[2267,4308,4309],{"class":2700},"    default",[2267,4311,4084],{"class":2273},[2267,4313,4315,4317,4319,4321,4323,4325,4327,4330,4332,4335,4337,4340],{"class":2269,"line":4314},49,[2267,4316,4248],{"class":2700},[2267,4318,4251],{"class":2273},[2267,4320,2773],{"class":2700},[2267,4322,4256],{"class":2273},[2267,4324,4259],{"class":2732},[2267,4326,2710],{"class":2273},[2267,4328,4329],{"class":2286},"\"🌡️ \"",[2267,4331,3790],{"class":2700},[2267,4333,4334],{"class":2273}," data.termal.value ",[2267,4336,3449],{"class":2700},[2267,4338,4339],{"class":2286}," \"°C\"",[2267,4341,4277],{"class":2273},[2267,4343,4345,4347,4349,4351,4353,4355,4357,4360,4362,4365,4367,4370,4372],{"class":2269,"line":4344},50,[2267,4346,4248],{"class":2700},[2267,4348,4251],{"class":2273},[2267,4350,2773],{"class":2700},[2267,4352,4256],{"class":2273},[2267,4354,4259],{"class":2732},[2267,4356,2710],{"class":2273},[2267,4358,4359],{"class":2286},"\"🫧 \"",[2267,4361,3790],{"class":2700},[2267,4363,4364],{"class":2273}," data.oxygen.value ",[2267,4366,3449],{"class":2700},[2267,4368,4369],{"class":2286}," \" ♥️ \"",[2267,4371,3790],{"class":2700},[2267,4373,4374],{"class":2273}," data.heart_rate.value);\n",[2267,4376,4378,4380],{"class":2269,"line":4377},51,[2267,4379,4283],{"class":2700},[2267,4381,4286],{"class":2273},[2267,4383,4385],{"class":2269,"line":4384},52,[2267,4386,4158],{"class":2273},[2267,4388,4390,4392,4394,4396,4398,4400],{"class":2269,"line":4389},53,[2267,4391,4196],{"class":2700},[2267,4393,4251],{"class":2273},[2267,4395,2773],{"class":2700},[2267,4397,4256],{"class":2273},[2267,4399,4259],{"class":2732},[2267,4401,4402],{"class":2273},"(data.datecreated);\n",[2267,4404,4406,4409,4411,4414,4417,4419,4422],{"class":2269,"line":4405},54,[2267,4407,4408],{"class":2273},"  text.font ",[2267,4410,2773],{"class":2700},[2267,4412,4413],{"class":2273}," Font.",[2267,4415,4416],{"class":2732},"regularRoundedSystemFont",[2267,4418,2710],{"class":2273},[2267,4420,4421],{"class":2280},"12",[2267,4423,4277],{"class":2273},[2267,4425,4427,4429],{"class":2269,"line":4426},55,[2267,4428,2798],{"class":2700},[2267,4430,4431],{"class":2273}," widget;\n",[2267,4433,4435],{"class":2269,"line":4434},56,[2267,4436,2333],{"class":2273},[2267,4438,4440,4443,4445,4447,4449,4451],{"class":2269,"line":4439},57,[2267,4441,4442],{"class":2700},"let",[2267,4444,3822],{"class":2273},[2267,4446,2773],{"class":2700},[2267,4448,3827],{"class":2700},[2267,4450,3750],{"class":2732},[2267,4452,3775],{"class":2273},[2267,4454,4456,4458,4460,4462,4464],{"class":2269,"line":4455},58,[2267,4457,4442],{"class":2700},[2267,4459,3879],{"class":2273},[2267,4461,2773],{"class":2700},[2267,4463,3855],{"class":2732},[2267,4465,4466],{"class":2273},"(data);\n",[2267,4468,4470,4472,4474,4476,4478,4480],{"class":2269,"line":4469},59,[2267,4471,4442],{"class":2700},[2267,4473,4199],{"class":2273},[2267,4475,2773],{"class":2700},[2267,4477,3827],{"class":2700},[2267,4479,4184],{"class":2732},[2267,4481,4482],{"class":2273},"(processedData);\n",[2267,4484,4486,4489,4492],{"class":2269,"line":4485},60,[2267,4487,4488],{"class":2273},"Script.",[2267,4490,4491],{"class":2732},"setWidget",[2267,4493,4494],{"class":2273},"(widget);\n",[2267,4496,4498,4500,4503],{"class":2269,"line":4497},61,[2267,4499,4488],{"class":2273},[2267,4501,4502],{"class":2732},"complete",[2267,4504,4505],{"class":2273},"()\n",[1840,4507,4508],{},"In the end, the widget would look like this. In case the wearable is charging, the current battery level is displayed.",[1840,4510,4511],{},[3202,4512],{"alt":4513,"src":4514},"Screenshot of an smartphone lockscreen that shows the latest health data provided by the Directus backend. Small icons are used to identify which value stands for which senor data. A timestamp is underneath.","/img/6f5d1ae4-96bc-4599-8d81-85f6a2e86ee3.jpg",[1855,4516,4518],{"id":4517},"summary","Summary",[1840,4520,4521],{},"And Voila, you've successfully built your monitoring system by using Directus. In this post, we covered how to set up the needed Collections to store data from an external API using Flows, worked with the data to further integrate the collected data into third-party tools and built our reporting Dashboard directly within Directus using Insights as well as display the latest data on our mobile phone.",[4523,4524,4525],"style",{},"html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sPrNH, html code.shiki .sPrNH{--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":24,"searchDepth":2270,"depth":2277,"links":4527},[4528,4532,4537,4542,4543],{"id":1857,"depth":2277,"text":1858,"children":4529},[4530,4531],{"id":1862,"depth":2293,"text":1863},{"id":1997,"depth":2293,"text":1998},{"id":2087,"depth":2277,"text":2088,"children":4533},[4534,4535,4536],{"id":2123,"depth":2293,"text":2124},{"id":2339,"depth":2293,"text":2340},{"id":3113,"depth":2293,"text":3114},{"id":3191,"depth":2277,"text":3192,"children":4538},[4539,4540,4541],{"id":3195,"depth":2293,"text":757},{"id":3243,"depth":2293,"text":3244},{"id":3250,"depth":2293,"text":3251},{"id":3696,"depth":2277,"text":3697},{"id":4517,"depth":2277,"text":4518},"md",{"slug":4546},"use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie","---\nid: 2aa59541-f1aa-4b2e-bdc4-64fa74d4af83\nslug: use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie\ntitle: Use Directus as a Baby Health Tracker with Owlet and OpsGenie\nauthors:\n  - name: Andreas Morgner\n    title: Guest Author\ndescription: Learn how to integrate Directus with hardware sensors and incident repsonse systems.\n---\nI have a baby and like many parents rely on monitors and sensors to make sure they're ok. In this article, we will explore Directus as a backend for a smart wearable device, and how to extend the functionality of the the apps shipped with the device. I personally use the [Owlet Smart Sock](https://owletcare.com/products/owlet-smart-sock), but the approaches covered in this article can be adapted for many other sensors.\n\nWe will cover data model configuration, how to grab data from the wearable using Directus Automate, and how to integrate Directus into 3rd party tools for reporting, such as OpsGenie and screen widgets on an iPhone.\n\n## Creating Collections\n\n### Sensor Data Collection\n\nAs we want to track sensor data over time, we will frequently pull the data with some details from the external API. Create a collection called `sensor_data` with a auto-generated UUID as an ID. Allow Directus to create `sort`, `status`, and `date_created` fields as well.\nFor each element of the data provided by the sensor, we want to save these values. Depending on the used sensor, you may come up with a different set of fields. In our case we've created the following important additional fields:\n\n| Field name | Interface | Comment |\n| ---- | ---- | ---- |\n| raw_payload | Code | We use this to store the JSON payload that we gather from the external API for debugging purposes. |\n| temperature | Input, Decimal | Plain value from the sensor data. |\n| oxygen | Input, Decimal | Plain value from the sensor data. |\n| heart_rate | Input, Decimal | Plain value from the sensor data. |\n| battery_level | Input, Integer | Plain value from the sensor data. |\n| battery_status | Dropdown | To evaluate the sensor data. |\n| heart_status | Dropdown | To evaluate the sensor data. |\n| oxygen_state | Dropdown | To evaluate the sensor data. |\n| thermal_state | Dropdown | To evaluate the sensor data. |\n\n### OpsGenie Alerts Collection\n\nThis collection is for integration into the OpsGenie alerting system. As Direcuts provides the fields for sort, creation, and update date as well aw who perfomred the action, we enanled these fields during creation. Next to the id we need the following fields for alerts we want to create later on. Next to the default fields, the most important custom fields are the following ones:\n\nCreate an `opsgenie_alert` collection for integration into the OpsGenie alerting system. As Directus provides the fields for sort, creation, and update date as well as who performed an action, enable these fields during creation. Create the following fields:\n\n| Field name | Interface | Comment |\n| ---- | ---- | ---- |\n| external_id | Input/String | Store the Alert ID |\n| priority | Dropdown | P1 - Critical to P5 - Informational |\n| category | Dropdown | Simple method to deicde if health related or just an info |\n| message | String | The message that should be displayed in OpsGenie |\n| data | Many to Many | foreign key to the data item |\n\nThere are also a couple of other fields that we can use and populate such as severity, type, description, tags, links, or alias. To find our more about each field, check out [the OpsGenie docs](https://docs.opsgenie.com/docs/alert-api).\n\n## Authenticating with the Sensor\n\nThe Owlet lacks a publicly-documented API, so some reverse-engineering was required. This Flow will roughly follow this workflow:\n\n1. Trigger every minute.\n2. Authenticate and get all the needed tokens.\n3. Get a list of connected devices.\n4. Get the data of our target device.\n5. Transform the data to our needs.\n6. Save the data.\n\nCreate a flow with a scheduled trigger that runs every minute (an interval of `* * * * *`). Turn off logging to prevent saving a lot of unnecessary data to your database.\n\n### Authenticate and Request Tokens\n\nFor this specific API, the authentication is a bit more complex compared to basic auth or a simple \"request a token\" as we might know it from other platforms. The general process to get a token which can be used to access actual device data contains three steps:\n\n1. Use the login credentials used by the mobile app and pass them to an auth service provided by Google. If successfully logged in, we receive a token.\n2. With this token, authenticate against the actual Owlet server for a second token.\n3. Using the second token, retrieve a final token that can be used to fetch sensor data.\n\n::: details Show Operations\n\nRequest 1:\n- Key: `verifyPw`\n- POST `https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=##########`\n- Headers:\n  - `X-Android-Package`: `com.owletcare.owletcare`\n  - `X-Android-Cert`: `##some secret value##`\n  - `Content-Type`: `application/json`\n  - `Accept`: `application/json`\n\nRequest 2:\n- Key: `get_mini_token`\n- POST `https://ayla-sso.eu.owletdata.com/mini/`\n- Headers:\n  - `Authorization`: `{{$last.data.idToken}}`\n\nRequest 3:\n- Key: `token_sign_in`\n- POST `https://user-field-eu-1a2039d9.aylanetworks.com/api/v1/token_sign_in`\n- Headers:\n  - `Content-Type`: `application/json`\n  - `Accept`: `application/json`\n- Body:\n  ```json\n  {\n    \"app_id\": \"OwletCare-Android-EU-fw-id\",\n    \"app_secret\": \"OwletCare-Android-EU-########\",\n    \"provider\": \"owl_id\",\n    \"token\": \"{{$last.data.mini_token}}\"\n  }\n  ```\n\n:::\n\n### Reading Data from the Sensor\n\nCompared to the auth process, fetching actual data from the API is done with fewer requests – just two are needed. As the vendor supports multiple devices, we have to get a list of devices first. In theory, we can also do this in preparation and hard-code the device ID within the next operation. But again, as there is no official documentation of the API this might change or the ID might not that unique and may change within any future updates.\n\nSo let's identify the device name, or `dsn` as it is called by the external API.\n\nCreate a Request operation with the final token we got from the authentication operations.\n\n\n| Method | URL |\n| --- | --- |\n| GET | https://ads-field-eu-1a2039d9.aylanetworks.com/apiv1/devices.json |\n\nAs header parameter, we set the following:\n\n| Header | Value |\n| --- | --- |\n| Authorization | `auth_token {{$last.data.access_token}}` |\n\nIf everything works so far, the JSON we receive looks something like this, but for security reasons, some data was removed or masked as it also contains coordinates, MAC addresses, IP addresses, and so on:\n\n```json\n{\n  \"status\": 200,\n  \"statusText\": \"OK\",\n  \"headers\": {\n    ...\n  },\n  \"data\": [\n    {\n      \"device\": {\n        \"dsn\": \"AC00***697\",\n        \"lan_ip\": \"192.168.*.*\",\n        \"lan_enabled\": false,\n        \"has_properties\": true,\n        \"connection_status\": \"Online\",\n        \"lat\": \"********\",\n        \"lng\": \"********\",\n        \"device_type\": \"Wifi\"\n      }\n    }\n  ]\n}\n```\n\nThe device object has exactly one tracker and provides us with the `dsn` as well as the flag for `has_properties`.\n\nCreate one more Request operation to actually, finally, fetch sensor data.\n\n| Method | URL |\n| --- | --- |\n| GET | `https://ads-field-eu-1a2039d9.aylanetworks.com/apiv1/dsns/{{$last.data[0].device.dsn}}/properties.json` |\nAs a header parameter, we set the following:\n\n| Header | Value |\n| ---- | ---- |\n| Authorization | `auth_token {{token_sign_in.data.access_token}}` |\nAs you can see, the named operation becomes handy now.\n\nThis request returns every property the device currently has. In total, we received over 1600 lines of JSON this time. The good thing, we only have a single property object here. All properties have a name attribute.\n\nCreate a Run Script operation to find the properties we need:\n\n```js\nmodule.exports = async function(data) {\n  let rtnData\n\tdata.read_dns.data.forEach(p => {\n    if (p.property.name === \"REAL_TIME_VITALS\") {\n      //console.log(JSON.parse(p.property.value))\n      rtnData = JSON.parse(p.property.value)\n    }\n  });\n  return rtnData;\n}\n```\n\nWithin `rtnData` we now store all the relevant values such as battery details, heart rate and oxygen level. As the JSON data is stored as a raw string with the value attribute, the run operation already parses the string and returns the following JSON object back to the Flow\n\n```json\n{\n  \"ox\": 0,\n  \"hr\": 0,\n  \"mv\": 0,\n  \"sc\": 2,\n  \"st\": 0,\n  \"bso\": 0,\n  \"bat\": 100,\n  \"btt\": 0,\n  \"chg\": 2,\n  \"aps\": 0,\n  \"alrt\": 0,\n  \"ota\": 0,\n  \"srf\": 1,\n  \"rsi\": 18,\n  \"sb\": 0,\n  \"ss\": 0,\n  \"mvb\": 0,\n  \"mst\": 0,\n  \"oxta\": 255,\n  \"onm\": 0,\n  \"bsb\": 4,\n  \"mrs\": 0,\n  \"hw\": \"obl\"\n}\n```\n\nSome of the keys are self-speaking while others are not clear. Due to the lack of documentation, I can only compare the values with the data from the original app to identify what is what. Also, the mentioned GitHub projects have some details from other users that were helping to understand the keys here.\n\nIn our case, we are using `ox` as the oxgenlevel, `hr` as heartrate, `bat` as battery level, and `st` as the skin temperature.\n\n### Saving the Sensor Data\n\nThe last step within the Flow is to save the gathered data within the collection we've set up already. The payload of the create operation looks like this:\n\n```json\n{\n    \"raw_payload\": \"{{$last}}\",\n    \"oxygen\": \"{{$last.ox}}\",\n    \"heart_rate\": \"{{$last.hr}}\",\n    \"temperature\": \"{{$last.st}}\",\n    \"battery_level\": \"{{$last.bat}}\"\n}\n```\n\n## Reporting\n\n### Insights\n\nAs the Insights module is built in Directus, you can create any report with the data just as you need it. In our case, we've created the following dashboard:\n\n![An insights dashboard with three sections. Two of them render a time based graph for the heart rate, oxygen level, and temperature. Another section displays the latest senor data as well as the battery level.](/img/18585ae9-828a-4d11-8e22-06db6515907a.webp)\n\nThe dashboard is split into three sections, on the left, the last 30 minutes of data are displayed. On the right, you can select the amount of hours you'd like to review. This is done by a slide that is used as a global variable for the 3 charts underneath. In between, some stats are displayed, in detail, in the very last dataset for the oxygen level, heart rate, temperature and battery stats.\n\nAll the charts are using the \"Time Series\" chart. The left side uses the default values for the data range of 30 minutes. For each measurement, the min and max values are set to render the most common values including some border values. The dynamic charts on the right are set up similarly.\n\nTo achieve the dynamic time window, we have to create the \"Global Variable\" with the name 'last_x_hours' first:\n\n![Configuration screen of a global variable within the inisghts dashboard. Different settings for name, min, max values, or default can be set.](/img/9e204338-aa13-4463-b334-127abbd69366.webp)\n\nWithin the dynamic \"Time Series\" charts we can reuse the global variable by adding its name to the date range:\n\n![Usage of the syntax for variables within the dashboard panels.](/img/02d8a4a7-97cc-4690-8c14-2278be350a30.webp)\n\nYou can use the `{{…}}` syntax, followed by a lower `h` to identify the value that should work as hours. If you use the same variable for all three slides, they will change altogether once you've selected a new amount of hours within the global variable slider.\n\n### 3rd Party Alerting Integration\n\nYou can integrate this system with external services to get a robust alerting system and a handy quick view of the current status directly on my mobile phone.\n\n### Creating an Alert Item\n\nFor the alerting system, we're using OpsGenie, usually used for system, infrastructure or app health status. But why not for the actual health use case?\n\nTo build this, a new Flow listens to every created event within the `sensor_data` collection. Every new record in this collection is evaluated and under certain conditions, a new item is created within an additional collection called `opsgenie_alert`. The collection looks something like this to store all relevant data that OpsGenie can use:\n\n![Item view of an alert that is created once the battery level is reaching a low level.](/img/6ee06987-7338-412f-bca0-30b76a8b556a.webp)\n\nThe related Flow looks like this:\n\n![The complete Flow to create new alert items based on newly created sensor data items. After the trigger more data is read, evaluated within a Run Script operation and based on a condtion new alert items are created or not.](/img/6f659c8c-339e-407c-824d-e434a80d2acb.webp)\n\nWithin the Run Script operation the data is evaluated and based on the met conditions, the returning JSON is passed over to the next operation.\n\nTo get more details about the API, please check the [official documentation for OpsGenie](https://docs.opsgenie.com/docs/alert-api).\n\nFor checking the battery level the code looks like this:\n\n```js\nmodule.exports = async function(data) {\n    var rtn = {\n    \t\"create_alert\": false\n    }\n    if (data.$trigger.payload.battery_level \u003C 20) {\n    \trtn.create_alert = true\n        rtn.alert_data = {\n        \t\"category\": \"battery\",\n            \"type\": \"info\",\n            \"severity\": \"mid\",\n            \"priority\": \"P3\",\n            \"alias\": \"Low Battery\",\n            \"message\": \"The battery is low. Right now it has \"+data.$trigger.payload.battery_level+\"%\",\n            \"description\": \"The battery is low. Right now it has \"+data.$trigger.payload.battery_level+\"%\"\n        }\n    }\n    // ...\n\treturn rtn;\n}\n```\n\nThe next Condition Operation within the Flow checks the value of `create_alert` and either stops here if `false` or passes the data to the final Create operation if set to `true`. This can be done easily by the following condition rule:\n\n```json\n{\n    \"$last\": {\n        \"create_alert\": {\n            \"_eq\": true\n        }\n    }\n}\n```\n\nYou can build in several other logic like checking if there is an open alert already and stuff like this. To keep it simple we're skipping this at the moment. (And trust OpsGenie to not raise two alerts for the same incoming data)\n\nWithin the create operation, the following payload is used to create the OpenGenie Alert item:\n\n```json\n{\n    \"category\": \"{{exec_alert_logic.alert_data.category}}\",\n    \"type\": \"{{exec_alert_logic.alert_data.type}}\",\n    \"severity\": \"{{exec_alert_logic.alert_data.severity}}\",\n    \"priority\": \"{{exec_alert_logic.alert_data.priority}}\",\n    \"alias\": \"{{exec_alert_logic.alert_data.alias}}\",\n    \"message\": \"{{exec_alert_logic.alert_data.message}}\",\n    \"description\": \"{{exec_alert_logic.alert_data.description}}\"\n}\n```\n\n#### Escalating to OpsGenie\n\nOnce the alert is created within Directus, of course, it has to be created within OpsGenie as well. For this – again a new Flow is needed. This time we have to use the Timeout operation as OpsGenie queues all incoming requests and does not provide the result immediately.\n\n![A Flow that posts data to the OpsGenie API, sleeps for some time and read out the newly created alert, once OpsGenie fulfilled the initial request. The external alert ID is entered into the related item wihtin Directus.](/img/07db9384-e4f9-4ffa-8740-fa3d944f3eb9.webp)\n\nOnce triggered, we read out all the data first and pass the needed data to the OpsGenie API with a user key and the JSON data from the alert collection. As the API does not return the actual result but only an ID of the incoming task, we now wait 2 seconds before requesting the current status of our queued task with the 2nd web request. The request URL gets the returning ID from the first web request:\n\n![A simple GET webrequest with a dynamic value as part of the request URL. The values is using data from another Flow operation and accessed by using the mustache syntax.](/img/e5ca10c2-3072-49e1-809c-276636623212.webp)\n\nThis request will return the current status and therefore all the data (including an ID) of this alert. With the update operation, we saved the alert ID to be able to refer to the OpsGenie alert if needed.\n\nIn the moment an actual alert is created within OpsGenie, any connected system is yelling for attention, just as configured in the tool.\n\nIf Directus tries to create a new alert with the same data (in case the battery or oxygen level is still on the same level) no new alert is created by the design of OpsGenie. But it's hard to miss any alert as it sends SMS, critical push notifications, or even calling a phone number if needed and no reaction is noticed.\n\n## Build an iOS Widget\n\nAs a last method of reporting and integration Directus, we can create an iOS widget, that sits right on my lock and home screen. As this is not about iOS development we chose the easy way and used Scriptable for this. This free app can be used to run JavaScript and display the data as a widget. The only downside of these Scriptable widgets is, that iOS decides WHEN to update the content of the widget. So you can not force the widget to reload actively. This is a limitation to prevent battery drainage and high load due to the demanding JavaScript. Usually, the script runs every 1 to 15 minutes. To know how \"outdated\" the displayed data is, we've added the create-timestamp as part of the widgets.\n\nFor the Directus integration this time I have created a new role that can have view access to the data collection only. A user in this role has set a static token that I can use within the widget. Using the query parameter `limit` and `sort` I can define to get only the very last entry sorted by the create date column.\n\n```js\nconst url = \"https://my-directus.app/items/sensor_data?limit=1&sort=sort,-date_created\"\nconst token = \"xy-my-static-token\"\nasync function getData(url) {\n  let request = new Request(url);\n  let authHeader = \"Bearer \" + token\n  request.headers = { \"Authorization\": authHeader }\n\n  let data = await request.loadJSON();\n  return data;\n}\nfunction processData(data) {\n  console.log(data)\n  let processedData = {\n    \"placement\": data.data[0].placement,\n    \"battery\": {\n      \"level\": data.data[0].battery_level,\n      \"state\": data.data[0].battery_state\n    },\n    \"termal\": {\n      \"state\": \"\",\n      \"value\": data.data[0].temperature\n    },\n    \"oxygen\": {\n      \"state\": \"\",\n      \"value\": data.data[0].oxygen\n    },\n    \"heart_rate\": {\n      \"state\": \"\",\n      \"value\": data.data[0].heart_rate\n    },\n    \"reldate\": new RelativeDateTimeFormatter().string(new Date(data.data[0].date_created), new Date()),\n    \"datecreated\":\n      new Date(data.data[0].date_created).getHours() + \":\" +\n      String(new Date(data.data[0].date_created).getMinutes()).padStart(2, \"0\")\n  }\n\n  return processedData;\n}\nfunction createWidget(data) {\n  var widget = new ListWidget();\n  console.log(data.placement);\n  switch (data.placement) {\n    case 4:  // Charging\n      var text = widget.addText(\"⚡️ \" + data.battery.level + \"% …\");\n      break;\n    case \"2\":\n      break;\n    default:\n      var text = widget.addText(\"🌡️ \" + data.termal.value + \"°C\");\n      var text = widget.addText(\"🫧 \" + data.oxygen.value + \" ♥️ \" + data.heart_rate.value);\n      break;\n  }\n  var text = widget.addText(data.datecreated);\n  text.font = Font.regularRoundedSystemFont(12);\n  return widget;\n}\nlet data = await getData(url);\nlet processedData = processData(data);\nlet widget = await createWidget(processedData);\nScript.setWidget(widget);\nScript.complete()\n```\n\nIn the end, the widget would look like this. In case the wearable is charging, the current battery level is displayed.\n\n![Screenshot of an smartphone lockscreen that shows the latest health data provided by the Directus backend. Small icons are used to identify which value stands for which senor data. A timestamp is underneath.](/img/6f5d1ae4-96bc-4599-8d81-85f6a2e86ee3.jpg)\n\n## Summary\n\nAnd Voila, you've successfully built your monitoring system by using Directus. In this post, we covered how to set up the needed Collections to store data from an external API using Flows, worked with the data to further integrate the collected data into third-party tools and built our reporting Dashboard directly within Directus using Insights as well as display the latest data on our mobile phone.\n",{"title":1526,"description":1529},"wkSLabtMxzD0cz3SlU6YygJYTwR2z7oAJhosCMwhIwE",1775038782546]