Create new destinations

async AsyncCogniteClient.hosted_extractors.destinations.create(
items: DestinationWrite | Sequence[DestinationWrite],
) Destination | DestinationList

Create one or more destinations.

Parameters:

items (DestinationWrite | Sequence[DestinationWrite]) – Destination(s) to create.

Returns:

Created destination(s)

Return type:

Destination | DestinationList

Examples

Create new destination:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.hosted_extractors import (
...     DestinationWrite,
...     SessionWrite,
... )
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> destination = DestinationWrite(
...     external_id="my_dest",
...     credentials=SessionWrite("my_nonce"),
...     target_data_set_id=123,
... )
>>> res = client.hosted_extractors.destinations.create(destination)