Thanks, using v3.1 instead of v3.0 solved my problems!
You might want to check the docs where 3.0 is still being used.
--
Kiffin Gish
Gouda, The Netherlands
On 4/23/19 6:35 AM, Mark Sapiro wrote:
On 4/22/19 1:18 AM, Kiffin Gish wrote:
I'm implementing a frontend for accessing the mailman-core via the REST
interface.
This list is primarily for support of Mailman 2.1. While some of us who
read this list are also involved with Mailman 3, some Mailman 3
developers do not read this list.
The preferred lists for Mailman 3 are mailman-us...@mailman3.org
<https://lists.mailman3.org/mailman3/lists/mailman-us...@mailman3.org/>
and mailman-develop...@python.org
<https://mail.python.org/mailman3/lists/mailman-developers.python.org/>.
Two problems arise, and both are related to the fact that in the json
response the mailman_id and the user_id are big integers.
As the values are greater than the maximum json integer format they
appear as exponential values with the last digits truncated.
I don't see this. Perhaps you can give specific url's that return these
large integers.
I see things like:
curl -urestadmin:restpass http://localhost:9001/3.1/users
{"entries": [{"created_on": "2005-08-01T07:49:23", "http_etag":
"\"2bf857a70410d149964152eb539a9f2e65167589\"", "is_server_owner":
false, "self_link":
"http://localhost:9001/3.1/users/00000000000000000000000000000001",
"user_id": "00000000000000000000000000000001"}], "http_etag":
"\"8b70aea0b2faf3427ee675a899bbfe01bd35940b\"", "start": 0, "total_size": 1}
and
curl -urestadmin:restpass http://localhost:9001/3.0/users
{"entries": [{"created_on": "2005-08-01T07:49:23", "http_etag":
"\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner":
false, "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}],
"http_etag": "\"cf73b75814e4f44e603170b39d65b5120218e52e\"", "start": 0,
"total_size": 1}
Granted this installation has only one user and on an installation with
many users, I do see things like
{"created_on": "2019-04-23T01:28:24.579274", "is_server_owner": false,
"self_link":
"http://localhost:8001/3.0/users/163692196465132998753332423763098956585",
"user_id": 163692196465132998753332423763098956585, "password":
"elided", "http_etag": "\"be49870d5d7cb722fc9e6852ed6a62a83efa088d\""}
with a large integer for user_id with API 3.0, but with API 3.1, I get a
string
{"created_on": "2019-04-23T01:28:24.579274", "is_server_owner": false,
"self_link":
"http://localhost:8001/3.1/users/7b25f8647f6343efac82f831674d7329",
"user_id": "7b25f8647f6343efac82f831674d7329", "password": "elided",
"http_etag": "\"a4c24cd3178e9d9c2361eb011496911f2fd12951\""}
I was just wondering if there is a proper way to handle this and/or it
is possible for the REST API to return these values as strings rather
than numbers.
Are you using API 3.1. If not, try it.
------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org