Skip to content

Latest commit

 

History

History
99 lines (62 loc) · 2.85 KB

File metadata and controls

99 lines (62 loc) · 2.85 KB

Ontology

Method HTTP request Release Stage
get GET /v1/ontologies/{ontologyRid} Stable
list GET /v1/ontologies Stable

get

Gets a specific ontology with the given Ontology RID.

Parameters

Name Type Description Notes
ontology_rid OntologyRid The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the List ontologies endpoint or check the Ontology Manager.

Return type

Ontology

Example

from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint

client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")

# OntologyRid | The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**.
ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367"


try:
    api_response = client.ontologies.Ontology.get(ontology_rid)
    print("The get response:\n")
    pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
    print("HTTP error when calling Ontology.get: %s\n" % e)

Authorization

See README

HTTP response details

Status Code Type Description Content Type
200 Ontology Success response. application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list

Lists the Ontologies visible to the current user.

Parameters

Name Type Description Notes

Return type

ListOntologiesResponse

Example

from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint

client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")


try:
    api_response = client.ontologies.Ontology.list()
    print("The list response:\n")
    pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
    print("HTTP error when calling Ontology.list: %s\n" % e)

Authorization

See README

HTTP response details

Status Code Type Description Content Type
200 ListOntologiesResponse Success response. application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]