Skip to content

Commit 7fd93bf

Browse files
Excavator: Upgrade API Version (#193)
1 parent f087e63 commit 7fd93bf

File tree

14 files changed

+224
-4
lines changed

14 files changed

+224
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,7 @@ Namespace | Name | Import |
14271427
**Ontologies** | [ValidateActionResponseV2](docs/v2/Ontologies/models/ValidateActionResponseV2.md) | `from foundry_sdk.v2.ontologies.models import ValidateActionResponseV2` |
14281428
**Ontologies** | [ValidationResult](docs/v2/Ontologies/models/ValidationResult.md) | `from foundry_sdk.v2.ontologies.models import ValidationResult` |
14291429
**Ontologies** | [ValueType](docs/v2/Ontologies/models/ValueType.md) | `from foundry_sdk.v2.ontologies.models import ValueType` |
1430+
**Ontologies** | [VersionedQueryTypeApiName](docs/v2/Ontologies/models/VersionedQueryTypeApiName.md) | `from foundry_sdk.v2.ontologies.models import VersionedQueryTypeApiName` |
14301431
**Ontologies** | [WithinBoundingBoxPoint](docs/v2/Ontologies/models/WithinBoundingBoxPoint.md) | `from foundry_sdk.v2.ontologies.models import WithinBoundingBoxPoint` |
14311432
**Ontologies** | [WithinBoundingBoxQuery](docs/v2/Ontologies/models/WithinBoundingBoxQuery.md) | `from foundry_sdk.v2.ontologies.models import WithinBoundingBoxQuery` |
14321433
**Ontologies** | [WithinDistanceOfQuery](docs/v2/Ontologies/models/WithinDistanceOfQuery.md) | `from foundry_sdk.v2.ontologies.models import WithinDistanceOfQuery` |

docs-snippets-npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"sls": {
2525
"dependencies": {
2626
"com.palantir.foundry.api:api-gateway": {
27-
"minVersion": "1.1146.0",
27+
"minVersion": "1.1149.0",
2828
"maxVersion": "1.x.x",
2929
"optional": false
3030
}

docs-snippets-npm/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,11 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets<typeof PLATFORM_API_DOCS_SPEC
988988
"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\ntry:\n api_response = client.ontologies.Ontology.list()\n print(\"The list response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.list: %s\\n\" % e)"
989989
}
990990
],
991+
"v2.loadOntologyMetadata": [
992+
{
993+
"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 | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# List[ActionTypeApiName]\naction_types = None\n# List[InterfaceTypeApiName]\ninterface_types = None\n# List[LinkTypeApiName]\nlink_types = None\n# List[ObjectTypeApiName]\nobject_types = None\n# List[VersionedQueryTypeApiName]\nquery_types = None\n\n\ntry:\n api_response = client.ontologies.Ontology.load_metadata(\n ontology,\n action_types=action_types,\n interface_types=interface_types,\n link_types=link_types,\n object_types=object_types,\n query_types=query_types,\n )\n print(\"The load_metadata response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Ontology.load_metadata: %s\\n\" % e)"
994+
}
995+
],
991996
"v2.aggregateObjectsForInterface": [
992997
{
993998
"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 | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# InterfaceTypeApiName | The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**.\ninterface_type = \"Employee\"\n# List[AggregationV2]\naggregation = [\n {\"type\": \"min\", \"field\": \"properties.tenure\", \"name\": \"min_tenure\"},\n {\"type\": \"avg\", \"field\": \"properties.tenure\", \"name\": \"avg_tenure\"},\n]\n# List[AggregationGroupByV2]\ngroup_by = [\n {\n \"field\": \"startDate\",\n \"type\": \"range\",\n \"ranges\": [{\"startValue\": \"2020-01-01\", \"endValue\": \"2020-06-01\"}],\n },\n {\"field\": \"city\", \"type\": \"exact\"},\n]\n# Optional[AggregationAccuracyRequest]\naccuracy = None\n# Optional[PreviewMode] | A boolean flag that, when set to true, enables the use of beta features in preview mode.\npreview = None\n# Optional[SearchJsonQueryV2]\nwhere = {\"type\": \"eq\", \"field\": \"name\", \"value\": \"john\"}\n\n\ntry:\n api_response = client.ontologies.OntologyInterface.aggregate(\n ontology,\n interface_type,\n aggregation=aggregation,\n group_by=group_by,\n accuracy=accuracy,\n preview=preview,\n where=where,\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyInterface.aggregate: %s\\n\" % e)"

docs/v2/AipAgents/models/SessionExchangeContexts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Retrieved context which was passed to the Agent as input for the exchange.
77
| Name | Type | Required | Description |
88
| ------------ | ------------- | ------------- | ------------- |
99
**object_contexts** | List[ObjectContext] | Yes | Relevant object context for the user's message that was included in the prompt to the Agent. |
10+
**function_retrieved_contexts** | List[FunctionRetrievedContext] | Yes | Context retrieved from running a function that was included as additional context in the prompt to the Agent. |
1011

1112

1213
[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)

docs/v2/Filesystem/models/ResourceType.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ The type of the Resource derived from the Resource Identifier (RID).
3333
| `"EDDIE_LOGIC"` |
3434
| `"EDDIE_PIPELINE"` |
3535
| `"FFORMS_FORM"` |
36+
| `"FLOW_WORKFLOW"` |
3637
| `"FOUNDRY_DATASET"` |
3738
| `"FOUNDRY_DEPLOYED_APP"` |
3839
| `"FOUNDRY_ACADEMY_TUTORIAL"` |

docs/v2/Ontologies/Ontology.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Method | HTTP request | Release Stage |
55
[**get**](#get) | **GET** /v2/ontologies/{ontology} | Stable |
66
[**get_full_metadata**](#get_full_metadata) | **GET** /v2/ontologies/{ontology}/fullMetadata | Public Beta |
77
[**list**](#list) | **GET** /v2/ontologies | Stable |
8+
[**load_metadata**](#load_metadata) | **POST** /v2/ontologies/{ontology}/metadata | Private Beta |
89

910
# **get**
1011
Gets a specific ontology with the given Ontology RID.
@@ -150,3 +151,73 @@ See [README](../../../README.md#authorization)
150151

151152
[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)
152153

154+
# **load_metadata**
155+
Load Ontology metadata for the requested object, link, action, query, and interface types.
156+
157+
158+
### Parameters
159+
160+
Name | Type | Description | Notes |
161+
------------- | ------------- | ------------- | ------------- |
162+
**ontology** | OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. | |
163+
**action_types** | List[ActionTypeApiName] | | |
164+
**interface_types** | List[InterfaceTypeApiName] | | |
165+
**link_types** | List[LinkTypeApiName] | | |
166+
**object_types** | List[ObjectTypeApiName] | | |
167+
**query_types** | List[VersionedQueryTypeApiName] | | |
168+
169+
### Return type
170+
**OntologyFullMetadata**
171+
172+
### Example
173+
174+
```python
175+
from foundry_sdk import FoundryClient
176+
import foundry_sdk
177+
from pprint import pprint
178+
179+
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
180+
181+
# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.
182+
ontology = "palantir"
183+
# List[ActionTypeApiName]
184+
action_types = None
185+
# List[InterfaceTypeApiName]
186+
interface_types = None
187+
# List[LinkTypeApiName]
188+
link_types = None
189+
# List[ObjectTypeApiName]
190+
object_types = None
191+
# List[VersionedQueryTypeApiName]
192+
query_types = None
193+
194+
195+
try:
196+
api_response = client.ontologies.Ontology.load_metadata(
197+
ontology,
198+
action_types=action_types,
199+
interface_types=interface_types,
200+
link_types=link_types,
201+
object_types=object_types,
202+
query_types=query_types,
203+
)
204+
print("The load_metadata response:\n")
205+
pprint(api_response)
206+
except foundry_sdk.PalantirRPCException as e:
207+
print("HTTP error when calling Ontology.load_metadata: %s\n" % e)
208+
209+
```
210+
211+
212+
213+
### Authorization
214+
215+
See [README](../../../README.md#authorization)
216+
217+
### HTTP response details
218+
| Status Code | Type | Description | Content Type |
219+
|-------------|-------------|-------------|------------------|
220+
**200** | OntologyFullMetadata | Success response. | application/json |
221+
222+
[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)
223+

docs/v2/Ontologies/models/OntologyFullMetadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ OntologyFullMetadata
88
**ontology** | OntologyV2 | Yes | |
99
**object_types** | Dict[ObjectTypeApiName, ObjectTypeFullMetadata] | Yes | |
1010
**action_types** | Dict[ActionTypeApiName, ActionTypeV2] | Yes | |
11-
**query_types** | Dict[QueryApiName, QueryTypeV2] | Yes | |
11+
**query_types** | Dict[VersionedQueryTypeApiName, QueryTypeV2] | Yes | |
1212
**interface_types** | Dict[InterfaceTypeApiName, InterfaceType] | Yes | |
1313
**shared_property_types** | Dict[SharedPropertyTypeApiName, SharedPropertyType] | Yes | |
1414

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# VersionedQueryTypeApiName
2+
3+
The name of the Query in the API and an optional version identifier separated by a colon.
4+
If the API name contains a colon, then a version identifier of either "latest" or a semantic version must
5+
be included.
6+
If the API does not contain a colon, then either the version identifier must be excluded or a version
7+
identifier of a semantic version must be included.
8+
Examples: 'myGroup:myFunction:latest', 'myGroup:myFunction:1.0.0', 'myFunction', 'myFunction:2.0.0'
9+
10+
11+
## Type
12+
```python
13+
str
14+
```
15+
16+
17+
[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md)

foundry_sdk/_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
# using the autorelease bot
1818
__version__ = "0.0.0"
1919

20-
__openapi_document_version__ = "1.1146.0"
20+
__openapi_document_version__ = "1.1149.0"

foundry_sdk/v2/aip_agents/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ class SessionExchangeContexts(pydantic.BaseModel):
406406
object_contexts: typing.List[ObjectContext] = pydantic.Field(alias=str("objectContexts")) # type: ignore[literal-required]
407407
"""Relevant object context for the user's message that was included in the prompt to the Agent."""
408408

409+
function_retrieved_contexts: typing.List[FunctionRetrievedContext] = pydantic.Field(alias=str("functionRetrievedContexts")) # type: ignore[literal-required]
410+
"""Context retrieved from running a function that was included as additional context in the prompt to the Agent."""
411+
409412
model_config = {"extra": "allow", "populate_by_name": True}
410413

411414
def to_dict(self) -> typing.Dict[str, typing.Any]:

0 commit comments

Comments
 (0)