Then I tried
curl -v http://localhost:8989/api/command -X POST -d '{"name": "downloadedepisodesscan"}' --header "X-Api-Key:MyKey"
Return the following in cmd:
Note: Unnecessary use of -X or --request, POST is already inferred.
* timeout on name lookup is not supported
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8989 (#0)
> POST /api/command HTTP/1.1
> Host: localhost:8989
> User-Agent: curl/7.53.1
> Accept: */*
> X-Api-Key:myapi
> Content-Length: 7
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 7 out of 7 bytes
< HTTP/1.1 500 Internal Server Error
< Cache-Control: no-cache, no-store, must-revalidate
< Pragma: no-cache
< Transfer-Encoding: chunked
< Content-Type: application/json; charset=utf-8
< Expires: 0
< Server: Microsoft-HTTPAPI/2.0
< X-ApplicationVersion: 2.0.0.4689
< Date: Wed, 12 Apr 2017 17:37:42 GMT
<
{
"message": "Unterminated string. Expected delimiter: '. Path '', line 1, position 7.",
"description": "Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter: '. Path '', line 1, position 7.\r\n at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote)\r\n at Newtonsoft.Json.JsonTextReader.ParseString(Char quote, ReadType readType)\r\n at Newtonsoft.Json.JsonTextReader.ParseValue()\r\n at Newtonsoft.Json.JsonTextReader.Read()\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)\r\n at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\r\n at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)\r\n at NzbDrone.Api.Extensions.ReqResExtensions.FromJson(Stream body, Type type) in M:\\BuildAgent\\work\\b69c1fe19bfc2c38\\src\\NzbDrone.Api\\Extensions\\ReqResExtensions.cs:line 31\r\n at NzbDrone.Api.Extensions.ReqResExtensions.FromJson[T](Stream body, Type type) in M:\\BuildAgent\\work\\b69c1fe19bfc2c38\\src\\NzbDrone.Api\\Extensions\\ReqResExtensions.cs:line 24\r\n at NzbDrone.Api.Extensions.ReqResExtensions.FromJson[T](Stream body) in M:\\BuildAgent\\work\\b69c1fe19bfc2c38\\src\\NzbDrone.Api\\Extensions\\ReqResExtensions.cs:line 19\r\n at NzbDrone.Api.REST.RestModule`1.ReadResourceFromRequest(Boolean skipValidate) in M:\\BuildAgent\\work\\b69c1fe19bfc2c38\\src\\NzbDrone.Api\\REST\\RestModule.cs:line 188\r\n at NzbDrone.Api.REST.RestModule`1.<set_CreateResource>b__41_0(Object options) in M:\\BuildAgent\\work\\b69c1fe19bfc2c38\\src\\NzbDrone.Api\\REST\\RestModule.cs:line 155\r\n at CallSite.Target(Closure , CallSite , Func`2 , Object )\r\n at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)"
}* Connection #0 to host localhost left intact
curl: (3) [globbing] unmatched close brace/bracket in column 23
In Sonarr:
Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter: '. Path '', line 1, position 7.
at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote)
at Newtonsoft.Json.JsonTextReader.ParseString(Char quote, ReadType readType)
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at NzbDrone.Api.Extensions.ReqResExtensions.FromJson(Stream body, Type type) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Api\Extensions\ReqResExtensions.cs:line 31
at NzbDrone.Api.Extensions.ReqResExtensions.FromJson[T](Stream body, Type type) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Api\Extensions\ReqResExtensions.cs:line 24
at NzbDrone.Api.Extensions.ReqResExtensions.FromJson[T](Stream body) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Api\Extensions\ReqResExtensions.cs:line 19
at NzbDrone.Api.REST.RestModule`1.ReadResourceFromRequest(Boolean skipValidate) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Api\REST\RestModule.cs:line 188
at NzbDrone.Api.REST.RestModule`1.<set_CreateResource>b__41_0(Object options) in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Api\REST\RestModule.cs:line 155
at CallSite.Target(Closure , CallSite , Func`2 , Object )
at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)
I dont understand any of this. How hard can it be to run a scan drone factory command?