In short: I need a way to expose 2 phonograph objects with different data but the same name via Palantir API.
On our on-prem stack we are exposing selected objects of the Ontology via an internal REST broker/middleware. This broker has a test and prod environment.
For a REST endpoint we maintain 2 Phonograph Objects. One with pseudonymized data for development/test and one with clear text data for production.
Let's assume a service endpoint for customer information.
This pattern leads to 2 endpoints:
FOUNDRY_STACK/api/v1/ontologies/ri.ontology.main.ontology.00000000-0000-0000-0000-000000000000/objects/CustomerInfoTest
and
FOUNDRY_STACK/api/v1/ontologies/ri.ontology.main.ontology.00000000-0000-0000-0000-000000000000/objects/CustomerInfoProd
Our internal REST/Broker middleware maps our stack URL to a REST Endpoint published by the middleware as as a basePath as following:
basePath: /foundry/objects/v1
upstream: FOUNDRY_STACK/api/v1/ontologies/ri.ontology.main.ontology.00000000-0000-0000-0000-000000000000/objects
The middleware has a test and a prod environment.
Thus users can consume our Ontology Objects via Palantir API as following:
MIDDLE-WARE-Test_URL/foundry/objects/v1/CustomerInfoTest
and
MIDDLE-WARE-Prod_URL/foundry/objects/v1/CustomerInfoProd
Because we want do distinguish the test and prod objects in Palantir API solely by the environment of the middleware, I would like to use the same Object Name for both environments. This will lead to consistent REST end point names across different environments.
Since we are configuring the middleware to map between Foundry URL (upstream) and basePath, the only way I can think of is to introduce a second ontology for our test Objects, but I do not know how involved this is.
Does anyone else have an idea what I could do?