diff --git a/README.md b/README.md index a40c2fdf..3f01b4f2 100644 --- a/README.md +++ b/README.md @@ -893,6 +893,7 @@ Namespace | Resource | Operation | HTTP request | **Ontologies** | AttachmentProperty | [**read_attachment**](docs/v2/Ontologies/AttachmentProperty.md#read_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content | **Ontologies** | AttachmentProperty | [**read_attachment_by_rid**](docs/v2/Ontologies/AttachmentProperty.md#read_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content | **Ontologies** | CipherTextProperty | [**decrypt**](docs/v2/Ontologies/CipherTextProperty.md#decrypt) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt | +**Ontologies** | GeotemporalSeriesProperty | [**load_geotemporal_series_entries**](docs/v2/Ontologies/GeotemporalSeriesProperty.md#load_geotemporal_series_entries) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/geotemporalSeries/{property}/loadEntries | **Ontologies** | LinkedObject | [**get_linked_object**](docs/v2/Ontologies/LinkedObject.md#get_linked_object) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | **Ontologies** | LinkedObject | [**list_linked_objects**](docs/v2/Ontologies/LinkedObject.md#list_linked_objects) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType} | **Ontologies** | MediaReferenceProperty | [**get_media_content**](docs/v2/Ontologies/MediaReferenceProperty.md#get_media_content) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content | @@ -2561,9 +2562,15 @@ Namespace | Name | Import | **Ontologies** | [GetActionTypeByRidBatchRequest](docs/v2/Ontologies/models/GetActionTypeByRidBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeByRidBatchRequest` | **Ontologies** | [GetActionTypeByRidBatchRequestElement](docs/v2/Ontologies/models/GetActionTypeByRidBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeByRidBatchRequestElement` | **Ontologies** | [GetActionTypeByRidBatchResponse](docs/v2/Ontologies/models/GetActionTypeByRidBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeByRidBatchResponse` | +**Ontologies** | [GetActionTypeFullMetadataBatchRequest](docs/v2/Ontologies/models/GetActionTypeFullMetadataBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeFullMetadataBatchRequest` | +**Ontologies** | [GetActionTypeFullMetadataBatchRequestElement](docs/v2/Ontologies/models/GetActionTypeFullMetadataBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeFullMetadataBatchRequestElement` | +**Ontologies** | [GetActionTypeFullMetadataBatchResponse](docs/v2/Ontologies/models/GetActionTypeFullMetadataBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeFullMetadataBatchResponse` | **Ontologies** | [GetObjectTypeByRidBatchRequest](docs/v2/Ontologies/models/GetObjectTypeByRidBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeByRidBatchRequest` | **Ontologies** | [GetObjectTypeByRidBatchRequestElement](docs/v2/Ontologies/models/GetObjectTypeByRidBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeByRidBatchRequestElement` | **Ontologies** | [GetObjectTypeByRidBatchResponse](docs/v2/Ontologies/models/GetObjectTypeByRidBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeByRidBatchResponse` | +**Ontologies** | [GetObjectTypeFullMetadataBatchRequest](docs/v2/Ontologies/models/GetObjectTypeFullMetadataBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeFullMetadataBatchRequest` | +**Ontologies** | [GetObjectTypeFullMetadataBatchRequestElement](docs/v2/Ontologies/models/GetObjectTypeFullMetadataBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeFullMetadataBatchRequestElement` | +**Ontologies** | [GetObjectTypeFullMetadataBatchResponse](docs/v2/Ontologies/models/GetObjectTypeFullMetadataBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeFullMetadataBatchResponse` | **Ontologies** | [GetOutgoingLinkTypesByObjectTypeRidBatchRequest](docs/v2/Ontologies/models/GetOutgoingLinkTypesByObjectTypeRidBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetOutgoingLinkTypesByObjectTypeRidBatchRequest` | **Ontologies** | [GetOutgoingLinkTypesByObjectTypeRidBatchRequestElement](docs/v2/Ontologies/models/GetOutgoingLinkTypesByObjectTypeRidBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetOutgoingLinkTypesByObjectTypeRidBatchRequestElement` | **Ontologies** | [GetOutgoingLinkTypesByObjectTypeRidBatchResponse](docs/v2/Ontologies/models/GetOutgoingLinkTypesByObjectTypeRidBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetOutgoingLinkTypesByObjectTypeRidBatchResponse` | diff --git a/docs-snippets-npm/package.json b/docs-snippets-npm/package.json index 5e45a1ea..070e2597 100644 --- a/docs-snippets-npm/package.json +++ b/docs-snippets-npm/package.json @@ -24,7 +24,7 @@ "sls": { "dependencies": { "com.palantir.foundry.api:api-gateway": { - "minVersion": "1.1740.1", + "minVersion": "1.1760.0", "maxVersion": "1.x.x", "optional": false } diff --git a/docs-snippets-npm/src/index.ts b/docs-snippets-npm/src/index.ts index 1690689d..67b2f80e 100644 --- a/docs-snippets-npm/src/index.ts +++ b/docs-snippets-npm/src/index.ts @@ -1513,9 +1513,14 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets ontologies_models.GetActionTypeFullMetadataBatchResponse: + """ + Gets a list of action types with full metadata (parameters and logic rules) by their API names in + bulk. + + Action types are filtered from the response if they don't exist, the requesting token lacks the + required permissions, or any of their logic rules are not supported by this API, so the response may + contain fewer entries than requested. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetActionTypeFullMetadataBatchRequestElement] + :param branch: The Foundry branch to load the action type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.GetActionTypeFullMetadataBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actionTypes/getFullMetadataBatch", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetActionTypeFullMetadataBatchRequest( + requests=requests, + ), + response_type=ontologies_models.GetActionTypeFullMetadataBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -133,7 +199,7 @@ def list( :type ontology: OntologyIdentifier :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. :type branch: Optional[FoundryBranch] - :param object_type_api_names: An set of object type api names that can be used to filter which actions are returned. Currently this only works for one object type, specifying more will cause the request to fail. + :param object_type_api_names: A set of object type API names that can be used to filter which actions are returned. :type object_type_api_names: Optional[List[ObjectTypeApiName]] :param page_size: 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. :type page_size: Optional[PageSize] @@ -176,18 +242,30 @@ def list( class _ActionTypeFullMetadataClientRaw: def __init__(self, client: ActionTypeFullMetadataClient) -> None: def get(_: ontologies_models.ActionTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetActionTypeFullMetadataBatchResponse, + ): ... def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... self.get = core.with_raw_response(get, client.get) + self.get_full_metadata_batch = core.with_raw_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.list = core.with_raw_response(list, client.list) class _ActionTypeFullMetadataClientStreaming: def __init__(self, client: ActionTypeFullMetadataClient) -> None: def get(_: ontologies_models.ActionTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetActionTypeFullMetadataBatchResponse, + ): ... def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... self.get = core.with_streaming_response(get, client.get) + self.get_full_metadata_batch = core.with_streaming_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.list = core.with_streaming_response(list, client.list) @@ -273,6 +351,71 @@ def get( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + requests: typing_extensions.Annotated[ + typing.List[ontologies_models.GetActionTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.GetActionTypeFullMetadataBatchResponse]: + """ + Gets a list of action types with full metadata (parameters and logic rules) by their API names in + bulk. + + Action types are filtered from the response if they don't exist, the requesting token lacks the + required permissions, or any of their logic rules are not supported by this API, so the response may + contain fewer entries than requested. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetActionTypeFullMetadataBatchRequestElement] + :param branch: The Foundry branch to load the action type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.GetActionTypeFullMetadataBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actionTypes/getFullMetadataBatch", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetActionTypeFullMetadataBatchRequest( + requests=requests, + ), + response_type=ontologies_models.GetActionTypeFullMetadataBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -300,7 +443,7 @@ def list( :type ontology: OntologyIdentifier :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. :type branch: Optional[FoundryBranch] - :param object_type_api_names: An set of object type api names that can be used to filter which actions are returned. Currently this only works for one object type, specifying more will cause the request to fail. + :param object_type_api_names: A set of object type API names that can be used to filter which actions are returned. :type object_type_api_names: Optional[List[ObjectTypeApiName]] :param page_size: 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. :type page_size: Optional[PageSize] @@ -343,16 +486,28 @@ def list( class _AsyncActionTypeFullMetadataClientRaw: def __init__(self, client: AsyncActionTypeFullMetadataClient) -> None: def get(_: ontologies_models.ActionTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetActionTypeFullMetadataBatchResponse, + ): ... def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... self.get = core.async_with_raw_response(get, client.get) + self.get_full_metadata_batch = core.async_with_raw_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.list = core.async_with_raw_response(list, client.list) class _AsyncActionTypeFullMetadataClientStreaming: def __init__(self, client: AsyncActionTypeFullMetadataClient) -> None: def get(_: ontologies_models.ActionTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetActionTypeFullMetadataBatchResponse, + ): ... def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... self.get = core.async_with_streaming_response(get, client.get) + self.get_full_metadata_batch = core.async_with_streaming_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/geotemporal_series_property.py b/foundry_sdk/v2/ontologies/geotemporal_series_property.py index 0082f40c..99124b1b 100644 --- a/foundry_sdk/v2/ontologies/geotemporal_series_property.py +++ b/foundry_sdk/v2/ontologies/geotemporal_series_property.py @@ -84,7 +84,7 @@ def load_geotemporal_series_entries( Results are paginated. Use the `nextPageToken` from the response to retrieve subsequent pages. :::callout{theme=warning title=Warning} - Geotemporal series integrations with only "dataset archive" enabled are not supported. + Geotemporal series integrations with only "cold storage" enabled are not supported. ::: :param ontology: @@ -226,7 +226,7 @@ def load_geotemporal_series_entries( Results are paginated. Use the `nextPageToken` from the response to retrieve subsequent pages. :::callout{theme=warning title=Warning} - Geotemporal series integrations with only "dataset archive" enabled are not supported. + Geotemporal series integrations with only "cold storage" enabled are not supported. ::: :param ontology: diff --git a/foundry_sdk/v2/ontologies/models.py b/foundry_sdk/v2/ontologies/models.py index c5c16ece..9c288d11 100644 --- a/foundry_sdk/v2/ontologies/models.py +++ b/foundry_sdk/v2/ontologies/models.py @@ -100,6 +100,7 @@ class ActionParameterArrayType(core.ModelBase): "OntologyObjectSetType", core_models.GeohashType, core_models.VectorType, + core_models.DecimalType, "OntologyObjectType", core_models.TimestampType, ], @@ -1847,6 +1848,27 @@ class GetActionTypeByRidBatchResponse(core.ModelBase): data: typing.List[ActionTypeV2] +class GetActionTypeFullMetadataBatchRequest(core.ModelBase): + """GetActionTypeFullMetadataBatchRequest""" + + requests: typing_extensions.Annotated[ + typing.List[GetActionTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ] + + +class GetActionTypeFullMetadataBatchRequestElement(core.ModelBase): + """GetActionTypeFullMetadataBatchRequestElement""" + + action_type: ActionTypeApiName = pydantic.Field(alias=str("actionType")) # type: ignore[literal-required] + + +class GetActionTypeFullMetadataBatchResponse(core.ModelBase): + """GetActionTypeFullMetadataBatchResponse""" + + data: typing.List[ActionTypeFullMetadata] + + class GetObjectTypeByRidBatchRequest(core.ModelBase): """GetObjectTypeByRidBatchRequest""" @@ -1868,6 +1890,41 @@ class GetObjectTypeByRidBatchResponse(core.ModelBase): data: typing.List[ObjectTypeV2] +class GetObjectTypeFullMetadataBatchRequest(core.ModelBase): + """GetObjectTypeFullMetadataBatchRequest""" + + requests: typing_extensions.Annotated[ + typing.List[GetObjectTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ] + include_link_types: typing.Optional[bool] = pydantic.Field(alias=str("includeLinkTypes"), default=None) # type: ignore[literal-required] + """ + A flag that will return all outgoing link types for each requested object type in that object type's + `linkTypes`. When false or omitted, `linkTypes` is empty. + """ + + +class GetObjectTypeFullMetadataBatchRequestElement(core.ModelBase): + """GetObjectTypeFullMetadataBatchRequestElement""" + + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + + +class GetObjectTypeFullMetadataBatchResponse(core.ModelBase): + """GetObjectTypeFullMetadataBatchResponse""" + + data: typing.List[ObjectTypeFullMetadata] + """ + The requested object types, in the order they were requested. Object types that were not found are + omitted, so this may contain fewer entries than were requested. + + Each object type's `linkTypes` is only populated when the request specifies + `includeLinkTypes=true`, and is ordered by link type API name. It may also be empty if the object + type has no outgoing link types, or if the requesting token cannot see the object types on the + other side of them. + """ + + class GetOutgoingLinkTypesByObjectTypeRidBatchRequest(core.ModelBase): """GetOutgoingLinkTypesByObjectTypeRidBatchRequest""" @@ -3917,6 +3974,7 @@ class ObjectTypeLinkTypeApiNameMapping(core.ModelBase): class ObjectTypeMediaSetViewDatasource(core.ModelBase): """An object type datasource backed by a Foundry media set view, providing media for media reference properties.""" + media_set_rid: core_models.MediaSetRid = pydantic.Field(alias=str("mediaSetRid")) # type: ignore[literal-required] media_set_view_rid: core_models.MediaSetViewRid = pydantic.Field(alias=str("mediaSetViewRid")) # type: ignore[literal-required] properties: typing.List[PropertyApiName] """The set of properties that are bound to the media view.""" @@ -6778,9 +6836,15 @@ class WithinPolygonQuery(core.ModelBase): "GetActionTypeByRidBatchRequest", "GetActionTypeByRidBatchRequestElement", "GetActionTypeByRidBatchResponse", + "GetActionTypeFullMetadataBatchRequest", + "GetActionTypeFullMetadataBatchRequestElement", + "GetActionTypeFullMetadataBatchResponse", "GetObjectTypeByRidBatchRequest", "GetObjectTypeByRidBatchRequestElement", "GetObjectTypeByRidBatchResponse", + "GetObjectTypeFullMetadataBatchRequest", + "GetObjectTypeFullMetadataBatchRequestElement", + "GetObjectTypeFullMetadataBatchResponse", "GetOutgoingLinkTypesByObjectTypeRidBatchRequest", "GetOutgoingLinkTypesByObjectTypeRidBatchRequestElement", "GetOutgoingLinkTypesByObjectTypeRidBatchResponse", diff --git a/foundry_sdk/v2/ontologies/object_type.py b/foundry_sdk/v2/ontologies/object_type.py index 8d364bc1..c8302d4f 100644 --- a/foundry_sdk/v2/ontologies/object_type.py +++ b/foundry_sdk/v2/ontologies/object_type.py @@ -320,6 +320,76 @@ def get_full_metadata( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + requests: typing_extensions.Annotated[ + typing.List[ontologies_models.GetObjectTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + include_link_types: typing.Optional[bool] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.GetObjectTypeFullMetadataBatchResponse: + """ + Gets the full metadata for a batch of object types, identified by their API names. + + Set `includeLinkTypes` to return every outgoing link type for each object type alongside its metadata, + without needing to know the link type API names. Link types are ordered by their API name. + + Object types are returned in the order they were requested. Any that don't exist or that the requesting + token lacks permissions for are silently omitted. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetObjectTypeFullMetadataBatchRequestElement] + :param branch: The Foundry branch to load the object type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param include_link_types: A flag that will return all outgoing link types for each requested object type in that object type's `linkTypes`. When false or omitted, `linkTypes` is empty. + :type include_link_types: Optional[bool] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.GetObjectTypeFullMetadataBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectTypes/getFullMetadataBatch", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetObjectTypeFullMetadataBatchRequest( + requests=requests, + include_link_types=include_link_types, + ), + response_type=ontologies_models.GetObjectTypeFullMetadataBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -571,6 +641,9 @@ def get(_: ontologies_models.ObjectTypeV2): ... def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetObjectTypeFullMetadataBatchResponse, + ): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... def get_outgoing_link_types_by_object_type_rid_batch( _: ontologies_models.GetOutgoingLinkTypesByObjectTypeRidBatchResponse, @@ -582,6 +655,9 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV self.get_by_rid_batch = core.with_raw_response(get_by_rid_batch, client.get_by_rid_batch) self.get_edits_history = core.with_raw_response(get_edits_history, client.get_edits_history) self.get_full_metadata = core.with_raw_response(get_full_metadata, client.get_full_metadata) + self.get_full_metadata_batch = core.with_raw_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.get_outgoing_link_type = core.with_raw_response( get_outgoing_link_type, client.get_outgoing_link_type ) @@ -601,6 +677,9 @@ def get(_: ontologies_models.ObjectTypeV2): ... def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetObjectTypeFullMetadataBatchResponse, + ): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... def get_outgoing_link_types_by_object_type_rid_batch( _: ontologies_models.GetOutgoingLinkTypesByObjectTypeRidBatchResponse, @@ -618,6 +697,9 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV self.get_full_metadata = core.with_streaming_response( get_full_metadata, client.get_full_metadata ) + self.get_full_metadata_batch = core.with_streaming_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.get_outgoing_link_type = core.with_streaming_response( get_outgoing_link_type, client.get_outgoing_link_type ) @@ -926,6 +1008,76 @@ def get_full_metadata( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + requests: typing_extensions.Annotated[ + typing.List[ontologies_models.GetObjectTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + include_link_types: typing.Optional[bool] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.GetObjectTypeFullMetadataBatchResponse]: + """ + Gets the full metadata for a batch of object types, identified by their API names. + + Set `includeLinkTypes` to return every outgoing link type for each object type alongside its metadata, + without needing to know the link type API names. Link types are ordered by their API name. + + Object types are returned in the order they were requested. Any that don't exist or that the requesting + token lacks permissions for are silently omitted. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetObjectTypeFullMetadataBatchRequestElement] + :param branch: The Foundry branch to load the object type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param include_link_types: A flag that will return all outgoing link types for each requested object type in that object type's `linkTypes`. When false or omitted, `linkTypes` is empty. + :type include_link_types: Optional[bool] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.GetObjectTypeFullMetadataBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectTypes/getFullMetadataBatch", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetObjectTypeFullMetadataBatchRequest( + requests=requests, + include_link_types=include_link_types, + ), + response_type=ontologies_models.GetObjectTypeFullMetadataBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -1177,6 +1329,9 @@ def get(_: ontologies_models.ObjectTypeV2): ... def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetObjectTypeFullMetadataBatchResponse, + ): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... def get_outgoing_link_types_by_object_type_rid_batch( _: ontologies_models.GetOutgoingLinkTypesByObjectTypeRidBatchResponse, @@ -1194,6 +1349,9 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV self.get_full_metadata = core.async_with_raw_response( get_full_metadata, client.get_full_metadata ) + self.get_full_metadata_batch = core.async_with_raw_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.get_outgoing_link_type = core.async_with_raw_response( get_outgoing_link_type, client.get_outgoing_link_type ) @@ -1213,6 +1371,9 @@ def get(_: ontologies_models.ObjectTypeV2): ... def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetObjectTypeFullMetadataBatchResponse, + ): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... def get_outgoing_link_types_by_object_type_rid_batch( _: ontologies_models.GetOutgoingLinkTypesByObjectTypeRidBatchResponse, @@ -1230,6 +1391,9 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV self.get_full_metadata = core.async_with_streaming_response( get_full_metadata, client.get_full_metadata ) + self.get_full_metadata_batch = core.async_with_streaming_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.get_outgoing_link_type = core.async_with_streaming_response( get_outgoing_link_type, client.get_outgoing_link_type )