I suspect it is because of it being an old API and the accept header being newer. Changing the old API to expect the new header will mean a breaking change for everyone. My experience has been that the examples provided in the documentation are correct, and I tend to use that.
Ketan or someone else might have a better idea or thoughts about changing it to optionally accept that header, maybe. On Mon, Jun 20, 2016 at 1:29 PM, Jeff <[email protected]> wrote: > I should note that I'm using GoCD v.16.3.0. > > On Mon, Jun 20, 2016 at 11:29 AM, Jeff <[email protected]> wrote: > >> This has been plaguing me and wondered if I'm doing something wrong. >> >> I'm hitting the GoCD API to schedule a pipeline. According to the >> instructions at https://api.go.cd/current/#current-version it states: >> >> [image: Inline image 1] >> >> However when I include the accept header: >> >> POST https://go.wp.bluecoat.com/go/api/pipelines/mypipeline1/schedule >> HTTP/1.1 >> User-Agent: Fiddler >> Host: go.wp.bluecoat.com >> Confirm: true >> Accept: "application/vnd.go.cd.v1+json" >> Content-Length: 0 >> Authorization: Basic c3ZjV2ViUHscUV2VsY29tZTE= >> >> >> I get the error: >> >> HTTP/1.1 404 Not Found >> Date: Mon, 20 Jun 2016 17:16:38 GMT >> Set-Cookie: JSESSIONID=120k1lcwfm28k1vgbnno8erbgu;Path=/go;Expires=Mon, >> 04-Jul-2016 17:16:38 GMT;Secure >> Expires: Thu, 01 Jan 1970 00:00:00 GMT >> X-Frame-Options: SAMEORIGIN >> X-XSS-Protection: 1; mode=block >> X-Content-Type-Options: nosniff >> X-UA-Compatible: chrome=1 >> Content-Type: application/vnd.go.cd.v1+json; charset=utf-8 >> Cache-Control: no-cache >> X-Request-Id: 5b661b21-ad19-4919-8148-2fde6146fc83 >> X-Runtime: 0.006000 >> Transfer-Encoding: chunked >> >> 3D >> { >> "message": "The resource you requested was not found!" >> } >> >> 0 >> >> >> If I simply omit the "Accept" header, it works fine. Am I doing >> something wrong because it seems that either the document is wrong or there >> is a bug and it is frustrating. >> >> Thanks! >> >> -- >> Jeff Vincent >> See my LinkedIn profile at: >> http://www.linkedin.com/in/rjeffreyvincent >> > > > > -- > Jeff Vincent > See my LinkedIn profile at: > http://www.linkedin.com/in/rjeffreyvincent > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
