<p>I'm trying to scale out my deployments using openshift rest api, but I'm encountering the error "invalid character 's' looking for beginning of value".
I can successfully get the deployment config details but it's the patch request which is troubling me.
From the documents I have tried Content-Type as below 3 but nothing works: </p>

<ul>
<li>application/json-patch+json</li>
<li>application/merge-patch+json</li>
<li>application/strategic-merge-patch+json</li>
</ul>

<p>Here's my code:</p>

<pre><code>data = {'spec':{'replicas':2}}
headers = {"Authorization": token, "Content-Type": "application/json-patch+json"}
def updateReplicas():
   url = root + "namespaces" + namespace + "deploymentconfigs" + dc + "scale"  
   resp = requests.patch(url, headers=headers, data=data, verify=False)
   print(resp.content)
</code></pre>

<p>Thank you.</p>

<p>Ok, I found out the issue. Silly thing first, data should be inside single quotes data = '{'spec':{'replicas':2}}'. </p>

<p>Then, we need few more info in our data, which finally looks like : </p>

<p>data = '{"kind":"Scale","apiVersion":"extensions/v1beta1","metadata":{"name":"deployment_name","namespace":"namespace_name"},"spec":{"replicas":1}}'</p>

<p>Thank you for your time.</p>
