401 Error: Accessing API through KNIME

I shouldn’t be meddling here (don’t use KNIME) but since I started…

For some reason your link to the GET documentation above displays as a blank link (an “a” tag without any “href” in the HTML) so I can’t check that either.

I see that new REST nodes which came in with KNIME 3.2 do have a way of passing authentication as you say, along with custom http headers. Couldn’t find main docs on the REST node but found info at:
http://www.dataminingreporting.com/blog/the-new-rest-nodes-get-request

As long as you’re setting it to use Basic authentication with the credentials as per CH, it should be fine.

Only other suggestions from me (you’ve probably covered) are:

  • Check the username works with another tool e.g. use cURL - you’ve done this via browser.

  • Try the (deprecated by RFC 3986) prepend username and password to URL e.g. I just requested the following example URL (via cURL on command line) and got the expected json response:

    https:// {my CH ID}:@api.companieshouse.gov.uk/search/companies?q=barclays

(Don’t have a space after “//” that’s just because otherwise this forum makes it a link!)

I wouldn’t rely on this instead of getting the normal authentication working for critical applications. Security info about this method in case you’re interested.

  • Check KNIME isn’t getting confused with username / password on Basic authentication e.g. there is no “password” for CH - check the output from KNIME if you can. According to e.g. wikipedia or (detail) RFC7617 the username and password string (“{youruserid}:”) are base64-encoded and the Authorization header will appear as:

    Authorization: Basic {base64-encoded-username-password}

I’ve used a couple of different ways of accessing the CH REST services (e.g. curl on command line, the PHP cURL extension etc.). I have experienced some issues but it turned out they were all at my end of the pipe.

Financial stuff: this is available now for companies that have filed it, see

It looks interesting but you’ll likely need some heavyweight financial analysis software to make sense of the data:

KNIME looks interesting - maybe I’ll check it out in my spare time…