Fix for #464 Timeouts for /v2/deployments

Work in progress, PR created for review.
Done. The root cause here is the use of the tuple type, that is not needed really. I have written a fix for this, but will make a separate PR, once this one is merged.