Sorry for my late feedback, but I got carried away with work and a lot of errands last week. And since I wanted to give an accurate and well written feedback, I decided to do it later. So here it is...
I'll start with when I first tried the commands of the V2 API. The first command took very long until I got any process feedback (as it was a silent cURL call), until more than a minute, I got a jQuery error stating that the syntax is invalid (referring to its input value originally retrieved from web). I tried it again and it worked the second time but it took almost the same amount of time to show the output.
So, I had to try the V1 API command and it worked much quicker, unlike the V2 API command. I completed my experiment to evaluate the average success rate, and it was almost a 50/50 success rate with the V2 API command. Given this, I wanted to verify what was the bottleneck in my test, and to my surprise it was both my connection and the jQuery process. I ruled this out by downloading the NordVPN API output to a local file for both versions.
I was shocked as soon as I discovered the data size difference between the output of each API version. For your reference, I just downloaded the output of the commands in your first post (and more) to self-indicating file names.
Code:
-rw-rw-rw- 1 atr root 337202 Nov 28 17:53 v1.servers
-rw-rw-rw- 1 atr root 30223 Nov 28 17:53 v1.servers.countries
-rw-rw-rw- 1 atr root 43565 Nov 28 17:53 v1.servers.recommendations
-rw-rw-rw- 1 atr root 8887860 Nov 28 17:56 v2.servers.16354.limit
-rw-rw-rw- 1 atr root 109819 Nov 28 17:53 v2.servers.default.limit
These files downloaded now with a
max single connection speed of 50 Kbps (unexplained speed limit), which made it take forever to download the 8.47MB
v2.servers.16354.limit file, and it failed once! Which totally explains the very long time it took to execute the V2 API commands in the first post of this thread.
So, in my case I must use V1 API calls specifically, as V2 API output is too large for my connection and would fail execution very often.
I'll do some research and get back here with results and recommendations as soon as possible, within a few hours.
I tried to figure out a way to get the URL's
filters GET parameter to work with V2 API, but I failed to get it to work even though I came up with some ideas. Have you made any trials within this approach?
The idea is to only have this run 1x a day, typically in the middle of the night so you wouldn't have to deal with any issues in processing time.
Just a quick question; is it possible to manually specify the time of the API call from within the script? I'm asking because I usually have a high data usage until late night.
I have a great idea for this thread that I'll provide after I finish setting up my VPNMON instance. Stay tuned!
I wanted to suggest that you start a new thread specific for NordVPN V2 API calls, or moving them to another post within this thread, in order to split the instructions of each API version. It got me super confused reading through the first post, when I first started experimenting with the commands. Additionally, the first post has an improper text formatting for Dark Mode view of this forums (See the attachments)