def get_endpoint(model):
    """
    Get the endpoint for the model object. If the model is an existing one the
    endpoint will be to that specific endpoint

    :param model: The model
    :type model: subclass of :class:`pyawx.models.mixins.DataModelMixin`
    :return: str
    """
    return model.__endpoint__ if not model.id else f"{model.__endpoint__}/{model.id}"