**Description**

I have noticed that the stable REST API doesn't have the ability to run a task (which is possible from the airflow web interface.
I think it would be nice to have either:
- Run task 
- Run all failing tasks (rerun from point of failure)
this ability for integrations.

**Use case / motivation**

I would like the ability to identify the failing tasks on a specific DAG Run and rerun only them.
I would like to do it remotely (non-interactive) using the REST API.
I could write a script that run only the failing tasks, but I couldn't find a way to "Run" a task, when I have the task instance ID.

**Are you willing to submit a PR?**

Not at this stage

**Related Issues**



airflow/models/dag.py
"""
        Returns the number of task instances in the given DAG.
        :param session: ORM session
        :param dag_id: ID of the DAG to get the task concurrency of
        :type dag_id: unicode
        :param task_ids: A list of valid task IDs for the given DAG
        :type task_ids: list[unicode]
        :param states: A list of states to filter by if supplied
        :type states: list[state]
        :return: The number of running tasks
        :rtype: int
        """
        qry = session.query(func.count(TaskInstance.task_id)).filter(
            TaskInstance.dag_id == dag_id,
        )
        if task_ids:
            qry = qry.filter(
                TaskInstance.task_id.in_(task_ids),
            )
        if states:
            if None in states:
                if all(x is None for x in states):
                    qry = qry.filter(TaskInstance.state.is_(None))
                else:
                    not_none_states = [state for state in states if state]
                    qry = qry.filter(
                        or_(TaskInstance.state.in_(not_none_states), TaskInstance.state.is_(None))
                    )
            else:
                qry = qry.filter(TaskInstance.state.in_(states))