I have attempted to make a POST call to the /Series API call. Everytime I make the call I recieve back the following error: http://pastebin.com/Kgc42NsJ
Here is the data I am sending: http://pastebin.com/pKJ07LkA
I have attempted to remove the only two boolean related data points since they are optional but the error persists. I believe that I am probably sending the request incorrectly since the error doesn’t change much as I alter the data.
boolean values should not be quoted (just sent true
or false
), so { seasonNumber: '4', monitored: 'true' } ],
should be { seasonNumber: '4', monitored: true } ],
Same error with the season[].monitored boolean instead of string.
I looked at the POST that the WebUI sends and it appears you are posting the entire model with just a modified model.seasons depending on the selection made. I attempted making this same call with the same result of the boolean error.
I then took the POST request from the WebUI and sent it over via the API and threw the same error. So perhaps it has something to do with headers or the way I am sending the data.
Here is my latest request: http://pastebin.com/8hhvGF8T
Just noticed I have stringed booleans in the main object, let me clear that.
Didn’t get that error, but you have a couple other errors:
-
qualityProfileId: '0',
- numbers are stringified
- rootFolderPath or path must be sent
I just sent this, verbatim: http://pastebin.com/4Hcyzy7w and it was successful.
The only header I set was the X-Api-Key header (with the value set to my API Key).
I executed this with POSTMAN for Chrome.
Markus,
Thank you much, I will attempt that and see what I get. This is a good point to work from since any error can be assumed to be at the POST request building side.
Markus,
Confirmed resolved. it was the method in which I was posting the data, I used a more standard REST POST structure and received success. Again, thank you.