bcgov / foi-flow

Freedom of Information modernization
Apache License 2.0
5 stars 3 forks source link

Backend - Page Flags [3413] #3455

Closed sumathi-thirumani closed 1 year ago

sumathi-thirumani commented 1 year ago

DOD

Master Data (Pageflags)

Transaction Data (DocumentPageflags)

sumathi-thirumani commented 1 year ago

GET http://localhost:15500/api/pageflags

[{"description": "Partial Disclosure", "sortorder": 1, "name": "Partial Disclosure", "pageflagid": 1}, {"description": "Full Disclosure", "sortorder": 2, "name": "Full Disclosure", "pageflagid": 2}, {"description": "Withheld in Full", "sortorder": 3, "name": "Withheld in Full", "pageflagid": 3}, {"description": "Consult", "sortorder": 4, "name": "Consult", "pageflagid": 4, "programareas": [{"programareaid": 1, "isactive": true, "bcgovcode": "AEST", "iaocode": "AED", "type": "BC GOV Ministry", "name": "Ministry of Advanced Education and Skills Training"}, {"programareaid": 2, "isactive": true, "bcgovcode": "AGR", "iaocode": "AGR", "type": "BC GOV Ministry", "name": "Ministry of Agriculture and Food"}, {"programareaid": 23, "isactive": true, "bcgovcode": "BRD", "iaocode": "BRD", "type": "Other", "name": "Board Resourcing and Development Office"}, {"programareaid": 25, "isactive": true, "bcgovcode": "CAS", "iaocode": "CAS", "type": "Other", "name": "Crown Agencies Secretariat"}, {"programareaid": 4, "isactive": true, "bcgovcode": "MCF", "iaocode": "CFD", "type": "BC GOV Ministry", "name": "Ministry of Children and Family Development"}, {"programareaid": 24, "isactive": true, "bcgovcode": "CLB", "iaocode": "CLB", "type": "Other", "name": "Community Living BC"}, {"programareaid": 5, "isactive": true, "bcgovcode": "CITZ", "iaocode": "CTZ", "type": "BC GOV Ministry", "name": "Ministry of Citizens\u2019 Services"}, {"programareaid": 35, "isactive": true, "bcgovcode": "DAS", "iaocode": "DAS", "type": "BC GOV Ministry", "name": "Declaration Act Secretariat"}, {"programareaid": 27, "isactive": true, "bcgovcode": "EAO", "iaocode": "EAO", "type": "Other", "name": "Environmental Assessment Office"}, {"programareaid": 6, "isactive": true, "bcgovcode": "EDU", "iaocode": "EDU", "type": "BC GOV Ministry", "name": "Ministry of Education and Childcare"}, {"programareaid": 26, "isactive": true, "bcgovcode": "EMBC", "iaocode": "EMB", "type": "Other", "name": "Emergency Management BC"}, {"programareaid": 7, "isactive": true, "bcgovcode": "EMLI", "iaocode": "EML", "type": "BC GOV Ministry", "name": "Ministry of Energy, Mines and Low Carbon Innovation"}, {"programareaid": 9, "isactive": true, "bcgovcode": "FIN", "iaocode": "FIN", "type": "BC GOV Ministry", "name": "Ministry of Finance"}, {"programareaid": 10, "isactive": true, "bcgovcode": "FOR", "iaocode": "FOR", "type": "BC GOV Ministry", "name": "Ministry of Forests"}, {"programareaid": 28, "isactive": true, "bcgovcode": "GCPE", "iaocode": "GCP", "type": "Other", "name": "Government Communications and Public Engagement"}, {"programareaid": 11, "isactive": true, "bcgovcode": "HLTH", "iaocode": "HLTH", "type": "BC GOV Ministry", "name": "Ministry of Health"}, {"programareaid": 29, "isactive": true, "bcgovcode": "IIO", "iaocode": "IIO", "type": "Other", "name": "Independent Investigations Office"}, {"programareaid": 12, "isactive": true, "bcgovcode": "IRR", "iaocode": "IRR", "type": "BC GOV Ministry", "name": "Ministry of Indigenous Relations and Reconciliation"}, {"programareaid": 13, "isactive": true, "bcgovcode": "JERI", "iaocode": "JER", "type": "BC GOV Ministry", "name": "Ministry of Jobs, Economic Recovery and Innovation"}, {"programareaid": 14, "isactive": true, "bcgovcode": "LBR", "iaocode": "LBR", "type": "BC GOV Ministry", "name": "Ministry of Labour"}, {"programareaid": 31, "isactive": true, "bcgovcode": "LDB", "iaocode": "LDB", "type": "Other", "name": "Liquor Distribution Branch"}, {"programareaid": 36, "isactive": true, "bcgovcode": "LWR", "iaocode": "LWR", "type": "BC GOV Ministry", "name": "Lands, Water and Resource Stewardship"}, {"programareaid": 3, "isactive": true, "bcgovcode": "AG", "iaocode": "MAG", "type": "BC GOV Ministry", "name": "Ministry of Attorney General"}, {"programareaid": 34, "isactive": true, "bcgovcode": "MGC", "iaocode": "MGC", "type": "Other", "name": "Medal of Good Citizenship Selection Committee"}, {"programareaid": 15, "isactive": true, "bcgovcode": "MMHA", "iaocode": "MHA", "type": "BC GOV Ministry", "name": "Ministry of Mental Health and Addictions"}, {"programareaid": 16, "isactive": true, "bcgovcode": "MUNI", "iaocode": "MMA", "type": "BC GOV Ministry", "name": "Ministry of Municipal Affairs"}, {"programareaid": 8, "isactive": true, "bcgovcode": "ENV", "iaocode": "MOE", "type": "BC GOV Ministry", "name": "Ministry of Environment and Climate Change Strategy"}, {"programareaid": 18, "isactive": true, "bcgovcode": "SDPR", "iaocode": "MSD", "type": "BC GOV Ministry", "name": "Ministry of Social Development and Poverty Reduction"}, {"programareaid": 33, "isactive": true, "bcgovcode": "OBC", "iaocode": "OBC", "type": "Other", "name": "Order of British Columbia Advisory Council"}, {"programareaid": 21, "isactive": true, "bcgovcode": "OCC", "iaocode": "OCC", "type": "Other", "name": "BC Coroners Service"}, {"programareaid": 30, "isactive": true, "bcgovcode": "PREM", "iaocode": "OOP", "type": "Other", "name": "Office of the Premier"}, {"programareaid": 22, "isactive": true, "bcgovcode": "PSA", "iaocode": "PSA", "type": "Other", "name": "BC Public Service Agency"}, {"programareaid": 17, "isactive": true, "bcgovcode": "PSSG", "iaocode": "PSS", "type": "BC GOV Ministry", "name": "Ministry of Public Safety and Solicitor General"}, {"programareaid": 19, "isactive": true, "bcgovcode": "TACS", "iaocode": "TAC", "type": "BC GOV Ministry", "name": "Ministry of Tourism, Arts, Culture and Sport"}, {"programareaid": 32, "isactive": true, "bcgovcode": "TIC", "iaocode": "TIC", "type": "Other", "name": "Transportation Investment Corporation"}, {"programareaid": 20, "isactive": true, "bcgovcode": "TRAN", "iaocode": "TRA", "type": "BC GOV Ministry", "name": "Ministry of Transportation and Infrastructure"}]}, {"description": "Duplicate", "sortorder": 5, "name": "Duplicate", "pageflagid": 5}, {"description": "Not Responsive", "sortorder": 6, "name": "Not Responsive", "pageflagid": 6}, {"description": "Left Off Here", "sortorder": 7, "name": "Left Off Here", "pageflagid": 7}]

