Skip to content
Snippets Groups Projects

Update api

Merged ns17 requested to merge update_API into development
1 file
+ 663
19
Compare changes
  • Side-by-side
  • Inline
@@ -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
@@ -1732,10 +1881,189 @@ paths:
# $ref: '#/components/schemas/CadUnicoReturn'
# '404':
# description: no data found
/african_culture:
/youth_education:
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
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
- rendimento_bruto
- 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']
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']
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
tags:
- CadÚnico
parameters:
@@ -1795,13 +2123,13 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AfricanCulture'
$ref: '#/components/schemas/CiganosCulture'
'404':
description: no data found
/african_rights:
/ciganos_rights:
get:
summary: Return the education level and number of families that belongs to 'terreiro communities' obtained by CadÚnico. This route uses the IBGE data listed above
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:
@@ -1861,13 +2189,13 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AfricanRights'
$ref: '#/components/schemas/CiganosRights'
'404':
description: no data found
/african_sustentability:
/ciganos_sustentability:
get:
summary: Return the average per capita income from families that belongs to 'terreiro communities' obtained by CadÚnico. This route uses the IBGE data listed above
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:
@@ -1920,13 +2248,13 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AfricanSustentability'
$ref: '#/components/schemas/CiganosSustentability'
'404':
description: no data found
/eixo_2:
/african_culture:
get:
summary: Return the infraestructure and life quality information about quilombola families obtained by CadÚnico. This route uses the CadUnico data listed above
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
tags:
- CadÚnico
parameters:
@@ -1944,10 +2272,201 @@ paths:
type: string
enum:
- year
- family_type
- cod_local_home
- cod_home_lighting
- cod_home_trash_destiny
- 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/AfricanCulture'
'404':
description: no data found
/african_rights:
get:
summary: Return the education level and number of families that belongs to 'terreiro 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/AfricanRights'
'404':
description: no data found
/african_sustentability:
get:
summary: Return the average per capita income from families that belongs to 'terreiro 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/AfricanSustentability'
'404':
description: no data found
/eixo_2:
get:
summary: Return the infraestructure and life quality information about quilombola families obtained by CadÚnico. This route uses the CadUnico 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
- cod_local_home
- cod_home_lighting
- cod_home_trash_destiny
- cod_home_watter_supply
- cod_sanitary_dump
- home_type
@@ -2359,11 +2878,61 @@ components:
ano_pesquisa:
type: "number"
AfricanSustentability:
YouthEducation:
type: object
required: ['total']
description: |
This model represents the return possibilities in african_rights queries
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"
rendimento_bruto:
type: "number"
uf:
type: "string"
CiganosSustentability:
type: object
required: ['total']
description: |
This model represents the return possibilities in ciganos_sustentability queries
properties:
total:
type: "number"
@@ -2372,6 +2941,81 @@ 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"
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']
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
Loading