access idx-analytics-data-api through a browser - api

I am trying to access the Open edX data Analytics API v0 alpha as I would like to download the problem grades data.
In the documentation on setting up the API it mentioned Test the Data Analytics API by "In a browser, go to: http://<server-name>:<port>/docs/#!/api/
Enter a valid key and click Explore."
May I know what is the server-name and port number here refers to?
Also what is the Docs/#! refers to here.
I tried to look for API url online, but could not find it either.
Also I am assuming I need to get authorization through Oauth2 as well.
As this is the first time I am trying to access API to download data, i would really appreciate your help with the questions above

in this
http://<server-name>:<port>/docs/#!/api/
<server-name>
refers to the ip address of the server where you are running the edx-analytics
<port>
refers to port
sample url could be http://192.168.10.110:8085/docs/#!/api/

Related

How do I use/read an api documentation to send a simple request?

I know this is probably strictly case-specific, but I do feel like I encounter this problem a lot so I will make an effort to try and understand it better.
I am new to using APIs, but I have never succeeded in using one without copying someone's code. In this case, I can't even find any examples on forums, nor in the API documentation.
I'm trying to pull my balance value from my investment bank "NordNet" to scroll, amongst other things, on an Arduino display I've made. Right now I use python Selenium to automatically but "physically" login to NordNet and grab my balance from the DOM. As I'm afraid I might get "punished" for such botted behavior, and because the script is fairly high maintenance (as the HTML changes over time), I would obviously much rather get this information through NordNet's new API.
Link to NordNets API doc
Every time I try to utilize an API doc it's always the same, it looks easy, but I can never get it to work.
This time I tried to just play a little with the API before exploring further.
I use PostMan to send the simplest request:
https://www.nordnet.se/api/2
And I get a successful code 200 JSON response.
I then try to take it a step further to access my account data using this endpoint:
https://www.nordnet.se/api/2/accounts
For this one, I obviously need some authentication of some sort
The doc looks like this:
So I set my PostMan client up like this and get the response showcased:
I've put my NordNet login into the "Auth" tab as "basic auth" and I then see PostMan encrypts this info some way, in the "Headers" tab.
I'm getting an unauthorized response code and I have no idea why. Am I using PostMan wrong (probably)? Is the API faulty (probably not)? There is a mention of a session_id that should contain both password and username? Maybe something completely else...
I hope you can help
The documentation says to use session_id as username and password for that api ,
so try logging in and then get the session id (try with both sid and ssid) . from network tab and pass it as username and password for authorization .
sid- is for http and ssid for https i guess , try with both

rpcapd - what is the password when not using null authentication

I'm running rpcapd on a Raspberry which serves as a WiFi access point to trace/sniff network traffic by WiFi users.
I can run rpcapd in null authentication mode and access the interfaces from my windows machine using wireshark and it works perfect.
However, I'd like to expose these capture interfaces to multiple users and i thought it might be good to not use null authentication but have at least a little barrier for unwanted users.
If i don't use the "-n" argument, what is the user/pass? I searched Google but i can not really find a source which leads me to the answer.
I tried creating a second user which has a password and ran rpcapd from this users but still if i use these users Linux credentials, wireshark tells me it can not find any interfaces. When i re-run rpcapd with the -n argument everything works.
So... i must have overseen something!? What is the username and password for non null authentication operation or where can i specify one?
Thanks a lot!
Let me know if you need further info to help. Thanks!
When not using RPCAP_RMTAUTH_NULL authentication it will instead use the other type, RPCAP_RMTAUTH_PWD : https://www.winpcap.org/docs/docs_412/html/group__remote__auth__methods.html
And according to some old copy of the manual I found (ftp://ftp.tuwien.ac.at/.vhost/winpcap.polito.it/301a/docs/group__remote__auth__methods.html) which helpfully listed code references : "Referenced by daemon_checkauth(), and rpcap_sendauth()."
..which leads us to to the code that does the authentication : ftp://ftp.tuwien.ac.at/.vhost/winpcap.polito.it/301a/docs/daemon_8c-source.html#l00626
I downloaded the source (http://www.winpcap.org/install/bin/WpcapSrc_4_1_3.zip) to check it was still current and found in file "wpcap\libpcap\rpcapd\daemon.c" the current information for "daemon_AuthUserPwd" which shows not much has changed.
Hope this helps :-)

How do I find userip and useragent?

I am new to programming and I am trying to practice using APIs from third party websites to pull data to my own site. I am trying to use the Glassdoor API but I don't know where I find the required values for UserAgent and the UserIP. This is Glassdoor's explanation:
userip The IP address of the end user to whom the API results will be shown.
useragent The User-Agent (browser) of the end user to whom the API results will be shown. Note that you can can obtain this from the "User-Agent" HTTP request header from the end-user.
Note that for now I just want to pull some data onto a test website on my own computer and simply print the JSONP results onto the page. Where do I find these values? Thanks!
I was having the same trouble and think I can answer your question:
You can find your user IP address by simply Googling "what is my IP address." Google will give you the correct answer in the results or you can use another site like http://www.whatismyip.com/
Your user agent info is basically the info that identifies which browser is being used, what version, and on which operating system. You can also google this and be provided with the string or you can open up your console (right click in the browser window --> inspect elements --> console) and type navigator.userAgent which will give you the info you seek.
Hope this helps!
You can put your IP address lookup in your code rather than googling it. For example, in R:
Require(RCurl)
Require(rjson)
str_info <- getURL('http://ipinfo.io')
data <- fromJSON(str_info)
userip <- paste("userip=",data$ip, sep = "")

espn api error from URI link

I have just signed up to have access to espn api and I just want to access a specific teams data but an error message appears saying "timestamp" :"2014-04-06T22:36:39Z","message" :"Improper API URI","status" :"error","code" :404"". The link I'm putting in with my api key is "http://api.espn.com/v1/sports/soccer/english-premier-league/arsenal?apikey=****". I know you need an id with the team but where do I get that from and I don't think the link recognizes 'english-premier-league'.
Have you tried using the online API testing tool at http://developer.espn.com/io-docs?
Enter your API Key, and then find the endpoint to try. Note that not all endpoints are supplied via the dropdown boxes.
With a little detective work, I found what you might be looking for
http://api.espn.com/v1/sports/soccer/eng.1/teams/359?apikey=xxxxxxxxxxxxx

Using Google maps API via SSL

So, I know just recently that google maps API is now available in SSL (here).
My question is, how do I retro-fit my http google maps api script to use this?
So my http Google maps API script call looks like this:
http://maps.google.com/maps?file=api&v=3&sensor=false&key=########
They suggest via this link that to use SSL it should be this:
https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=false
I've tried retro-fitting this into my old URL format like so:
https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=false&key=########
but that no longer displays the map.
Does anyone have any suggestions on what the URL should be?
Thanks
Try this line:
https://maps.google.com/maps/api/js?v=3.5&sensor=true
Google btw suggests that you explicitly enter what version of the api you are going to use. Just entering v=3 will always return the latest version, at the moment 3.5. I believe that the current stable version is 3.3.
As Trott wrote in his answer, api key is no longer needed.
You don't need an API key to use v3, but I suppose it probably doesn't hurt. General things to try:
Open your browser's JavaScript console and see if it is reporting any problems when you load the page.
Remove the API key
Change & to just &
Copy and paste the exact link text you put above into your code, because that link text is working for me. I'm referring to this:
https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=false&key=########
Of course, change ######## to your API key (or just remove it altogether).