Added resource input for add thread.

Refactored add thread service and json converter a little.