{"note":"OpenAPI conversion -- returning structured metadata","name":"parliament-uk-writtenquestions","description":"Written Questions Service API","version":"v1","base_url":"","endpoints":7,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Written Questions Service API\n@version v1\n@endpoints 7\n@toc api(7)\n\n@endpoint GET /api/dailyreports/dailyreports\n@desc Returns a list of daily reports\n@optional {dateFrom: str(date-time) # Daily report with report date on or after the date specified. Date format yyyy-mm-dd, dateTo: str(date-time) # Daily report with report date on or before the date specified. Date format yyyy-mm-dd, house: str # Daily report relating to the House specified. Defaults to Bicameral, skip: int(int32) # Number of records to skip, default is 0, take: int(int32) # Number of records to take, default is 20}\n@returns(200) {totalResults: int(int32), results: [map]?} # Success\n@errors {400: Bad Request}\n\n@endpoint GET /api/writtenquestions/questions\n@desc Returns a list of written questions\n@optional {askingMemberId: int(int32) # Written questions asked by member with member ID specified, answeringMemberId: int(int32) # Written questions answered by member with member ID specified, tabledWhenFrom: str(date-time) # Written questions tabled on or after the date specified. Date format yyyy-mm-dd, dateForAnswerWhenFrom: str(date-time) # Written questions DateForAnswer on or after the date specified format yyyy-mm-dd, dateForAnswerWhenTo: str(date-time) # Written questions DateForAnswer on or before the date specified format yyyy-mm-dd, tabledWhenTo: str(date-time) # Written questions tabled on or before the date specified. Date format yyyy-mm-dd, answered: str # Written questions that have been answered, unanswered or either., answeredWhenFrom: str(date-time) # Written questions answered on or after the date specified. Date format yyyy-mm-dd, answeredWhenTo: str(date-time) # Written questions answered on or before the date specified. Date format yyyy-mm-dd, questionStatus: str # Written questions with the status specified, includeWithdrawn: bool # Include written questions that have been withdrawn, expandMember: bool # Expand the details of Members in the results, correctedWhenFrom: str(date-time) # Written questions corrected on or after the date specified. Date format yyyy-mm-dd, correctedWhenTo: str(date-time) # Written questions corrected on or before the date specified. Date format yyyy-mm-dd, sessionStatus: str # The Session status for which the Questions data will be returned, searchTerm: str # Written questions / statements containing the search term specified, searches item content, uIN: str # Written questions / statements with the uin specified, answeringBodies: [int(int32)] # Written questions / statements relating to the answering bodies with the IDs specified, members: [int(int32)] # Written questions / statements relating to the members with the IDs specified, house: str # Written questions / statements relating to the House specified, skip: int(int32) # Number of records to skip, default is 0, take: int(int32) # Number of records to take, default is 20}\n@returns(200) {totalResults: int(int32), results: [map]?} # Success\n@errors {400: Bad Request}\n\n@endpoint GET /api/writtenquestions/questions/{id}\n@desc Returns a written question\n@required {id: int(int32) # written question with ID specified}\n@optional {expandMember: bool # Expand the details of Members in the result, sessionStatus: str # Session status to get the Questions data for}\n@returns(200) {value: map{id: int(int32), askingMemberId: int(int32), askingMember: map{id: int(int32), listAs: str?, name: str?, party: str?, partyColour: str?, partyAbbreviation: str?, memberFrom: str?, thumbnailUrl: str?}, house: str, memberHasInterest: bool, dateTabled: str(date-time), dateForAnswer: str(date-time), uin: str?, questionText: str?, answeringBodyId: int(int32), answeringBodyName: str?, isWithdrawn: bool, isNamedDay: bool, groupedQuestions: [str]?, answerIsHolding: bool?, answerIsCorrection: bool?, answeringMemberId: int(int32)?, answeringMember: map{id: int(int32), listAs: str?, name: str?, party: str?, partyColour: str?, partyAbbreviation: str?, memberFrom: str?, thumbnailUrl: str?}, correctingMemberId: int(int32)?, correctingMember: map{id: int(int32), listAs: str?, name: str?, party: str?, partyColour: str?, partyAbbreviation: str?, memberFrom: str?, thumbnailUrl: str?}, dateAnswered: str(date-time)?, answerText: str?, originalAnswerText: str?, comparableAnswerText: str?, dateAnswerCorrected: str(date-time)?, dateHoldingAnswer: str(date-time)?, attachmentCount: int(int32), heading: str?, attachments: [map]?, groupedQuestionsDates: [map]?}, links: [map]?} # Success\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/writtenquestions/questions/{date}/{uin}\n@desc Returns a written question\n@required {date: str(date-time) # Written question on date specified, uin: str # Written question with uid specified}\n@optional {expandMember: bool # Expand the details of Members in the results, sessionStatus: str # Session status to get the Questions data for}\n@returns(200) {value: map{id: int(int32), askingMemberId: int(int32), askingMember: map{id: int(int32), listAs: str?, name: str?, party: str?, partyColour: str?, partyAbbreviation: str?, memberFrom: str?, thumbnailUrl: str?}, house: str, memberHasInterest: bool, dateTabled: str(date-time), dateForAnswer: str(date-time), uin: str?, questionText: str?, answeringBodyId: int(int32), answeringBodyName: str?, isWithdrawn: bool, isNamedDay: bool, groupedQuestions: [str]?, answerIsHolding: bool?, answerIsCorrection: bool?, answeringMemberId: int(int32)?, answeringMember: map{id: int(int32), listAs: str?, name: str?, party: str?, partyColour: str?, partyAbbreviation: str?, memberFrom: str?, thumbnailUrl: str?}, correctingMemberId: int(int32)?, correctingMember: map{id: int(int32), listAs: str?, name: str?, party: str?, partyColour: str?, partyAbbreviation: str?, memberFrom: str?, thumbnailUrl: str?}, dateAnswered: str(date-time)?, answerText: str?, originalAnswerText: str?, comparableAnswerText: str?, dateAnswerCorrected: str(date-time)?, dateHoldingAnswer: str(date-time)?, attachmentCount: int(int32), heading: str?, attachments: [map]?, groupedQuestionsDates: [map]?}, links: [map]?} # Success\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/writtenstatements/statements\n@desc Returns a list of written statements\n@optional {madeWhenFrom: str(date-time) # Written statements made on or after the date specified. Date format yyyy-mm-dd, madeWhenTo: str(date-time) # Written statements made on or before the date specified. Date format yyyy-mm-dd, sessionStatus: str # The Session status for which the Written statements data will be returned, searchTerm: str # Written questions / statements containing the search term specified, searches item content, uIN: str # Written questions / statements with the uin specified, answeringBodies: [int(int32)] # Written questions / statements relating to the answering bodies with the IDs specified, members: [int(int32)] # Written questions / statements relating to the members with the IDs specified, house: str # Written questions / statements relating to the House specified, skip: int(int32) # Number of records to skip, default is 0, take: int(int32) # Number of records to take, default is 20, expandMember: bool # Expand the details of Members in the results}\n@returns(200) {totalResults: int(int32), results: [map]?} # Success\n@errors {400: Bad Request}\n\n@endpoint GET /api/writtenstatements/statements/{id}\n@desc Returns a written statement\n@required {id: int(int32) # Written statement with ID specified}\n@optional {expandMember: bool # Expand the details of Members in the results, sessionStatus: str # Session status to filter the Written statement records}\n@returns(200) {totalResults: int(int32), results: [map]?} # Success\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/writtenstatements/statements/{date}/{uin}\n@desc Returns a written statemnet\n@required {date: str(date-time) # Written statement on date specified, uin: str # Written statement with uid specified}\n@optional {expandMember: bool # Expand the details of Members in the results, sessionStatus: str # Session status to filter the Written statement records}\n@returns(200) {value: map{id: int(int32), memberId: int(int32), member: map{id: int(int32), listAs: str?, name: str?, party: str?, partyColour: str?, partyAbbreviation: str?, memberFrom: str?, thumbnailUrl: str?}, memberRole: str?, uin: str?, dateMade: str(date-time), answeringBodyId: int(int32), answeringBodyName: str?, title: str?, text: str?, house: str, noticeNumber: int(int32), hasAttachments: bool, hasLinkedStatements: bool, linkedStatements: [map]?, attachments: [map]?}, links: [map]?} # Success\n@errors {400: Bad Request, 404: Not Found}\n\n@end\n"}