Skip to content

Latest commit

 

History

History
109 lines (70 loc) · 2.78 KB

Ontology.md

File metadata and controls

109 lines (70 loc) · 2.78 KB

Ontology

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

get

Gets a specific ontology with the given Ontology RID.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:ontologies-read.

Parameters

Name Type Description Notes
ontology_rid OntologyRid ontologyRid

Return type

Ontology

Example

from foundry.v1 import FoundryClient
import foundry
from pprint import pprint

foundry_client = FoundryClient(
    auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)

# OntologyRid | ontologyRid
ontology_rid = "ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367"


try:
    api_response = foundry_client.ontologies.Ontology.get(
        ontology_rid,
    )
    print("The get response:\n")
    pprint(api_response)
except foundry.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.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:ontologies-read.

Parameters

Name Type Description Notes

Return type

ListOntologiesResponse

Example

from foundry.v1 import FoundryClient
import foundry
from pprint import pprint

foundry_client = FoundryClient(
    auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)


try:
    api_response = foundry_client.ontologies.Ontology.list()
    print("The list response:\n")
    pprint(api_response)
except foundry.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]