sumathi-thirumani commented 1 year ago

To create/update page flag [Not Consult]

POST http://localhost:15500/api/ministryrequest/1/document/1/version/1/pageflag URL Pattern: /ministryrequest/{requestid}/document/{documentid}/version/{document version}/pageflag

Body: {"page": 1, "flagid": 1}

Response: { "id": "3", "message": "Page Flag is saved", "status": true }

sumathi-thirumani commented 1 year ago

To create/update page flag [Consult]

POST http://localhost:15500/api/ministryrequest/1/document/1/version/1/pageflag URL Pattern: /ministryrequest/{requestid}/document/{documentid}/version/{document version}/pageflag

Body: {"page": 3, "flagid": 1, "programareaid":1, "other": "test"}

Response: { "id": "3", "message": "Page Flag is saved", "status": true }

sumathi-thirumani commented 1 year ago

To get page flag of a document

GET http://localhost:15500/api/ministryrequest/1/document/1/version/1/pageflag URL Pattern: /ministryrequest/{requestid}/document/{documentid}/version/{document version}/pageflag

Response: [{"page": 1, "flagid": 10}, {"page": 2, "flagid": 2}, {"other": "test", "page": 3, "flagid": 1, "programareaid": 1}]

sumathi-thirumani commented 1 year ago

