# How to specify parameters for an HTTP get request

**URL:** <https://www.thethingsnetwork.org/forum/t/how-to-specify-parameters-for-an-http-get-request/60740>\
**Category:** Application Development\
**Created:** [January 3, 2023, 3:44pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-specify-parameters-for-an-http-get-request/60740 "2023-01-03T15:44:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecosoph](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ecosoph/32/35697_2.png) [@ecosoph](https://www.thethingsnetwork.org/forum/u/ecosoph)\
**Post date:** [January 3, 2023, 3:44pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-specify-parameters-for-an-http-get-request/60740/1 "2023-01-03T15:44:12Z")

</div>

I’ve set up working end devices as well as the storage integration and an API key. I can query the data using the [CURL reference provided in the documentation](https://www.thethingsindustries.com/docs/integrations/storage/retrieve/)

and also a bare minimum python code example is working:

```auto
import requests
import json

endpoint = "https://eu1.cloud.thethings.network/api/v3/as/applications/XXX/devices/XXX/packages/storage/uplink_message"
headers = {"Authorization" : "Bearer NNSXS"}
payload = {"-d":"field_mask=up.uplink_message.decoded_payload"}

x = requests.get(url=endpoint, headers=headers)
data = x.content.decode("utf-8")
print(json.dumps(data))

```

I am currently trying to beautify the output by applying the parameters provided in the documentation:  
`-d "field_mask=up.uplink_message.decoded_payload"`

Curl throws the following error:  
`{"code":12,"message":"Not Implemented"}`

due to the field\_mask and putting the parameter in the requests changes nothing.  
Currently, the output of one line looks as follows:

```auto

{"result":{"end_device_ids":{"device_id":"eui-xxxx","application_ids":{"application_id":"xxx"},"dev_eui":"xxxx","dev_addr":"xxx"},"received_at":"2023-01-03T15:42:28.960613068Z","uplink_message":{"f_port":2,"f_cnt":425,"frm_payload":"DkwAAAD1AADfAmU=","decoded_payload":{"ADC_CH0V":0.245,"BatV":3.66,"Digital_IStatus":"L","Door_status":"OPEN","EXTI_Trigger":"FALSE","Hum_SHT":61.3,"TempC1":0,"TempC_SHT":22.3,"Work_mode":"IIC"},"rx_metadata":[{"gateway_ids":{"gateway_id":"eui-7276ff002ef47003","eui":"7276FF002EF47003"},"time":"2023-01-03T15:42:27.610279Z","timestamp":2044388988,"encrypted_fine_timestamp":"Lcc1ZV8UM1Izjue4kJSRhA==","encrypted_fine_timestamp_key_id":"0","rssi":-111,"signal_rssi":-117,"channel_rssi":-111,"snr":-3,"frequency_offset":"-12376","location":{"latitude":48.76991574466756,"longitude":11.377442479133608,"source":"SOURCE_REGISTRY"},"channel_index":7,"received_at":"2023-01-03T15:42:28.751236599Z"},{"gateway_ids":{"gateway_id":"xxx","eui":"xxx"},"time":"2023-01-03T15:42:28.697572Z","timestamp":3954411043,"rssi":-93,"channel_rssi":-93,"snr":7,"channel_index":2,"received_at":"2023-01-03T15:42:28.768105104Z"}],"settings":{"data_rate":{"lora":{"bandwidth":125000,"spreading_factor":7,"coding_rate":"4/5"}},"frequency":"868500000","timestamp":2044388988,"time":"2023-01-03T15:42:27.610279Z"},"received_at":"2023-01-03T15:42:28.752203175Z","consumed_airtime":"0.061696s","version_ids":{"brand_id":"dragino","model_id":"lsn50v2-s31","hardware_version":"_unknown_hw_version_","firmware_version":"1.0","band_id":"EU_863_870"},"network_ids":{"net_id":"000013","tenant_id":"ttn","cluster_id":"eu1","cluster_address":"eu1.cloud.thethings.network"}}}}

```

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [January 3, 2023, 4:43pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-specify-parameters-for-an-http-get-request/60740/2 "2023-01-03T16:43:11Z")

</div>

AFAIK, the field\_mask is to ADD additional fields from the ones that you get as decided by the developers. The ‘can I trim down the amount of data’ question comes up about monthly, two years in and the answer is still ‘not as far as anyone here knows’.

---

<div class="post-metadata">

**Author:** ![ecosoph](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ecosoph/32/35697_2.png) [@ecosoph](https://www.thethingsnetwork.org/forum/u/ecosoph)\
**Post date:** [January 3, 2023, 5:06pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-specify-parameters-for-an-http-get-request/60740/3 "2023-01-03T17:06:40Z")

</div>

@descartes thanks! I have read your answers on previous similar/identical questions. As you wrote previously, it is probably better to stay with webhooks.
