Getting API data fr Beginners


#1

Hi,

Im not very well vested in API setup however I would like to be able to connect to PVOutput and pull some data off the site. What I am trying to get is data concerning output and production from 5 - 10 stations, as well as the station name. Ive tried the documentation on the site, but Im not getting it to work. I also have no system to add - I simply just want to listen.

When I put in my API key in the header im getting an “Unauthorized 401: Invalid System ID”, which I guess is expected since I dont have a systems ID. Is there no way to just listen to it?

I have little to no idea what Im doing here. Ive tried googling but I cant seem to find a step-by-step instruction which is really what I need here. Can anyone help?

Thanks!


#2

Hi,

you need to specify system id of the “station” you want to pull data from. For instance, if i go to web version and explore the pv ladder, pick one system at random like: https://pvoutput.org/list.jsp?sid=45962 the system id is that “sid” parameter in the URL. Hence, if this is your system of interest, you should inform “45962” as systemId in the API.

BRs
Benito


#3

Thank you!

Progress I guess, however Im getting an API key error (which is odd since I havent used my API key before). I tried regenerating a new key, but got the same response. Im using the below call:

https://pvoutput.org/service/r2/addoutput.jsp?&key=myAPIKEY&sid=45962


#4

i think you need the api key of the system your wanting to view.


#5

oh, ok. how do i get that? im looking at the [above] example but cant find anything


#6

Even for public data? If so, what I told him is totally wrong… I never read from pvoutput, just wrote to it. Sorry for misguiding


#7

Hi please go here for a how to do what you want to do,donot try to use a API key for access. as i will not work and is not needed.


#8

I have never read data either but using your own key on someone elses system surely isnt going to work


#9

A system id (sid) and api key is always required to access API services

To access the data of another system the parameter (sid1) is used.


#10

Sorry @bankstownbloke but that didnt work either, im getting the following error:

The page you requested is missing or has an error.


#11

/service/ instead of /services/

Documentation - https://pvoutput.org/help.html#api-getstatus


#12

we are getting closer, but Im getting an “401: Inaccessible System ID” error
my system id is: 62035 and im trying to look at 21992 (top of the ladder).


#13

The use of sid1 requires your account to be donation enabled.