From bc2f32710ee183818cfd5fb4881b540cbc516f21 Mon Sep 17 00:00:00 2001 From: Nicollas <ns17@inf.ufpr.br> Date: Thu, 23 Apr 2020 12:08:12 -0300 Subject: [PATCH 1/3] adding description of ciganos --- src/SMPPIR-API_Specification.yaml | 243 +++++++++++++++++++++++++++++- 1 file changed, 240 insertions(+), 3 deletions(-) diff --git a/src/SMPPIR-API_Specification.yaml b/src/SMPPIR-API_Specification.yaml index eb3592b5..e1e4923b 100644 --- a/src/SMPPIR-API_Specification.yaml +++ b/src/SMPPIR-API_Specification.yaml @@ -1732,7 +1732,198 @@ paths: # $ref: '#/components/schemas/CadUnicoReturn' # '404': # description: no data found - + + /ciganos_culture: + get: + summary: Return the type of house and location of the houses that belongs to 'ciganos communities' obtained by CadÚnico. This route uses the IBGE data listed above + tags: + - CadÚnico + parameters: + - name: dims + in: query + description: Group data using a metric parameter + allowReserved: true + required: false + explode: false + style: form + example: year,home_type + schema: + type: array + items: + type: string + enum: + - year + - cod_local_home + - home_type + - home_location + - name: filter + in: query + description: Filter data + allowReserved: true + required: false + explode: false + style: form + example: ethnic:["2","6"],gender:"1" + schema: + type: array + items: + type: object + properties: + year: + type: "array" + items: + type: "string" + enum: ['2012', '2013', '2014', '2015', '2016','2017'] + cod_local_home: + type: "array" + items: + type: "string" + enum: ['1','2'] + home_type: + type: "array" + items: + type: "string" + enum: ['1','2','3'] + home_location: + type: "array" + items: + type: "string" + enum: ['1301902','1303809', '1304237','1500107','1502806','1503705','1503903','1504604','1504901','1505205'] + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/CiganosCulture' + '404': + description: no data found + + /ciganos_rights: + get: + summary: Return the education level and number of families that belongs to 'ciganos communities' obtained by CadÚnico. This route uses the IBGE data listed above + tags: + - CadÚnico + parameters: + - name: dims + in: query + description: Group data using a metric parameter + allowReserved: true + required: false + explode: false + style: form + example: year,home_type + schema: + type: array + items: + type: string + enum: + - year + - education_families_conclude + - education_families_level + - education_families + - name: filter + in: query + description: Filter data + allowReserved: true + required: false + explode: false + style: form + example: ethnic:["2","6"],gender:"1" + schema: + type: array + items: + type: object + properties: + year: + type: "array" + items: + type: "string" + enum: ['2012', '2013', '2014', '2015', '2016','2017'] + education_families_conclude: + type: "array" + items: + type: "string" + enum: ['1','2','null'] + education_families_level: + type: "array" + items: + type: "string" + enum: ['1','2','3','4','5','6','7','8','9','null'] + education_families: + type: "array" + items: + type: "string" + enum: ['3','4','5','6','7','8','9','12','13','null'] + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/CiganosRights' + '404': + description: no data found + + /ciganos_sustentability: + get: + summary: Return the average per capita income from families that belongs to 'ciganos communities' obtained by CadÚnico. This route uses the IBGE data listed above + tags: + - CadÚnico + parameters: + - name: dims + in: query + description: Group data using a metric parameter + allowReserved: true + required: false + explode: false + style: form + example: year,home_type + schema: + type: array + items: + type: string + enum: + - year + - family_type + - per_capita_income + + - name: filter + in: query + description: Filter data + allowReserved: true + required: false + explode: false + style: form + example: ethnic:["2","6"],gender:"1" + schema: + type: array + items: + type: object + properties: + year: + type: "array" + items: + type: "string" + enum: ['2012', '2013', '2014', '2015', '2016','2017'] + vlr_renda_media_fam: + type: "array" + items: + type: "number" + minimum: 0 + maximum: 3000 + + + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/CiganosSustentability' + '404': + description: no data found + /african_culture: get: summary: Return the type of house and location of the houses that belongs to 'terreiro communities' obtained by CadÚnico. This route uses the IBGE data listed above @@ -2359,11 +2550,11 @@ components: ano_pesquisa: type: "number" - AfricanSustentability: + CiganosSustentability: type: object required: ['total'] description: | - This model represents the return possibilities in african_rights queries + This model represents the return possibilities in ciganos_sustentability queries properties: total: type: "number" @@ -2372,6 +2563,52 @@ components: vlr_renda_media_fam: type: "number" + CiganosRights: + type: object + required: ['total'] + description: | + This model represents the return possibilities in ciganos_rights queries + properties: + total: + type: "number" + ano_pesquisa: + type: "number" + cod_concluiu_frequentou_memb: + type: "string" + cod_ano_serie_frequentou_memb: + type: "string" + cod_curso_frequentou_pessoa_memb: + type: "string" + + CiganosCulture: + type: object + required: ['total'] + description: | + This model represents the return possibilities in ciganos_culture queries + properties: + total: + type: "number" + ano_pesquisa: + type: "number" + cod_local_domic_fam: + type: "string" + cod_especie_domic_fam: + type: "string" + cd_ibge: + type: "string" + + AfricanSustentability: + type: object + required: ['total'] + description: | + This model represents the return possibilities in african_sustentability queries + properties: + total: + type: "number" + ano_pesquisa: + type: "number" + vlr_renda_media_fam: + type: "number" AfricanRights: type: object -- GitLab From 2431ff390e596ccfca68fd982c3affeccdee80e6 Mon Sep 17 00:00:00 2001 From: Nicollas <ns17@inf.ufpr.br> Date: Fri, 24 Apr 2020 11:47:08 -0300 Subject: [PATCH 2/3] Adding description of youth education and jobs --- src/SMPPIR-API_Specification.yaml | 222 +++++++++++++++++++++++++++++- 1 file changed, 221 insertions(+), 1 deletion(-) diff --git a/src/SMPPIR-API_Specification.yaml b/src/SMPPIR-API_Specification.yaml index e1e4923b..af86d74a 100644 --- a/src/SMPPIR-API_Specification.yaml +++ b/src/SMPPIR-API_Specification.yaml @@ -1732,7 +1732,179 @@ paths: # $ref: '#/components/schemas/CadUnicoReturn' # '404': # description: no data found - + + /youth_education: + get: + summary: Returns educational information related to the "living youth plan". This route uses the PNAD. + tags: + - PNAD + parameters: + - name: dims + in: query + description: Group data using a metric parameter + allowReserved: true + required: false + explode: false + style: form + example: year,cor_raca + schema: + type: array + items: + type: string + enum: + - year + - cor_raca + - max_level + - age + - in_escola + - frequenta + - uf + - concluiu + - nivel_escola + - name: filter + in: query + description: Filter data + allowReserved: true + required: false + explode: false + style: form + example: cor_raca:["2","4"],year:"2017" + schema: + type: array + items: + type: object + properties: + year: + type: "array" + items: + type: "string" + enum: ['2012', '2013', '2014', '2015', '2016','2017','2018'] + ethnic: + type: "array" + items: + type: "string" + enum: ['1','2','3','4','5','9'] + max_level: + type: "array" + items: + type: "string" + enum: ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','null'] + age: + type: "array" + items: + type: "number" + minimum: 0 + maximum: 45 + in_escola: + type: "array" + items: + type: "string" + enum: ['1','2',null'] + frequenta: + type: "array" + items: + type: "string" + enum: ['1','2',null'] + uf: + type: "array" + enum: ['AC', 'AL', 'AP', 'AM', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MT', 'MS', 'MG', 'PA', 'PB', 'PR', 'PE', 'PI', 'RJ', 'RN', 'RS', 'RO', 'RR', 'SC', 'SP', 'SE', 'TO'] + concluiu: + type: "array" + items: + type: "string" + enum: ['1','2',null'] + nivel_escola: + type: "array" + items: + type: "string" + enum: ['2','3','4','5','6','7','8','9','10','11',null'] + + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/YouthEducation' + '404': + description: no data found + + /youth_jobs: + get: + summary: Returns jobs information related to the "living youth plan". This route uses the PNAD data. + tags: + - PNAD + parameters: + - name: dims + in: query + description: Group data using a metric parameter + allowReserved: true + required: false + explode: false + style: form + example: year,cor_raca + schema: + type: array + items: + type: string + enum: + - year + - cor_raca + - trabalhou + - vinculo + - rendimento_faixa + - uf + - name: filter + in: query + description: Filter data + allowReserved: true + required: false + explode: false + style: form + example: cor_raca:["2","4"],year:"2017" + schema: + type: array + items: + type: object + properties: + year: + type: "array" + items: + type: "string" + enum: ['2012', '2013', '2014', '2015', '2016','2017','2018'] + cor_raca: + type: "array" + items: + type: "string" + enum: ['1','2','3','4','5','9'] + trabalhou: + type: "array" + items: + type: "string" + enum: ['1','2'] + vinculo: + type: "array" + items: + type: "string" + enum: ['1','2','3','4','5','6','7','null'] + rendimento_faixa: + type: "array" + items: + type: "string" + enum: ['1','2','3','4','5','6','7','8','null'] + uf: + type: "array" + enum: ['AC', 'AL', 'AP', 'AM', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MT', 'MS', 'MG', 'PA', 'PB', 'PR', 'PE', 'PI', 'RJ', 'RN', 'RS', 'RO', 'RR', 'SC', 'SP', 'SE', 'TO'] + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/YouthEducation' + '404': + description: no data found + /ciganos_culture: get: summary: Return the type of house and location of the houses that belongs to 'ciganos communities' obtained by CadÚnico. This route uses the IBGE data listed above @@ -2550,6 +2722,54 @@ components: ano_pesquisa: type: "number" + YouthEducation: + type: object + required: ['total'] + description: | + This model represents the return possibilities in youth_education queries + properties: + total: + type: "number" + ano_pesquisa: + type: "number" + cor_raca: + type: "string" + max_level: + type: "string" + year: + type: "number" + in_escola: + type: "string" + frequenta: + type: "string" + uf: + type: "string" + concluiu: + type: "string" + nivel_escola: + type: "string" + + YouthJobs: + type: object + required: ['total'] + description: | + This model represents the return possibilities in youth_jobs queries + properties: + total: + type: "number" + year: + type: "number" + cor_raca: + type: "string" + trabalhou: + type: "string" + vinculo: + type: "string" + rendimento_faixa: + type: "string" + uf: + type: "string" + CiganosSustentability: type: object required: ['total'] -- GitLab From 1c17321f0064469e76ff3bed179dc670fc692513 Mon Sep 17 00:00:00 2001 From: Nicollas <ns17@inf.ufpr.br> Date: Mon, 27 Apr 2020 11:44:31 -0300 Subject: [PATCH 3/3] Adding description of vulnerabilidades --- src/SMPPIR-API_Specification.yaml | 189 +++++++++++++++++++++++++++++- 1 file changed, 188 insertions(+), 1 deletion(-) diff --git a/src/SMPPIR-API_Specification.yaml b/src/SMPPIR-API_Specification.yaml index af86d74a..09bf0ae6 100644 --- a/src/SMPPIR-API_Specification.yaml +++ b/src/SMPPIR-API_Specification.yaml @@ -34,6 +34,10 @@ tags: description: "Contains queries made with data from CadÚnico" externalDocs: url: https://aplicacoes.mds.gov.br/sagi/portal/index.php?grupo=212 + - name: SIM + description: "Contains queries made with data from SIM" + externalDocs: + url: https://https://bigdata-metadados.icict.fiocruz.br/dataset/sistema-de-informacoes-de-mortalidade-sim - name: EXTRA description: "Contains data from auxiliary extra routes" externalDocs: @@ -1052,7 +1056,152 @@ paths: $ref: '#/components/schemas/vacancy' '404': description: no data found - + /taxa_homicidios: + get: + summary: Return the number of homicides per 100 thousand inhabitants in 2016. This route uses the SIM database listed above. + tags: + - SIM + parameters: + - name: dims + in: query + description: Group data using a metric parameter + allowReserved: true + required: false + explode: false + style: form + example: year,raca_cor + schema: + type: array + items: + type: string + enum: + - uf + - raca_cor + - name: filter + in: query + description: Filter data + allowReserved: true + required: false + explode: false + style: form + example: raca_cor:["Parda","Preta"],uf:"PR" + schema: + type: array + items: + type: object + properties: + uf: + items: + type: "string" + enum: ["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO"] + raca_cor: + type: "array" + items: + type: "string" + enum: ['Amarela', 'Branca', 'Ignorado', 'IndÃgena', 'Parda', 'Preta'] + /sim: + get: + summary: Return the number of people from the SIM data obtained from DATASUS. + tags: + - SIM + parameters: + - name: dims + in: query + description: Group data using a metric parameter + allowReserved: true + required: false + explode: false + style: form + example: year,def_raca_cor + schema: + type: array + items: + type: string + enum: + - year + - uf + - def_raca_cor + - raca_cor + - def_tipo_obito + - tipo_obito + - min_idade + - max_idade + - sexo + - def_sexo + - name: filter + in: query + description: Filter data + allowReserved: true + required: false + explode: false + style: form + example: tipo_obito:["2","3"],min_idade:"15" + schema: + type: array + items: + type: object + properties: + year: + type: "array" + items: + type: "string" + enum: ['1996', '1997', '1998', '1999', '2000', '2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016'] + uf: + items: + type: "string" + enum: ["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO"] + def_raca_cor: + type: "array" + items: + type: "string" + enum: ['Amarela', 'Branca', 'Ignorado', 'IndÃgena', 'Parda', 'Preta'] + raca_cor: + type: "array" + items: + type: "string" + enum: ['1', '2', '3', '4', '5', '9'] + def_tipo_obito: + type: "array" + items: + type: "string" + enum: ['Acidente', 'HomicÃdio', 'Ignorado', 'Outros', 'SuicÃdio'] + tipo_obito: + type: "array" + items: + type: "string" + enum: ['1', '2', '3', '4', '9'] + min_idade: + type: "array" + items: + type: "number" + minimum: 0 + maximum: 128 + max_idade: + type: "array" + items: + type: "number" + minimum: 0 + maximum: 128 + sexo: + type: "array" + items: + type: "string" + enum: ['0', '1', '2'] + def_sexo: + type: "array" + items: + type: "string" + enum: ['Feminino', 'Ignorado', 'Masculino'] + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/PnadReturn' + '404': + description: no data found + /pnad: get: summary: Return the number of people obtained by IBGE in the PNAD research. This route uses the PNAD database listed above @@ -1853,6 +2002,7 @@ paths: - trabalhou - vinculo - rendimento_faixa + - rendimento_bruto - uf - name: filter in: query @@ -1892,6 +2042,12 @@ paths: items: type: "string" enum: ['1','2','3','4','5','6','7','8','null'] + rendimento_bruto: + type: "array" + items: + type: "number" + minimum: 0 + maximum: 100000 uf: type: "array" enum: ['AC', 'AL', 'AP', 'AM', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MT', 'MS', 'MG', 'PA', 'PB', 'PR', 'PE', 'PI', 'RJ', 'RN', 'RS', 'RO', 'RR', 'SC', 'SP', 'SE', 'TO'] @@ -2767,6 +2923,8 @@ components: type: "string" rendimento_faixa: type: "string" + rendimento_bruto: + type: "number" uf: type: "string" @@ -2800,6 +2958,35 @@ components: cod_curso_frequentou_pessoa_memb: type: "string" + SIM: + type: object + required: ['total'] + description: | + This model represents the return possibilities in SIM queries + properties: + total: + type: "number" + year: + type: "number" + uf: + type: "string" + def_raca_cor: + type: "string" + raca_cor: + type: "number" + def_tipo_obito: + type: "string" + tipo_obito: + type: "number" + min_idade: + type: "number" + max_idade: + type: "number" + sexo: + type: "number" + def_sexo: + type: "string" + CiganosCulture: type: object required: ['total'] -- GitLab