Hi @Akratos, you can use the query
parameter to do this kind of lookup through the API. The documentation is here (replace with your asset UID):
https://kobo.humanitarianresponse.info/api/v2/assets/<your asset uid>/data/#query-submitted-data
So your URL should like something like:
https://kobo.humanitarianresponse.info/api/v2/assets/<your asset uid>/data?format=json&query={"group_pe65x02/Nombre_de_la_persona_encuestada": "louis"}
Or in Python, something like:
import requests
import json
TOKEN = 'your_secret_token'
ASSET_UID = 'your_asset_uid'
URL = f'https://kobo.humanitarianresponse.info/api/v2/assets/{ASSET_UID}/data'
PARAMS = {
'format': 'json',
'query': json.dumps({
'group_pe65x02/Nombre_de_la_persona_encuestada': 'louis'
})
}
HEADERS = {
'Authorization': f'Token {TOKEN}'
}
res = requests.get(url=URL, params=PARAMS, headers=HEADERS)
assert res.status_code == 200
print(json.dumps(res.json(), indent=2))
Since you asked about getting <Response [200]>
, it seems you might need to familiarize yourself with the Python requests
library and interacting with data through APIs. This might be a helpful resource: Python & APIs: A Winning Combo for Reading Public Data – Real Python