Skip to content

Latest commit

 

History

History
111 lines (72 loc) · 2.76 KB

OntologyV2.md

File metadata and controls

111 lines (72 loc) · 2.76 KB

OntologyV2

Method HTTP request
get GET /v2/ontologies/{ontology}

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 OntologyIdentifier ontology

Return type

OntologyV2

Example

from foundry.v2 import FoundryClient
import foundry
from pprint import pprint

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

# OntologyIdentifier | ontology
ontology = "palantir"


try:
    api_response = foundry_client.ontologies.Ontology.get(
        ontology,
    )
    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 OntologyV2 Success response. application/json

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

Get the full Ontology metadata. This includes the objects, links, actions, queries, and interfaces.

Parameters

Name Type Description Notes
ontology OntologyIdentifier ontology

Return type

OntologyFullMetadata

Example

from foundry.v2 import FoundryClient
import foundry
from pprint import pprint

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

# OntologyIdentifier | ontology
ontology = "palantir"


try:
    api_response = foundry_client.ontologies.Ontology.get_full_metadata(
        ontology,
    )
    print("The get_full_metadata response:\n")
    pprint(api_response)
except foundry.PalantirRPCException as e:
    print("HTTP error when calling Ontology.get_full_metadata: %s\n" % e)

Authorization

See README

HTTP response details

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

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