terminate containers API.