# Using REST API and Python to retrieve data \[retired\]

**URL:** <https://www.thethingsnetwork.org/forum/t/using-rest-api-and-python-to-retrieve-data-retired/943>\
**Category:** Application Development\
**Created:** [January 2, 2016, 2:56pm UTC](https://www.thethingsnetwork.org/forum/t/using-rest-api-and-python-to-retrieve-data-retired/943 "2016-01-02T14:56:14Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [September 23, 2018, 10:56am UTC](https://www.thethingsnetwork.org/forum/t/using-rest-api-and-python-to-retrieve-data-retired/943/10 "2018-09-23T10:56:24Z")

</div>

HTTP 301 is not an error, but tells you that the location has changed:

```python
print res.status, res.reason, res.getheader('Location')

```

In this specific case, TTN is redirecting you to the HTTPS URL:

```nohighlight
301 Moved Permanently https://www.thethingsnetwork.org/api/v0/nodes/03FF8124/

```

That said: the new URL won’t work either, as the REST API is no more. You’ll have to use an alternative, like MQTT: [A Python program to listen to your devices with MQTT](https://www.thethingsnetwork.org/forum/t/a-python-program-to-listen-to-your-devices-with-mqtt/9036). The storage integration has its own API; [https://www.thethingsnetwork.org/docs/applications/storage/api.html](https://www.thethingsnetwork.org/docs/applications/storage/api.html)

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/using-rest-api-and-python-to-retrieve-data-retired/943)._