To get page flags of request

GET http://localhost:15500/api/ministryrequest/1/pageflag URL Pattern: /ministryrequest/{requestid}/pageflag

Response: [{"documentid": 1, "pageflag": [{"flagid": 1, "page": 1}]}, {"documentid": 3, "pageflag": [{"flagid": 1, "page": 1}, {"other": "test", "flagid": 1, "programareaid": 1, "page": 3}]}]

sumathi-thirumani commented 1 year ago

To get page flags (MASTERDATA) at request level

GET http://localhost:15500/api/pageflags/ministryrequest/1 URL Pattern: /pageflags/ministryrequest/{requestid}

Response: [{"description": "Partial Disclosure", "sortorder": 1, "pageflagid": 1, "name": "Partial Disclosure"}, {"description": "Full Disclosure", "sortorder": 2, "pageflagid": 2, "name": "Full Disclosure"}, {"description": "Withheld in Full", "sortorder": 3, "pageflagid": 3, "name": "Withheld in Full"}, {"description": "Consult", "sortorder": 4, "pageflagid": 4, "name": "Consult", "programareas": [{"type": "BC GOV Ministry", "bcgovcode": "AEST", "programareaid": 1, "name": "Ministry of Advanced Education and Skills Training", "isactive": true, "iaocode": "AED"}, {"type": "BC GOV Ministry", "bcgovcode": "AGR", "programareaid": 2, "name": "Ministry of Agriculture and Food", "isactive": true, "iaocode": "AGR"}, {"type": "Other", "bcgovcode": "BRD", "programareaid": 23, "name": "Board Resourcing and Development Office", "isactive": true, "iaocode": "BRD"}, {"type": "Other", "bcgovcode": "CAS", "programareaid": 25, "name": "Crown Agencies Secretariat", "isactive": true, "iaocode": "CAS"}, {"type": "BC GOV Ministry", "bcgovcode": "MCF", "programareaid": 4, "name": "Ministry of Children and Family Development", "isactive": true, "iaocode": "CFD"}, {"type": "Other", "bcgovcode": "CLB", "programareaid": 24, "name": "Community Living BC", "isactive": true, "iaocode": "CLB"}, {"type": "BC GOV Ministry", "bcgovcode": "CITZ", "programareaid": 5, "name": "Ministry of Citizens\u2019 Services", "isactive": true, "iaocode": "CTZ"}, {"type": "BC GOV Ministry", "bcgovcode": "DAS", "programareaid": 35, "name": "Declaration Act Secretariat", "isactive": true, "iaocode": "DAS"}, {"type": "Other", "bcgovcode": "EAO", "programareaid": 27, "name": "Environmental Assessment Office", "isactive": true, "iaocode": "EAO"}, {"type": "BC GOV Ministry", "bcgovcode": "EDU", "programareaid": 6, "name": "Ministry of Education and Childcare", "isactive": true, "iaocode": "EDU"}, {"type": "Other", "bcgovcode": "EMBC", "programareaid": 26, "name": "Emergency Management BC", "isactive": true, "iaocode": "EMB"}, {"type": "BC GOV Ministry", "bcgovcode": "EMLI", "programareaid": 7, "name": "Ministry of Energy, Mines and Low Carbon Innovation", "isactive": true, "iaocode": "EML"}, {"type": "BC GOV Ministry", "bcgovcode": "FIN", "programareaid": 9, "name": "Ministry of Finance", "isactive": true, "iaocode": "FIN"}, {"type": "BC GOV Ministry", "bcgovcode": "FOR", "programareaid": 10, "name": "Ministry of Forests", "isactive": true, "iaocode": "FOR"}, {"type": "Other", "bcgovcode": "GCPE", "programareaid": 28, "name": "Government Communications and Public Engagement", "isactive": true, "iaocode": "GCP"}, {"type": "BC GOV Ministry", "bcgovcode": "HLTH", "programareaid": 11, "name": "Ministry of Health", "isactive": true, "iaocode": "HLTH"}, {"type": "Other", "bcgovcode": "IIO", "programareaid": 29, "name": "Independent Investigations Office", "isactive": true, "iaocode": "IIO"}, {"type": "BC GOV Ministry", "bcgovcode": "IRR", "programareaid": 12, "name": "Ministry of Indigenous Relations and Reconciliation", "isactive": true, "iaocode": "IRR"}, {"type": "BC GOV Ministry", "bcgovcode": "JERI", "programareaid": 13, "name": "Ministry of Jobs, Economic Recovery and Innovation", "isactive": true, "iaocode": "JER"}, {"type": "BC GOV Ministry", "bcgovcode": "LBR", "programareaid": 14, "name": "Ministry of Labour", "isactive": true, "iaocode": "LBR"}, {"type": "Other", "bcgovcode": "LDB", "programareaid": 31, "name": "Liquor Distribution Branch", "isactive": true, "iaocode": "LDB"}, {"type": "BC GOV Ministry", "bcgovcode": "LWR", "programareaid": 36, "name": "Lands, Water and Resource Stewardship", "isactive": true, "iaocode": "LWR"}, {"type": "BC GOV Ministry", "bcgovcode": "AG", "programareaid": 3, "name": "Ministry of Attorney General", "isactive": true, "iaocode": "MAG"}, {"type": "Other", "bcgovcode": "MGC", "programareaid": 34, "name": "Medal of Good Citizenship Selection Committee", "isactive": true, "iaocode": "MGC"}, {"type": "BC GOV Ministry", "bcgovcode": "MMHA", "programareaid": 15, "name": "Ministry of Mental Health and Addictions", "isactive": true, "iaocode": "MHA"}, {"type": "BC GOV Ministry", "bcgovcode": "MUNI", "programareaid": 16, "name": "Ministry of Municipal Affairs", "isactive": true, "iaocode": "MMA"}, {"type": "BC GOV Ministry", "bcgovcode": "ENV", "programareaid": 8, "name": "Ministry of Environment and Climate Change Strategy", "isactive": true, "iaocode": "MOE"}, {"type": "BC GOV Ministry", "bcgovcode": "SDPR", "programareaid": 18, "name": "Ministry of Social Development and Poverty Reduction", "isactive": true, "iaocode": "MSD"}, {"type": "Other", "bcgovcode": "OBC", "programareaid": 33, "name": "Order of British Columbia Advisory Council", "isactive": true, "iaocode": "OBC"}, {"type": "Other", "bcgovcode": "OCC", "programareaid": 21, "name": "BC Coroners Service", "isactive": true, "iaocode": "OCC"}, {"type": "Other", "bcgovcode": "PREM", "programareaid": 30, "name": "Office of the Premier", "isactive": true, "iaocode": "OOP"}, {"type": "Other", "bcgovcode": "PSA", "programareaid": 22, "name": "BC Public Service Agency", "isactive": true, "iaocode": "PSA"}, {"type": "BC GOV Ministry", "bcgovcode": "PSSG", "programareaid": 17, "name": "Ministry of Public Safety and Solicitor General", "isactive": true, "iaocode": "PSS"}, {"type": "BC GOV Ministry", "bcgovcode": "TACS", "programareaid": 19, "name": "Ministry of Tourism, Arts, Culture and Sport", "isactive": true, "iaocode": "TAC"}, {"type": "Other", "bcgovcode": "TIC", "programareaid": 32, "name": "Transportation Investment Corporation", "isactive": true, "iaocode": "TIC"}, {"type": "BC GOV Ministry", "bcgovcode": "TRAN", "programareaid": 20, "name": "Ministry of Transportation and Infrastructure", "isactive": true, "iaocode": "TRA"}], "others": ["test2", "test"]}, {"description": "Duplicate", "sortorder": 5, "pageflagid": 5, "name": "Duplicate"}, {"description": "Not Responsive", "sortorder": 6, "pageflagid": 6, "name": "Not Responsive"}, {"description": "Left Off Here", "sortorder": 7, "pageflagid": 7, "name": "Left Off Here"}]