# varsom-regobs-client
  ## Introduction    RegObs is a tool for collecting observations and events   related to natural hazards. It is currently used by the   Norwegian flood, landslide and avalanche warning service in   Norway, but the data is openly available for anyone through this API.    Regobs has been developed by the Norwegian Water resources and   Energy Directorate (NVE), in collaboration with the Norwegian   Meteorological Institute (MET) and the Norwegian Public Roads   Administration (NPRA).    You can check out our representation of the data at [regobs.no](http://regobs.no).    ## Authentication    Some endpoints require an api key.  You can get an API key by sending an email to   [raek@nve.no](mailto:raek@nve.no?subject=RegObs%20API%20Key).  To use the api key with the swagger ui, fill in the api\\_key input above.   It should then be included with every request in the   `regObs_apptoken` header.    ## Getting started    Get the last 10 observations using python:    ```python  import requests  r = requests.post('https://api.regobs.no/v4/Search',       data={'NumberOfRecords': 10},      headers={'Content-Type': 'application/json'}  )  data = r.json()  print(len(data))  # 10  ```    

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: v4
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import varsom_regobs_client 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import varsom_regobs_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import varsom_regobs_client
from varsom_regobs_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = varsom_regobs_client.AccountApi(varsom_regobs_client.ApiClient(configuration))
body = varsom_regobs_client.CreateAccountRequest() # CreateAccountRequest | 

