First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:
7.9.3 → 8.9.2 → 9.0.1 (last step optional)
Regarding your actual question, you should be able to pull multiple pages using the p parameter, IIRC. Output format is not modifiable server-side. You’ll need to read it in and output the data in your format of choice.
Alright, call me slow but I’m just not following here. When I set the ps=50 and the p=2 I should get 100 users back right? However, I’m only getting 50. Also, when it says total 1694 could I assume this is my total number of users? This does correlate with the count from the UI. Still need the list of all users though.
you need to iterate over the pages. think of it like a book where you can define the number of sentences per page. if you define a page size (ps) of 50, you will get 50 entries on one page in return. with this information you can now iterate over the pages. ps=50&p=2 would give you now 50 entries on the second page and so on.
in order to get all users in your instance you could write something like this:
#!/bin/bash
#4*500>1694
TOKEN="your token"
for i in 1 2 3 4;
do
curl -u "${TOKEN}:" "http://localhost:9000/api/users/search?ps=500&p=$i"
done