@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Written Questions Service API
@version v1
@endpoints 7
@toc api(7)

@endpoint GET /api/dailyreports/dailyreports
@optional {dateFrom: str(date-time), dateTo: str(date-time), house: str, skip: int(int32), take: int(int32)}
@returns(200) {totalResults: int(int32), results: [map]?}
@errors {400}

@endpoint GET /api/writtenquestions/questions
@optional {askingMemberId: int(int32), answeringMemberId: int(int32), tabledWhenFrom: str(date-time), dateForAnswerWhenFrom: str(date-time), dateForAnswerWhenTo: str(date-time), tabledWhenTo: str(date-time), answered: str, answeredWhenFrom: str(date-time), answeredWhenTo: str(date-time), questionStatus: str, includeWithdrawn: bool, expandMember: bool, correctedWhenFrom: str(date-time), correctedWhenTo: str(date-time), sessionStatus: str, searchTerm: str, uIN: str, answeringBodies: [int(int32)], members: [int(int32)], house: str, skip: int(int32), take: int(int32)}
@returns(200) {totalResults: int(int32), results: [map]?}
@errors {400}

@endpoint GET /api/writtenquestions/questions/{id}
@required {id: int(int32)}
@optional {expandMember: bool, sessionStatus: str}
@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]?}
@errors {400, 404}

@endpoint GET /api/writtenquestions/questions/{date}/{uin}
@required {date: str(date-time), uin: str}
@optional {expandMember: bool, sessionStatus: str}
@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]?}
@errors {400, 404}

@endpoint GET /api/writtenstatements/statements
@optional {madeWhenFrom: str(date-time), madeWhenTo: str(date-time), sessionStatus: str, searchTerm: str, uIN: str, answeringBodies: [int(int32)], members: [int(int32)], house: str, skip: int(int32), take: int(int32), expandMember: bool}
@returns(200) {totalResults: int(int32), results: [map]?}
@errors {400}

@endpoint GET /api/writtenstatements/statements/{id}
@required {id: int(int32)}
@optional {expandMember: bool, sessionStatus: str}
@returns(200) {totalResults: int(int32), results: [map]?}
@errors {400, 404}

@endpoint GET /api/writtenstatements/statements/{date}/{uin}
@required {date: str(date-time), uin: str}
@optional {expandMember: bool, sessionStatus: str}
@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]?}
@errors {400, 404}

@end
