Overview

Services have been developed to serve Written and Oral questions filtered by search term, date range, and member Id. These services are available for consumption by any interested party and are documented below.

Two services are provided. A query string needs to be attached to filter the Question data, either a start and end date or a dynamic date must be specified in order to return data. It is also mandatory to include the output format in the url.


URL

URL: questions/oral/list.{format}?{query}

This service will display a list of all the Oral questions which have taken submitted by members.

The information provided by this service is as follows:

  • Id of the oral question
  • Member Id of the asking member
  • Tabled Date
  • Date Question is due for answer
  • First 100 characters of the question text
  • UIN
  • Contribution Id
  • Debate Id
  • Whether question is substantive
  • Member Id of the answering member
  • Date question was answered
  • Whether it is a correction
  • Does the Tabling member have an interest
  • House

Example URL:

/questions/oral/list.xml?startdate=2014-04-01&enddate=2014-04-28

URL: questions/written/list.{format}?{query}

This service will display a list of all the Written questions which have taken submitted by members.

The information provided by this service is as follows:

  • Id of the Written question
  • Member Id of the asking member
  • Tabled Date
  • Date Question is due for answer
  • First 100 characters of the question text
  • UIN
  • Contribution Id
  • Debate Id
  • Whether question is substantive
  • Member Id of the answering member
  • Date question was answered
  • Whether it is a correction
  • Does the Tabling member have an interest
  • House

Example URL:

/questions/written/list.xml?startdate=2014-04-01&enddate=2014-04-28

URL: questions/question/{id}.{format}

This service will bring up information for a single Question, which is as follows:

  • Id of the question
  • Member Id of the asking member
  • Tabled Date
  • Date Question is due for answer
  • Full question text
  • UIN
  • Contribution Id
  • Debate Id
  • Whether question is substantive
  • Member Id of the answering member
  • Date question was answered
  • Whether it is a correction
  • Does the Tabling member have an interest
  • House

Example URL:

/questions/question/102.xml

Query Parameters

Parameter Description
startDate Date range start date (string: yyyy-MM-dd).
endDate Date range end date (string: yyyy-MM-dd). NB - the total number of days that can be returned by any single call is 90.
date Date, (string, a dynamic date description - see below).
memberId Valid member Id from the Members Names service (integer).
SearchTerm The search text to find a match within the title or text.

Dynamic Dates

A dynamic date can form part of the query. These values will be automatically parsed by the server to create an appropriate date range for the query.

Parameter Description
today Data for today
yesterday Data for yesterday
last7days Data for the last 7 days
last30days Data for the last 30 days
thisweek Data for the current week (start day Monday)
thismonth Data for the current calendar month
lastmonth Data for the next calendar month

Example URLs

/questions/oral/list.xml?date=thismonth


Output Formats

The following output formats are available, to be included in the query:

Format Description
xml Xml output, available on both services.
json Json output, available on both services.

Example URLs

/questions/oral/list.xml?date=thisweek

/questions/oral/list.json?date=thisweek