# 401 Error: Accessing API through KNIME

**URL:** <http://forum.companieshouse.gov.uk/t/401-error-accessing-api-through-knime/1211>\
**Category:** API Issues\
**Created:** [June 23, 2017, 3:11pm UTC](http://forum.companieshouse.gov.uk/t/401-error-accessing-api-through-knime/1211 "2017-06-23T15:11:09Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![voracityemail](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/v/b77776/32.png) [@voracityemail](http://forum.companieshouse.gov.uk/u/voracityemail)\
**Post date:** [July 27, 2017, 10:09am UTC](http://forum.companieshouse.gov.uk/t/401-error-accessing-api-through-knime/1211/10 "2017-07-27T10:09:30Z")

</div>

Good to hear, that should help anyone else using KNIME.

Maybe there should be a way of flagging threads here for a kind of FAQ - the article you mentioned at [Getting invalid authorization](http://forum.aws.chdev.org/t/getting-invalid-authorization/41) should be on if so!

I can’t help with XBRL. Yes, it’s XML so readers should be able to parse it. I haven’t troubled with it because the financial data are rather complex and translating that into simple categories is outside my remit!

If you’re interested short examles can be found at [https://beta.companieshouse.gov.uk/company/SC229764/filing-history](https://beta.companieshouse.gov.uk/company/SC229764/filing-history) - there are a couple of short filings there e.g. [https://beta.companieshouse.gov.uk/company/SC229764/filing-history/MzE1MDYxMzMwNWFkaXF6a2N4/document?format=xhtml&download=1](https://beta.companieshouse.gov.uk/company/SC229764/filing-history/MzE1MDYxMzMwNWFkaXF6a2N4/document?format=xhtml&download=1)

The text on Beta says “Download iXBRL” - the document itself is just XBRL (XML) with a [processing instruction for a stylesheet](http://www.companieshouse.gov.uk/ef/xbrl/uk/fr/gaap/ae/2009-06-21/stylesheet/CH-AE-stylesheet.xsl) which will transform to XHTML. This works quite neatly using an XSLT processor. FYI when I tried in browser (Firefox, current) I get an error that it can’t load the stylesheet.

Note that for downloads as of now [2017-07] when you [use the fetch a document request](https://developer.companieshouse.gov.uk/document/docs/document/id/content/fetchDocument.html) you’ll be send an [http redirect response](https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections) (302 here) which points to the document location on Amazon (S3). KNIME may handle this for you transparently ([as happens if you make the request e.g. via AJAX call](http://forum.aws.chdev.org/t/requesting-documents-from-filing-history/1234)) - just saying as I had to explicitly catch the location returned then request this from Amazon.

---

_[View the full topic](http://forum.companieshouse.gov.uk/t/401-error-accessing-api-through-knime/1211)._
