cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5458
Views
7
Helpful
3
Replies

Rest API using Python

Any one here using Python with requests to give me some guidance or basic script examples ?  All I got so far was the html code from Prime.

Thanks in advanced.

3 Replies 3

Gallifrean
Level 7
Level 7

have you seen this

"import requests resp = requests.get('https://todolist.example.com/tasks/') if resp.status_code != 200:    # This means something went wrong.    raise ApiError('GET /tasks/ {}'.format(resp.status_code)) for todo_item in resp.json():    print('{} {}'.format(todo_item['id'], todo_item['summary'])) "

Source

aradford
Cisco Employee
Cisco Employee

brian420
Level 1
Level 1

HTML? Do you mean URL?

APIs use URLs and JSON.

What exactly are you trying to do?