[RESOLVED] Retrieve a list of all current users through REST API: OK with curl, not with Python requests

List Users through REST API:

  • with curl:

    curl -i http://nohost/plone/@users -H 'Accept: application/json' --user admin:secret 
    

    is OK: the list of the users is printed,

  • with Python requests:

    requests.get('http://nohost/plone/@users', headers={ 'Accept': 'application/json', }, auth=('admin', 'secret'))
    

    is not OK: the only thing printed is:

    <Response [200]>

requests will give you a response object. Please read https://2.python-requests.org/en/master/user/quickstart/#json-response-content on how to use that

1 Like

Thanks!

Plone Foundation Code of Conduct