[Mailman-Users] REST API user_id and mailman_id are big integers

Mark Sapiro mark at msapiro.net
Tue Apr 23 00:35:29 EDT 2019

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-users at mailman3.org
and mailman-developers at 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":
"user_id": "00000000000000000000000000000001"}], "http_etag":
"\"8b70aea0b2faf3427ee675a899bbfe01bd35940b\"", "start": 0, "total_size": 1}


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,
"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

{"created_on": "2019-04-23T01:28:24.579274", "is_server_owner": false,
"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.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list