try:
    api_response = api_instance.account_create_account(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->account_create_account: %s\n" % e)

# create an instance of the API class
api_instance = varsom_regobs_client.AccountApi(varsom_regobs_client.ApiClient(configuration))
lang_key = 56 # int |  (optional)

try:
    api_response = api_instance.account_get_my_page_data(lang_key=lang_key)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->account_get_my_page_data: %s\n" % e)

# create an instance of the API class
api_instance = varsom_regobs_client.AccountApi(varsom_regobs_client.ApiClient(configuration))

try:
    api_response = api_instance.account_get_observer()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->account_get_observer: %s\n" % e)

# create an instance of the API class
api_instance = varsom_regobs_client.AccountApi(varsom_regobs_client.ApiClient(configuration))
guid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 

try:
    api_response = api_instance.account_get_observer_groups(guid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->account_get_observer_groups: %s\n" % e)

# create an instance of the API class
api_instance = varsom_regobs_client.AccountApi(varsom_regobs_client.ApiClient(configuration))

try:
    api_response = api_instance.account_login()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->account_login: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *https://api.regobs.no/v4*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccountApi* | [**account_create_account**](docs/AccountApi.md#account_create_account) | **POST** /Account/Create | 
*AccountApi* | [**account_get_my_page_data**](docs/AccountApi.md#account_get_my_page_data) | **GET** /Account/Mypage | 
*AccountApi* | [**account_get_observer**](docs/AccountApi.md#account_get_observer) | **GET** /Account/GetObserver | 
*AccountApi* | [**account_get_observer_groups**](docs/AccountApi.md#account_get_observer_groups) | **GET** /Account/Groups/{guid} | 
*AccountApi* | [**account_login**](docs/AccountApi.md#account_login) | **GET** /Account/Login | 
*AttachmentApi* | [**attachment_post**](docs/AttachmentApi.md#attachment_post) | **POST** /Attachment/Upload | 
*GeneralObsApi* | [**delete_general_obs**](docs/GeneralObsApi.md#delete_general_obs) | **DELETE** /GeneralObs/{regId} | 
*GeneralObsApi* | [**get_general_obs**](docs/GeneralObsApi.md#get_general_obs) | **GET** /GeneralObs/{regId} | 
*GeneralObsApi* | [**post_general_obs**](docs/GeneralObsApi.md#post_general_obs) | **POST** /GeneralObs/{regId} | 
*GeneralObsApi* | [**put_general_obs**](docs/GeneralObsApi.md#put_general_obs) | **PUT** /GeneralObs/{regId} | 
*GeoCodeApi* | [**geo_code_location_info**](docs/GeoCodeApi.md#geo_code_location_info) | **GET** /GeoCode/LocationInfo | 
*HelptextApi* | [**helptext_get**](docs/HelptextApi.md#helptext_get) | **GET** /HelpText | Get a list of helptext objects.
*KdvElementsApi* | [**kdv_elements_get_kdvs**](docs/KdvElementsApi.md#kdv_elements_get_kdvs) | **GET** /KdvElements | Returns values and texts for input fields, dropdowns etc.
*LocationApi* | [**location_within_radius**](docs/LocationApi.md#location_within_radius) | **GET** /Location/WithinRadius | 
*RegistrationApi* | [**registration_get**](docs/RegistrationApi.md#registration_get) | **GET** /Registration/{regId}/{langKey} | Get registration by regId.
*RegistrationApi* | [**registration_get_caaml**](docs/RegistrationApi.md#registration_get_caaml) | **GET** /Registration/Caaml/{regId} | Get a registration in CAAML format
*RegistrationApi* | [**registration_insert**](docs/RegistrationApi.md#registration_insert) | **POST** /Registration | Create a new registration.
*RegistrationApi* | [**registration_plot_preview_png**](docs/RegistrationApi.md#registration_plot_preview_png) | **POST** /Registration/PlotPreviewPng | Generate a preview figure for a snow profile registration.
*RegistrationApi* | [**registration_validate**](docs/RegistrationApi.md#registration_validate) | **POST** /Registration/Validate | Validate registration data.
*SearchApi* | [**search_at_a_glance**](docs/SearchApi.md#search_at_a_glance) | **POST** /Search/AtAGlance | Returns simplified registrations.
*SearchApi* | [**search_count**](docs/SearchApi.md#search_count) | **POST** /Search/Count | Returns search result count
*SearchApi* | [**search_search**](docs/SearchApi.md#search_search) | **POST** /Search | Registration search
*SearchApi* | [**search_search_criteria**](docs/SearchApi.md#search_search_criteria) | **POST** /Search/SearchCriteria | Returns search criteria for the specified hazard type and language.
*TokenApi* | [**token_get**](docs/TokenApi.md#token_get) | **POST** /Token/Get | 
*TripApi* | [**trip_post**](docs/TripApi.md#trip_post) | **POST** /Trip | 
*TripApi* | [**trip_put**](docs/TripApi.md#trip_put) | **PUT** /Trip | 

## Documentation For Models

 - [AreasDto](docs/AreasDto.md)
 - [AtAGlanceViewModel](docs/AtAGlanceViewModel.md)
 - [AttachmentViewModel](docs/AttachmentViewModel.md)
 - [AvalancheActivityObs2Dto](docs/AvalancheActivityObs2Dto.md)
 - [AvalancheActivityObs2ViewModel](docs/AvalancheActivityObs2ViewModel.md)
 - [AvalancheActivityObsDto](docs/AvalancheActivityObsDto.md)
 - [AvalancheActivityObsViewModel](docs/AvalancheActivityObsViewModel.md)
 - [AvalancheDangerObsDto](docs/AvalancheDangerObsDto.md)
 - [AvalancheDangerObsViewModel](docs/AvalancheDangerObsViewModel.md)
 - [AvalancheEvalProblem2Dto](docs/AvalancheEvalProblem2Dto.md)
 - [AvalancheEvalProblem2ViewModel](docs/AvalancheEvalProblem2ViewModel.md)
 - [AvalancheEvalProblemViewModel](docs/AvalancheEvalProblemViewModel.md)
 - [AvalancheEvaluation2ViewModel](docs/AvalancheEvaluation2ViewModel.md)
 - [AvalancheEvaluation3Dto](docs/AvalancheEvaluation3Dto.md)
 - [AvalancheEvaluation3ViewModel](docs/AvalancheEvaluation3ViewModel.md)
 - [AvalancheEvaluationViewModel](docs/AvalancheEvaluationViewModel.md)
 - [AvalancheObsDto](docs/AvalancheObsDto.md)
 - [AvalancheObsViewModel](docs/AvalancheObsViewModel.md)
 - [CompressionTestDto](docs/CompressionTestDto.md)
 - [CompressionTestViewModel](docs/CompressionTestViewModel.md)
 - [CountyDto](docs/CountyDto.md)
 - [CreateAccountRequest](docs/CreateAccountRequest.md)
 - [CreateRegistrationRequestDto](docs/CreateRegistrationRequestDto.md)
 - [CreateRegistrationResponseDto](docs/CreateRegistrationResponseDto.md)
 - [CreateTripDto](docs/CreateTripDto.md)
 - [DamageObsDto](docs/DamageObsDto.md)
 - [DamageObsViewModel](docs/DamageObsViewModel.md)
 - [DangerObsDto](docs/DangerObsDto.md)
 - [DangerObsViewModel](docs/DangerObsViewModel.md)
 - [DensityProfileDto](docs/DensityProfileDto.md)
 - [DensityProfileLayerDto](docs/DensityProfileLayerDto.md)
 - [FinishTripDto](docs/FinishTripDto.md)
 - [ForecastRegionDto](docs/ForecastRegionDto.md)
 - [ForecastRegionSubRegionDto](docs/ForecastRegionSubRegionDto.md)
 - [GeneralObservationEditModel](docs/GeneralObservationEditModel.md)
 - [GeneralObservationViewModel](docs/GeneralObservationViewModel.md)
 - [GeoLocationInfo](docs/GeoLocationInfo.md)
 - [GetTokenRequestDto](docs/GetTokenRequestDto.md)
 - [GetTokenResponseDto](docs/GetTokenResponseDto.md)
 - [HelptextDto](docs/HelptextDto.md)
 - [IceCoverObsDto](docs/IceCoverObsDto.md)
 - [IceCoverViewModel](docs/IceCoverViewModel.md)
 - [IceThicknessDto](docs/IceThicknessDto.md)
 - [IceThicknessLayerDto](docs/IceThicknessLayerDto.md)
 - [IceThicknessLayerViewModel](docs/IceThicknessLayerViewModel.md)
 - [IceThicknessViewModel](docs/IceThicknessViewModel.md)
 - [IncidentDto](docs/IncidentDto.md)
 - [IncidentUrlsDto](docs/IncidentUrlsDto.md)
 - [IncidentViewModel](docs/IncidentViewModel.md)
 - [KdvElement](docs/KdvElement.md)
 - [KdvElementsResponseDto](docs/KdvElementsResponseDto.md)
 - [LandSlideObsDto](docs/LandSlideObsDto.md)
 - [LandslideViewModel](docs/LandslideViewModel.md)
 - [LatLngObject](docs/LatLngObject.md)
 - [MyPageData](docs/MyPageData.md)
 - [ObsLocationDto](docs/ObsLocationDto.md)
 - [ObsLocationViewModel](docs/ObsLocationViewModel.md)
 - [ObsLocationsResponseDtoV2](docs/ObsLocationsResponseDtoV2.md)
 - [ObserverCompetenceDto](docs/ObserverCompetenceDto.md)
 - [ObserverCompetenceLevelDto](docs/ObserverCompetenceLevelDto.md)
 - [ObserverGroupDto](docs/ObserverGroupDto.md)
 - [ObserverResponseDto](docs/ObserverResponseDto.md)
 - [ObserverViewModel](docs/ObserverViewModel.md)
 - [PictureRequestDto](docs/PictureRequestDto.md)
 - [PositionDto](docs/PositionDto.md)
 - [RegObsGenericValue](docs/RegObsGenericValue.md)
 - [RegistrationTypeCriteriaDto](docs/RegistrationTypeCriteriaDto.md)
 - [RegistrationTypeDto](docs/RegistrationTypeDto.md)
 - [RegistrationTypeSubTypeDto](docs/RegistrationTypeSubTypeDto.md)
 - [RegistrationViewModel](docs/RegistrationViewModel.md)
 - [SearchCountResponseDto](docs/SearchCountResponseDto.md)
 - [SearchCriteriaRequestDto](docs/SearchCriteriaRequestDto.md)
 - [SearchSideBarDto](docs/SearchSideBarDto.md)
 - [SearchSideBarRequestDto](docs/SearchSideBarRequestDto.md)
 - [SnowCoverObsDto](docs/SnowCoverObsDto.md)
 - [SnowCoverObsViewModel](docs/SnowCoverObsViewModel.md)
 - [SnowDensityLayerViewModel](docs/SnowDensityLayerViewModel.md)
 - [SnowDensityViewModel](docs/SnowDensityViewModel.md)
 - [SnowProfileDto](docs/SnowProfileDto.md)
 - [SnowProfileViewModel](docs/SnowProfileViewModel.md)
 - [SnowSurfaceObservationDto](docs/SnowSurfaceObservationDto.md)
 - [SnowSurfaceViewModel](docs/SnowSurfaceViewModel.md)
 - [SnowTempObsViewModel](docs/SnowTempObsViewModel.md)
 - [SnowTempViewModel](docs/SnowTempViewModel.md)
 - [StratProfileDto](docs/StratProfileDto.md)
 - [StratProfileLayerDto](docs/StratProfileLayerDto.md)
 - [StratProfileLayerViewModel](docs/StratProfileLayerViewModel.md)
 - [StratProfileViewModel](docs/StratProfileViewModel.md)
 - [Summary](docs/Summary.md)
 - [TempObsDto](docs/TempObsDto.md)
 - [TempProfileObsDto](docs/TempProfileObsDto.md)
 - [UrlViewModel](docs/UrlViewModel.md)
 - [WaterLevel2Dto](docs/WaterLevel2Dto.md)
 - [WaterLevelDto](docs/WaterLevelDto.md)
 - [WaterLevelMeasurementDto](docs/WaterLevelMeasurementDto.md)
 - [WaterLevelMeasurementViewModel](docs/WaterLevelMeasurementViewModel.md)
 - [WaterLevelViewModel](docs/WaterLevelViewModel.md)
 - [Waterlevel2ViewModel](docs/Waterlevel2ViewModel.md)
 - [WeatherObservationDto](docs/WeatherObservationDto.md)
 - [WeatherViewModel](docs/WeatherViewModel.md)
 - [WithinExtentCriteriaDto](docs/WithinExtentCriteriaDto.md)
 - [WithinRadiusCriteriaDto](docs/WithinRadiusCriteriaDto.md)

## Documentation For Authorization


## apiKey

- **Type**: API key
- **API key parameter name**: regObs_apptoken
- **Location**: HTTP header


## Author


