Changes suggest for Doc Page "Basic Operation" of "Mailman 3 Core administrative Rest API"

The URL written for the syntax in the request is static -> "https://localhost:9001/3.0/......"
Does the REST ROOT URL always need to be static --> "https://localhost:9001/3.0" ? Mine is "https://localhost:8001/3.1" Am I missing something here?
If it need not to be static then it can be written like this <the URL given in the parameter "REST root url" >/<type of request>
Like for obtaining the version information it can be <the URL given in the parameter "REST root url" >/system/versions
In my case it will be --> http://localhost:8001/3.1/system/versions

On 3/2/19 4:01 AM, Aaryan Bhagat wrote:
Those URIs are in doctests so they must be the actual URI for the test environment or the test will fail.
If anything, the paragraph
In order to do anything with the REST API, you need to know its Basic AUTH credentials, and the version of the API you wish to speak to.
could be expanded to say something about the port being 9001 for tests, but defined in mailman.cfg for a running system <https://mailman.readthedocs.io/en/latest/src/mailman/config/docs/config.html...>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Please be advised that in the same wiki page, there is a section called "API Versions". Two different but similar API versions are presented (API version 3.1 was introduced in Mailman 3.1).
Port 9001 is what unittests are using (see also https://gitlab.com/mailman/mailman/blob/661921ba4c0ae612f15b229227e7f836b432...), while port 8001 is the default port.
I think the reason why the document is using 9001 is, the documents' examples are also tested (using sphinx doctests).
All the things combine together, it becomes localhost:9001/3.0.

It is ambiguous as of now. I like Mark suggestion for adding details in the doc regarding the doctest url and url used in case of running it in system.

On 3/2/19 4:01 AM, Aaryan Bhagat wrote:
Those URIs are in doctests so they must be the actual URI for the test environment or the test will fail.
If anything, the paragraph
In order to do anything with the REST API, you need to know its Basic AUTH credentials, and the version of the API you wish to speak to.
could be expanded to say something about the port being 9001 for tests, but defined in mailman.cfg for a running system <https://mailman.readthedocs.io/en/latest/src/mailman/config/docs/config.html...>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Please be advised that in the same wiki page, there is a section called "API Versions". Two different but similar API versions are presented (API version 3.1 was introduced in Mailman 3.1).
Port 9001 is what unittests are using (see also https://gitlab.com/mailman/mailman/blob/661921ba4c0ae612f15b229227e7f836b432...), while port 8001 is the default port.
I think the reason why the document is using 9001 is, the documents' examples are also tested (using sphinx doctests).
All the things combine together, it becomes localhost:9001/3.0.

It is ambiguous as of now. I like Mark suggestion for adding details in the doc regarding the doctest url and url used in case of running it in system.
participants (3)
-
Aaryan Bhagat
-
Mark Sapiro
-
Ye Xiaoxing