Skip to content

area information

robert-valueguard edited this page Apr 9, 2024 · 24 revisions

The code below gives an example of how to use the client to get area information data

import valueguard

vgClient = valueguard.Client()
vgClient.authenticate("<username>", "<password>")


print(vgClient.area_information(search_criteria={
"area_ids":5,
'field_ids':'13',
'category_ids':1,
'valid_at':'2024-01-12'
}))

Field list

Field name Description Example
id ID of area information entity 1
area_id ID of area 5
field field information {'id': 1, 'name': 'Befolkningsmängd'}
value Value of the chosen field 1407
unit Unit of the chosen field Antal människor
created_at Creation datetime 2022-06-07T22:00:00.000+0000
updated_at Update datetime 2022-06-07T22:00:00.000+0000
valid_from Valid from datetime 2022-06-07T22:00:00.000+0000
valid_to Valid to datetime 2022-06-07T22:00:00.000+0000
information_source Information about the information source {'id': 1, 'name': 'Communal Ovevrlords'}
tags Information about the area information tag [{'id': 2, 'name': 'Befolkningsstatistik' ]}

Search criteria fields

Field name Description Example
area_ids ID of areas {1, 2, 3}
field_ids ID of fields {13, 14}
category_ids ID of category {1, 2}
valid_at Filter objects within timeframe between valid_from and valid_to 2023-09-01
limit Max number of objects returned 10000

Raw request

Get

curl https://api.valueguard.se/v1/area/information?access_token={access_token}&area_ids={area_id}
Clone this wiki locally