{"source":"brannstatistikk","operation":"get_statistics","description":"One fire statistic, nationally or for one municipality. Signature: get_statistics(statistic: string, required; municipality: string, optional, default None; by_year: yes/no, optional, default False; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"get_statistics(statistic: string, required; municipality: string, optional, default None; by_year: yes/no, optional, default False; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"statistic","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"An unrestricted statistic id (for example \"ADDRESS_COUNTY_ID\", \"REVISED_MISSION_TYPE_ID\" or \"352\") or a name substring matching exactly one unrestricted statistic.","unit":null},{"name":"municipality","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"A 4-digit municipality number (kommune), for example \"4650\" for Gloppen. Omit for national figures.","unit":null},{"name":"by_year","type":"boolean","schema":{"type":"boolean"},"required":false,"default":false,"description":"Break the statistic down by year instead of returning one set of buckets. Cannot be combined with municipality (that would need three aggregation levels).","unit":null},{"name":"limit","type":"integer","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"display_type":"integer","required":false,"default":25,"description":"Maximum list items returned by the gateway (default 25, maximum 100).","unit":"items"},{"name":"offset","type":"integer","schema":{"type":"integer","minimum":0,"default":0},"display_type":"integer","required":false,"default":0,"description":"Number of list items to skip before returning the page.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/brannstatistikk/get_statistics?statistic={statistic}&municipality={municipality}&by_year=false&limit=25&offset=0","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"statistic":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"additionalProperties":false},"municipality":{"type":["string","null"]},"buckets":{"type":"array","items":{"type":"object","properties":{"key":{"type":["string","integer"]},"count":{"type":"integer"}},"additionalProperties":false,"required":["key","count"]}},"years":{"type":"array","items":{"type":"object","properties":{"year":{"type":["integer","string"]},"total":{"type":"integer"},"buckets":{"type":"array","items":{"type":"object","properties":{"key":{"type":["string","integer"]},"count":{"type":"integer"}},"additionalProperties":false,"required":["key","count"]}}},"additionalProperties":false,"required":["year","total","buckets"]}}},"additionalProperties":false,"required":["statistic"]},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"intentionally_none","entity_types":[],"description":"No stable cross-source entity projection is defined for this operation; entities is intentionally empty."},"error_contract":{"scope":"top-level HTTP error response; never part of a success payload","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object"}},"additionalProperties":false,"required":["code","message","retryable"]},"suggestion":{"type":"string"},"_meta":{"type":"object","properties":{"retrieved_at":{"type":"string","format":"date-time"},"language":{"type":"string","const":"en"},"content_languages":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object"}}},"required":["retrieved_at","language","content_languages","sources"]},"_links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"api_index":{"type":"string","format":"uri"},"feedback":{"type":"string","format":"uri"}},"required":["self","api_index","feedback"],"additionalProperties":false}},"additionalProperties":false,"required":["error","suggestion","_meta","_links"]},"statuses":{"400":{"codes":["MISSING_PARAMETER","INVALID_PARAMETER","INVALID_REQUEST"],"retryable":false},"404":{"codes":["SOURCE_NOT_FOUND","OPERATION_NOT_FOUND","ENTITY_NOT_FOUND"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"503":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":true}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/brannstatistikk/get_statistics/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/brannstatistikk/get_statistics","source":"https://allemannsdata.com/wiki/api/v1/kilder/brannstatistikk","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["statistic","statistic.id","statistic.name","municipality","buckets","buckets[].key","buckets[].count","years","years[].year","years[].total","years[].buckets","years[].buckets[].key","years[].buckets[].count"],"output_fields_truncated":false,"canonical_field_aliases":{"identifier":["statistic.id"],"name":["statistic.name"]},"response_example":{"source":"brannstatistikk","operation":"get_statistics","parameters":{"statistic":"example value","municipality":"example value","by_year":false},"data":{"statistic":{"id":"example-id","name":"Example"},"municipality":"example value","buckets":[{"key":"example value","count":1}],"years":[{"year":1,"total":1,"buckets":[{"key":"example value","count":1}]}]},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"brannstatistikk","name":"Fire statistics (DSB)","description":"Fire-service mission statistics and headline fire figures, from the undocumented endpoint behind brannstatistikk.no.","cache_ttl_seconds":3600,"documentation":"https://brannstatistikk.no/"}]},"_provenance":{"data":{"source":"brannstatistikk","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/brannstatistikk"},"entities":{"source":"brannstatistikk","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/brannstatistikk","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/brannstatistikk/get_statistics","source":"https://allemannsdata.com/wiki/api/v1/kilder/brannstatistikk","wiki":"https://allemannsdata.com/wiki/kilder/brannstatistikk/get_statistics/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
