You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application.\nobject_type = \"Employee\"\n# LinkTypeApiName | The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**.\nlink_type = \"directReport\"\n# Optional[FoundryBranch] | The Foundry branch to get the outgoing link types for an object type from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = client.ontologies.Ontology.ObjectType.get_outgoing_link_type(\n ontology, object_type, link_type, branch=branch\n )\n print(\"The get_outgoing_link_type response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.get_outgoing_link_type: %s\\n\" % e)"
1564
1564
}
1565
1565
],
1566
+
"v2.getOutgoingLinkTypesByObjectTypeRidBatch": [
1567
+
{
1568
+
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# List[LinkTypeRid] | If provided, only return outgoing link types with RIDs in this list. If omitted, all outgoing link types for each requested object type are returned.\nfilter_link_type_rids = None\n# List[GetOutgoingLinkTypesByObjectTypeRidBatchRequestElement]\nrequests = None\n# Optional[FoundryBranch] | The Foundry branch to load the outgoing link type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n\n\ntry:\n api_response = (\n client.ontologies.Ontology.ObjectType.get_outgoing_link_types_by_object_type_rid_batch(\n ontology, filter_link_type_rids=filter_link_type_rids, requests=requests, branch=branch\n )\n )\n print(\"The get_outgoing_link_types_by_object_type_rid_batch response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\n \"HTTP error when calling ObjectType.get_outgoing_link_types_by_object_type_rid_batch: %s\\n\"\n % e\n )"
1569
+
}
1570
+
],
1566
1571
"v2.listObjectTypesV2": [
1567
1572
{
1568
1573
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# OntologyIdentifier\nontology = \"palantir\"\n# Optional[FoundryBranch] | The Foundry branch to list the object types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.\nbranch = None\n# Optional[PageSize] | The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.\npage_size = None\n# Optional[PageToken]\npage_token = None\n\n\ntry:\n for object_type in client.ontologies.Ontology.ObjectType.list(\n ontology, branch=branch, page_size=page_size, page_token=page_token\n ):\n pprint(object_type)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling ObjectType.list: %s\\n\" % e)"
0 commit comments