{"mock":"https://private-anon-0192508c7f-mapbiomas3.apiary-mock.com/","production":"http://alerta.mapbiomas.org/","proxy":"https://private-anon-0192508c7f-mapbiomas3.apiary-proxy.com/"}
FORMAT: 1A HOST: http://alerta.mapbiomas.org/ # APIs Mapbiomas Alerta Documentação das versões das APIs disponíveis no Mapbiomas Alerta. # Group Autenticação ## Token [/api/auth] ### Criar Token [POST] + Request (application/json) { "email": "example@user.com", "password": "123456789" } + Response 200 (application/json) { "token": "example.token.payload" } # Group v1 ## Biomas [/api/v1/biomês] ### Listar Biomas [GET] + Response 200 (application/json) + Headers Authorization: Bearer {token} + Body [ { "id": 1, "name": "Amazônia" }, { "id": 2, "name": "Caatinga" }, { "id": 3, "name": "Cerrado" }, ... ] ## Estados [/api/v1/states] ### Listar Estados [GET] + Response 200 (application/json) + Headers Authorization: Bearer {token} + Body [ { "id": 1, "name": "Rondônia", "acronym": "RO" }, { "id": 2, "name": "Acre", "acronym": "AC" }, { "id": 3, "name": "Amazonas", "acronym": "AM" }, ... ] ## Alertas [/api/v1/validated_alerts?end_year={end_year}&end_month={end_month}&start_year={start_year}&start_month={start_month}&biome_id={biome_id}&state_id={state_id}&authorized={authorized}] ### Listar Alertas [GET] + Parameters + start_month (number, required) - Mês inicial + start_year (number, required) - Ano inicial + end_month (number, required) - Mês final + end_year (number, required) - Ano final + authorized (boolean, optional) - Autorizado ou não + biome_id (number, optional) - ID do bioma recuperado da lista de biomas + state_id (number, optional) - ID do Estado recuperado da lista de Estados + Response 200 (application/json) + Headers Authorization: Bearer {token} + Body [ { "id": 10, "validation": true, "geom_area_ha": "86.947", "before_image_date": "2018-07-14", "after_image_date": "2018-10-10", "validation_date": "2018-12-20", "before_image_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/validated_alert_10_before_.png", "after_image_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/validated_alert_10_after_.png", "cars": [ { "id": 1529675, "car_id": 460894, "car_type": "properties", "code": "MA-2103307-2D62177B729A4AC3A5FEB2CAEFFB2EA6" } ] }, ... ] # Group v2 ## Laudos [/api/v2/reports/{report_id}/car/{car_id}] ### Consultar Laudo [GET] + Parameters + report_id (number, required) - ID do Alerta recuperado da lista de alertas + car_id (number, required) - ID do Car recuperado da lista de alertas + Response 200 (application/json) + Headers Authorization: Bearer {token} + Body { "alert": { "id": 4243, "alert_area": "746.415", "validation": true, "validation_date": "2019-06-05", "processed": false, "sources": [ "SAD", "GLAD", "DETERB-AMAZONIA" ], "states": [ "MATO GROSSO" ], "municipity": [ "MARCELÂNDIA" ], "biomês": [ "AMAZONIA" ], "geometry": "MULTIPOLYGON(((-54.7376842238442 -10.9148397752553, ...)))" }, "car": { "cod": "MT-5105580-553827F038A1465DA75DF3F52E9B062B", "area": "2641.5224", "geometry": "MULTIPOLYGON(((-54.7499873332303 -10.8558218845067,...)))" }, "images": { "equivalence_table": { "h": [ { "index": 0, "coord": -54.766, "len": 0.0, "label": "54°45'57.600\"W" }, ... ], "w": [ { "index": 0, "coord": -10.961, "len": 0.0, "label": "10°57'39.600\"S" }, ... ] }, "before_image": { "date": "2018-12-22", "url": "https://storage.googleapis.com/mapbiomas/alerta/wms_cache_2019_2/validated_alerts_before/4243.png" }, "after_image": { "date": "2019-02-11", "url": "https://storage.googleapis.com/mapbiomas/alerta/wms_cache_2019_2/validated_alerts_after/4243.png" }, "boundaries": { "property": "https://storage.googleapis.com/mapbiomas/alerta/wms_cache_2019_2/validated_alerts_car_boundaries_car/4243_5463960.png?noCache=12062019_1", "state": "https://storage.googleapis.com/mapbiomas/alerta/wms_cache_2019_2/validated_alerts_state_boundaries_car/4243_5463960.png?noCache=12062019_1" }, "comparison": [ { "base": "http://mapbiomas-staging.terras.agr.br/wms?service=WMS&request=GetMap&layers=coverage&format=image/png&transparent=true&version=1.1.1&tileType=wms&map=wms/v/3.1/classification/coverage.map&year=2012&territory_id=10&classification_ids=1,2,3,4,5,9,10,11,12,13,14,15,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33&srs=EPSG:4674&width=768&height=768&attribution=MapBiomas Workspace&bbox=-54.7660676266825,-10.9610682265967,-54.6920662933082,-10.8879358523879", "boundaries": "https://storage.googleapis.com/mapbiomas/alerta/wms_cache_2019_2/validated_alerts_boundaries_car/4243_5463960.png?noCache=12062019_1" }, { "base": "http://mapbiomas-staging.terras.agr.br/wms?service=WMS&request=GetMap&layers=coverage&format=image/png&transparent=true&version=1.1.1&tileType=wms&map=wms/v/3.1/classification/coverage.map&year=2013&territory_id=10&classification_ids=1,2,3,4,5,9,10,11,12,13,14,15,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33&srs=EPSG:4674&width=768&height=768&attribution=MapBiomas Workspace&bbox=-54.7660676266825,-10.9610682265967,-54.6920662933082,-10.8879358523879", "boundaries": "https://storage.googleapis.com/mapbiomas/alerta/wms_cache_2019_2/validated_alerts_boundaries_car/4243_5463960.png?noCache=12062019_1" }, ... ], "crossings": { "areas": { "settlement": null, "indigenous_land": null, "conservation_unit": null, "legal_reserve": "0.00195902151893852", "car_app": "0.001059", "forest_management": null, "embargo": "18.419911", "river_source": null, "vegetation_suppression": null }, "labels": [ { "title": "Classes de Vegetação Nativa", "colors": [ "#00730f", "#00e83b", "#628037", "#b1be47", "#b6c565" ] }, { "title": "Floresta\n Plantada", "colors": [ "#945229" ] }, ... ] }, "data_sheet": { "points": "https://storage.googleapis.com/mapbiomas/alerta/wms_cache_2019_2/validated_alerts_points_car/4243_5463960.png?noCache=12062019_1", "coordinates": { "total": 8, "points": [ { "number": 5, "x": "10°54'53.423\"S", "y": "54°44'15.663\"W" }, { "number": 136, "x": "10°54'38.120\"S", "y": "54°44'20.025\"W" }, ... ] } } }, "warning": { "pt": "Informações baseadas nas fontes disponíveis, sujeitas a interpretação, seu uso fica a juízo do usuário.", "en": "information based on available sources, subject to interpretation, its use is at the discretion of the user." }, "source_list": [ "Territórios Indígenas - Fonte: ISA, 2017. Mapas de Terras Indígenas do Brasil.", "Unidades de Conservação - Fonte: Cadastro Nacional de Unidades de Conservação - CNUC, 2019", "Assentamentos - Fonte: INCRA, 2017.", "Áreas do Cadastro Ambiental Rural (CAR), Áreas de Preservação Permanente (APP) e Reserva Legal (RL) - Fonte: Serviço Florestal Brasileiro, 2019", "Embargos e Autorizações de supressão e plano de manejo florestal - Fonte: Sinaflor / IBAMA, 2019; SEMA/MT, 2019; SEMA/PA, 2019", ... ] } ## Laudos por alerta [/private/api/v2/reports?start_date={start_date}&end_date={end_date}&biome_id={biome_id}&state_id={state_id}] ### Laudos por alerta [GET] + Parameters + start_date (string, required) - Data inicial do range para a data em que foi tirada a foto da seção 'depois' do alerta. Deve seguir o formato "YYYY-MM-DD". + end_date (string, required) - Data final do range para a data em que foi tirada a foto da seção 'depois' do alerta. Deve seguir o formato "YYYY-MM-DD". + biome_id (number, optional) - ID do bioma em que está inserido o alerta + state_id (number, optional) - ID do estado em que está inserido o alerta + Response 200 (application/json) + Headers Authorization: Bearer {token} + Body [ { "id": 108, "geom_wkt": "MULTIPOLYGON(((-52.6998527613276 -6.36342170499153,-52.6998402168201 -6.36358955378605),(-52.7063239543526 -6.36089794855756,-52.7062716878581 -6.36079095578319,-52.7064172054401 -6.36064635164735,-52.7066299682009 -6.36077685239134,-52.7065771104156 -6.36090083284648,-52.7063239543526 -6.36089794855756)))", "validation": true, "processed": true, "geom_area_ha": "38.875", "before_image_date": "2018-09-02", "before_image_id": "118690_20180902_140004_0f21_cut", "after_image_date": "2018-09-22", "after_image_id": "118690_20180922_132200_1004_cut", "validation_date": "2019-04-01", "before_image_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/validated_alert_108_before_.png", "after_image_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/validated_alert_108_after_.png", "cars": [ { "id": 1061634, "car_id": 343884, "car_type": "properties", "code": null, "state_boundaries_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/state_boundaries_1_343884.png", "property_location_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/car_boundaries_1_343884.png" }, { "id": 1067780, "car_id": 345420, "car_type": "properties", "code": "PA-1507300-E51833D00CD74FD486BA43FD7E6FE8B7", "state_boundaries_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/state_boundaries_1_345420.png", "property_location_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/car_boundaries_1_345420.png" }, { "id": 1062205, "car_id": 344027, "car_type": "properties", "code": "PA-1507300-5D381AC7B5CB4026BA5077668FD97588", "state_boundaries_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/state_boundaries_1_344027.png", "property_location_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/car_boundaries_1_344027.png" }, { "id": 1077892, "car_id": 347948, "car_type": "properties", "code": "PA-1507300-9A1A02F4C88644FAB955918AA04B2F9F", "state_boundaries_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/state_boundaries_1_347948.png", "property_location_url": "https://storage.googleapis.com/mapbiomas/alerta/cache/car_boundaries_1_347948.png" } ], "states": "Pará", "cities": "São félix do xingu", "biomês": "Amazonia", "settlements": [ { "id": 7205101, "description": "PAE EQUADOR", "category": "Assentamentos", "category_id": "3.0", "geom_wkt": "MULTIPOLYGON(((-68.3755671438042 -10.799847315924,-68.3698117692785 -10.8038838264455,-68.3490187271595 -10.8178576413189)))" } ], "indigenous_lands": "indigenous_lands": [ { "id": 6000340, "description": "TI Parabubure", "category": "Terra Indígena", "category_id": "0.0", "geom_wkt": "MULTIPOLYGON(((-52.9363369059999 -14.2462971469999,-52.9362470749999 -14.247914136)))" } ], "conservation_unties": [ { "id": 6000637, "description": "APA Triunfo do Xingu", "category": "UC", "category_id": "8.0", "geom_wkt": "MULTIPOLYGON(((-53.5619738509999 -5.62114486799993,-53.438843285 -5.68264888999988)))" } ], "rls": [ { "id": 357826, "validated_alert_id": 108, "car_legal_reserve_id": 357826, "area_ha": "0.731294", "idt_rel_te": 55891057, "idt_imovel": 3901118, "ind_tipo_i": "IRU", "num_modulo": "3.253", "round": "121.9783", "cod_uf": "PA", "idt_munici": 1507300, "geom_wkt": "MULTIPOLYGON(((-52.6926592187216 -6.36268400666696,-52.7042218720668 -6.36039206465269,-52.70276340923 -6.35113758135135,-52.6915699488752 -6.35511831575122,-52.6926592187216 -6.36268400666696)))" }, { "id": 358658, "validated_alert_id": 108, "car_legal_reserve_id": 358658, "area_ha": "2.970656", "idt_rel_te": 59824286, "idt_imovel": 4267073, "ind_tipo_i": "IRU", "num_modulo": "3.5503", "round": "190.9546", "cod_uf": "PA", "idt_munici": 1507300, "geom_wkt": "MULTIPOLYGON(((-52.6856459955984 -6.37542224629115,-52.7047490911665 -6.37568627773917,-52.7043556446849 -6.36516085338681,-52.687799321941 -6.36816967011943,-52.6874893102039 -6.3705893048876,-52.6865384234028 -6.37232694660249,-52.6864233478046 -6.37370298678591,-52.6856459955984 -6.37542224629115)))" } ], "apps": [ { "id": 30, "validated_alert_id": 395, "car_app_id": 125981, "area_ha": "0.067137" } ], "rvs": [ { "id":1 "validated_alert_id":245, "car_river_source_id":147153, "area_ha":"0.0" } ], "forest_managements": [], "embargos": [ { "id": 31, "validated_alert_id": 39, "embargo_id": 38250, "area_ha": "1.075832" } ], "vegetation_suppressions": [ { "id": 1, "validated_alert_id": 727, "vegetation_suppression_id": 504, "area_ha": "2.066256" } ] }, ... ]