Interacting with Rancher api

Hello,

Yesterday I was trying to bootstrap cluster with Pulumi and I have found a way to bypass that problem. I’m writing small utility which I will use to manually fetch data from the server. i have tried to get data from the API by posting following JSON to /registertokens endpoint.

{
   "clusterId":clusterId",
   "name":"",
   "namespaceId":""
}

But, each time I get HTTP error 422. Same code from API works just fine. Content type is application/json and this all seems fine. Can anyone give me some advice.

HTTP 422 “Unprocessable Entity” would very much occur because of a typo like the missing quote around “clusterId” value!