How to automatically inject multi-app endpoints as environment variables
Learn how to use Upsun route identifiers and the PLATFORM_ROUTES variable to easily get and use the hostnames of dynamically deployed applications in your project.
Many projects deployed on Upsun contain multiple applications. For example, you might have a frontend application and a separate backend API, or several microservices working together.Upsun lets you create relationships between your applications, similar to how you connect services like databases. However, these relationships are mainly for server-side communication over the internal network. Sometimes, one application needs the public hostname, or Uniform Resource Identifier (URI), of another application in the same project.For instance, imagine a Next.js frontend application. It might need to call your API application from both server components (running on the server) and client components (running in the user’s browser). To do this, the frontend needs the API’s public URI.Every application container deployed on Upsun automatically gets an environment variable called PLATFORM_ROUTES. This variable contains information about all the project’s routes. This guide uses the following example project structure:
To easily reference these routes later, add an id attribute to each one. Choose a meaningful string for the ID. Using the application name often works well:
routes: "https://api.{all}/": type: upstream upstream: "api:http" id: api # Identifier for the API route "https://{all}/": type: upstream upstream: "next:http" id: next # Identifier for the Next.js frontend route
After deploying these changes, connect to one of your application containers using the Upsun CLI. For example, use upsun ssh -A api where api is your application’s name. Inside the container, you can view the PLATFORM_ROUTES variable:
You can make this JSON easier to read by piping it through jq. jq is a command-line tool for processing JSON data. It helps you parse, filter, and transform JSON, which is useful when working with APIs and configuration files. You can find more information on the jq website.
That’s much better!Now, you need a jq query to extract the specific URI you want, using the route id defined earlier. Here’s how you can select the URI associated with the id “api”:
Here’s how that jq query works:
(You can experiment with this query and the example JSON using the online jq playground.)
to_entries[]: Converts the JSON object into an array where each item has a key (the URI) and a value (the route details object). The [] processes each item in the array.
select(.value.id=="api"): Filters these items, keeping only those where the id field inside the value object equals "api". Change "api" to the route ID you need.
.key: Extracts the key field (the URI) from the filtered item.
The -r flag tells jq to output the raw value instead of its JSON representation.
Now you know how to get a specific URI. The next step is making this URI available to your applications as an environment variable.
Upsun lets you define environment variables dynamically during the build process. You do this using a special script file named .environment placed in your application’s source code directory. Find more details in the documentation on setting variables via script.Suppose your Next.js application needs an API_HOST variable with the API’s URI. And your API application needs a NEXT_PUBLIC_BASE_URL variable with the frontend’s URI. You can create a .environment file using the jq queries from the previous step.
⚠️ Important: If multiple applications need these variables, place a copy of the .environment file in each application’s source directory.
# This file runs during deployment to set environment variables.# Place it in the root directory of applications that need these variables.# Export the API host URI (identified by id: api)export API_HOST=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r 'to_entries[] | select(.value.id=="api") | .key')# Export the Next.js frontend URI (identified by id: next)# NEXT_PUBLIC_BASE_URL is a common convention for Next.js public variables.export NEXT_PUBLIC_BASE_URL=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r 'to_entries[] | select(.value.id=="next") | .key')
Commit the .environment file(s) to your repository and push the changes to Upsun. After the deployment finishes, connect to an application container again and check the variables:
Bonus tip: Use these variables in statically exported JavaScript applications
JavaScript applications that are statically exported (like some Next.js static exports or Create React App builds) generate their assets and configuration during a build phase.The way most static generators work is that they will replace the process.env.* variables at build time with their actual values. Let’s take an example with a variable called API_ENDPOINT.This API_ENDPOINT variable has a value of https://api.example.com in either your .env file or the server environment variable. Your Javascript code refers to that variable with process.env.API_ENDPOINT.When you are triggering the generation of the static export with npm run build, the process.env.API_ENDPOINT get replaced in the generated code with the actual value https://api.example.com.While it does seem to be a satisfactory way of doing it, it creates a problem when that code needs to run on multiple environments where that variable could have different values.On production, you might want to query https://api.example.com but staging should target “https://staging.api.example.com`.“Hard-coding” the value during prevent us from running the exact same build on different environments with different configurations make the build process undertiministic. Upsun’s goal is to run the exact same applications builds on all environment to guarantee the exact same behaviors during testing.
Injecting different variable values on different environments
In our example, the client application running in the user’s browser needs to be able to query a different API_ENDPOINT based on the environment it is running in. Let’s explore two approaches.
Approach 1: Dynamically constructing the URI (If applicable)
The simplest approach, if your routes structure allows it, is to dynamically construct the necessary URI in the browser. For example, consider these routes again:
Here, the API endpoint (api.{all}) is always on the same base domain as the frontend ({all}), just prefixed with api.. You could potentially use the browser’s current location.hostname to figure out the API endpoint:
// Example function to get the API endpointexport const getAPIEndpoint = (): string => { // Check if running server-side (Node.js) where build-time env var might exist // Ensure NEXT_PUBLIC_API_ENDPOINT is set during build if needed server-side if (typeof window === 'undefined' && process.env.NEXT_PUBLIC_API_ENDPOINT) { return process.env.NEXT_PUBLIC_API_ENDPOINT; } // Check if running in a browser if (typeof window !== 'undefined') { // Construct the API endpoint from the browser's hostname return `https://api.${window.location.hostname}`; } // Fallback or error if environment is unknown throw new Error("Cannot determine API endpoint: Unknown environment.");};
However, this dynamic construction might not always work, especially if you don’t control the API endpoint naming structure or if the relationship between frontend and API hostnames is more complex.
Approach 2: Using a Deploy Hook and Runtime Configuration File
When dynamic construction isn’t suitable, the recommended alternative is to write the necessary environment-specific variables to a JSON configuration file during the deploy hook. This hook runs after your application build is complete and deployed to the server, at which point it has access to runtime environment variables, services, and mounts.Let’s assume your project uses an API_ENDPOINT environment variable whose value changes per environment (e.g., defined using Upsun’s environment variables features).During the deploy hook, you can read this variable’s value and store it in a publicly accessible JSON file, for example, variables.json.First, ensure you have a writable mount defined in your application configuration where you can store this file:
# .upsun/app.yaml or .upsun/config.yaml depending on your setup# Define a writable mount named 'storage'mounts: 'storage': source: storage # Use 'local:files/storage' for local storage source_path: '' # Optional: subdirectory within the source
Next, make this storage location accessible via HTTP so the frontend JavaScript can fetch the file. Configure this in your web settings:
# .upsun/app.yaml or .upsun/config.yamlweb: locations: # Make the 'storage' mount publicly readable at /storage /storage: root: "storage" # Corresponds to the mount name passthru: true # Allow direct access to files scripts: false allow: true expires: -1 # Disable caching or set appropriate headers
Note: Adjust passthru, scripts, allow, and expires based on your security and caching needs.Finally, add the deploy hook to write the environment variable into the JSON file within the mounted directory. The path /app/storage typically corresponds to the storage mount point inside the container:
# .upsun/app.yaml or .upsun/config.yamlhooks: deploy: | # Write the environment variable to a JSON file printf '{"API_ENDPOINT": "%s"}\\n' "$API_ENDPOINT" > /app/storage/variables.json
Your application can then fetch this /storage/variables.json file at runtime using a library like axios or the native fetch API to get the correct API_ENDPOINT for the current environment:
// Using native fetch APIfetch('/storage/variables.json') .then(response => { if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return response.json(); // Parses the JSON response body }) .then(data => { const apiEndpoint = data.API_ENDPOINT; console.log('API Endpoint from fetch:', apiEndpoint); // Use the apiEndpoint in your application }) .catch(error => { console.error('Error fetching config:', error); });// Using axios (assuming axios is installed and imported)// import axios from 'axios';axios.get('/storage/variables.json') .then(response => { const apiEndpoint = response.data.API_ENDPOINT; // axios automatically parses JSON console.log('API Endpoint from axios:', apiEndpoint); // Use the apiEndpoint in your application }) .catch(error => { console.error('Error fetching config with axios:', error); });
Choose the method that best suits your project structure and needs. Both methods allows a single build artifact to be deployed across different environments, each retrieving its specific configuration at runtime.This approach ensures your application build remains deterministic while allowing runtime flexibility for environment-specific settings like API endpoints.
Last modified on April 27, 2026
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Upsun Developer","description":"Upsun Developer — documentation, guides, and more.","colors":{"primary":"#6046ff","light":"#F7F8F8","dark":"#646F75"},"logo":{"light":"https://mintcdn.com/upsun-c9761871/WSCgazBk0GWUPP4l/logo/Upsun-dev-center-light.svg?fit=max\u0026auto=format\u0026n=WSCgazBk0GWUPP4l\u0026q=85\u0026s=c35e42815c3d17de292fb0a86d41aa5f","dark":"https://mintcdn.com/upsun-c9761871/WSCgazBk0GWUPP4l/logo/Upsun-dev-center-dark.svg?fit=max\u0026auto=format\u0026n=WSCgazBk0GWUPP4l\u0026q=85\u0026s=6bdea7a02f9b19da987e3502457d1ce8","href":"https://developer.upsun.com/"},"favicon":"https://mintcdn.com/upsun-c9761871/zc3aDujkEk92gVGr/favicon.png?fit=max\u0026auto=format\u0026n=zc3aDujkEk92gVGr\u0026q=85\u0026s=3b2ecb4deccafac0ea68acf519ab577b","api":{"examples":{"prefill":true}},"appearance":{"default":"system"},"background":{"color":{"light":"#F7F8F8","dark":"#0E1113"}},"navbar":{"links":[{"href":"https://auth.upsun.com/","label":"Console"},{"href":"https://upsun.com/demo/","label":"Watch a demo"}],"primary":{"type":"button","label":"Free trial","href":"https://auth.upsun.com/register"}},"footer":{"socials":{"github":"https://github.com/upsun","youtube":"https://www.youtube.com/@upsundotcom","x":"https://x.com/upsundotcom","linkedin":"https://www.linkedin.com/company/upsundotcom"},"links":[{"header":"Docs","items":[{"label":"Documentation","href":"/docs/get-started"},{"label":"Tutorials","href":"/tutorials"},{"label":"API Reference","href":"/api"},{"label":"CLI Reference","href":"/cli"}]},{"header":"Resources","items":[{"label":"Changelog","href":"/changelog"},{"label":"Upsun Blog","href":"https://upsun.com/blog"},{"label":"Community","href":"https://community.upsun.com"},{"label":"Support","href":"/docs/get-started/here/support"}]},{"header":"Company","items":[{"label":"About","href":"https://upsun.com/about-us"},{"label":"Pricing","href":"https://upsun.com/pricing"},{"label":"Careers","href":"https://upsun.com/jobs"}]}]},"seo":{"metatags":{"robots":"index, follow","description":"Upsun User Documentation, Dev Center, news, and more."},"indexing":"all"},"fonts":{"heading":{"family":"Instrument Sans","weight":700},"body":{"family":"Instrument Sans","weight":400}},"icons":{"library":"lucide"},"integrations":{"gtm":{"tagId":"GTM-KJ4F382K"},"telemetry":{"enabled":true}},"errors":{"404":{"redirect":false,"title":"This page took an unexpected detour","description":"It might have moved, or maybe it never existed. Either way, let's get you back on track. Try searching above or head to one of these:\n\n\u003cdiv style={{textAlign: 'left'}}>\n\n\u003cColumns cols={2}>\n \u003cCard title=\"Get Started\" icon=\"rocket\" href=\"/docs/get-started\">\n Deploy your first app on Upsun\n \u003c/Card>\n \u003cCard title=\"Documentation\" icon=\"book-open\" href=\"/docs/core-concepts\">\n Explore the full documentation\n \u003c/Card>\n \u003cCard title=\"Tutorials\" icon=\"play\" href=\"/tutorials\">\n Follow step-by-step guides\n \u003c/Card>\n \u003cCard title=\"API Reference\" icon=\"code\" href=\"/api\">\n REST API and SDK reference\n \u003c/Card>\n\u003c/Columns>\n\n\u003c/div>"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"variables":{"config_platformsh":"Platform.sh","config_config_dir":".upsun/","config_config_files_app":".upsun/config.yaml","config_config_files_services":".upsun/config.yaml","config_config_files_routes":".upsun/config.yaml","config_config_files_env":".environment","config_glossary_mb":"MB","config_product_blackfire":"Upsun Blackfire","config_product_cloud":"Upsun Cloud","config_product_dispatch":"Upsun Dispatch","config_vendor_name":"Upsun","config_vendor_cli":"upsun","config_vendor_alt":"upsun","config_vendor_prefix":"UPSUN","config_vendor_community_url":"https://community.upsun.com/","config_vendor_hostname":"platformsh.site","config_vendor_host":"upsun.com","config_vendor_docs":"https://developer.upsun.com","config_vendor_api":"https://api.upsun.com","config_vendor_console":"https://console.upsun.com","config_vendor_sales":"https://upsun.com/contact-us/","config_vendor_support_url":"https://support.upsun.com","config_vendor_support_ticket":"https://support.upsun.com/hc/en-us/requests/new?ticket_form_id=35294051960082","config_vendor_support_feature":"https://support.upsun.com/hc/en-us/requests/new?ticket_form_id=37982573191442","config_vendor_support_requests":"https://support.upsun.com/hc/en-us/requests","config_vendor_register":"https://auth.upsun.com/register/","meta_version_solr":"10.0","meta_version_composable":"26.05","meta_version_nodejs":"26","meta_version_python":"3.14","meta_version_php_latest":"8.5"},"styling":{"latex":true},"navigation":{"global":{"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"upsun-c9761871","hasAudioNarration":false,"actualSubdomain":"upsun-c9761871","customDomains":["developer.upsun.com"],"gitSource":{"type":"github","owner":"upsun","repo":"devcenter-mintlify","deployBranch":"main","contentDirectory":"contents","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adc4cd4ed3bac47b4069326","collectionId":"054614e1-a766-40d6-b532-bd8f97cf7bfc","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adc4cd4ed3bac47b4069326"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adc4cd4ed3bac47b4069326","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"Cloud","count":543},{"language":"default","tag":"API","count":271},{"language":"default","tag":"OpenAPI Reference","count":263},{"language":"default","tag":"Docs","count":255},{"language":"default","tag":"Configure Apps \u0026 Services","count":79},{"language":"default","tag":"Get Started","count":41},{"language":"default","tag":"Manage Projects","count":36},{"language":"default","tag":"Configure apps","count":30},{"language":"default","tag":"Pick a Stack","count":27},{"language":"default","tag":"PHP","count":26}],"searchSettings":{"maxResults":16}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"type":"email","email":"advocacy@upsun.com"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","href":"/_mintlify/custom/upsun-c9761871/0cd1b08b3290f735/styles.css"}],"page":{"pagePath":"posts/hands-on/route-ids-env","slug":"/posts/hands-on/route-ids-env","pageMetadata":{"title":"How to automatically inject multi-app endpoints as environment variables","subtitle":"Connect multiple applications within an Upsun project using their public URIs","date":"2025-04-28T17:00:00.000Z","image":"/images/posts/hands-on/route-ids-env/route-ids-env.webp","icon":"tutorial","featured":true,"author":["gmoigneu"],"sidebar":{"exclude":true},"type":"post","description":"Learn how to use Upsun route identifiers and the PLATFORM_ROUTES variable to easily get and use the hostnames of dynamically deployed applications in your project.\n \n","tags":["routes","environment","variables","jq","decoupled","multi-app","tutorial"],"categories":["hands-on"],"math":false,"href":"/posts/hands-on/route-ids-env"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to use Upsun route identifiers and the PLATFORM_ROUTES variable to easily get and use the hostnames of dynamically deployed applications in your project.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const PostMeta=({data={}})=>{const _components={a:`a`,..._provideComponents()};const{author,date}=data;const authors=Array.isArray(author)?author:author?[author]:[];const toSlug=value=>String(value).toLowerCase().trim().replace(/\\s+/g,`-`).replace(/[^a-z0-9-]/g,``);const resolveAuthor=slug=>{const entry=AUTHOR_MAP[slug]||{};const name=entry.name||slug;const github=entry.github||null;const url=`/posts/authors/${toSlug(slug)}`;const avatarUrl=github?`https://github.com/${github}.png?size=64`:null;return{name,url,avatarUrl}};const formattedDate=date?new Date(date).toLocaleDateString(`en-US`,{year:`numeric`,month:`long`,day:`numeric`}):null;if(authors.length===0\u0026\u0026!formattedDate)return null;const AUTHOR_MAP={\"aaron-collier\":{\"name\":`Aaron Collier`},\"aaron-dudenhofer\":{\"name\":`Aaron Dudenhofer`},\"aaron-porter\":{\"name\":`Aaron Porter`},\"adriaan-odendaal\":{\"name\":`Adriaan Odendaal`},\"ajmal\":{\"name\":`Ajmal Siddiqui`},\"akalipetis\":{\"name\":`Antonis Kalipetis`},\"alexander-varwijk\":{\"name\":`Alexander Varwijk`},\"alicia-bevilacqua\":{\"name\":`Alicia Bevilacqua`},\"amelie-deguerry\":{\"name\":`Amelie Deguerry`},\"anacidre\":{\"name\":`Ana Cidre`,\"linkedin\":`https://www.linkedin.com/in/ana-cidre`},\"andoni\":{\"name\":`Andoni Auzmendi`},\"andrei-taranu\":{\"name\":`Andrei (Alex) Taranu`,\"linkedin\":`https://www.linkedin.com/in/andrei-alex-taranu/`},\"andrew-baxter\":{\"name\":`Andrew Baxter`},\"andrew-melck\":{\"name\":`Andrew Melck`},\"antoine-crochet-damais\":{\"name\":`Antoine Crochet Damais`},\"augustin-delaporte\":{\"name\":`Augustin Delaporte`,\"linkedin\":`https://www.linkedin.com/in/augustindelaporte/`},\"branislav-bujisic\":{\"name\":`Branislav Bujisic`},\"carl-smith\":{\"name\":`Carl Smith`},\"caroline-leroy\":{\"name\":`Caroline Leroy`},\"cati-mayer\":{\"name\":`Cati Mayer`},\"catplat\":{\"name\":`C Trinkwon`},\"ceelolulu\":{\"name\":`Celeste van der Watt`},\"chadwcarlson\":{\"name\":`Chad Carlson`,\"github\":`chadwcarlson`,\"linkedin\":`https://www.linkedin.com/in/chadwcarlson`},\"charles-moore\":{\"name\":`Charles Moore`,\"linkedin\":`https://www.linkedin.com/in/charles-g-moore/`},\"chris-ward\":{\"name\":`Chris Ward`},\"chris-yates\":{\"name\":`Chris Yates`},\"christian-sieber\":{\"name\":`Christian Sieber`},\"christopher-lockheardt\":{\"name\":`Christopher Lockheardt`},\"christopher-skene\":{\"name\":`Christopher Skene`},\"chuck-morgan\":{\"name\":`Chuck Morgan`},\"corey-dockendorf\":{\"name\":`Corey Dockendorf`},\"crell\":{\"name\":`Crell`},\"damz\":{\"name\":`Damz`},\"dan-morrison\":{\"name\":`Dan Morrison`},\"davidbonachera\":{\"name\":`David Bonachera`,\"github\":`davidbonachera`,\"linkedin\":`https://www.linkedin.com/in/davidbonachera`},\"dereliahmet1\":{\"name\":`Ahmet Faruk Dereli`},\"devicezero\":{\"name\":`Jonas Kröger`,\"github\":`devicezero`,\"linkedin\":`https://www.linkedin.com/in/jonaskroeger/`},\"doug-goldberg\":{\"name\":`Doug Goldberg`},\"duncan-naves\":{\"name\":`Duncan Naves`,\"github\":`duncannaves`,\"linkedin\":`https://www.linkedin.com/in/duncan-naves-a94423aa`},\"erika-bustamante\":{\"name\":`Erika Bustamante`},\"fabpot\":{\"name\":`Fabien Potencier`},\"flovntp\":{\"name\":`Florent Huck`,\"github\":`flovntp`,\"linkedin\":`https://www.linkedin.com/in/florenthuck`},\"fred-plais\":{\"name\":`Fred Plais`},\"gauthier-garnier\":{\"name\":`Gauthier Garnier`},\"gilzow\":{\"name\":`Paul Gilzow`},\"gmoigneu\":{\"name\":`Guillaume Moigneu`,\"github\":`gmoigneu`,\"linkedin\":`https://www.linkedin.com/in/guillaumemoigneu/`},\"gregqualls\":{\"name\":`Greg Qualls`},\"guguss\":{\"name\":`Augustin Delaporte`},\"haylee-millar\":{\"name\":`Haylee Millar`},\"ivana-kotur\":{\"name\":`Ivana Kotur`},\"jackrabbithanna\":{\"name\":`Mark Hanna`,\"github\":`jackrabbithanna`},\"jared-wright\":{\"name\":`Jared Wright`,\"github\":`jww-sh`,\"linkedin\":`https://www.linkedin.com/in/jaredwaynewright`},\"jessica-orozco\":{\"name\":`Jessica Orozco`},\"joey-stanford\":{\"name\":`Joey Stanford`},\"john-grubb\":{\"name\":`John Grubb`},\"jonas-kruger\":{\"name\":`Jonas Kruger`},\"kathryn-frazer\":{\"name\":`Kathryn Frazer`},\"kemiojo\":{\"name\":`Kemi Elizabeth Ojogbede`},\"kieronsambrook-smith\":{\"name\":`Kieronsambrook Smith`},\"laurent-arnoud\":{\"name\":`Laurent Arnoud`,\"linkedin\":`https://www.linkedin.com/in/laurent-arnoud-861b44121/`},\"letoya-boyne\":{\"name\":`Letoya Boyne`},\"lolautruche\":{\"name\":`Jérôme Vieilledent`},\"lyly-lepinay\":{\"name\":`Lyly Lepinay`},\"manauwar-alam\":{\"name\":`Manauwar Alam`},\"marc-antoine-porri\":{\"name\":`Marc Antoine Porri`},\"maria-antinkaapo\":{\"name\":`Maria Antinkaapo`},\"maria-de-anton\":{\"name\":`Maria De Anton`},\"mark-dorison\":{\"name\":`Mark Dorison`},\"markus-hausammann\":{\"name\":`Markus Hausammann`},\"mary-thomas\":{\"name\":`Mary Thomas`},\"mathias-bolt-lesniak\":{\"name\":`Mathias Bolt Lesniak`},\"mathieu-strauch\":{\"name\":`Mathieu Strauch`},\"matthias-van-woensel\":{\"name\":`Matthias Van Woensel`,\"linkedin\":`https://www.linkedin.com/in/matthias-van-woensel-267a069`},\"maz-mohammadi\":{\"name\":`Maz Mohammadi`},\"michael-sharp\":{\"name\":`Michael Sharp`},\"mupsi\":{\"name\":`Marine Gandy`},\"natalie-harper\":{\"name\":`Natalie Harper`},\"ngommenginger\":{\"name\":`Nicolas Gommenginger`,\"linkedin\":`https://www.linkedin.com/in/nicolas-gommenginger`},\"nicholas-bennison\":{\"name\":`Nicholas Bennison`},\"nicholas-vahalik\":{\"name\":`Nicholas Vahalik`},\"nick-hardiman\":{\"name\":`Nick Hardiman`},\"nickanderegg\":{\"name\":`Nickanderegg`},\"nicolas-grekas\":{\"name\":`Nicolas Grekas`,\"github\":`nicolas-grekas`,\"linkedin\":`https://www.linkedin.com/in/nicolasgrekas/`},\"niti-malwade\":{\"name\":`Niti Malwade`},\"opensocialteam\":{\"name\":`Opensocialteam`},\"ori-pekelman\":{\"name\":`Ori Pekelman`},\"otavio-santana\":{\"name\":`Otavio Santana`},\"palwandi\":{\"name\":`Pawan Alwandi`,\"github\":`pawpy`,\"linkedin\":`https://www.linkedin.com/in/pawanalwandi`},\"patrick-boest\":{\"name\":`Patrick Boest`},\"patrick-dawkins\":{\"name\":`Patrick Dawkins`,\"github\":`pjcdawkins`,\"linkedin\":`https://www.linkedin.com/in/patrickdawkins`},\"patrick-klima\":{\"name\":`Patrick Klima`},\"pjcdawkins\":{\"name\":`Pjcdawkins`},\"prineet-kaurbhurji\":{\"name\":`Prineet Kaurbhurji`},\"quentin-sinig\":{\"name\":`Quentin Sinig`},\"ralt\":{\"name\":`Florian Margaine`,\"github\":`ralt`,\"linkedin\":`https://www.linkedin.com/in/florian-margaine-43971136`},\"ramanathanramakrishnamurthy\":{\"name\":`Ramanathanramakrishnamurthy`},\"remi-lejeune\":{\"name\":`Rémi Lejeune`},\"ribel\":{\"name\":`Taras Kruts`},\"robert-douglass\":{\"name\":`Robert Douglass`},\"rudy-weber\":{\"name\":`Rudy Weber`},\"ryan-hicks\":{\"name\":`Ryan Hicks`},\"sabri-helal\":{\"name\":`Sabri Helal`},\"savannah-bergeron\":{\"name\":`Savannah Bergeron`},\"shannon-vettes\":{\"name\":`Shannon Vettes`},\"shawn-ogasawara\":{\"name\":`Shawn Ogasawara`,\"linkedin\":`https://www.linkedin.com/in/shawn-ogasawara-83a9a0/`},\"shawna-spoor\":{\"name\":`Shawna Spoor`},\"shedrack-akintayo\":{\"name\":`Shedrack Akintayo`},\"simon-ruggier\":{\"name\":`Simon Ruggier`},\"sophie-van-der-kindere\":{\"name\":`Sophie Van Der Kindere`},\"stefanos-thampis\":{\"name\":`Stefanos Thampis`},\"stephen-weinberg\":{\"name\":`Stephen Weinberg`},\"sukhman-virk\":{\"name\":`Sukhman Virk`},\"sumaira-nazir\":{\"name\":`Sumaira Nazir`},\"sumer\":{\"name\":`Sümer Cip`,\"noindex\":true,\"github\":`sumerc`,\"linkedin\":`https://www.linkedin.com/in/sumer-cip/`},\"syed-raza\":{\"name\":`Syed Raza`},\"tamara-bacchia\":{\"name\":`Tamara Bacchia`},\"tara-arnold\":{\"name\":`Tara Arnold`},\"theosakamg\":{\"name\":`Mickael Gaillard`,\"github\":`theosakamg`},\"thomasdiluccio\":{\"name\":`Thomas di Luccio`},\"tim-anderson\":{\"name\":`Tim Anderson`},\"tom-helmer-hansen\":{\"name\":`Tom Helmer Hansen`},\"tylermills\":{\"name\":`Tyler Mills`},\"upsun\":{\"name\":`Upsun`},\"veronika-tolkachova\":{\"name\":`Veronika Tolkachova`,\"linkedin\":`https://www.linkedin.com/in/veronika-tolkachova-169167a2`},\"vince-parker\":{\"name\":`Vince Parker`},\"vinnie-russo\":{\"name\":`Vincenzo Russo`},\"vrobert78\":{\"name\":`Vincent Robert`,\"github\":`vrobert78`,\"linkedin\":`https://www.linkedin.com/in/vincent-robert-498a883`},\"yuriy-babenko\":{\"name\":`Yuriy Babenko`},\"yuriy-gerasimov\":{\"name\":`Yuriy Gerasimov`}};return _jsx(`div`,{className:`post-meta`,children:(authors.length>0||formattedDate)\u0026\u0026_jsxs(`div`,{className:`post-meta-info`,children:[authors.length>0\u0026\u0026_jsx(`div`,{className:`post-meta-authors`,children:authors.map(slug=>{const{name,url,avatarUrl}=resolveAuthor(slug);const inner=_jsxs(_Fragment,{children:[avatarUrl\u0026\u0026_jsx(`img`,{src:avatarUrl,alt:name,className:`post-meta-avatar`}),_jsx(`span`,{className:`post-meta-author-name`,children:name})]});return url?_jsx(_components.a,{href:url,className:`post-meta-author`,children:inner},slug):_jsx(`span`,{className:`post-meta-author`,children:inner},slug)})}),authors.length>0\u0026\u0026formattedDate\u0026\u0026_jsx(`span`,{className:`post-meta-separator`,\"aria-hidden\":`true`,children:`·`}),formattedDate\u0026\u0026_jsx(`span`,{className:`post-meta-date`,children:formattedDate})]})})};function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedImage,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_MdxComponentBoundary,{name:`PostMeta`,children:_jsx(PostMeta,{data:{author:[`gmoigneu`],date:`2025-04-28T17:00:00+00:00`,image:`/images/posts/hands-on/route-ids-env/route-ids-env.webp`}})}),`\n`,_jsx(_components.p,{children:`Many projects deployed on Upsun contain multiple applications. For example, you might have a frontend application and a separate backend API, or several microservices working together.`}),`\n`,_jsxs(_components.p,{children:[`Upsun lets you `,_jsx(_components.a,{href:`https://docs.upsun.com/create-apps/multi-app/relationships.html`,children:`create relationships between your applications`}),`, similar to how you connect services like databases. However, these relationships are mainly for server-side communication over the internal network. Sometimes, one application needs the `,_jsx(_components.em,{children:`public`}),` hostname, or Uniform Resource Identifier (URI), of another application in the same project.`]}),`\n`,_jsxs(_components.p,{children:[`For instance, imagine a `,_jsx(_components.strong,{children:`Next.js frontend`}),` application. It might need to call your `,_jsx(_components.strong,{children:`API application`}),` from both server components (running on the server) and client components (running in the user’s browser). To do this, the frontend needs the API’s public URI.`]}),`\n`,_jsxs(_components.p,{children:[`Every application container deployed on Upsun automatically gets an environment variable called `,_jsx(_components.code,{children:`PLATFORM_ROUTES`}),`. This variable contains information about all the project’s routes. This guide uses the following example project structure:`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/upsun-c9761871/tziXiwEbbKjwbX3l/images/posts/hands-on/route-ids-env/project.webp?fit=max\u0026auto=format\u0026n=tziXiwEbbKjwbX3l\u0026q=85\u0026s=97f660d31988dffb8440170c7da9dcfc`,alt:`Multi-Apps project`,\"data-og-width\":`3200`,width:`3200`,\"data-og-height\":`2464`,height:`2464`,\"data-path\":`images/posts/hands-on/route-ids-env/project.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/upsun-c9761871/tziXiwEbbKjwbX3l/images/posts/hands-on/route-ids-env/project.webp?w=280\u0026fit=max\u0026auto=format\u0026n=tziXiwEbbKjwbX3l\u0026q=85\u0026s=21711e0bda91bfd9f4b4a096877ccd8b 280w, https://mintcdn.com/upsun-c9761871/tziXiwEbbKjwbX3l/images/posts/hands-on/route-ids-env/project.webp?w=560\u0026fit=max\u0026auto=format\u0026n=tziXiwEbbKjwbX3l\u0026q=85\u0026s=0445e2c23a49549c8fc7dd51fe85cb42 560w, https://mintcdn.com/upsun-c9761871/tziXiwEbbKjwbX3l/images/posts/hands-on/route-ids-env/project.webp?w=840\u0026fit=max\u0026auto=format\u0026n=tziXiwEbbKjwbX3l\u0026q=85\u0026s=470c904d88dac23b6a04a71a32c5f977 840w, https://mintcdn.com/upsun-c9761871/tziXiwEbbKjwbX3l/images/posts/hands-on/route-ids-env/project.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=tziXiwEbbKjwbX3l\u0026q=85\u0026s=a4c96c4ae9e0b046dec357d5f8331be7 1100w, https://mintcdn.com/upsun-c9761871/tziXiwEbbKjwbX3l/images/posts/hands-on/route-ids-env/project.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=tziXiwEbbKjwbX3l\u0026q=85\u0026s=0c6c885a5a36eb1407024bafc1407732 1650w, https://mintcdn.com/upsun-c9761871/tziXiwEbbKjwbX3l/images/posts/hands-on/route-ids-env/project.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=tziXiwEbbKjwbX3l\u0026q=85\u0026s=d38c02b64cd6c8cb9d18548f8d487e08 2500w`}),`\n`,_jsx(Heading,{level:`2`,id:`define-route-identifiers`,children:`Define route identifiers`}),`\n`,_jsxs(_components.p,{children:[`First, define your application routes in your project’s routing configuration, within `,_jsx(_components.code,{children:`.upsun/config.yaml`}),`. Here’s a basic example:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`routes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.{all}/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`upstream`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` upstream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"api:http\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://{all}/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`upstream`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` upstream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"next:http\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`To easily reference these routes later, add an `,_jsx(_components.code,{children:`id`}),` attribute to each one. Choose a meaningful string for the ID. Using the application name often works well:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`routes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.{all}/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`upstream`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` upstream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"api:http\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`api`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Identifier for the API route`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://{all}/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`upstream`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` upstream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"next:http\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`next`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Identifier for the Next.js frontend route`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Read the full Upsun documentation on `,_jsx(_components.a,{href:`https://docs.upsun.com/define-routes.html#route-identifiers`,children:`Route identifiers`}),`.`]}),`\n`,_jsxs(Heading,{level:`2`,id:`fetch-specific-uris-from-$platform_routes`,children:[`Fetch specific URIs from `,_jsx(_components.code,{children:`$PLATFORM_ROUTES`})]}),`\n`,_jsxs(_components.p,{children:[`After deploying these changes, connect to one of your application containers using the Upsun CLI. For example, use `,_jsx(_components.code,{children:`upsun ssh -A api`}),` where `,_jsx(_components.code,{children:`api`}),` is your application’s name. Inside the container, you can view the `,_jsx(_components.code,{children:`PLATFORM_ROUTES`}),` variable:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`web@api.0:~$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` echo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $PLATFORM_ROUTES`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`eyJodHRwOi8vYXBpLm1haW4tYnZ4ZWE2aS1yY...........`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The output is a base64 encoded JSON string. To see the actual JSON content, you need to decode it:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`web@api.0:~$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` echo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $PLATFORM_ROUTES`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` base64`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --decode`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"http://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/\": {\"id\": null, \"original_url\": \"http://api.{all}/\", \"primary\": false, \"production_url\": \"http://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/\", \"to\": \"https://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/\", \"type\": \"redirect\"}, \"http://main-bvxea6i-abcdefgh.ca-1.platformsh.site/\": {\"attributes\": {}, \"id\": null, \"original_url\": \"http://{all}/\", \"primary\": false, \"production_url\": \"http://main-bvxea6i-abcdefgh.ca-1.platformsh.site/\", \"to\": \"https://main-bvxea6i-abcdefgh.ca-1.platformsh.site/\", \"type\": \"redirect\"}, \"https://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/\": {\"attributes\": {}, \"id\": \"api\", \"original_url\": \"https://api.{all}/\", \"primary\": true, \"production_url\": \"https://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/\", \"type\": \"upstream\", \"upstream\": \"api\"}, \"https://main-bvxea6i-abcdefgh.ca-1.platformsh.site/\": {\"attributes\": {}, \"id\": \"next\", \"original_url\": \"https://{all}/\", \"primary\": false, \"production_url\": \"https://main-bvxea6i-abcdefgh.ca-1.platformsh.site/\", \"type\": \"upstream\", \"upstream\": \"next\"}}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can make this JSON easier to read by piping it through `,_jsx(_components.code,{children:`jq`}),`. `,_jsx(_components.code,{children:`jq`}),` is a command-line tool for processing JSON data. It helps you parse, filter, and transform JSON, which is useful when working with APIs and configuration files. You can find more information on the `,_jsx(_components.a,{href:`https://jqlang.org/`,children:`jq website`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`web@api.0:~$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` echo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $PLATFORM_ROUTES`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` base64`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --decode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"http://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` null,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"original_url\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"http://api.{all}/\",`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"primary\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"production_url\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"http://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/\",`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"to\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/\",`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"redirect\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"http://main-bvxea6i-abcdefgh.ca-1.platformsh.site/\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"attributes\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"https://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"attributes\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"api\",`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"https://main-bvxea6i-abcdefgh.ca-1.platformsh.site/\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"attributes\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"next\",`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`That’s much better!`}),`\n`,_jsxs(_components.p,{children:[`Now, you need a `,_jsx(_components.code,{children:`jq`}),` query to extract the specific URI you want, using the route `,_jsx(_components.code,{children:`id`}),` defined earlier. Here’s how you can select the URI associated with the `,_jsx(_components.code,{children:`id`}),` “api”:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`web@api.0:~$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` echo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $PLATFORM_ROUTES`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` base64`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --decode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'to_entries[] | select(.value.id==\"api\") | .key'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`https://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Here’s how that `,_jsx(_components.code,{children:`jq`}),` query works:\n`,_jsxs(_components.em,{children:[`(You can experiment with this query and the example JSON using the `,_jsx(_components.a,{href:`https://play.jqlang.org/s/MWvtpbqG5ExfBgB`,children:`online jq playground`}),`.)`]})]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`to_entries[]`}),`: Converts the JSON object into an array where each item has a `,_jsx(_components.code,{children:`key`}),` (the URI) and a `,_jsx(_components.code,{children:`value`}),` (the route details object). The `,_jsx(_components.code,{children:`[]`}),` processes each item in the array.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`select(.value.id==\"api\")`}),`: Filters these items, keeping only those where the `,_jsx(_components.code,{children:`id`}),` field inside the `,_jsx(_components.code,{children:`value`}),` object equals `,_jsx(_components.code,{children:`\"api\"`}),`. Change `,_jsx(_components.code,{children:`\"api\"`}),` to the route ID you need.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`.key`}),`: Extracts the `,_jsx(_components.code,{children:`key`}),` field (the URI) from the filtered item.`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`-r`}),` flag tells `,_jsx(_components.code,{children:`jq`}),` to output the raw value instead of its JSON representation.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Now you know how to get a specific URI. The next step is making this URI available to your applications as an environment variable.`}),`\n`,_jsxs(Heading,{level:`2`,id:`set-up-environment-variables-using-environment`,children:[`Set up environment variables using `,_jsx(_components.code,{children:`.environment`})]}),`\n`,_jsxs(_components.p,{children:[`Upsun lets you define environment variables dynamically during the build process. You do this using a special script file named `,_jsx(_components.code,{children:`.environment`}),` placed in your application’s source code directory. Find more details in the `,_jsx(_components.a,{href:`https://docs.upsun.com/development/variables/set-variables.html#set-variables-via-script`,children:`documentation on setting variables via script`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Suppose your Next.js application needs an `,_jsx(_components.code,{children:`API_HOST`}),` variable with the API’s URI. And your API application needs a `,_jsx(_components.code,{children:`NEXT_PUBLIC_BASE_URL`}),` variable with the frontend’s URI. You can create a `,_jsx(_components.code,{children:`.environment`}),` file using the `,_jsx(_components.code,{children:`jq`}),` queries from the previous step.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`⚠️ Important: If multiple applications need these variables, place a copy of the `,_jsx(_components.code,{children:`.environment`}),` file in each application’s source directory.`]})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# This file runs during deployment to set environment variables.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Place it in the root directory of applications that need these variables.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Export the API host URI (identified by id: api)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` API_HOST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $PLATFORM_ROUTES`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` base64`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --decode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'to_entries[] | select(.value.id==\"api\") | .key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Export the Next.js frontend URI (identified by id: next)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# NEXT_PUBLIC_BASE_URL is a common convention for Next.js public variables.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` NEXT_PUBLIC_BASE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $PLATFORM_ROUTES`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` base64`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --decode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'to_entries[] | select(.value.id==\"next\") | .key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Commit the `,_jsx(_components.code,{children:`.environment`}),` file(s) to your repository and push the changes to Upsun. After the deployment finishes, connect to an application container again and check the variables:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`web@api.0:~$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` echo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $API_HOST`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`https://api.main-bvxea6i-abcdefgh.ca-1.platformsh.site/`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`web@api.0:~$`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` echo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $NEXT_PUBLIC_BASE_URL`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`https://main-bvxea6i-abcdefgh.ca-1.platformsh.site/`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Your applications can now access these URIs directly through the environment variables:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# In PHP`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` getenv`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'API_HOST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# In Node.js`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`console`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`process`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`env`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`API_HOST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# In Python`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`import`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`os`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`environ`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"API_HOST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`bonus-tip-use-these-variables-in-statically-exported-javascript-applications`,children:`Bonus tip: Use these variables in statically exported JavaScript applications`}),`\n`,_jsx(_components.p,{children:`JavaScript applications that are statically exported (like some Next.js static exports or Create React App builds) generate their assets and configuration during a build phase.`}),`\n`,_jsxs(_components.p,{children:[`The way most static generators work is that they will replace the `,_jsx(_components.code,{children:`process.env.*`}),` variables at build time with their actual values. Let’s take an example with a variable called `,_jsx(_components.code,{children:`API_ENDPOINT`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This `,_jsx(_components.code,{children:`API_ENDPOINT`}),` variable has a value of `,_jsx(_components.code,{children:`https://api.example.com`}),` in either your `,_jsx(_components.code,{children:`.env`}),` file or the server environment variable. Your Javascript code refers to that variable with `,_jsx(_components.code,{children:`process.env.API_ENDPOINT`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`When you are triggering the generation of the static export with `,_jsx(_components.code,{children:`npm run build`}),`, the `,_jsx(_components.code,{children:`process.env.API_ENDPOINT`}),` get replaced in the generated code with the actual value `,_jsx(_components.code,{children:`https://api.example.com`}),`.`]}),`\n`,_jsx(_components.p,{children:`While it does seem to be a satisfactory way of doing it, it creates a problem when that code needs to run on multiple environments where that variable could have different values.`}),`\n`,_jsxs(_components.p,{children:[`On `,_jsx(_components.code,{children:`production`}),`, you might want to query `,_jsx(_components.code,{children:`https://api.example.com`}),` but `,_jsx(_components.code,{children:`staging`}),` should target “`,_jsx(_components.a,{href:`https://staging.api.example.com%60`,children:\"https://staging.api.example.com`\"}),`.`]}),`\n`,_jsx(_components.p,{children:`“Hard-coding” the value during prevent us from running the exact same build on different environments with different configurations make the build process undertiministic. Upsun’s goal is to run the exact same applications builds on all environment to guarantee the exact same behaviors during testing.`}),`\n`,_jsx(Heading,{level:`3`,id:`injecting-different-variable-values-on-different-environments`,children:`Injecting different variable values on different environments`}),`\n`,_jsxs(_components.p,{children:[`In our example, the client application running in the user’s browser needs to be able to query a different `,_jsx(_components.code,{children:`API_ENDPOINT`}),` based on the environment it is running in. Let’s explore two approaches.`]}),`\n`,_jsx(Heading,{level:`4`,id:`approach-1-dynamically-constructing-the-uri-if-applicable`,children:`Approach 1: Dynamically constructing the URI (If applicable)`}),`\n`,_jsxs(_components.p,{children:[`The simplest approach, `,_jsx(_components.strong,{children:`if your routes structure allows it`}),`, is to dynamically construct the necessary URI in the browser. For example, consider these routes again:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`routes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.{all}/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`upstream`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` upstream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"api:http\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://{all}/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`upstream`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` upstream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"next:http\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Here, the API endpoint (`,_jsx(_components.code,{children:`api.{all}`}),`) is always on the same base domain as the frontend (`,_jsx(_components.code,{children:`{all}`}),`), just prefixed with `,_jsx(_components.code,{children:`api.`}),`. You could potentially use the browser’s current `,_jsx(_components.code,{children:`location.hostname`}),` to figure out the API endpoint:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Example function to get the API endpoint`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getAPIEndpoint`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ()`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Check if running server-side (Node.js) where build-time env var might exist`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Ensure NEXT_PUBLIC_API_ENDPOINT is set during build if needed server-side`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'undefined'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`NEXT_PUBLIC_API_ENDPOINT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`NEXT_PUBLIC_API_ENDPOINT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Check if running in a browser`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'undefined'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Construct the API endpoint from the browser's hostname`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `https://api.\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`hostname`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Fallback or error if environment is unknown`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Cannot determine API endpoint: Unknown environment.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`However, this dynamic construction might not always work, especially if you don’t control the API endpoint naming structure or if the relationship between frontend and API hostnames is more complex.`}),`\n`,_jsx(Heading,{level:`4`,id:`approach-2-using-a-deploy-hook-and-runtime-configuration-file`,children:`Approach 2: Using a Deploy Hook and Runtime Configuration File`}),`\n`,_jsxs(_components.p,{children:[`When dynamic construction isn’t suitable, the recommended alternative is to write the necessary environment-specific variables to a JSON configuration file during the `,_jsx(_components.code,{children:`deploy`}),` hook. This hook runs after your application build is complete and deployed to the server, at which point it has access to runtime environment variables, services, and mounts.`]}),`\n`,_jsxs(_components.p,{children:[`Let’s assume your project uses an `,_jsx(_components.code,{children:`API_ENDPOINT`}),` environment variable whose value changes per environment (e.g., defined using Upsun’s `,_jsx(_components.a,{href:`https://docs.upsun.com/development/variables.html`,children:`environment variables features`}),`).`]}),`\n`,_jsxs(_components.p,{children:[`During the `,_jsx(_components.code,{children:`deploy`}),` hook, you can read this variable’s value and store it in a publicly accessible JSON file, for example, `,_jsx(_components.code,{children:`variables.json`}),`.`]}),`\n`,_jsx(_components.p,{children:`First, ensure you have a writable mount defined in your application configuration where you can store this file:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# .upsun/app.yaml or .upsun/config.yaml depending on your setup`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Define a writable mount named 'storage'`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`mounts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'storage'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`storage`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Use 'local:files/storage' for local storage`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` source_path`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`''`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Optional: subdirectory within the source`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Next, make this storage location accessible via HTTP so the frontend JavaScript can fetch the file. Configure this in your `,_jsx(_components.code,{children:`web`}),` settings:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# .upsun/app.yaml or .upsun/config.yaml`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`web`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` locations`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Make the 'storage' mount publicly readable at /storage`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` /storage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` root`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"storage\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Corresponds to the mount name`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` passthru`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Allow direct access to files`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` scripts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` allow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` expires`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`-1`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Disable caching or set appropriate headers`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsxs(_components.em,{children:[`Note: Adjust `,_jsx(_components.code,{children:`passthru`}),`, `,_jsx(_components.code,{children:`scripts`}),`, `,_jsx(_components.code,{children:`allow`}),`, and `,_jsx(_components.code,{children:`expires`}),` based on your security and caching needs.`]})}),`\n`,_jsxs(_components.p,{children:[`Finally, add the `,_jsx(_components.code,{children:`deploy`}),` hook to write the environment variable into the JSON file within the mounted directory. The path `,_jsx(_components.code,{children:`/app/storage`}),` typically corresponds to the `,_jsx(_components.code,{children:`storage`}),` mount point inside the container:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# .upsun/app.yaml or .upsun/config.yaml`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`hooks`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` deploy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` # Write the environment variable to a JSON file`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` printf '{\"API_ENDPOINT\": \"%s\"}\\\\\\\\n' \"$API_ENDPOINT\" > /app/storage/variables.json`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Your application can then fetch this `,_jsx(_components.code,{children:`/storage/variables.json`}),` file at runtime using a library like `,_jsx(_components.code,{children:`axios`}),` or the native `,_jsx(_components.code,{children:`fetch`}),` API to get the correct `,_jsx(_components.code,{children:`API_ENDPOINT`}),` for the current environment:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`29`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`29`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Using native fetch API`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/storage/variables.json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`HTTP error! status: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Parses the JSON response body`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` apiEndpoint`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`API_ENDPOINT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'API Endpoint from fetch:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiEndpoint`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Use the apiEndpoint in your application`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Error fetching config:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Using axios (assuming axios is installed and imported)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// import axios from 'axios';`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`axios`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/storage/variables.json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` apiEndpoint`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`API_ENDPOINT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// axios automatically parses JSON`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'API Endpoint from axios:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiEndpoint`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Use the apiEndpoint in your application`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Error fetching config with axios:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Choose the method that best suits your project structure and needs. Both methods allows a single build artifact to be deployed across different environments, each retrieving its specific configuration at runtime.`}),`\n`,_jsx(_components.p,{children:`This approach ensures your application build remains deterministic while allowing runtime flexibility for environment-specific settings like API endpoints.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{PostMeta,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"How to automatically inject multi-app endpoints as environment variables","subtitle":"Connect multiple applications within an Upsun project using their public URIs","date":"2025-04-28T17:00:00.000Z","image":"/images/posts/hands-on/route-ids-env/route-ids-env.webp","icon":"tutorial","featured":true,"author":["gmoigneu"],"sidebar":{"exclude":true},"type":"post","description":"Learn how to use Upsun route identifiers and the PLATFORM_ROUTES variable to easily get and use the hostnames of dynamically deployed applications in your project.\n \n","tags":["routes","environment","variables","jq","decoupled","multi-app","tutorial"],"categories":["hands-on"],"math":false,"href":"/posts/hands-on/route-ids-env"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[144,8703,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Define route identifiers","slug":"define-route-identifiers","depth":2,"children":[]},{"title":"Fetch specific URIs from $PLATFORM_ROUTES","slug":"fetch-specific-uris-from-$platform_routes","depth":2,"children":[]},{"title":"Set up environment variables using .environment","slug":"set-up-environment-variables-using-environment","depth":2,"children":[]},{"title":"Bonus tip: Use these variables in statically exported JavaScript applications","slug":"bonus-tip-use-these-variables-in-statically-exported-javascript-applications","depth":2,"children":[{"title":"Injecting different variable values on different environments","slug":"injecting-different-variable-values-on-different-environments","depth":3,"children":[]},{"title":"Approach 1: Dynamically constructing the URI (If applicable)","slug":"approach-1-dynamically-constructing-the-uri-if-applicable","depth":4,"children":[]},{"title":"Approach 2: Using a Deploy Hook and Runtime Configuration File","slug":"approach-2-using-a-deploy-hook-and-runtime-configuration-file","depth":4,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/upsun-c9761871/426c6190a2163560/sidebar-fix.js","/_mintlify/custom/upsun-c9761871/af4757650ec2f1cc/search-override.js"],"subdomain":"upsun-c9761871","siteName":"Upsun Developer","title":"How to automatically inject multi-app endpoints as environment variables - Upsun Developer","contextualStarterQuestions":[{"_id":"6ace001c4516b45226274709","deploymentId":"696781be74d50424a2a74647","questionText":"How do I inject endpoints dynamically?","status":"active","generatedBy":"contextual","path":"posts/hands-on/route-ids-env","createdAt":"2026-10-13T09:55:40.219Z","updatedAt":"2026-10-13T09:55:40.219Z","__v":0},{"_id":"6ace001c4516b45226274708","deploymentId":"696781be74d50424a2a74647","questionText":"What is PLATFORM_ROUTES variable?","status":"active","generatedBy":"contextual","path":"posts/hands-on/route-ids-env","createdAt":"2026-10-13T09:55:40.219Z","updatedAt":"2026-10-13T09:55:40.219Z","__v":0},{"_id":"6ace001c4516b45226274707","deploymentId":"696781be74d50424a2a74647","questionText":"How do I use route identifiers?","status":"active","generatedBy":"contextual","path":"posts/hands-on/route-ids-env","createdAt":"2026-10-13T09:55:40.219Z","updatedAt":"2026-10-13T09:55:40.219Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-13T09:54:36.280Z","gitLastModified":"2026-04-27T14:52:26.000Z","originalFileLocation":"posts/hands-on/route-ids-env.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to use Upsun route identifiers and the PLATFORM_ROUTES variable to easily get and use the hostnames of dynamically deployed applications in your project.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Upsun Developer\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"How to automatically inject multi-app endpoints as environment variables - Upsun Developer\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to use Upsun route identifiers and the PLATFORM_ROUTES variable to easily get and use the hostnames of dynamically deployed applications in your project.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Upsun Developer\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.upsun.com/posts/hands-on/route-ids-env\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://upsun-c9761871.mintlify.app/_mintlify/api/og/v2?division=Documentation\u0026amp;title=How+to+automatically+inject+multi-app+endpoints+as+environment+variables\u0026amp;description=Learn+how+to+use+Upsun+route+identifiers+and+the+PLATFORM_ROUTES+variable+to+easily+get+and+use+the+hostnames+of+dynamically+deployed+applications+in+your+proje\u0026amp;theme=a5db750ae46123aa22d266f2\u0026amp;signature=7ae5e30b38b04cc86dba458ac8ecae90487e5a6f4aea36864728cfdd548a05fc\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"How to automatically inject multi-app endpoints as environment variables - Upsun Developer\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to use Upsun route identifiers and the PLATFORM_ROUTES variable to easily get and use the hostnames of dynamically deployed applications in your project.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://upsun-c9761871.mintlify.app/_mintlify/api/og/v2?division=Documentation\u0026amp;title=How+to+automatically+inject+multi-app+endpoints+as+environment+variables\u0026amp;description=Learn+how+to+use+Upsun+route+identifiers+and+the+PLATFORM_ROUTES+variable+to+easily+get+and+use+the+hostnames+of+dynamically+deployed+applications+in+your+proje\u0026amp;theme=a5db750ae46123aa22d266f2\u0026amp;signature=7ae5e30b38b04cc86dba458ac8ecae90487e5a6f4aea36864728cfdd548a05fc\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/upsun-c9761871/rMHAq1HO1s16sbdD/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Upsun Developer\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6046ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developer.upsun.com/posts/hands-on/route-ids-env\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/posts/hands-on/route-ids-env.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developer.upsun.com/#organization\",\"name\":\"Upsun Developer\",\"url\":\"https://developer.upsun.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/upsun-c9761871/WSCgazBk0GWUPP4l/logo/Upsun-dev-center-light.svg?fit=max\u0026auto=format\u0026n=WSCgazBk0GWUPP4l\u0026q=85\u0026s=c35e42815c3d17de292fb0a86d41aa5f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developer.upsun.com#website\",\"name\":\"Upsun Developer\",\"url\":\"https://developer.upsun.com\",\"publisher\":{\"@id\":\"https://developer.upsun.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developer.upsun.com/posts/hands-on/route-ids-env#webpage\",\"url\":\"https://developer.upsun.com/posts/hands-on/route-ids-env\",\"name\":\"How to automatically inject multi-app endpoints as environment variables\",\"description\":\"Learn how to use Upsun route identifiers and the PLATFORM_ROUTES variable to easily get and use the hostnames of dynamically deployed applications in your project.\",\"dateModified\":\"2026-04-27T14:52:26.000Z\",\"isPartOf\":{\"@id\":\"https://developer.upsun.com#website\"}},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developer.upsun.com/posts/hands-on/route-ids-env#article\",\"headline\":\"How to automatically inject multi-app endpoints as environment variables\",\"name\":\"How to automatically inject multi-app endpoints as environment variables\",\"description\":\"Learn how to use Upsun route identifiers and the PLATFORM_ROUTES variable to easily get and use the hostnames of dynamically deployed applications in your project.\",\"url\":\"https://developer.upsun.com/posts/hands-on/route-ids-env\",\"mainEntityOfPage\":{\"@id\":\"https://developer.upsun.com/posts/hands-on/route-ids-env#webpage\"},\"dateModified\":\"2026-04-27T14:52:26.000Z\",\"publisher\":{\"@id\":\"https://developer.upsun.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developer.upsun.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Upsun Developer\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Upsun Developer","nav":{"global":{"anchors":[]},"tabs":[{"tab":"Home","icon":"house","pages":[{"mode":"custom","title":"Upsun Developer Center","href":""}]},{"tab":"Dispatch","icon":"https://mintlify.s3.us-west-1.amazonaws.com/upsun-c9761871/images/icons/dispatch.svg","anchors":[{"anchor":"Docs","icon":"book","pages":[{"mode":"custom","title":"Upsun Dispatch","href":"/dispatch"},{"group":"Get Started","icon":"rocket","expanded":false,"pages":[{"title":"Get Started with Upsun Dispatch","sidebarTitle":"Get Started","href":"/dispatch/docs/get-started/index"},{"title":"Quickstart","href":"/dispatch/docs/get-started/quickstart"},{"title":"Get support","href":"/dispatch/docs/get-started/support"}]},{"group":"Integrations","icon":"link","expanded":false,"pages":[{"title":"Integration overview","sidebarTitle":"Integration overview","href":"/dispatch/docs/integrations/index"},{"group":"VCS integrations","expanded":true,"pages":[{"title":"Set up GitHub","sidebarTitle":"GitHub","href":"/dispatch/docs/integrations/github"},{"title":"Set up GitLab","sidebarTitle":"GitLab","href":"/dispatch/docs/integrations/gitlab"}]},{"group":"Ticketing integrations","expanded":true,"pages":[{"title":"Set up Jira","sidebarTitle":"Jira","href":"/dispatch/docs/integrations/jira"},{"title":"Set up Linear","sidebarTitle":"Linear","href":"/dispatch/docs/integrations/linear"}]},{"group":"AI Models","root":{"title":"AI models","sidebarTitle":"AI models","href":"/dispatch/docs/models/index"},"expanded":true,"pages":[{"title":"Store your Anthropic key","sidebarTitle":"Anthropic","href":"/dispatch/docs/models/anthropic"},{"title":"Store your OpenAI key","sidebarTitle":"OpenAI","href":"/dispatch/docs/models/openai"}]}]},{"group":"Workflows","icon":"workflow","expanded":false,"pages":[{"title":"Workflows in Upsun Dispatch","sidebarTitle":"Concept","href":"/dispatch/docs/workflows/index"},{"group":"Built-in workflows","root":{"title":"Built-in workflows","sidebarTitle":"Built-in workflows","href":"/dispatch/docs/workflows/builtin"},"expanded":true,"pages":[{"title":"Code review","sidebarTitle":"Code review","href":"/dispatch/docs/workflows/code-review"},{"title":"Issue to code","sidebarTitle":"Issue to code","href":"/dispatch/docs/workflows/issue-to-code"}]}]},{"group":"Manage","icon":"layout-grid","expanded":false,"pages":[{"title":"Use the Upsun Dispatch console","href":"/dispatch/docs/dashboard/index"}]}]}]},{"tab":"Cloud","icon":"https://mintlify.s3.us-west-1.amazonaws.com/upsun-c9761871/images/icons/cloud.svg","anchors":[{"anchor":"Docs","icon":"book","pages":[{"mode":"custom","title":"Upsun Cloud","href":"/cloud"},{"group":"Get Started","icon":"rocket","expanded":false,"pages":[{"title":"Get Started with Upsun Cloud","sidebarTitle":"Quickstart","href":"/docs/get-started/index"},{"group":"Setup Guide","root":{"title":"Getting started with Upsun Cloud","sidebarTitle":"Introduction","href":"/docs/get-started/here/index"},"pages":[{"title":"Setup","href":"/docs/get-started/here/setup"},{"title":"Create a project","href":"/docs/get-started/here/create-project"},{"group":"Configure your project","root":{"title":"Configure your project","href":"/docs/get-started/here/configure/index"},"pages":[{"title":"JavaScript/Node.js","href":"/docs/get-started/here/configure/nodejs"},{"title":"PHP","href":"/docs/get-started/here/configure/php"},{"title":"Python","href":"/docs/get-started/here/configure/python"}]},{"title":"Set resources","href":"/docs/get-started/here/set-resources"},{"title":"Make changes to your project","sidebarTitle":"Revisions","href":"/docs/get-started/here/make-changes"},{"group":"Local development","root":{"title":"Local development","href":"/docs/get-started/here/local/index"},"pages":[{"title":"Tethered","href":"/docs/get-started/here/local/tethered"}]},{"title":"Third party integrations","href":"/docs/get-started/here/third-party"},{"title":"Get support","href":"/docs/get-started/here/support"}]},{"group":"Pick a Stack","root":{"title":"How to deploy","sidebarTitle":"Overview","href":"/docs/get-started/stacks/index"},"pages":[{"group":"PHP","root":{"title":"Deploy PHP apps on Upsun Cloud","sidebarTitle":"Overview","href":"/docs/get-started/stacks/php"},"pages":[{"group":"Laravel","root":{"title":"Deploy Laravel on Upsun Cloud","sidebarTitle":"Laravel","href":"/docs/get-started/stacks/laravel/index"},"pages":[{"title":"Get started","sidebarTitle":"Get started","href":"/docs/get-started/stacks/laravel/get-started"},{"title":"Configure environment variables","sidebarTitle":"Environment variables","href":"/docs/get-started/stacks/laravel/environment-variables"},{"title":"Set up cron jobs","sidebarTitle":"Cron jobs","href":"/docs/get-started/stacks/laravel/crons"},{"title":"Set up Redis","sidebarTitle":"Set up Redis","href":"/docs/get-started/stacks/laravel/setup-redis"},{"title":"Manage continuous observability with Upsun Blackfire","sidebarTitle":"Upsun Blackfire","href":"/docs/get-started/stacks/laravel/blackfire"},{"title":"Handle queues with Horizon","sidebarTitle":"Handle queues with Horizon","href":"/docs/get-started/stacks/laravel/laravel-horizon"},{"title":"Debug with Laravel Telescope","sidebarTitle":"Debug with Laravel Telescope","href":"/docs/get-started/stacks/laravel/laravel-telescope"},{"title":"FAQ","sidebarTitle":"FAQ","href":"/docs/get-started/stacks/laravel/faq"}]},{"group":"Symfony","root":{"title":"Deploy Symfony on Upsun Cloud","sidebarTitle":"Symfony","href":"/docs/get-started/stacks/symfony/index"},"pages":[{"title":"Get started","sidebarTitle":"Get started","href":"/docs/get-started/stacks/symfony/get-started"},{"title":"Configure environment variables","href":"/docs/get-started/stacks/symfony/environment-variables"},{"title":"Set up cron jobs","sidebarTitle":"Cron jobs","href":"/docs/get-started/stacks/symfony/crons"},{"title":"Configure workers","sidebarTitle":"Workers","href":"/docs/get-started/stacks/symfony/workers"},{"title":"Manage continuous observability with Upsun Blackfire","sidebarTitle":"Upsun Blackfire","href":"/docs/get-started/stacks/symfony/blackfire"},{"title":"Symfony integration","sidebarTitle":"Symfony integration","href":"/docs/get-started/stacks/symfony/integration"},{"title":"Local development","sidebarTitle":"Local development","href":"/docs/get-started/stacks/symfony/local"},{"title":"Symfony CLI Tips","sidebarTitle":"Symfony CLI Tips","href":"/docs/get-started/stacks/symfony/symfony-cli-tips"},{"title":"FAQ","sidebarTitle":"FAQ","href":"/docs/get-started/stacks/symfony/faq"}]}]},{"group":"JavaScript","root":{"title":"Deploy JavaScript apps on Upsun Cloud","sidebarTitle":"Overview","href":"/docs/get-started/stacks/javascript"},"pages":[{"title":"Deploy Next.js on Upsun Cloud","sidebarTitle":"Next.js","href":"/docs/get-started/stacks/nextjs"},{"group":"Express","root":{"title":"Deploy Express on Upsun Cloud","sidebarTitle":"Express","href":"/docs/get-started/stacks/express/index"},"pages":[{"title":"Add a database to Express","href":"/docs/get-started/stacks/express/add-database"}]},{"group":"Strapi","root":{"title":"Deploy Strapi on Upsun Cloud","sidebarTitle":"Strapi","href":"/docs/get-started/stacks/strapi/index"},"pages":[{"title":"Add a database to Strapi","sidebarTitle":"Add a database to Strapi","href":"/docs/get-started/stacks/strapi/add-database"}]}]},{"group":"Python","root":{"title":"Deploy Python apps on Upsun Cloud","sidebarTitle":"Overview","href":"/docs/get-started/stacks/python"},"pages":[{"title":"Deploy Django on Upsun Cloud","sidebarTitle":"Django","href":"/docs/get-started/stacks/django"},{"title":"Deploy Flask on Upsun Cloud","sidebarTitle":"Flask","href":"/docs/get-started/stacks/flask"}]},{"group":"AI","root":{"title":"How to deploy AI","href":"/docs/get-started/ai/index"},"pages":[{"title":"Host AI Agents","sidebarTitle":"AI Agents","href":"/docs/get-started/ai/aiagent"},{"title":"Hosting Model Context Protocol (MCP) Servers","sidebarTitle":"Deploy MCP","href":"/docs/get-started/ai/deploy-mcp"},{"title":"The Upsun MCP Server","href":"/docs/get-started/ai/using-the-mcp"},{"title":"Upsun Cloud performance agent","href":"/docs/get-started/ai/upsun-cloud-performance-agent"},{"title":"Upsun Cloud log-analyzer agent","href":"/docs/get-started/ai/upsun-cloud-log-analyzer-agent"}]}]}]},{"group":"Core Concepts","icon":"layers","expanded":false,"pages":[{"group":"How Upsun Cloud Works","root":{"title":"What is Upsun Cloud?","sidebarTitle":"What is Upsun Cloud?","href":"/docs/core-concepts/index"},"pages":[{"title":"Philosophy","href":"/docs/core-concepts/philosophy"}]},{"group":"Workflow Overview","root":{"title":"Workflow Overview","href":"/docs/core-concepts/workflow"},"pages":[{"group":"YAML","root":{"title":"YAML","href":"/docs/core-concepts/yaml/index"},"pages":[{"title":"What YAML is","href":"/docs/core-concepts/yaml/what-is-yaml"},{"title":"Upsun Cloud YAML structure","href":"/docs/core-concepts/yaml/yaml-structure"},{"title":"Upsun Cloud YAML tags","href":"/docs/core-concepts/yaml/platform-yaml-tags"}]},{"title":"Structure","href":"/docs/core-concepts/structure"},{"title":"Get support","href":"/docs/core-concepts/get-support"}]},{"group":"Using Upsun Cloud Effectively","root":{"title":"Using Upsun Cloud Effectively","sidebarTitle":"Best practices","href":"/docs/core-concepts/best-practices/index"},"pages":[{"title":"HTTP caching","href":"/docs/core-concepts/best-practices/http-caching"},{"title":"From monoliths through headless to microservices","sidebarTitle":"Monolith, headless or microservices?","href":"/docs/core-concepts/best-practices/oneormany"},{"title":"Keep your Git repository clean","sidebarTitle":"Clean repository","href":"/docs/core-concepts/best-practices/clean-repository"}]},{"group":"Common Tasks","root":{"title":"Common Tasks","sidebarTitle":"Common Tasks","href":"/docs/core-concepts/common-tasks/index"},"pages":[{"title":"Automate your code updates","sidebarTitle":"Automate your code updates","href":"/docs/core-concepts/common-tasks/dependency-updates"},{"title":"Restrict access to a service","sidebarTitle":"Restrict service access","href":"/docs/core-concepts/common-tasks/restrict-service-access"},{"title":"Exporting data","sidebarTitle":"Exporting data","href":"/docs/core-concepts/common-tasks/exporting"},{"title":"Upgrade to a maintained version of a runtime or service","sidebarTitle":"Upgrade runtimes and services","href":"/docs/core-concepts/upgrade-runtimes-services"}]}]},{"group":"Configure Apps \u0026 Services","icon":"settings","expanded":false,"pages":[{"group":"Configure apps","root":{"title":"Configure apps","sidebarTitle":"Overview","href":"/docs/configure-apps/index"},"pages":[{"group":"Image types","root":{"title":"Choose an image type","href":"/docs/configure-apps/app-reference/index"},"pages":[{"title":"Single-runtime image","href":"/docs/configure-apps/app-reference/single-runtime-image"},{"title":"Composable image","href":"/docs/configure-apps/app-reference/composable-image"}]},{"group":"Image properties","root":{"title":"Image properties","sidebarTitle":"Overview","href":"/docs/configure-apps/image-properties/index"},"pages":[{"title":"Access","href":"/docs/configure-apps/image-properties/access"},{"title":"Additional hosts","href":"/docs/configure-apps/image-properties/additional_hosts"},{"title":"Workload authorizations","sidebarTitle":"Authorizations","href":"/docs/configure-apps/image-properties/authorizations"},{"title":"Container profile","href":"/docs/configure-apps/image-properties/container_profile"},{"title":"Crons","href":"/docs/configure-apps/image-properties/crons"},{"title":"Hooks","href":"/docs/configure-apps/image-properties/hooks"},{"title":"Mounts","href":"/docs/configure-apps/image-properties/mounts"},{"title":"Relationships","href":"/docs/configure-apps/image-properties/relationships"},{"title":"Source","href":"/docs/configure-apps/image-properties/source"},{"title":"Variables","href":"/docs/configure-apps/image-properties/variables"},{"title":"Web","href":"/docs/configure-apps/image-properties/web"},{"title":"Workers","href":"/docs/configure-apps/image-properties/workers"}]},{"group":"Advanced","pages":[{"title":"Source operations","href":"/docs/configure-apps/source-operations"},{"title":"Runtime operations","href":"/docs/configure-apps/runtime-operations"},{"group":"Configure what's served","root":{"title":"Configure what's served","sidebarTitle":"Overview","href":"/docs/configure-apps/web/index"},"pages":[{"title":"Create a basic PHP app with a front controller","sidebarTitle":"PHP with front controller","href":"/docs/configure-apps/web/php-basic"},{"title":"Rewrite requests without redirects","sidebarTitle":"Rewrite requests","href":"/docs/configure-apps/web/rewrite-requests"},{"title":"Serve directories at different paths","sidebarTitle":"Serve different paths","href":"/docs/configure-apps/web/serve-different-directories"},{"title":"Serve static sites","sidebarTitle":"Static sites","href":"/docs/configure-apps/web/static"},{"title":"Set custom headers on static content","sidebarTitle":"Custom headers","href":"/docs/configure-apps/web/custom-headers"}]},{"group":"Multiple apps","root":{"title":"Set up multiple apps in a single project","sidebarTitle":"Overview","href":"/docs/configure-apps/multi-app/index"},"pages":[{"title":"Choose a project structure","href":"/docs/configure-apps/multi-app/project-structure"},{"title":"Define routes for your multiple apps","sidebarTitle":"Define routes","href":"/docs/configure-apps/multi-app/routes"},{"title":"Define relationships between your multiple apps","sidebarTitle":"Define relationships","href":"/docs/configure-apps/multi-app/relationships"}]},{"title":"Timezones","sidebarTitle":"Timezones","href":"/docs/configure-apps/timezone"},{"group":"Use build and deploy hooks","root":{"title":"Use build and deploy hooks","sidebarTitle":"Overview","href":"/docs/configure-apps/hooks/index"},"pages":[{"title":"Change hooks in different environments","href":"/docs/configure-apps/hooks/vary-hooks-by-environment"},{"title":"Comparison of hooks","href":"/docs/configure-apps/hooks/hooks-comparison"},{"title":"Use hooks with dependencies","href":"/docs/configure-apps/hooks/hooks-and-dependencies"}]},{"title":"Work with workers","sidebarTitle":"Work with workers","href":"/docs/configure-apps/workers"},{"title":"Configure tasks to run on-demand workloads and AI agents","sidebarTitle":"Task containers","href":"/docs/configure-apps/tasks"}]}]},{"group":"Languages","root":{"title":"Languages","sidebarTitle":"Overview","href":"/docs/languages/index"},"pages":[{"title":"C#/.NET Core","href":"/docs/languages/dotnet"},{"title":"Elixir","href":"/docs/languages/elixir"},{"title":"Go","href":"/docs/languages/go"},{"group":"Java","root":{"title":"Java","sidebarTitle":"Overview","href":"/docs/languages/java/index"},"pages":[{"title":"Moving a Java application to Upsun Cloud","sidebarTitle":"Moving to Upsun Cloud","href":"/docs/languages/java/migration"},{"title":"Performance tuning Java","sidebarTitle":"Tuning","href":"/docs/languages/java/tuning"}]},{"group":"JavaScript/Node.js","root":{"title":"JavaScript/Node.js","sidebarTitle":"Overview","href":"/docs/languages/nodejs/index"},"pages":[{"title":"Debugging","href":"/docs/languages/nodejs/debug"},{"title":"Manage Node.js versions","href":"/docs/languages/nodejs/node-version"}]},{"group":"PHP","root":{"title":"PHP","sidebarTitle":"Overview","href":"/docs/languages/php/index"},"pages":[{"title":"Extensions","href":"/docs/languages/php/extensions"},{"title":"PHP performance tuning","href":"/docs/languages/php/tuning"},{"title":"PHP-FPM sizing","href":"/docs/languages/php/fpm"},{"title":"FrankenPHP","sidebarTitle":"FrankenPHP","href":"/docs/languages/php/frankenphp"},{"title":"Using Xdebug","sidebarTitle":"Xdebug","href":"/docs/languages/php/xdebug"},{"title":"Custom Redis versions","sidebarTitle":"Custom Redis","href":"/docs/languages/php/redis"},{"title":"Swoole","sidebarTitle":"Swoole","href":"/docs/languages/php/swoole"},{"title":"Authenticated Composer repositories","sidebarTitle":"Authenticated Composer","href":"/docs/languages/php/composer-auth"},{"title":"Troubleshoot PHP","sidebarTitle":"Troubleshoot","href":"/docs/languages/php/troubleshoot"}]},{"group":"Python","root":{"title":"Python","sidebarTitle":"Overview","href":"/docs/languages/python/index"},"pages":[{"title":"Manage Python dependencies","sidebarTitle":"Manage dependencies","href":"/docs/languages/python/dependencies"},{"title":"Web servers","href":"/docs/languages/python/server"},{"title":"Manage Python versions in non-Python containers","sidebarTitle":"Python in non-Python containers","href":"/docs/languages/python/python-version"}]},{"title":"Ruby","href":"/docs/languages/ruby"},{"title":"Rust","href":"/docs/languages/rust"}]},{"group":"Services","root":{"title":"Add services","href":"/docs/add-services/index"},"pages":[{"title":"ClickHouse","href":"/docs/add-services/clickhouse"},{"title":"Elasticsearch and Enterprise Search (search service)","sidebarTitle":"Elasticsearch and Enterprise Search","href":"/docs/add-services/elasticsearch"},{"title":"Gotenberg","href":"/docs/add-services/gotenberg"},{"title":"Headless Chrome","href":"/docs/add-services/headless-chrome"},{"title":"InfluxDB (Database service)","sidebarTitle":"InfluxDB","href":"/docs/add-services/influxdb"},{"title":"Kafka (Message queue service)","sidebarTitle":"Kafka","href":"/docs/add-services/kafka"},{"title":"Memcached (Object cache)","sidebarTitle":"Memcached","href":"/docs/add-services/memcached"},{"title":"Mercure","sidebarTitle":"Mercure","href":"/docs/add-services/mercure"},{"title":"MongoDB (Database service)","sidebarTitle":"MongoDB","href":"/docs/add-services/mongodb"},{"group":"MariaDB/MySQL","root":{"title":"MariaDB/MySQL (database service)","sidebarTitle":"Overview","href":"/docs/add-services/mysql/index"},"pages":[{"title":"MariaDB read-only replication","sidebarTitle":"MariaDB read-only replication","href":"/docs/add-services/mysql/mysql-readonly-replication"},{"title":"MariaDB/MySQL external replication","sidebarTitle":"External replication","href":"/docs/add-services/mysql/mysql-replication"},{"title":"Troubleshoot MySQL","sidebarTitle":"Troubleshoot","href":"/docs/add-services/mysql/troubleshoot"}]},{"title":"Network Storage","href":"/docs/add-services/network-storage"},{"title":"OpenSearch (search service)","sidebarTitle":"OpenSearch","href":"/docs/add-services/opensearch"},{"group":"PostgreSQL","root":{"title":"PostgreSQL (Database service)","sidebarTitle":"Overview","href":"/docs/add-services/postgresql/index"},"pages":[{"title":"PostgreSQL read-only replication","sidebarTitle":"Read-only replication","href":"/docs/add-services/postgresql/postgresql-readonly-replication"}]},{"title":"RabbitMQ (message queue service)","sidebarTitle":"RabbitMQ","href":"/docs/add-services/rabbitmq"},{"title":"Redis (Object cache)","sidebarTitle":"Redis","href":"/docs/add-services/redis"},{"title":"Solr (Search service)","sidebarTitle":"Solr","href":"/docs/add-services/solr"},{"title":"Valkey","sidebarTitle":"Valkey","href":"/docs/add-services/valkey"},{"title":"Varnish","href":"/docs/add-services/varnish"},{"title":"Vault key management service","sidebarTitle":"Vault KMS","href":"/docs/add-services/vault"},{"group":"Self-hosted services","root":{"title":"Self-hosted services","sidebarTitle":"Self-hosted services","href":"/docs/add-services/self-hosted"},"pages":[{"group":"Public Docker images","root":{"title":"Self-hosted services from public Docker images","sidebarTitle":"Public Docker images","href":"/docs/add-services/docker-images/index"},"pages":[{"title":"Meilisearch","sidebarTitle":"Meilisearch","href":"/docs/add-services/docker-images/docker-meilisearch"},{"title":"n8n","sidebarTitle":"n8n","href":"/docs/add-services/docker-images/docker-n8n"}]}]}]},{"group":"Routes","root":{"title":"Define routes","sidebarTitle":"Overview","href":"/docs/routes/index"},"pages":[{"title":"Server Side Includes (SSI)","href":"/docs/routes/ssi"},{"title":"HTTP cache","href":"/docs/routes/cache"},{"title":"HTTPS","sidebarTitle":"HTTPS","href":"/docs/routes/https"},{"title":"Proxy routes","href":"/docs/routes/proxy"},{"title":"Redirects","href":"/docs/routes/redirects"}]}]},{"group":"Build, Deploy \u0026 Run","icon":"server","expanded":false,"pages":[{"title":"Build and deploy","href":"/docs/core-concepts/build-deploy"},{"group":"Local development","root":{"title":"Set up your local development environment","sidebarTitle":"Overview","href":"/docs/development/local/index"},"pages":[{"group":"Integrated environments","pages":[{"title":"Use DDEV for local development","sidebarTitle":"DDEV","href":"/docs/development/local/ddev"}]},{"group":"Supported environments","pages":[{"title":"Tethered local development","sidebarTitle":"Tethered","href":"/docs/development/local/tethered"},{"title":"Untethered local development","sidebarTitle":"Untethered","href":"/docs/development/local/untethered"}]}]},{"group":"Variables","root":{"title":"Variables overview","sidebarTitle":"Overview","href":"/docs/development/variables/index"},"pages":[{"title":"Set variables","href":"/docs/development/variables/set-variables"},{"title":"Use variables","href":"/docs/development/variables/use-variables"}]},{"group":"Development tools","root":{"title":"Development tools","href":"/docs/development/tools"},"pages":[{"title":"Access your site","href":"/docs/development/access-site"},{"title":"Transfer files to and from your app","sidebarTitle":"Transfer files","href":"/docs/development/file-transfer"},{"title":"HTTP Headers","sidebarTitle":"Headers","href":"/docs/development/headers"},{"title":"Send email from your Upsun Cloud environment using an SMTP proxy","sidebarTitle":"Email","href":"/docs/development/email"},{"title":"Pull code from a private Git repository","sidebarTitle":"Private repositories","href":"/docs/development/private-repository"},{"title":"Use Git submodules","sidebarTitle":"Git submodules","href":"/docs/development/submodules"},{"title":"Regions","href":"/docs/development/regions"},{"title":"Use Drush with Upsun Cloud","sidebarTitle":"Drush","href":"/docs/development/drush"}]},{"group":"SSH","root":{"title":"Connect securely with SSH","sidebarTitle":"Overview","href":"/docs/development/ssh/index"},"pages":[{"title":"Authenticate with SSH keys","sidebarTitle":"SSH keys","href":"/docs/development/ssh/ssh-keys"},{"title":"Troubleshoot SSH","href":"/docs/development/ssh/troubleshoot-ssh"}]},{"group":"Database management","root":{"title":"Sanitize databases","sidebarTitle":"Overview","href":"/docs/development/sanitize-db/index"},"pages":[{"title":"Sanitizing databases: MariaDB and Drupal","sidebarTitle":"MariaDB and Drupal","href":"/docs/development/sanitize-db/mariadb"},{"title":"Sanitizing databases: PostgreSQL and Django","sidebarTitle":"PostgreSQL and Django","href":"/docs/development/sanitize-db/postgresql"},{"title":"Sanitizing databases: PostgreSQL and Symfony","sidebarTitle":"PostgreSQL and Symfony","href":"/docs/development/sanitize-db/postgresql-symfony"}]}]},{"group":"Manage Projects","icon":"layout-grid","expanded":false,"pages":[{"title":"Manage projects","sidebarTitle":"Overview","href":"/docs/projects/index"},{"group":"Project settings","root":{"title":"Project settings","href":"/docs/projects/settings"},"pages":[{"title":"Change a project's region","sidebarTitle":"Change regions","href":"/docs/projects/region-migration"},{"title":"Change the project timezone","href":"/docs/projects/change-project-timezone"},{"title":"Delete a project","sidebarTitle":"Delete a project","href":"/docs/projects/delete-project"}]},{"group":"Custom domains","root":{"title":"Custom domains","sidebarTitle":"Overview","href":"/docs/domains/index"},"pages":[{"group":"Set up a custom domain","root":{"title":"Set up a custom domain","sidebarTitle":"Set up a custom domain","href":"/docs/domains/steps/index"},"pages":[{"title":"DNS management and apex domains","sidebarTitle":"DNS and apex domains","href":"/docs/domains/steps/dns"},{"title":"Configure a third-party TLS certificate","sidebarTitle":"Custom TLS certificates","href":"/docs/domains/steps/tls"},{"title":"Share subdomains across different projects","sidebarTitle":"Subdomains across projects","href":"/docs/domains/steps/subdomains"},{"title":"DNS challenge for domain ownership","sidebarTitle":"DNS challenge","href":"/docs/domains/steps/dns-challenge"},{"title":"Set up a custom domain on a preview environment","sidebarTitle":"Preview environment domains","href":"/docs/domains/steps/custom-domains-preview-environments"},{"title":"Troubleshoot domain issues","sidebarTitle":"Troubleshoot","href":"/docs/domains/troubleshoot"}]},{"group":"CDN","root":{"title":"Content delivery networks (CDNs)","sidebarTitle":"Overview","href":"/docs/domains/cdn/index"},"pages":[{"title":"Set up your Fastly CDN","sidebarTitle":"Fastly setup","href":"/docs/domains/cdn/fastly"},{"title":"Managed Fastly CDN","sidebarTitle":"Managed Fastly CDN","href":"/docs/domains/cdn/managed-fastly"},{"title":"Set up your Cloudflare CDN","sidebarTitle":"Cloudflare setup","href":"/docs/domains/cdn/cloudflare"}]}]},{"group":"Administration","root":{"title":"Administration","href":"/docs/administration/index"},"pages":[{"group":"Console","root":{"title":"Console","sidebarTitle":"Overview","href":"/docs/administration/web/index"},"pages":[{"title":"Configure a project","href":"/docs/administration/web/configure-project"},{"title":"Configure environments","sidebarTitle":"Configure environments","href":"/docs/administration/web/configure-environment"}]},{"title":"Organizations","href":"/docs/administration/organizations"},{"title":"Administer teams","sidebarTitle":"Teams","href":"/docs/administration/teams"},{"title":"Administer users","sidebarTitle":"Users","href":"/docs/administration/users"},{"title":"Pricing","href":"/docs/administration/pricing"},{"group":"Billing","root":{"title":"Billing","href":"/docs/administration/billing/index"},"pages":[{"title":"Set up a billing account and billing profile","href":"/docs/administration/billing/bp-setup"},{"title":"Add and manage payment methods","href":"/docs/administration/billing/bp-payment-method"},{"title":"View invoices","href":"/docs/administration/billing/bp-invoices"},{"title":"Monitor spending and usage","href":"/docs/administration/billing/bp-monitor-billing"},{"title":"Manage billing members on a billing profile","href":"/docs/administration/billing/bp-users"},{"title":"Edit a billing profile","href":"/docs/administration/billing/bp-edit-billing-profile"},{"title":"View discounts and commitments","href":"/docs/administration/billing/bp-discounts"},{"title":"View vouchers","href":"/docs/administration/billing/bp-vouchers"},{"title":"Transfer an organization to a different billing profile","href":"/docs/administration/billing/bp-transfers"},{"title":"Billing FAQ","href":"/docs/administration/billing/bp-faq"}]},{"title":"Server upgrades","href":"/docs/administration/servers"},{"group":"Security","root":{"title":"Security","sidebarTitle":"Overview","href":"/docs/administration/security/index"},"pages":[{"title":"Multifactor Authentication (MFA)","sidebarTitle":"Multifactor Authentication (MFA)","href":"/docs/administration/security/mfa"},{"title":"Single Sign-On (SSO)","sidebarTitle":"Single Sign-On (SSO)","href":"/docs/administration/security/sso"}]}]},{"group":"Security \u0026 compliance","root":{"title":"Security and compliance","sidebarTitle":"Overview","href":"/docs/security/index"},"pages":[{"title":"Fastly WAF","href":"/docs/security/fastly-waf"},{"title":"Upsun WAF","sidebarTitle":"Upsun WAF","href":"/docs/security/waf"},{"title":"Data retention","href":"/docs/security/data-retention"},{"title":"Project isolation","href":"/docs/security/project-isolation"}]}]},{"group":"Manage Environments","icon":"git-branch","expanded":false,"pages":[{"title":"Manage Upsun Cloud environments","sidebarTitle":"Overview","href":"/docs/environments/index"},{"group":"Backup \u0026 restore","root":{"title":"Backup \u0026 restore","href":"/docs/environments/backup-restore"},"pages":[{"title":"Back up an environment","sidebarTitle":"Back up an environment","href":"/docs/environments/backup"},{"title":"Restore an environment from a backup","sidebarTitle":"Restore an environment","href":"/docs/environments/restore"}]},{"group":"Environment settings","root":{"title":"Environment settings","href":"/docs/environments/settings"},"pages":[{"title":"Change an environment's parent","sidebarTitle":"Change parent","href":"/docs/environments/change-parent"},{"title":"Rename the default environment","sidebarTitle":"Rename the default environment","href":"/docs/environments/default-environment"},{"title":"Configure HTTP access control","sidebarTitle":"Configure HTTP access control","href":"/docs/environments/http-access-control"},{"title":"Manage search indexing for an environment","sidebarTitle":"Manage search indexing","href":"/docs/environments/search-engine-visibility"}]},{"group":"Environment actions","root":{"title":"Environment actions","href":"/docs/environments/actions"},"pages":[{"title":"Cancel an activity","href":"/docs/environments/cancel-activity"},{"title":"Deactivate an environment","sidebarTitle":"Deactivate an environment","href":"/docs/environments/deactivate-environment"}]}]},{"group":"Manage Resources","icon":"gauge","expanded":false,"pages":[{"title":"Manage resources","sidebarTitle":"Overview","href":"/docs/manage-resources/index"},{"title":"How resources work on Upsun Cloud","sidebarTitle":"How resources work","href":"/docs/manage-resources/how-resources-work"},{"group":"Configure resources","root":{"title":"Configure resources","href":"/docs/manage-resources/configure"},"pages":[{"title":"Resource initialization","sidebarTitle":"Resource initialization","href":"/docs/manage-resources/resource-init"},{"title":"Resource configuration","sidebarTitle":"Resource configuration","href":"/docs/manage-resources/adjust-resources"},{"title":"Project build resources","sidebarTitle":"Project build resources","href":"/docs/manage-resources/build-resources"}]},{"group":"Scaling","root":{"title":"Scaling","href":"/docs/manage-resources/scaling"},"pages":[{"title":"Autoscaling","sidebarTitle":"Autoscaling","href":"/docs/manage-resources/autoscaling"},{"title":"Guaranteed resources","sidebarTitle":"Guaranteed resources","href":"/docs/manage-resources/guaranteed-resources"}]},{"title":"Object storage","sidebarTitle":"Object storage","href":"/docs/manage-resources/object-storage"}]},{"group":"Observability \u0026 Metrics","icon":"activity","expanded":false,"pages":[{"title":"Increase observability","sidebarTitle":"Overview","href":"/docs/observability/index"},{"group":"Infrastructure metrics","root":{"title":"Infrastructure metrics","sidebarTitle":"Overview","href":"/docs/observability/metrics/index"},"pages":[{"title":"HTTP metrics","sidebarTitle":"HTTP metrics","href":"/docs/observability/metrics/http-metrics"},{"title":"Understand metrics","sidebarTitle":"Understand metrics","href":"/docs/observability/metrics/understand-metrics"}]},{"group":"Application metrics","root":{"title":"Application metrics","sidebarTitle":"Overview","href":"/docs/observability/application-metrics/index"},"pages":[{"title":"Monitor Cron job executions","sidebarTitle":"Monitor Cron job executions","href":"/docs/observability/application-metrics/cron-metrics"},{"title":"Understanding application observability","sidebarTitle":"Understanding application observability","href":"/docs/observability/application-metrics/understanding"},{"title":"Upsun Blackfire for PHP and Python","sidebarTitle":"Upsun Blackfire for PHP and Python","href":"/docs/observability/application-metrics/blackfire"},{"group":"Continuous profiling","pages":[{"title":"Continuous Profiling dashboard","sidebarTitle":"Dashboard","href":"/docs/observability/application-metrics/cont-prof"},{"title":"Comparing Continuous Profiling Timeframes","sidebarTitle":"Comparing Timeframes","href":"/docs/observability/application-metrics/cont-prof-comparison"},{"title":"Continuous profiling for Go","sidebarTitle":"Go continuous profiler","href":"/docs/observability/application-metrics/go"},{"title":"Continuous profiling for Java","sidebarTitle":"Java continuous profiler","href":"/docs/observability/application-metrics/java"},{"title":"Continuous profiling for Node.js","sidebarTitle":"Node.js continuous profiler","href":"/docs/observability/application-metrics/nodejs"},{"title":"Continuous profiling for PHP","sidebarTitle":"PHP continuous profiler","href":"/docs/observability/application-metrics/php"},{"title":"Continuous profiling for Python","sidebarTitle":"Python continuous profiler","href":"/docs/observability/application-metrics/python"},{"title":"Continuous profiling for Ruby","sidebarTitle":"Ruby continuous profiler","href":"/docs/observability/application-metrics/ruby"},{"title":"Continuous profiling for Rust","sidebarTitle":"Rust continuous profiler","href":"/docs/observability/application-metrics/rust"}]}]},{"group":"Logs","root":{"title":"Consume logs","sidebarTitle":"Overview","href":"/docs/observability/logs/index"},"pages":[{"title":"Log Explorer","sidebarTitle":"Log Explorer","href":"/docs/observability/logs/log-explorer"},{"title":"Access your logs","sidebarTitle":"Access logs","href":"/docs/observability/logs/access-logs"},{"title":"Forward Upsun Cloud and Upsun Blackfire logs","sidebarTitle":"Forward Upsun Cloud and Upsun Blackfire logs","href":"/docs/observability/logs/forward-logs"}]}]},{"group":"Integrations","icon":"link","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"External Integrations","href":"/docs/integrations/overview"},{"group":"Source integrations","root":{"title":"Source integrations","sidebarTitle":"Overview","href":"/docs/integrations/source/index"},"pages":[{"title":"Integrate with Bitbucket","sidebarTitle":"Bitbucket","href":"/docs/integrations/source/bitbucket"},{"title":"Integrate with GitHub","sidebarTitle":"GitHub","href":"/docs/integrations/source/github"},{"title":"Integrate with GitLab","sidebarTitle":"GitLab","href":"/docs/integrations/source/gitlab"},{"title":"Resolve access issues with source integrations","sidebarTitle":"Resolve access issues with source integrations","href":"/docs/integrations/source/troubleshoot"}]},{"group":"Activity scripts","root":{"title":"Activity scripts","sidebarTitle":"Overview","href":"/docs/integrations/activity/index"},"pages":[{"title":"Activity reference","sidebarTitle":"Activity reference","href":"/docs/integrations/activity/reference"},{"title":"Utility routines","sidebarTitle":"Utility routines","href":"/docs/integrations/activity/utility"},{"title":"Webhooks","href":"/docs/integrations/activity/webhooks"},{"group":"Examples","pages":[{"title":"Example: Discord","href":"/docs/integrations/activity/discord"},{"title":"Example: Slack","sidebarTitle":"Example: Slack","href":"/docs/integrations/activity/slack"}]}]},{"title":"Fastly CDN","href":"/docs/integrations/fastly-cdn"},{"title":"Health notifications","href":"/docs/integrations/notifications"}]},{"group":"Troubleshooting","icon":"circle-alert","expanded":false,"pages":[{"title":"502 error resolution guide","sidebarTitle":"502 error resolutions","href":"/docs/troubleshooting/502-errors"},{"title":"Troubleshoot development","sidebarTitle":"Development","href":"/docs/troubleshooting/general"},{"title":"Troubleshoot disks","sidebarTitle":"Disks","href":"/docs/troubleshooting/disks"},{"title":"Troubleshoot mounts","sidebarTitle":"Mounts","href":"/docs/troubleshooting/mounts"}]},{"group":"Resources","icon":"code","expanded":false,"pages":[{"title":"Glossary","sidebarTitle":"Glossary","href":"/docs/glossary/index"},{"title":"Data Register","sidebarTitle":"Data Register","href":"/docs/registry/index"},{"title":"Request features","sidebarTitle":"Request features","href":"/docs/request-features/index"}]}]},{"anchor":"Tutorials","icon":"graduation-cap","pages":[{"title":"Tutorials","sidebarTitle":"Overview","icon":"graduation-cap","href":"/tutorials/index"},{"group":"AI use cases","icon":"brain","pages":[{"title":"AI use cases","sidebarTitle":"Overview","href":"/tutorials/ai/index"},{"title":"Building a LangChain chatbot on Upsun Cloud","sidebarTitle":"LangChain chatbot","tag":"New","href":"/tutorials/ai/langchain-chatbot"},{"title":"Building a RAG pipeline with Qdrant on Upsun Cloud","sidebarTitle":"RAG pipeline","tag":"New","href":"/tutorials/ai/rag-pipeline"},{"title":"Deploying a coding agent with opencode on Upsun Cloud","sidebarTitle":"Coding agent","tag":"New","href":"/tutorials/ai/coding-agent"},{"title":"Building a news digest with workers on Upsun Cloud","sidebarTitle":"News digest","tag":"New","href":"/tutorials/ai/news-digest"},{"title":"Building an AI support ticket classifier on Upsun Cloud","sidebarTitle":"Form processing","tag":"New","href":"/tutorials/ai/form-processing"},{"title":"Building an AI-powered BI tool on Upsun Cloud","sidebarTitle":"eCommerce insights","tag":"New","href":"/tutorials/ai/ecommerce-insights"}]},{"group":"Self-hosted services","icon":"server","pages":[{"title":"Self-hosted services","sidebarTitle":"Overview","href":"/tutorials/self-hosted/index"},{"title":"Qdrant","sidebarTitle":"Qdrant","href":"/tutorials/self-hosted/qdrant"},{"title":"Chroma","sidebarTitle":"Chroma","href":"/tutorials/self-hosted/chroma"}]},{"group":"CMS guides","icon":"newspaper","pages":[{"title":"CMS guides","sidebarTitle":"Overview","href":"/tutorials/cms/index"},{"group":"WordPress","root":{"title":"Deploy WordPress on Upsun Cloud","sidebarTitle":"WordPress","href":"/tutorials/wordpress/index"},"pages":[{"title":"Deploy Vanilla WordPress on Upsun Cloud","sidebarTitle":"Vanilla WordPress","href":"/tutorials/wordpress/vanilla"},{"title":"Deploy Composer-based WordPress on Upsun Cloud","sidebarTitle":"Composer WordPress","href":"/tutorials/wordpress/composer"},{"title":"Deploy Bedrock-based WordPress on Upsun Cloud","sidebarTitle":"Bedrock WordPress","href":"/tutorials/wordpress/bedrock"},{"title":"Deploy WordPress Multisite on Upsun Cloud","sidebarTitle":"WordPress Multisite","href":"/tutorials/wordpress/multisite"}]},{"title":"Deploy Drupal on Upsun Cloud","sidebarTitle":"Drupal","href":"/tutorials/drupal"},{"title":"Deploy Magento on Upsun Cloud","sidebarTitle":"Magento","href":"/tutorials/magento"},{"title":"Deploy Shopware on Upsun Cloud","sidebarTitle":"Shopware","href":"/tutorials/shopware"},{"title":"Deploy Pimcore on Upsun Cloud","sidebarTitle":"Pimcore","href":"/tutorials/pimcore"},{"title":"Deploy Liferay on Upsun Cloud","sidebarTitle":"Liferay","href":"/tutorials/liferay"}]},{"group":"Migration guides","icon":"move-right","pages":[{"title":"Migration guides","sidebarTitle":"Overview","href":"/tutorials/migration/index"},{"title":"Migrating from another provider to Upsun Cloud","sidebarTitle":"From another provider","href":"/tutorials/migration/from-other-provider"},{"title":"Converting from Upsun Fixed (formerly Platform.sh)","sidebarTitle":"Converting from Upsun Fixed (formerly Platform.sh)","href":"/tutorials/migration/from-fixed"}]}]},{"anchor":"API","icon":"code","pages":[{"title":"Upsun Cloud API","sidebarTitle":"API Home","icon":"code","href":"/api/index"},{"group":"SDK","pages":[{"title":"Overview","icon":"book-open","sidebarTitle":"Overview","href":"/api/sdk/overview"},{"title":"Upsun Cloud SDK for PHP","sidebarTitle":"PHP","icon":"php","tag":"Beta","href":"/api/sdk/php"},{"title":"Upsun Cloud SDK for NodeJs","sidebarTitle":"NodeJs","icon":"js","tag":"Beta","href":"/api/sdk/js"}]},{"group":"REST API","pages":[{"title":"Overview","icon":"book-open","sidebarTitle":"Overview","href":"/api/rest/overview"},{"title":"Authentication","icon":"lock","sidebarTitle":"Authentication","href":"/api/rest/authentication"},{"title":"Errors","icon":"circle-x","sidebarTitle":"Errors","href":"/api/rest/errors"},{"title":"Endpoints","icon":"route","sidebarTitle":"Endpoints","href":"/api/rest/endpoints"}]},{"group":"OpenAPI Reference","pages":[{"group":"API Reference","pages":[{"title":"Query project carbon emissions metrics for an entire organization","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/metrics/carbon","href":"/api-reference/query-project-carbon-emissions-metrics-for-an-entire-organization"},{"title":"List support tickets","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /tickets","href":"/api-reference/list-support-tickets"}]},{"group":"Add-ons","pages":[{"title":"Get add-ons","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/addons","href":"/api-reference/add-ons/get-add-ons"}]},{"group":"Alerts","pages":[{"title":"Get usage alerts for a subscription","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /alerts/subscriptions/{subscriptionId}/usage","href":"/api-reference/alerts/get-usage-alerts-for-a-subscription"},{"title":"Update usage alerts.","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /alerts/subscriptions/{subscriptionId}/usage","href":"/api-reference/alerts/update-usage-alerts"}]},{"group":"API Tokens","pages":[{"title":"List a user's API tokens","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/api-tokens","href":"/api-reference/api-tokens/list-a-users-api-tokens"},{"title":"Create an API token","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /users/{user_id}/api-tokens","href":"/api-reference/api-tokens/create-an-api-token"},{"title":"Get an API token","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/api-tokens/{token_id}","href":"/api-reference/api-tokens/get-an-api-token"},{"title":"Delete an API token","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /users/{user_id}/api-tokens/{token_id}","href":"/api-reference/api-tokens/delete-an-api-token"}]},{"group":"Autoscaling","pages":[{"title":"Retrieves Autoscaler settings","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/autoscaling/settings","href":"/api-reference/autoscaling/retrieves-autoscaler-settings"},{"title":"Updates Autoscaler settings","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/autoscaling/settings","href":"/api-reference/autoscaling/updates-autoscaler-settings"},{"title":"Modifies Autoscaler settings","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/environments/{environmentId}/autoscaling/settings","href":"/api-reference/autoscaling/modifies-autoscaler-settings"}]},{"group":"Blackfire Monitoring","pages":[{"title":"Get server cache metrics","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/server/caches","href":"/api-reference/blackfire-monitoring/get-server-cache-metrics"},{"title":"Get server monitoring overview","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/server","href":"/api-reference/blackfire-monitoring/get-server-monitoring-overview"},{"title":"Get server transaction breakdown","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/server/transactions-break-down","href":"/api-reference/blackfire-monitoring/get-server-transaction-breakdown"},{"title":"Get top spans","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/server/top-spans","href":"/api-reference/blackfire-monitoring/get-top-spans"}]},{"group":"Blackfire Profiling","pages":[{"title":"Get profile timeline data","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/timeline","href":"/api-reference/blackfire-profiling/get-profile-timeline-data"},{"title":"Get profile subprofiles","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/subprofiles","href":"/api-reference/blackfire-profiling/get-profile-subprofiles"},{"title":"Get profile details","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/profile","href":"/api-reference/blackfire-profiling/get-profile-details"},{"title":"Get profile call graph","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/graph","href":"/api-reference/blackfire-profiling/get-profile-call-graph"},{"title":"Get recommendation statistics","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/profiles/recommendations","href":"/api-reference/blackfire-profiling/get-recommendation-statistics"},{"title":"List profiling results","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/profiles","href":"/api-reference/blackfire-profiling/list-profiling-results"}]},{"group":"Cert Management","pages":[{"title":"Get list of SSL certificates","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/certificates","href":"/api-reference/cert-management/get-list-of-ssl-certificates"},{"title":"Add an SSL certificate","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/certificates","href":"/api-reference/cert-management/add-an-ssl-certificate"},{"title":"Get an SSL certificate","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/certificates/{certificateId}","href":"/api-reference/cert-management/get-an-ssl-certificate"},{"title":"Delete an SSL certificate","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/certificates/{certificateId}","href":"/api-reference/cert-management/delete-an-ssl-certificate"},{"title":"Update an SSL certificate","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/certificates/{certificateId}","href":"/api-reference/cert-management/update-an-ssl-certificate"},{"title":"Get projects provisioners","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/provisioners","href":"/api-reference/cert-management/get-projects-provisioners"},{"title":"Get projects provisioners 1","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/provisioners/{certificateProvisionerDocumentId}","href":"/api-reference/cert-management/get-projects-provisioners-1"},{"title":"Patch projects provisioners","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/provisioners/{certificateProvisionerDocumentId}","href":"/api-reference/cert-management/patch-projects-provisioners"}]},{"group":"Connections","pages":[{"title":"List federated login connections","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/connections","href":"/api-reference/connections/list-federated-login-connections"},{"title":"Get a federated login connection","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/connections/{provider}","href":"/api-reference/connections/get-a-federated-login-connection"},{"title":"Delete a federated login connection","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /users/{user_id}/connections/{provider}","href":"/api-reference/connections/delete-a-federated-login-connection"}]},{"group":"Continuous Profiling","pages":[{"title":"List profiled applications","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{envId}/continuous-profiling","href":"/api-reference/continuous-profiling/list-profiled-applications"},{"title":"Get application timeline","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}","href":"/api-reference/continuous-profiling/get-application-timeline"},{"title":"Get merged profile","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/merge","href":"/api-reference/continuous-profiling/get-merged-profile"},{"title":"Get application filter values","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter","href":"/api-reference/continuous-profiling/get-application-filter-values"}]},{"group":"Deployment","pages":[{"title":"Get an environment's deployment information","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/deployments","href":"/api-reference/deployment/get-an-environments-deployment-information"},{"title":"Get a single environment deployment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}","href":"/api-reference/deployment/get-a-single-environment-deployment"}]},{"group":"Deployment Target","pages":[{"title":"Get project deployment target info","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/deployments","href":"/api-reference/deployment-target/get-project-deployment-target-info"},{"title":"Create a project deployment target","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/deployments","href":"/api-reference/deployment-target/create-a-project-deployment-target"},{"title":"Get a single project deployment target","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/deployments/{deploymentTargetConfigurationId}","href":"/api-reference/deployment-target/get-a-single-project-deployment-target"},{"title":"Delete a single project deployment target","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/deployments/{deploymentTargetConfigurationId}","href":"/api-reference/deployment-target/delete-a-single-project-deployment-target"},{"title":"Update a project deployment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/deployments/{deploymentTargetConfigurationId}","href":"/api-reference/deployment-target/update-a-project-deployment"}]},{"group":"Diff","pages":[{"title":"Get projects gitdiffs ","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/git/diffs/{diffBaseId}/{diffTargetId}","href":"/api-reference/diff/get-projects-gitdiffs-"}]},{"group":"Discounts","pages":[{"title":"Get an organization discount","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /discounts/{id}","href":"/api-reference/discounts/get-an-organization-discount"},{"title":"Get the value of the First Project Incentive discount","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /discounts/types/allowance","href":"/api-reference/discounts/get-the-value-of-the-first-project-incentive-discount"},{"title":"List organization discounts","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/discounts","href":"/api-reference/discounts/list-organization-discounts"}]},{"group":"Domain Claim","pages":[{"title":"Get projects domain claims","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/domain-claims","href":"/api-reference/domain-claim/get-projects-domain-claims"},{"title":"Post projects domain claims","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/domain-claims","href":"/api-reference/domain-claim/post-projects-domain-claims"},{"title":"Get projects domain claims 1","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/domain-claims/{domainClaimId}","href":"/api-reference/domain-claim/get-projects-domain-claims-1"},{"title":"Delete projects domain claims","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/domain-claims/{domainClaimId}","href":"/api-reference/domain-claim/delete-projects-domain-claims"},{"title":"Patch projects domain claims","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/domain-claims/{domainClaimId}","href":"/api-reference/domain-claim/patch-projects-domain-claims"}]},{"group":"Domain Management","pages":[{"title":"Get list of project domains","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/domains","href":"/api-reference/domain-management/get-list-of-project-domains"},{"title":"Add a project domain","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/domains","href":"/api-reference/domain-management/add-a-project-domain"},{"title":"Get a project domain","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/domains/{domainId}","href":"/api-reference/domain-management/get-a-project-domain"},{"title":"Delete a project domain","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/domains/{domainId}","href":"/api-reference/domain-management/delete-a-project-domain"},{"title":"Update a project domain","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/domains/{domainId}","href":"/api-reference/domain-management/update-a-project-domain"},{"title":"Get a list of environment domains","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/domains","href":"/api-reference/domain-management/get-a-list-of-environment-domains"},{"title":"Add an environment domain","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/domains","href":"/api-reference/domain-management/add-an-environment-domain"},{"title":"Get an environment domain","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/domains/{domainId}","href":"/api-reference/domain-management/get-an-environment-domain"},{"title":"Delete an environment domain","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/environments/{environmentId}/domains/{domainId}","href":"/api-reference/domain-management/delete-an-environment-domain"},{"title":"Update an environment domain","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/environments/{environmentId}/domains/{domainId}","href":"/api-reference/domain-management/update-an-environment-domain"}]},{"group":"Entrypoint","pages":[{"title":"Get observability entrypoint","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability","href":"/api-reference/entrypoint/get-observability-entrypoint"}]},{"group":"Environment","pages":[{"title":"Get list of project environments","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments","href":"/api-reference/environment/get-list-of-project-environments"},{"title":"Get an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}","href":"/api-reference/environment/get-an-environment"},{"title":"Delete an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/environments/{environmentId}","href":"/api-reference/environment/delete-an-environment"},{"title":"Update an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/environments/{environmentId}","href":"/api-reference/environment/update-an-environment"},{"title":"Activate an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/activate","href":"/api-reference/environment/activate-an-environment"},{"title":"Branch an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/branch","href":"/api-reference/environment/branch-an-environment"},{"title":"Deactivate an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/deactivate","href":"/api-reference/environment/deactivate-an-environment"},{"title":"Deploy an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/deploy","href":"/api-reference/environment/deploy-an-environment"},{"title":"Initialize a new environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/initialize","href":"/api-reference/environment/initialize-a-new-environment"},{"title":"Post projects environments maintenance redeploy","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/maintenance-redeploy","href":"/api-reference/environment/post-projects-environments-maintenance-redeploy"},{"title":"Merge an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/merge","href":"/api-reference/environment/merge-an-environment"},{"title":"Pause an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/pause","href":"/api-reference/environment/pause-an-environment"},{"title":"Redeploy an environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/redeploy","href":"/api-reference/environment/redeploy-an-environment"},{"title":"Resume a paused environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/resume","href":"/api-reference/environment/resume-a-paused-environment"},{"title":"Synchronize a child environment with its parent","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/synchronize","href":"/api-reference/environment/synchronize-a-child-environment-with-its-parent"}]},{"group":"Environment Activity","pages":[{"title":"Get environment activity log","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/activities","href":"/api-reference/environment-activity/get-environment-activity-log"},{"title":"Get an environment activity log entry","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/activities/{activityId}","href":"/api-reference/environment-activity/get-an-environment-activity-log-entry"},{"title":"Cancel an environment activity","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/activities/{activityId}/cancel","href":"/api-reference/environment-activity/cancel-an-environment-activity"}]},{"group":"Environment Backups","pages":[{"title":"Create backup of environment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/backup","href":"/api-reference/environment-backups/create-backup-of-environment"},{"title":"Get an environment's backup list","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/backups","href":"/api-reference/environment-backups/get-an-environments-backup-list"},{"title":"Get an environment backup's info","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/backups/{backupId}","href":"/api-reference/environment-backups/get-an-environment-backups-info"},{"title":"Delete an environment backup","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/environments/{environmentId}/backups/{backupId}","href":"/api-reference/environment-backups/delete-an-environment-backup"},{"title":"Restore an environment snapshot","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/backups/{backupId}/restore","href":"/api-reference/environment-backups/restore-an-environment-snapshot"}]},{"group":"Environment Type","pages":[{"title":"Get environment types","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environment-types","href":"/api-reference/environment-type/get-environment-types"},{"title":"Get environment type links","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environment-types/{environmentTypeId}","href":"/api-reference/environment-type/get-environment-type-links"}]},{"group":"Environment Variables","pages":[{"title":"Get list of environment variables","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/variables","href":"/api-reference/environment-variables/get-list-of-environment-variables"},{"title":"Add an environment variable","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/variables","href":"/api-reference/environment-variables/add-an-environment-variable"},{"title":"Get an environment variable","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/variables/{variableId}","href":"/api-reference/environment-variables/get-an-environment-variable"},{"title":"Delete an environment variable","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/environments/{environmentId}/variables/{variableId}","href":"/api-reference/environment-variables/delete-an-environment-variable"},{"title":"Update an environment variable","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/environments/{environmentId}/variables/{variableId}","href":"/api-reference/environment-variables/update-an-environment-variable"}]},{"group":"Grants","pages":[{"title":"List extended access of a user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/extended-access","href":"/api-reference/grants/list-extended-access-of-a-user"},{"title":"Get access document by access ID","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /access/{access_id}","href":"/api-reference/grants/get-access-document-by-access-id"}]},{"group":"Http Traffic","pages":[{"title":"Get HTTP traffic timeline by URL","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls","href":"/api-reference/http-traffic/get-http-traffic-timeline-by-url"},{"title":"Get HTTP traffic timeline by IP","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/http/breakdown/ips","href":"/api-reference/http-traffic/get-http-traffic-timeline-by-ip"},{"title":"Get HTTP traffic timeline by user agent","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/http/breakdown/user-agents","href":"/api-reference/http-traffic/get-http-traffic-timeline-by-user-agent"}]},{"group":"Invoices","pages":[{"title":"List invoices","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/invoices","href":"/api-reference/invoices/list-invoices"},{"title":"Get invoice","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/invoices/{invoice_id}","href":"/api-reference/invoices/get-invoice"}]},{"group":"MFA","pages":[{"title":"Get information about TOTP enrollment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/totp","href":"/api-reference/mfa/get-information-about-totp-enrollment"},{"title":"Confirm TOTP enrollment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /users/{user_id}/totp","href":"/api-reference/mfa/confirm-totp-enrollment"},{"title":"Withdraw TOTP enrollment","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /users/{user_id}/totp","href":"/api-reference/mfa/withdraw-totp-enrollment"},{"title":"Re-create recovery codes","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /users/{user_id}/codes","href":"/api-reference/mfa/re-create-recovery-codes"},{"title":"Get organization MFA settings","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/mfa-enforcement","href":"/api-reference/mfa/get-organization-mfa-settings"},{"title":"Enable organization MFA enforcement","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations/{organization_id}/mfa-enforcement/enable","href":"/api-reference/mfa/enable-organization-mfa-enforcement"},{"title":"Disable organization MFA enforcement","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations/{organization_id}/mfa-enforcement/disable","href":"/api-reference/mfa/disable-organization-mfa-enforcement"},{"title":"Send MFA reminders to organization members","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations/{organization_id}/mfa/remind","href":"/api-reference/mfa/send-mfa-reminders-to-organization-members"}]},{"group":"Orders","pages":[{"title":"Download an invoice.","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /orders/download","href":"/api-reference/orders/download-an-invoice"},{"title":"List orders","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/orders","href":"/api-reference/orders/list-orders"},{"title":"Get order","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/orders/{order_id}","href":"/api-reference/orders/get-order"},{"title":"Create confirmation credentials for for 3D-Secure","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations/{organization_id}/orders/{order_id}/authorize","href":"/api-reference/orders/create-confirmation-credentials-for-for-3d-secure"}]},{"group":"Organization Invitations","pages":[{"title":"List invitations to an organization","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/invitations","href":"/api-reference/organization-invitations/list-invitations-to-an-organization"},{"title":"Invite user to an organization by email","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations/{organization_id}/invitations","href":"/api-reference/organization-invitations/invite-user-to-an-organization-by-email"},{"title":"Cancel a pending invitation to an organization","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /organizations/{organization_id}/invitations/{invitation_id}","href":"/api-reference/organization-invitations/cancel-a-pending-invitation-to-an-organization"}]},{"group":"Organization Management","pages":[{"title":"Estimate total spend","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/estimate","href":"/api-reference/organization-management/estimate-total-spend"},{"title":"Get billing alert configuration","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/alerts/billing","href":"/api-reference/organization-management/get-billing-alert-configuration"},{"title":"Update billing alert configuration","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /organizations/{organization_id}/alerts/billing","href":"/api-reference/organization-management/update-billing-alert-configuration"},{"title":"Get organization prepayment information","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/prepayment","href":"/api-reference/organization-management/get-organization-prepayment-information"},{"title":"List organization prepayment transactions","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/prepayment/transactions","href":"/api-reference/organization-management/list-organization-prepayment-transactions"}]},{"group":"Organization Members","pages":[{"title":"List organization members","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/members","href":"/api-reference/organization-members/list-organization-members"},{"title":"Create organization member","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations/{organization_id}/members","href":"/api-reference/organization-members/create-organization-member"},{"title":"Get organization member","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/members/{user_id}","href":"/api-reference/organization-members/get-organization-member"},{"title":"Delete organization member","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /organizations/{organization_id}/members/{user_id}","href":"/api-reference/organization-members/delete-organization-member"},{"title":"Update organization member","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /organizations/{organization_id}/members/{user_id}","href":"/api-reference/organization-members/update-organization-member"}]},{"group":"Organization Projects","pages":[{"title":"List projects","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/projects","href":"/api-reference/organization-projects/list-projects"},{"title":"Create project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations/{organization_id}/projects","href":"/api-reference/organization-projects/create-project"},{"title":"Stream provisioning progress","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/projects/provisioning","href":"/api-reference/organization-projects/stream-provisioning-progress"},{"title":"Get project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/projects/{project_id}","href":"/api-reference/organization-projects/get-project"},{"title":"Delete project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /organizations/{organization_id}/projects/{project_id}","href":"/api-reference/organization-projects/delete-project"},{"title":"Update project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /organizations/{organization_id}/projects/{project_id}","href":"/api-reference/organization-projects/update-project"},{"title":"Query project carbon emissions metrics","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/projects/{project_id}/metrics/carbon","href":"/api-reference/organization-projects/query-project-carbon-emissions-metrics"}]},{"group":"Organizations","pages":[{"title":"User organizations","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/organizations","href":"/api-reference/organizations/user-organizations"},{"title":"List organizations","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations","href":"/api-reference/organizations/list-organizations"},{"title":"Create organization","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations","href":"/api-reference/organizations/create-organization"},{"title":"Get organization","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}","href":"/api-reference/organizations/get-organization"},{"title":"Delete organization","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /organizations/{organization_id}","href":"/api-reference/organizations/delete-organization"},{"title":"Update organization","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /organizations/{organization_id}","href":"/api-reference/organizations/update-organization"}]},{"group":"PhoneNumber","pages":[{"title":"Verify phone number","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /users/{user_id}/phonenumber","href":"/api-reference/phonenumber/verify-phone-number"},{"title":"Confirm phone number","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /users/{user_id}/phonenumber/{sid}","href":"/api-reference/phonenumber/confirm-phone-number"}]},{"group":"Profiles","pages":[{"title":"Get address","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/address","href":"/api-reference/profiles/get-address"},{"title":"Update address","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /organizations/{organization_id}/address","href":"/api-reference/profiles/update-address"},{"title":"Get profile","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/profile","href":"/api-reference/profiles/get-profile"},{"title":"Update profile","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /organizations/{organization_id}/profile","href":"/api-reference/profiles/update-profile"}]},{"group":"Project","pages":[{"title":"Get a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}","href":"/api-reference/project/get-a-project"},{"title":"Get a project's capabilities","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/capabilities","href":"/api-reference/project/get-a-projects-capabilities"},{"title":"Clear project build cache","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/clear_build_cache","href":"/api-reference/project/clear-project-build-cache"},{"title":"Post projects maintenance redeploy","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/maintenance-redeploy","href":"/api-reference/project/post-projects-maintenance-redeploy"}]},{"group":"Project Activity","pages":[{"title":"Get project activity log","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/activities","href":"/api-reference/project-activity/get-project-activity-log"},{"title":"Get a project activity log entry","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/activities/{activityId}","href":"/api-reference/project-activity/get-a-project-activity-log-entry"},{"title":"Cancel a project activity","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/activities/{activityId}/cancel","href":"/api-reference/project-activity/cancel-a-project-activity"}]},{"group":"Project Invitations","pages":[{"title":"List invitations to a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{project_id}/invitations","href":"/api-reference/project-invitations/list-invitations-to-a-project"},{"title":"Invite user to a project by email","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{project_id}/invitations","href":"/api-reference/project-invitations/invite-user-to-a-project-by-email"},{"title":"Cancel a pending invitation to a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{project_id}/invitations/{invitation_id}","href":"/api-reference/project-invitations/cancel-a-pending-invitation-to-a-project"}]},{"group":"Project Settings","pages":[{"title":"Get list of project settings","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/settings","href":"/api-reference/project-settings/get-list-of-project-settings"},{"title":"Update a project setting","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/settings","href":"/api-reference/project-settings/update-a-project-setting"}]},{"group":"Project Variables","pages":[{"title":"Get list of project variables","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/variables","href":"/api-reference/project-variables/get-list-of-project-variables"},{"title":"Add a project variable","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/variables","href":"/api-reference/project-variables/add-a-project-variable"},{"title":"Get a project variable","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/variables/{projectVariableId}","href":"/api-reference/project-variables/get-a-project-variable"},{"title":"Delete a project variable","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/variables/{projectVariableId}","href":"/api-reference/project-variables/delete-a-project-variable"},{"title":"Update a project variable","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/variables/{projectVariableId}","href":"/api-reference/project-variables/update-a-project-variable"}]},{"group":"Projects","pages":[{"title":"List project history","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/projects/{project_id}/history","href":"/api-reference/projects/list-project-history"}]},{"group":"Records","pages":[{"title":"List plan records","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/records/plan","href":"/api-reference/records/list-plan-records"},{"title":"List usage records","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/records/usage","href":"/api-reference/records/list-usage-records"}]},{"group":"References","pages":[{"title":"List referenced users","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /ref/users","href":"/api-reference/references/list-referenced-users"},{"title":"List referenced teams","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /ref/teams","href":"/api-reference/references/list-referenced-teams"},{"title":"List referenced organizations","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /ref/organizations","href":"/api-reference/references/list-referenced-organizations"},{"title":"List referenced projects","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /ref/projects","href":"/api-reference/references/list-referenced-projects"},{"title":"List referenced regions","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /ref/regions","href":"/api-reference/references/list-referenced-regions"}]},{"group":"Regions","pages":[{"title":"List regions","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /regions","href":"/api-reference/regions/list-regions"},{"title":"Get region","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /regions/{region_id}","href":"/api-reference/regions/get-region"}]},{"group":"Repository","pages":[{"title":"Get a blob object","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/git/blobs/{repositoryBlobId}","href":"/api-reference/repository/get-a-blob-object"},{"title":"Get a commit object","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/git/commits/{repositoryCommitId}","href":"/api-reference/repository/get-a-commit-object"},{"title":"Get list of repository refs","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/git/refs","href":"/api-reference/repository/get-list-of-repository-refs"},{"title":"Get a ref object","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/git/refs/{repositoryRefId}","href":"/api-reference/repository/get-a-ref-object"},{"title":"Get a tree object","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/git/trees/{repositoryTreeId}","href":"/api-reference/repository/get-a-tree-object"}]},{"group":"Resources","pages":[{"title":"Get resource metrics overview","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/resources/overview","href":"/api-reference/resources/get-resource-metrics-overview"},{"title":"Get resource metrics summary","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/resources/summary","href":"/api-reference/resources/get-resource-metrics-summary"},{"title":"Get resource metrics by service","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/observability/resources/service/{service}","href":"/api-reference/resources/get-resource-metrics-by-service"}]},{"group":"Routing","pages":[{"title":"Get list of routes","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/routes","href":"/api-reference/routing/get-list-of-routes"},{"title":"Get a route's info","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/routes/{routeId}","href":"/api-reference/routing/get-a-routes-info"}]},{"group":"Runtime Operations","pages":[{"title":"Execute a runtime operation","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/operations","href":"/api-reference/runtime-operations/execute-a-runtime-operation"}]},{"group":"Source Operations","pages":[{"title":"Trigger a source operation","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/source-operation","href":"/api-reference/source-operations/trigger-a-source-operation"},{"title":"List source operations","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/source-operations","href":"/api-reference/source-operations/list-source-operations"}]},{"group":"SSH Keys","pages":[{"title":"Get an SSH key","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /ssh_keys/{key_id}","href":"/api-reference/ssh-keys/get-an-ssh-key"},{"title":"Delete an SSH key","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /ssh_keys/{key_id}","href":"/api-reference/ssh-keys/delete-an-ssh-key"},{"title":"Add a new public SSH key to a user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /ssh_keys","href":"/api-reference/ssh-keys/add-a-new-public-ssh-key-to-a-user"}]},{"group":"Subscriptions","pages":[{"title":"Checks if the user is able to update a project.","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /subscriptions/{subscriptionId}/can-update","href":"/api-reference/subscriptions/checks-if-the-user-is-able-to-update-a-project"},{"title":"Checks if the user can afford the requested resources.","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /subscriptions/{subscriptionId}/can-afford","href":"/api-reference/subscriptions/checks-if-the-user-can-afford-the-requested-resources"},{"title":"Estimate the price of a new subscription","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/subscriptions/estimate","href":"/api-reference/subscriptions/estimate-the-price-of-a-new-subscription"},{"title":"Checks if the user is able to create a new project.","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/subscriptions/can-create","href":"/api-reference/subscriptions/checks-if-the-user-is-able-to-create-a-new-project"},{"title":"Estimate the price of a subscription","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/subscriptions/{subscription_id}/estimate","href":"/api-reference/subscriptions/estimate-the-price-of-a-subscription"},{"title":"Get current usage for a subscription","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/subscriptions/{subscription_id}/current_usage","href":"/api-reference/subscriptions/get-current-usage-for-a-subscription"},{"title":"List addons for a subscription","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/subscriptions/{subscription_id}/addons","href":"/api-reference/subscriptions/list-addons-for-a-subscription"},{"title":"Get usage alerts","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/alerts/subscriptions/{subscription_id}/usage","href":"/api-reference/subscriptions/get-usage-alerts"},{"title":"Update usage alerts.","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /organizations/{organization_id}/alerts/subscriptions/{subscription_id}/usage","href":"/api-reference/subscriptions/update-usage-alerts"},{"title":"List subscriptions","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/subscriptions","href":"/api-reference/subscriptions/list-subscriptions"},{"title":"Create subscription","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations/{organization_id}/subscriptions","href":"/api-reference/subscriptions/create-subscription"},{"title":"Get subscription","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/subscriptions/{subscription_id}","href":"/api-reference/subscriptions/get-subscription"},{"title":"Delete subscription","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /organizations/{organization_id}/subscriptions/{subscription_id}","href":"/api-reference/subscriptions/delete-subscription"},{"title":"Update subscription","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /organizations/{organization_id}/subscriptions/{subscription_id}","href":"/api-reference/subscriptions/update-subscription"}]},{"group":"Support","pages":[{"title":"Create a new support ticket","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /tickets","href":"/api-reference/support/create-a-new-support-ticket"},{"title":"Update a ticket","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /tickets/{ticket_id}","href":"/api-reference/support/update-a-ticket"},{"title":"List support ticket priorities","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /tickets/priority","href":"/api-reference/support/list-support-ticket-priorities"},{"title":"List support ticket categories","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /tickets/category","href":"/api-reference/support/list-support-ticket-categories"}]},{"group":"System Information","pages":[{"title":"Get information about the Git server.","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/system","href":"/api-reference/system-information/get-information-about-the-git-server"},{"title":"Restart the Git server","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/system/restart","href":"/api-reference/system-information/restart-the-git-server"}]},{"group":"Task","pages":[{"title":"Get projects environments tasks","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/tasks","href":"/api-reference/task/get-projects-environments-tasks"},{"title":"Get projects environments tasks 1","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/environments/{environmentId}/tasks/{taskId}","href":"/api-reference/task/get-projects-environments-tasks-1"},{"title":"Post projects environments tasks run","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/environments/{environmentId}/tasks/{taskId}/run","href":"/api-reference/task/post-projects-environments-tasks-run"}]},{"group":"Team Access","pages":[{"title":"List team access for a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{project_id}/team-access","href":"/api-reference/team-access/list-team-access-for-a-project"},{"title":"Grant team access to a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{project_id}/team-access","href":"/api-reference/team-access/grant-team-access-to-a-project"},{"title":"Get team access for a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{project_id}/team-access/{team_id}","href":"/api-reference/team-access/get-team-access-for-a-project"},{"title":"Remove team access for a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{project_id}/team-access/{team_id}","href":"/api-reference/team-access/remove-team-access-for-a-project"},{"title":"List project access for a team","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /teams/{team_id}/project-access","href":"/api-reference/team-access/list-project-access-for-a-team"},{"title":"Grant project access to a team","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /teams/{team_id}/project-access","href":"/api-reference/team-access/grant-project-access-to-a-team"},{"title":"Get project access for a team","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /teams/{team_id}/project-access/{project_id}","href":"/api-reference/team-access/get-project-access-for-a-team"},{"title":"Remove project access for a team","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /teams/{team_id}/project-access/{project_id}","href":"/api-reference/team-access/remove-project-access-for-a-team"}]},{"group":"Teams","pages":[{"title":"List teams","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /teams","href":"/api-reference/teams/list-teams"},{"title":"Create team","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /teams","href":"/api-reference/teams/create-team"},{"title":"Get team","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /teams/{team_id}","href":"/api-reference/teams/get-team"},{"title":"Delete team","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /teams/{team_id}","href":"/api-reference/teams/delete-team"},{"title":"Update team","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /teams/{team_id}","href":"/api-reference/teams/update-team"},{"title":"List team members","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /teams/{team_id}/members","href":"/api-reference/teams/list-team-members"},{"title":"Create team member","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /teams/{team_id}/members","href":"/api-reference/teams/create-team-member"},{"title":"Get team member","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /teams/{team_id}/members/{user_id}","href":"/api-reference/teams/get-team-member"},{"title":"Delete team member","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /teams/{team_id}/members/{user_id}","href":"/api-reference/teams/delete-team-member"},{"title":"User teams","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/teams","href":"/api-reference/teams/user-teams"}]},{"group":"Third-Party Integrations","pages":[{"title":"Get list of existing integrations for a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/integrations","href":"/api-reference/third-party-integrations/get-list-of-existing-integrations-for-a-project"},{"title":"Integrate project with a third-party service","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{projectId}/integrations","href":"/api-reference/third-party-integrations/integrate-project-with-a-third-party-service"},{"title":"Get information about an existing third-party integration","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{projectId}/integrations/{integrationId}","href":"/api-reference/third-party-integrations/get-information-about-an-existing-third-party-integration"},{"title":"Delete an existing third-party integration","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{projectId}/integrations/{integrationId}","href":"/api-reference/third-party-integrations/delete-an-existing-third-party-integration"},{"title":"Update an existing third-party integration","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{projectId}/integrations/{integrationId}","href":"/api-reference/third-party-integrations/update-an-existing-third-party-integration"}]},{"group":"User Access","pages":[{"title":"List user access for a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{project_id}/user-access","href":"/api-reference/user-access/list-user-access-for-a-project"},{"title":"Grant user access to a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /projects/{project_id}/user-access","href":"/api-reference/user-access/grant-user-access-to-a-project"},{"title":"Get user access for a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /projects/{project_id}/user-access/{user_id}","href":"/api-reference/user-access/get-user-access-for-a-project"},{"title":"Remove user access for a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /projects/{project_id}/user-access/{user_id}","href":"/api-reference/user-access/remove-user-access-for-a-project"},{"title":"Update user access for a project","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /projects/{project_id}/user-access/{user_id}","href":"/api-reference/user-access/update-user-access-for-a-project"},{"title":"List project access for a user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/project-access","href":"/api-reference/user-access/list-project-access-for-a-user"},{"title":"Grant project access to a user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /users/{user_id}/project-access","href":"/api-reference/user-access/grant-project-access-to-a-user"},{"title":"Get project access for a user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}/project-access/{project_id}","href":"/api-reference/user-access/get-project-access-for-a-user"},{"title":"Remove project access for a user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /users/{user_id}/project-access/{project_id}","href":"/api-reference/user-access/remove-project-access-for-a-user"},{"title":"Update project access for a user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /users/{user_id}/project-access/{project_id}","href":"/api-reference/user-access/update-project-access-for-a-user"}]},{"group":"User Profiles","pages":[{"title":"List user profiles","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /profiles","href":"/api-reference/user-profiles/list-user-profiles"},{"title":"Get a single user profile","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /profiles/{userId}","href":"/api-reference/user-profiles/get-a-single-user-profile"},{"title":"Update a user profile","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /profiles/{userId}","href":"/api-reference/user-profiles/update-a-user-profile"},{"title":"Get a user address","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /profiles/{userId}/address","href":"/api-reference/user-profiles/get-a-user-address"},{"title":"Update a user address","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /profiles/{userId}/address","href":"/api-reference/user-profiles/update-a-user-address"},{"title":"Create a user profile picture","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /profile/{uuid}/picture","href":"/api-reference/user-profiles/create-a-user-profile-picture"},{"title":"Delete a user profile picture","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec delete /profile/{uuid}/picture","href":"/api-reference/user-profiles/delete-a-user-profile-picture"}]},{"group":"Users","pages":[{"title":"Get current logged-in user info","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /me","href":"/api-reference/users/get-current-logged-in-user-info"},{"title":"Check if phone verification is required","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /me/phone","href":"/api-reference/users/check-if-phone-verification-is-required"},{"title":"Check if verification is required","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /me/verification","href":"/api-reference/users/check-if-verification-is-required"},{"title":"Get the current user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/me","href":"/api-reference/users/get-the-current-user"},{"title":"Get a user by email","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/email={email}","href":"/api-reference/users/get-a-user-by-email"},{"title":"Get a user by username","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/username={username}","href":"/api-reference/users/get-a-user-by-username"},{"title":"Get a user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /users/{user_id}","href":"/api-reference/users/get-a-user"},{"title":"Update a user","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec patch /users/{user_id}","href":"/api-reference/users/update-a-user"},{"title":"Reset email address","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /users/{user_id}/emailaddress","href":"/api-reference/users/reset-email-address"},{"title":"Reset user password","deprecated":null,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /users/{user_id}/resetpassword","href":"/api-reference/users/reset-user-password"}]},{"group":"Vouchers","pages":[{"title":"List vouchers","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec get /organizations/{organization_id}/vouchers","href":"/api-reference/vouchers/list-vouchers"},{"title":"Apply voucher","deprecated":true,"version":null,"openapi":"https://meta.upsun.com/openapi-spec post /organizations/{organization_id}/vouchers/apply","href":"/api-reference/vouchers/apply-voucher"}]}]}]},{"anchor":"CLI","icon":"terminal","pages":[{"title":"Upsun Cloud CLI","sidebarTitle":"CLI Home","icon":"terminal","mode":"custom","href":"/cli/index"},{"group":"Getting started","icon":"rocket","pages":[{"title":"Install the Upsun Cloud CLI","sidebarTitle":"Install","href":"/cli/install"},{"title":"Use the Upsun Cloud CLI","sidebarTitle":"Use","href":"/cli/use"},{"title":"Authenticate the Upsun Cloud CLI using an API token","sidebarTitle":"API tokens","href":"/cli/api-tokens"},{"title":"Initialize a project","href":"/cli/init"}]},{"group":"Reference","icon":"book-open","pages":[{"title":"CLI Command reference","sidebarTitle":"Command reference","href":"/cli/reference"},{"title":"AI coding agents","sidebarTitle":"AI coding agents","href":"/cli/ai-coding-agents"}]}]},{"anchor":"Changelog","icon":"scroll-text","pages":[{"title":"Changelog","href":"/changelog"}]}]},{"tab":"Blog","icon":"newspaper","pages":[{"title":"Blog","sidebarTitle":"Blog overview","icon":"newspaper","mode":"custom","href":"/posts"},{"group":"Articles","icon":"newspaper","pages":[{"title":"All Articles","sidebarTitle":"All","mode":"wide","href":"/posts/articles/index"},{"title":"Artificial Intelligence","sidebarTitle":"AI","mode":"wide","href":"/posts/articles/ai"},{"title":"How It Works","sidebarTitle":"How It Works","mode":"wide","href":"/posts/articles/how-it-works"},{"title":"How-Tos","sidebarTitle":"How-Tos","mode":"wide","href":"/posts/articles/how-tos"},{"title":"Insights","sidebarTitle":"Insights","mode":"wide","href":"/posts/articles/insights"},{"title":"Releases","sidebarTitle":"Releases","mode":"wide","href":"/posts/articles/releases"},{"title":"Hands-On","sidebarTitle":"Hands-On","mode":"wide","href":"/posts/articles/hands-on"}]}]},{"tab":"AI","icon":"sparkles","pages":[{"mode":"custom","title":"AI on Upsun","href":"/ai"},{"group":"MCP","root":{"title":"Overview","icon":"book-open","sidebarTitle":"Overview","tag":"New","href":"/ai/mcp/overview"},"pages":[{"title":"Upsun MCP on Cursor","sidebarTitle":"Cursor","href":"/ai/mcp/integrations/cursor"},{"title":"Upsun MCP on VSCode","sidebarTitle":"VSCode","href":"/ai/mcp/integrations/vscode"},{"title":"Upsun MCP on your Agent","sidebarTitle":"Other","href":"/ai/mcp/integrations/all"}]},{"group":"Onboarding","root":{"title":"Overview","icon":"book-open","sidebarTitle":"Overview","tag":"New","href":"/ai/onboarding/overview"},"pages":[{"title":"Setup","sidebarTitle":"Setup","href":"/ai/onboarding/setup"},{"title":"Best Practices","sidebarTitle":"Best Practices","href":"/ai/onboarding/best-practices"}]}]}]},"title":"How to automatically inject multi-app endpoints as environment variables - Upsun Developer","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-BZxD9MAj.js","lightbox-handle-r17bVUz3.js"]}