api - get task instance status command output_format as json now returns all json
task method api call will return proper json
changed error handling in rest api call command to confirm with python best practice