superwise_api.entities.destination

class DestinationApi(superwise_api.entities.base.BaseApi):

This class provides methods to interact with the Destination API.

Attributes:
  • api_client (ApiClient): An instance of the ApiClient to make requests.
  • _model_name (str): The name of the model.
  • _resource_path (str): The path of the resource.
  • _model_class (Destination): The model class.
def get_by_id(self, destination_id: str, **kwargs) -> dict:

Gets a destination by id.

Arguments:
  • destination_id (str): The id of the destination.
  • **kwargs: Arbitrary keyword arguments.
Returns:

Destination: The destination.

def delete(self, destination_id: str, **kwargs) -> None:

Deletes a destination.

Arguments:
  • destination_id (str): The id of the destination.
  • **kwargs: Arbitrary keyword arguments.
def create( self, name: str, integration_id: str, params: superwise_api.models.destination.destination.SlackDestinationParams, **kwargs) -> dict:

Creates a new destination.

Arguments:
  • name (str): The name of the destination.
  • integration_id (str): The id of the integration.
  • params (dict): The parameters of the destination.
  • **kwargs: Arbitrary keyword arguments.
Returns:

Destination: The created destination.

def get( self, name: Optional[str] = None, integration_id: Optional[str] = None, destination_id: Optional[str] = None, created_by: Optional[str] = None, page: Optional[int] = None, size: Optional[int] = None, **kwargs) -> superwise_api.client.models.page.Page:

Retrieves destinations. Filter if any of the parameters are provided.

Arguments:
  • name (str, optional): The name of the destination.
  • integration_id (str, optional): The id of the integration.
  • destination_id (str, optional): The id of the destination.
  • created_by (str, optional): The creator of the destination.
  • page (int, optional): The page number.
  • size (int, optional): The size of the page.
  • **kwargs: Arbitrary keyword arguments.
Returns:

Page: A page of destinations.

def update( self, destination_id: str, *, name: Optional[str] = None, params: Optional[superwise_api.models.destination.destination.SlackDestinationParams] = None, **kwargs) -> dict:

Updates a destination.

Arguments:
  • destination_id (str): The id of the destination.
  • name (str, optional): The new name of the destination.
  • params (dict, optional): The new parameters of the destination.
  • **kwargs: Arbitrary keyword arguments.
Returns:

Destination: The updated destination.

Inherited Members
superwise_api.entities.base.BaseApi
BaseApi
api_client
wrap_api_calls
raise_exception