Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go »
No member browsing this thread
Thread Status: Active
Total posts in this thread: 115
Posts: 115   Pages: 12   [ 1 2 3 4 5 6 7 8 9 10 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 66870 times and has 114 replies Next Thread
foxfire
Advanced Cruncher
United States
Joined: Sep 1, 2007
Post Count: 121
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Unable to Use API

Do to something changed between this AM US CST and this PM the API no longer allows me to pull my personal and team stats.
It fails with:
<?xml version="1.0" encoding="UTF-8"?>
-<error>
<error_code>401</error_code>
<error_message>Access is denied. To request access, refer to https://www.worldcommunitygrid.org/help/viewT...api</error_message>
</error>

After looping around the Help topics it appears a "contact us" has to be sent to receive authorization. The "contact us" dialog failed twice before appearing to work. So I guess now I wait until someone responds.

Anyone else run into this tonight??
----------------------------------------

[May 24, 2018 2:07:32 AM]   Link   Report threatening or abusive post: please login first  Go to top 
alanb1951
Veteran Cruncher
Joined: Jan 20, 2006
Post Count: 739
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Unable to Use API

Yes, I saw this too. I was expecting something like this because of the new EU privacy regs...

I tried the Contact Us dialog and it said it failed because I'd sent it more than once -- I hadn't! -- and it was my third attempt that succeeded. (I shortened the message each time; I wonder if there's a size limit that breaks the interface?)

Now we wait... (And perhaps it'll turn out that the hoops we have to jump through mean it's not worth the hassle using the API for simple hobbyist use any longer!)
[May 24, 2018 3:47:18 AM]   Link   Report threatening or abusive post: please login first  Go to top 
foxfire
Advanced Cruncher
United States
Joined: Sep 1, 2007
Post Count: 121
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Unable to Use API

I've been pulling my stats for over 10 years, first copy/paste from the screen, then code I wrote to pull from the page source then they gave us the API and I rewrote everthing to use that. Then the API started returning strange results so I wrote more code to get around that. Now this.

They put this change in and never gave us a "heads-up", nothing in the forums or news. Just a couple of lines in the Help section and a "contact us" link that may/may not be working.

Where I'm at right now is to just stop contributing. I stopped all new work and will copy/paste to finish the results I have in progress and then thats it for me.
----------------------------------------

[May 24, 2018 4:34:55 AM]   Link   Report threatening or abusive post: please login first  Go to top 
adriverhoef
Master Cruncher
The Netherlands
Joined: Apr 3, 2009
Post Count: 1985
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Unable to Use API

Last night before going to bed I noticed that my script 'wcgresults' that uses the API didn't return any results anymore, which it should be doing each hour (by crontab). After investigating I found out why:
$ wcgresults -l9 -dw -D /tmp/
HTTP request sent, awaiting response... 200 OK
Length: 175 [application/json]
Saving to: ‘/tmp//wcgresults.2018-05-24T02:32:11.13021’

2018-05-24 02:32:12 (11.9 MB/s) - ‘/tmp//wcgresults.2018-05-24T02:32:11.13021’ saved [175/175]
$ cat /tmp//wcgresults.2018-05-24T02:32:11.13021
{
"errors": [
{
"message": "Access is denied. To request access, refer to https://www.worldcommunitygrid.org/help/viewTopic.do?shortName=api"
}
]
}
So I used the 'Contact us' form there - almost 12 hours ago - and now I'm awaiting a response from the WCG team.

Funny, I didn't know the meaning of "heads-up". It seems to be an alert. I was expecting that this important news about the API would be posted here on the forum by the WCG administration, too.
[May 24, 2018 10:52:02 AM]   Link   Report threatening or abusive post: please login first  Go to top 
ErikaT
Former World Community Grid Admin
USA
Joined: Apr 27, 2009
Post Count: 912
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Unable to Use API

Hello all,

World Community Grid had to make changes to the way APIs are allowed to be exported due to the European Union General Data Protection Regulation.

For information on how to export APIs, please see the API Help webpage.

@foxfire and @alanb1951: Both of your Contact Us emails made it to the support email box and will be responded to. We will look in to the issues mentioned with the Contact Us feature.

Thank you for your understanding, and your support,
ErikaT
[May 24, 2018 11:17:41 AM]   Link   Report threatening or abusive post: please login first  Go to top 
knreed
Former World Community Grid Tech
Joined: Nov 8, 2004
Post Count: 4504
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Unable to Use API

Which API's are you using and are you using them to get your own data for your own personal use (which shouldn't require any special hoops) or are you using them to collect data about multiple users?
[May 24, 2018 1:24:49 PM]   Link   Report threatening or abusive post: please login first  Go to top 
TonyEllis
Senior Cruncher
Australia
Joined: Jul 9, 2008
Post Count: 249
Status: Recently Active
Project Badges:
Reply to this Post  Reply with Quote 
Re: Unable to Use API

Using the script written by adriverhoef called 'wcgresults' which he made available elsewhere in these forums some time ago.
Looking through his code see this line - does this help?

wget $QUIET -O $TMPFILE "$HTTPS$URLBASE/api/members/$MEMBER/results?code=$VERIFY&format=json&ServerState=$ServerState$ValidateState$SortBy$Offset&Limit=$opt_l"

seems to be the only wget in the code
Only downloading my own stats...

MPDIR=/var/tmp # Directory for storing temporary files
URLBASE=www.worldcommunitygrid.org # Don't change this, unless you know what you're doing
HTTPS="https:"// # Don't change this, unless you know what you're doing
MEMBER="TonyEllis" # The name of your account with which you're crunching
VERIFY="xxxxxxxxxxxxxxxxxxxxxxxxxx" # Your verification code on 'My Profile' (see website)

EDIT: Obviously the "xxxxxxxxxxxxxxxxxxxxxxxxxx" is my real code. Working for months until a few hours ago
----------------------------------------
----------------------------------------
[Edit 1 times, last edit by TonyEllis at May 24, 2018 1:40:33 PM]
[May 24, 2018 1:38:32 PM]   Link   Report threatening or abusive post: please login first  Go to top 
TonyEllis
Senior Cruncher
Australia
Joined: Jul 9, 2008
Post Count: 249
Status: Recently Active
Project Badges:
Reply to this Post  Reply with Quote 
Re: Unable to Use API

adriverhoef - yes, use your script and had the same experience this morning...
realized that the data needed was actually on my systems - though not in such a useful format... just use the wip count for each machine.

Have had to resort to knocking up a crude hurried script like this on every machine - then collate the results from each - the heart of it is

#!/bin/sh
#
# 24.05.2018
password=`cat $BOINCHOME/gui_rpc_auth.cfg`
shorthostname=`echo $HOSTNAME | sed 's/.sraellis.com//'`
count=`boinccmd --host 127.0.0.1 --passwd $password --get_tasks | grep "WU name:" | wc -l`
echo "$shorthostname $count" > "/var/..........

see http://www.sraellis.tk/wcg.php?number=wcg&...cg_wip&alternative=98

Pity WCG didn't look in their logs - see who was using APIs - contact a few - found out what they were doing and done some testing first. I would happily have spent time for testing if needed before the event - rather than being faced with a mess like this...
----------------------------------------
----------------------------------------
[Edit 1 times, last edit by TonyEllis at May 24, 2018 2:48:03 PM]
[May 24, 2018 1:52:41 PM]   Link   Report threatening or abusive post: please login first  Go to top 
foxfire
Advanced Cruncher
United States
Joined: Sep 1, 2007
Post Count: 121
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Unable to Use API

Which API's are you using and are you using them to get your own data for your own personal use (which shouldn't require any special hoops) or are you using them to collect data about multiple users?

I am using the API you wrote twice daily to pull WU Results for only myself.
I am also using URL + format=xml | format=json to pull:

Global Stats
My Stats (http://www.worldcommunitygrid.org/verifyMembe...mp;code=VERIFICATION-CODE
Team Stats
Team Project Stats
Team Member Stats (https://www.worldcommunitygrid.org/team/viewTeamMemberDetail.do?sort=cpu | points | results&teamId=6BWD4Z9132&pageNum=1&numRecordsPerPage=250)

once a day

The API and anything I have tried with format=xml or format=JSON fails.
----------------------------------------

[May 24, 2018 1:53:11 PM]   Link   Report threatening or abusive post: please login first  Go to top 
foxfire
Advanced Cruncher
United States
Joined: Sep 1, 2007
Post Count: 121
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Unable to Use API


Pity WCG didn't log in their logs - see who was using APIs - contact a few - found out what they were doing and done some testing first. I would happily have spent time for testing if needed before the event - rather than being faced with a mess like this...

+1
----------------------------------------

[May 24, 2018 1:55:28 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Posts: 115   Pages: 12   [ 1 2 3 4 5 6 7 8 9 10 | Next Page ]
[ Jump to Last Post ]
Post new Thread