Retrieve ontology metadata within an ontology function

Within a typescript function, is there any way to retrieve information about the parent ontology e.g. ontology rid, display name or api name?

For background, we have a typescript ontology function that will be deployed to multiple ontologies using Marketplace. Within that function, we will be generating certain string IDs that need to include prefixes based on the ontology in which the function runs. We could have a configuration file in each ontology that contains the prefix, but being able to read in the ontology details would avoid that dependency.

1 Like

Just a thought - I wonder if you use the new TS ontology function if this is possible to access via the OSDK

Running into this issue as well. Need to programmatically retrieve the ontology id in my typescript code repo function because my application will be deployed to different spaces/ontologies

new TS ontology function
@bkaplan what do you mean by this?

Adding tags for more visibility:
code-repositories ontology-management functions


I can’t seem to find documentation but when I bootstrap a new repository I see the typescript v2 option that allows for me to leverage the OSDK direction in typescript functions.

Python functions by default use the OSDK as well.

“TypeScript Functions” uses OSDK as well, its just v1.

nvm i guess its all part of the foundry npm package