Use Marketplace to package and install Developer Console applications across Foundry environments. You can package an application or its code repository:
Packaging both an application and its source code may be useful when bootstrapping an OAuth client without an existing website. In this case, you may want to modify the application code post-installation and publish a website that uses the installed OAuth client. This workflow is uncommon for production applications because the installed application always matches the latest website assets (if they exist), so the source code is effectively ignored.
Ontology entity API names are not automatically remapped during installation. This applies to both application and source code installations. This means that an installed application may break if it uses API names that don't exist in the destination ontology. See Handling API name changes for strategies to manage API name consistency across environments.
A packaged application includes:
In Foundry DevOps, add a Developer Console application as an output of a product. Developer Console applications have two types of dependencies:
Installing an application from Marketplace automatically creates the Developer Console resource and configures OAuth. Learn more about installing products. In some cases, you will need to take manual steps during installation:
API_NAME=Truck and there already exists an object type API_NAME=Truck in the destination Ontology, Marketplace may rename the installed object type Truck_1. This has the potential to break installed applications that reference objects by API names. When installing Ontology entities alongside an application, select Always install source Ontology API names during installation. This preserves the original API names rather than prefixing or modifying them, ensuring application code continues to work.
To update an installed application as part of a Marketplace product:
For applications with built website assets, Marketplace automatically maps application parameters during installation. The following values are replaced with target environment equivalents:
For automatic mapping to work, an application must read these values from meta tags in index.html rather than the application packaged code itself. Applications created with @osdk/create-app ↗ v2.1.3+ or VS Code workspaces in Foundry are configured this way by default.
Unlike website parameters, Ontology API names are not automatically remapped during installation. See Handling API name changes for strategies to manage API name consistency across environments.
Applications created before @osdk/create-app ↗ v2.1.3 require code changes to enable automatic configuration replacement. Add the following meta tags to index.html:
Copied!1 2 3 4<meta name="osdk-clientId" content="%VITE_FOUNDRY_CLIENT_ID%" /> <meta name="osdk-redirectUrl" content="%VITE_FOUNDRY_REDIRECT_URL%" /> <meta name="osdk-foundryUrl" content="%VITE_FOUNDRY_API_URL%" /> <meta name="osdk-ontologyRid" content="%VITE_FOUNDRY_ONTOLOGY_RID%" />
Then update the client initialization to read from these meta tags:
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30import { createClient, type Client } from "@osdk/client"; import { createPublicOauthClient, type PublicOauthClient } from "@osdk/oauth"; function getMetaTagContent(tagName: string): string { const elements = document.querySelectorAll(`meta[name="${tagName}"]`); const element = elements.item(elements.length - 1); const value = element ? element.getAttribute("content") : null; if (value == null || value === "") { throw new Error(`Meta tag ${tagName} not found or empty`); } if (value.match(/%.+%/)) { throw new Error( `Meta tag ${tagName} contains placeholder value. Add ${value.replace(/%/g, "")} to your .env files`, ); } return value; } const foundryUrl = getMetaTagContent("osdk-foundryUrl"); const clientId = getMetaTagContent("osdk-clientId"); const redirectUrl = getMetaTagContent("osdk-redirectUrl"); const ontologyRid = getMetaTagContent("osdk-ontologyRid"); export const auth: PublicOauthClient = createPublicOauthClient( clientId, foundryUrl, redirectUrl, ); export const client: Client = createClient(foundryUrl, ontologyRid, auth);
Add the Ontology RID to the .env files:
VITE_FOUNDRY_ONTOLOGY_RID=<ri.ontology.main.ontology.your-ontology-rid>
These code changes are specific to TypeScript OSDK 2.0. If you are using OSDK 1.x, first migrate to OSDK 2.0.
Custom workshop widgets deploy similarly to Developer Console applications. See Add a widget set to a Marketplace product.
You can package application source code as you would any other code repository. Unlike with application packaging, configuration parameters like Ontology RID and Redirect URL are not remapped in the source code. This means that when source code is shipped together with an application, the application website will function correctly on the destination environment but the source code files still contain the original environment's parameters.
Templatization is experimental and treats any {{}} syntax as a template variable, including patterns already present in the code. For example, JSX inline styles like style={{color: 'red'}} will be incorrectly interpreted as template inputs. Review the codebase for existing double-brace patterns before enabling templatization.
For source code only installations, you can templatize your application so that parameters are rewritten automatically on install. Templating typically makes sense in Bootstrap mode when:
To templatize an application:
{{my_variable}}) that will need to be rewritten during install.
When using handlebar parameters, the application will fail CI checks due to type checks. This means that you cannot package website assets – which deploy after CI checks pass - together with templatized code.
We recommend not using parameters for Ontology API name mappings. Applications with many templatized API names become difficult to maintain and debug. For complex deployments, define Ontology resources as inputs so installers provide matching resources. Templates work best for simpler variable substitutions. See Handling API name changes for recommended strategies.
In addition to custom parameters, TypeScript OSDK applications have the following reserved parameters which automatically resolve to their respective values during installation:
| Variable | Example value | Files that may reference these parameters |
|---|---|---|
{{FOUNDRY_HOSTNAME}} | yourdomain.palantirfoundry.com | .env, .npmrc, foundry.config.json |
{{APPLICATION_CLIENT_ID}} | 1564cead075af0e23eb1799ac0f6381f | .env |
{{APPLICATION_PACKAGE_NAME}} | osdk-sample-app-20 | package.json, code files referencing the package |
{{APPLICATION_RID}} | ri.third-party-applications.main.application.7ebc94b7-bad3-45a9-a063-d7fc0ccd2873 | foundry.config.json |
{{REPOSITORY_RID}} | ri.stemma.main.repository.35d25ea4-973d-4112-a7d3-04c31efa1875 | .npmrc, settings.sh |
{{ONTOLOGY_RID}} | ri.ontology.main.ontology.00000000-0000-0000-0000-000000000000 | .env |
Note the following constraints for reserved parameters:
@ or a trailing /sdk.package.json must be set to latest or 0.1.0 for the template to work out of the box when installed.OSDK references Ontology entities by API name. This means that the entities used by an installed Developer Console application (or application code) must have identical API names between the source and destination Ontologies for the application to work.
This behavior is different than most Foundry applications which reference resources using non-human-readable RIDs that are mapped between enrollments. For example, a Workshop application that references an object type with rid=X may be rewritten, on deployment, to reference an object type with rid=y. In contrast, compiled OSDK application assets and raw OSDK code are intended to be human readable and identical between source and destination repositories.
To ensure entity API name consistency, where possible, you should package and install both Ontology resources and the application. Ontology resources should be product outputs together with the Developer Console application (or outputs to a second product deployed alongside the first). That way, Marketplace creates resources in the destination Ontology with the same API names as the source, preventing breaks. When installing Ontology entities, select Always install source Ontology API names to preserve the original names.
There are four strategies for handling API name conflicts, divided into two categories:
When packaging Ontology with the application: If an object type already exists in the destination Ontology with the same API name, Marketplace will apply an installation prefix, which risks breaking OSDK code. To avoid this, use fully qualified names or separate spaces.
When not packaging Ontology with the application: If the destination environment already has the required Ontology resources, reference them directly. Use interfaces when the source and destination object types are intentionally different but share a common structure. If the objects are identical but have different names, modify API names manually to match across environments.
To prevent conflicts when packaging the Ontology, use fully qualified API names when defining Ontology entities on a source environment. Fully qualified API names include a namespace prefix that makes them globally unique across Ontologies. As long as an application is deployed once per Ontology, that is, a Singleton product, fully qualified names guarantee no API name conflicts.
Configure fully qualified names in Ontology Manager.
For multi-organization or development lifecycle workflows, using distinct spaces is another way to remove API name conflicts. API name uniqueness is only enforced at the space level. Each space maps one-to-one with an Ontology, so users can think of this as Ontology-level uniqueness.
Sometimes, conflicting API names actually represent two implementations of the same interface. In these cases, consider rewriting application code to use interfaces rather than concrete object types.
For example, consider an application that uses the medicine object type in the source Ontology, but the destination environment has a vaccine object type instead. This can be simplified by representing medicine as an interface rather than an object type. The medicine interface would then be deployed as part of the Marketplace product, and, in the destination Ontology, vaccine would implement medicine. This approach has the advantage of human-readable code, clarity about the abstraction at build time, and sensible ontological classification on the destination environment.
In other words, building applications on interfaces rather than object types guarantees that application code is legible and often eliminates the need to map objects altogether.
When the source and destination have identical objects with different API names, you will need to manually edit API names to match between environments. Changing API names has the potential to break other applications or functions that reference those entities, so proceed carefully.