Command and House Papers Beta

Welcome to the Command and House Paper Beta API

This beta site give you access to Command and House papers as HTML or XML documents. The instructions below indicate how to use this site.

Please note that currently this site only functions correctly in IE8, Safari and Firefox 3.

How to Create URIs to Access the Papers

Command papers are referred to by their paper number where possible. For instance 'Communities in control: real people, real power' has the number 7427 and is therefore available at:http://sandbox.opsi.gov.uk/id/paper/cm/7427

This is an identifier URI. Each document and all useful parts of the document have an identifier URI, allowing you to refer to it. Within this beta site identifier URIs are redirected to the generic document URI and as you are using an HTML browser, you wil see the HTML representation.

Each document and parts of it can also retrieved as an XML representation. For example, the XML representation of Cm 7427 ishttp://sandbox.opsi.gov.uk/paper/cm/7427/cm-7427.xml

Similarly each document can also retrieved as a PDF representation. For example, the PDF representation of Cm 7427 ishttp://sandbox.opsi.gov.uk/paper/cm/7427/cm-7427.pdf

The pattern for the filename, to access the XML or PDF representation, is to take the part of the URI after 'paper/' and convert / characters into hypens.

Where titles are used spaces should be replaced by underscores and other punctuation dropped. For instance the Barker Review is at:http://sandbox.opsi.gov.uk/paper/barker_review_of_land_use_planning/barker_review_of_land_use_planning.xml

At the lower level paragraphs can be referred to using the format: http://sandbox.opsi.gov.uk/paper/cm/7427/chapter/1/para/1.3

This will display only that section or, for the XML, only return the XML for that section.

Annexes can be referred to using the format:http://sandbox.opsi.gov.uk/paper/cm/7293/annex/a

Accessing XML

XML for a document can be downloaded from the papers page. Additionally, for each document and fragment the XML can be accessed using the 'Get this section as XML' link on the top right of the page.

The site does have some content negotiation. If your request to a generic document URI is made with an accept header with a value of application/xml you will get served that URI as XML. If the URI is the identifier URI you will get a '303 See other' redirect to the generic document, which as before will serve XML if the accept header is application/xml. XML Content-Location values will be as in the section above.

Questions and Feedback

Any questions you have or feedback you would like to provide should be sent to john.sheridan@nationalarchives.gov.uk.

Crown copyright, free to re-use