Add API(v2) to add environment to task