UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 15.9 kB
{"openapi":"3.0.0","info":{"contact":{"email":"softwareengineering@parliament.uk","name":"UK Parliament","url":"https://www.parliament.uk/"},"description":"An API that allows querying of Commons Votes data.","title":"Commons Votes API","version":"v1","x-apisguru-categories":["open_data"],"x-origin":[{"format":"swagger","url":"https://commonsvotes-api.parliament.uk/swagger/docs/v1","version":"2.0"}],"x-providerName":"parliament.uk","x-serviceName":"commonsvotes"},"paths":{"/data/division/{divisionId}.{format}":{"get":{"description":"Single Division which has the specified Id","operationId":"Divisions_GetDivisionById","parameters":[{"description":"Id number of a Division whose records are to be returned","in":"path","name":"divisionId","required":true,"schema":{"type":"integer","format":"int32"}},{"description":"xml or json","in":"path","name":"format","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishedDivision"}},"text/json":{"schema":{"$ref":"#/components/schemas/PublishedDivision"}}}},"400":{"description":"BadRequest"},"404":{"description":"NotFound"}},"summary":"Return a Division","tags":["Divisions"]}},"/data/divisions.{format}/groupedbyparty":{"get":{"description":"Division results which meet the specified criteria grouped by parties","operationId":"Divisions_GetDivisionsGroupsByParty","parameters":[{"description":"xml or json","in":"path","name":"format","required":true,"schema":{"type":"string"}},{"description":"Divisions containing search term within title or number","in":"query","name":"queryParameters.searchTerm","required":false,"schema":{"type":"string"}},{"description":"Divisions returning Member with Member ID voting records","in":"query","name":"queryParameters.memberId","required":false,"schema":{"type":"integer","format":"int32"}},{"description":"Divisions where member was a teller as well as if they actually voted","in":"query","name":"queryParameters.includeWhenMemberWasTeller","required":false,"schema":{"type":"boolean"}},{"description":"Divisions where division date in one or after date provided. Date format is yyyy-MM-dd","in":"query","name":"queryParameters.startDate","required":false,"schema":{"type":"string","format":"date-time"}},{"description":"Divisions where division date in one or before date provided. Date format is yyyy-MM-dd","in":"query","name":"queryParameters.endDate","required":false,"schema":{"type":"string","format":"date-time"}},{"description":"Division Number - as specified by the House, unique within a session. This is different to the division id which uniquely identifies a division in this system and is passed to the GET division endpoint","in":"query","name":"queryParameters.divisionNumber","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DivisionGroupedByParty"},"type":"array"}},"text/json":{"schema":{"items":{"$ref":"#/components/schemas/DivisionGroupedByParty"},"type":"array"}}}},"400":{"description":"BadRequest"}},"summary":"Return Divisions results grouped by party","tags":["Divisions"]}},"/data/divisions.{format}/membervoting":{"get":{"description":"List of voting records for a member which meet the specified criteria.","operationId":"Divisions_GetVotingRecordsForMember","parameters":[{"description":"xml or json","in":"path","name":"format","required":true,"schema":{"type":"string"}},{"description":"Id number of a Member whose voting records are to be returned","in":"query","name":"queryParameters.memberId","required":true,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":2147483647}},{"description":"The number of records to skip. Default is 0","in":"query","name":"queryParameters.skip","required":false,"schema":{"type":"integer","format":"int32"}},{"description":"The number of records to return per page. Default is 25","in":"query","name":"queryParameters.take","required":false,"schema":{"type":"integer","format":"int32"}},{"description":"Divisions containing search term within title or number","in":"query","name":"queryParameters.searchTerm","required":false,"schema":{"type":"string"}},{"description":"Divisions where member was a teller as well as if they actually voted","in":"query","name":"queryParameters.includeWhenMemberWasTeller","required":false,"schema":{"type":"boolean"}},{"description":"Divisions where division date in one or after date provided. Date format is yyyy-MM-dd","in":"query","name":"queryParameters.startDate","required":false,"schema":{"type":"string","format":"date-time"}},{"description":"Divisions where division date in one or before date provided. Date format is yyyy-MM-dd","in":"query","name":"queryParameters.endDate","required":false,"schema":{"type":"string","format":"date-time"}},{"description":"Division Number - as specified by the House, unique within a session. This is different to the division id which uniquely identifies a division in this system and is passed to the GET division endpoint","in":"query","name":"queryParameters.divisionNumber","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MemberVotingRecord"},"type":"array"}},"text/json":{"schema":{"items":{"$ref":"#/components/schemas/MemberVotingRecord"},"type":"array"}}}},"400":{"description":"BadRequest"}},"summary":"Return voting records for a Member","tags":["Divisions"]}},"/data/divisions.{format}/search":{"get":{"description":"List of Divisions which meet the specified criteria","operationId":"Divisions_SearchDivisions","parameters":[{"description":"json or xml","in":"path","name":"format","required":true,"schema":{"type":"string"}},{"description":"The number of records to skip. Default is 0","in":"query","name":"queryParameters.skip","required":false,"schema":{"type":"integer","format":"int32"}},{"description":"The number of records to return per page. Default is 25","in":"query","name":"queryParameters.take","required":false,"schema":{"type":"integer","format":"int32"}},{"description":"Divisions containing search term within title or number","in":"query","name":"queryParameters.searchTerm","required":false,"schema":{"type":"string"}},{"description":"Divisions returning Member with Member ID voting records","in":"query","name":"queryParameters.memberId","required":false,"schema":{"type":"integer","format":"int32"}},{"description":"Divisions where member was a teller as well as if they actually voted","in":"query","name":"queryParameters.includeWhenMemberWasTeller","required":false,"schema":{"type":"boolean"}},{"description":"Divisions where division date in one or after date provided. Date format is yyyy-MM-dd","in":"query","name":"queryParameters.startDate","required":false,"schema":{"type":"string","format":"date-time"}},{"description":"Divisions where division date in one or before date provided. Date format is yyyy-MM-dd","in":"query","name":"queryParameters.endDate","required":false,"schema":{"type":"string","format":"date-time"}},{"description":"Division Number - as specified by the House, unique within a session. This is different to the division id which uniquely identifies a division in this system and is passed to the GET division endpoint","in":"query","name":"queryParameters.divisionNumber","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PublishedDivision"},"type":"array"}},"text/json":{"schema":{"items":{"$ref":"#/components/schemas/PublishedDivision"},"type":"array"}}}},"400":{"description":"BadRequest"}},"summary":"Return a list of Divisions","tags":["Divisions"]}},"/data/divisions.{format}/searchTotalResults":{"get":{"description":"Total count of Divisions meeting the specified criteria","operationId":"Divisions_SearchTotalResults","parameters":[{"description":"json or xml","in":"path","name":"format","required":true,"schema":{"type":"string"}},{"description":"Divisions containing search term within title or number","in":"query","name":"queryParameters.searchTerm","required":false,"schema":{"type":"string"}},{"description":"Divisions returning Member with Member ID voting records","in":"query","name":"queryParameters.memberId","required":false,"schema":{"type":"integer","format":"int32"}},{"description":"Divisions where member was a teller as well as if they actually voted","in":"query","name":"queryParameters.includeWhenMemberWasTeller","required":false,"schema":{"type":"boolean"}},{"description":"Divisions where division date in one or after date provided. Date format is yyyy-MM-dd","in":"query","name":"queryParameters.startDate","required":false,"schema":{"type":"string","format":"date-time"}},{"description":"Divisions where division date in one or before date provided. Date format is yyyy-MM-dd","in":"query","name":"queryParameters.endDate","required":false,"schema":{"type":"string","format":"date-time"}},{"description":"Division Number - as specified by the House, unique within a session. This is different to the division id which uniquely identifies a division in this system and is passed to the GET division endpoint","in":"query","name":"queryParameters.divisionNumber","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"format":"int32","type":"integer"}},"text/json":{"schema":{"format":"int32","type":"integer"}}}},"400":{"description":"BadRequest"}},"summary":"Return total results count","tags":["Divisions"]}}},"servers":[{"url":"http://commonsvotes-api.parliament.uk"},{"url":"https://commonsvotes-api.parliament.uk"}],"components":{"schemas":{"DivisionGroupedByParty":{"properties":{"AyeCount":{"format":"int32","type":"integer"},"Ayes":{"description":"Counts of all members who voted 'Aye', grouped by party","items":{"$ref":"#/components/schemas/PartyVoteResult"},"type":"array"},"Date":{"format":"date-time","type":"string"},"DivisionId":{"format":"int32","type":"integer"},"NoCount":{"format":"int32","type":"integer"},"Noes":{"description":"Counts of all members who voted 'Noe', grouped by party","items":{"$ref":"#/components/schemas/PartyVoteResult"},"type":"array"},"Number":{"format":"int32","type":"integer"},"Title":{"type":"string"}},"type":"object"},"MemberSearchQueryParameters":{"properties":{"DivisionNumber":{"description":"Division Number - as specified by the House, unique within a session. This is different to the division id which uniquely identifies a division in this system and is passed to the GET division endpoint","format":"int32","type":"integer"},"EndDate":{"description":"Divisions where division date in one or before date provided. Date format is yyyy-MM-dd","format":"date-time","type":"string"},"IncludeWhenMemberWasTeller":{"description":"Divisions where member was a teller as well as if they actually voted","type":"boolean"},"MemberId":{"description":"Id number of a Member whose voting records are to be returned","format":"int32","maximum":2147483647,"minimum":1,"type":"integer"},"SearchTerm":{"description":"Divisions containing search term within title or number","type":"string"},"Skip":{"description":"The number of records to skip. Default is 0","format":"int32","type":"integer"},"StartDate":{"description":"Divisions where division date in one or after date provided. Date format is yyyy-MM-dd","format":"date-time","type":"string"},"Take":{"description":"The number of records to return per page. Default is 25","format":"int32","type":"integer"}},"required":["MemberId"],"type":"object"},"MemberVotingRecord":{"properties":{"MemberId":{"format":"int32","type":"integer"},"MemberVotedAye":{"type":"boolean"},"MemberWasTeller":{"type":"boolean"},"PublishedDivision":{"$ref":"#/components/schemas/PublishedDivision"}},"type":"object"},"PartyVoteResult":{"properties":{"PartyName":{"type":"string"},"VoteCount":{"format":"int32","type":"integer"}},"type":"object"},"PublishedDivision":{"properties":{"AyeCount":{"format":"int32","type":"integer"},"AyeTellers":{"items":{"$ref":"#/components/schemas/RecordedMember"},"type":"array"},"Ayes":{"items":{"$ref":"#/components/schemas/RecordedMember"},"type":"array"},"Date":{"format":"date-time","type":"string"},"DivisionId":{"format":"int32","type":"integer"},"DoubleMajorityAyeCount":{"format":"int32","type":"integer"},"DoubleMajorityNoCount":{"format":"int32","type":"integer"},"EVELCountry":{"type":"string"},"EVELType":{"type":"string"},"FriendlyDescription":{"type":"string"},"FriendlyTitle":{"type":"string"},"IsDeferred":{"type":"boolean"},"NoCount":{"format":"int32","type":"integer"},"NoTellers":{"items":{"$ref":"#/components/schemas/RecordedMember"},"type":"array"},"NoVoteRecorded":{"items":{"$ref":"#/components/schemas/RecordedMember"},"type":"array"},"Noes":{"items":{"$ref":"#/components/schemas/RecordedMember"},"type":"array"},"Number":{"format":"int32","type":"integer"},"PublicationUpdated":{"format":"date-time","type":"string"},"RemoteVotingEnd":{"format":"date-time","type":"string"},"RemoteVotingStart":{"format":"date-time","type":"string"},"Title":{"type":"string"}},"type":"object"},"QueryParameters":{"properties":{"DivisionNumber":{"description":"Division Number - as specified by the House, unique within a session. This is different to the division id which uniquely identifies a division in this system and is passed to the GET division endpoint","format":"int32","type":"integer"},"EndDate":{"description":"Divisions where division date in one or before date provided. Date format is yyyy-MM-dd","format":"date-time","type":"string"},"IncludeWhenMemberWasTeller":{"description":"Divisions where member was a teller as well as if they actually voted","type":"boolean"},"MemberId":{"description":"Divisions returning Member with Member ID voting records","format":"int32","type":"integer"},"SearchTerm":{"description":"Divisions containing search term within title or number","type":"string"},"StartDate":{"description":"Divisions where division date in one or after date provided. Date format is yyyy-MM-dd","format":"date-time","type":"string"}},"type":"object"},"RecordedMember":{"properties":{"ListAs":{"type":"string"},"MemberFrom":{"type":"string"},"MemberId":{"format":"int32","type":"integer"},"Name":{"type":"string"},"Party":{"type":"string"},"PartyAbbreviation":{"type":"string"},"PartyColour":{"type":"string"},"ProxyName":{"type":"string"},"SubParty":{"type":"string"}},"type":"object"},"SearchQueryParameters":{"properties":{"DivisionNumber":{"description":"Division Number - as specified by the House, unique within a session. This is different to the division id which uniquely identifies a division in this system and is passed to the GET division endpoint","format":"int32","type":"integer"},"EndDate":{"description":"Divisions where division date in one or before date provided. Date format is yyyy-MM-dd","format":"date-time","type":"string"},"IncludeWhenMemberWasTeller":{"description":"Divisions where member was a teller as well as if they actually voted","type":"boolean"},"MemberId":{"description":"Divisions returning Member with Member ID voting records","format":"int32","type":"integer"},"SearchTerm":{"description":"Divisions containing search term within title or number","type":"string"},"Skip":{"description":"The number of records to skip. Default is 0","format":"int32","type":"integer"},"StartDate":{"description":"Divisions where division date in one or after date provided. Date format is yyyy-MM-dd","format":"date-time","type":"string"},"Take":{"description":"The number of records to return per page. Default is 25","format":"int32","type":"integer"}},"type":"object"}}}}