API for Server Data Queries: Difference between revisions

From Eterna Wiki

(Friday afternoon update)
(type=lab results not carried forward to new labs)
Line 14: Line 14:
</ol>
</ol>
<p>[[User:Omei|Omei]] ([[User talk:Omei|talk]]) 01:30, 28 September 2013 (UTC)</p>
<p>[[User:Omei|Omei]] ([[User talk:Omei|talk]]) 01:30, 28 September 2013 (UTC)</p>
<p>---</p>
<h3>type=lab: <strong>Doesn't return anything meaningful for labs in last synthesis round</strong></h3>
<p>Apparently Justin restored the behavior of the lab query for existing labs, but didn't cary that over to new labs.&nbsp; A query for a new lab returns</p>
<p><span style="font-family: courier new,courier;">{"data":{"lab":null,"comments":[],"supercomments":[],"num_synthesized":0,"follow":[],"num_slots":false,"sum_picks":null,"num_solutions":"0","my_votes":null,"uid":"57675"},"memcache":true}</span></p>
<p>So any existing scripts that use the lab query are still broken for new labs.&nbsp; I'll raise this issue with Justin.</p>
<p>[[User:Omei|Omei]] ([[User talk:Omei|talk]]) 18:14, 28 September 2013 (UTC)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong><br /></strong></p>

Revision as of 18:14, 28 September 2013

The intent for this page is to document the RESTful interface to the Eterna data.

 

For the moment,  this is focused on documenting the 9/26 changes that broke a bunch of existing scripts.

 

Update: Justin says he'll return the old API, to preserve compatibility with existing scripts.  Thanks, Justin!

Friday (5:50 PM PDT) update: My Data Mining Tool, which was broken by the change to the type=lab query, now works again.  But I think Justin was probably especially careful about fixing the queries it uses.  I advise anyone reading this to test any scripts they really care about, and if it is still broken, post here.  Please describe the query URL, and what about the JSON is missing.

Omei (talk) 01:30, 28 September 2013 (UTC)

---

type=past-labs: New fields are needed to access the thumbnail images (change)

I note two related changes here, but I wouldn't consider asking Justin t change it for my scripts.  They seem like a reasonable step in moving forward.

  1. The thumbnail images have been moved to Amazon's S3 service.  The thumbnails don't exist at their old location.  This breaks scripts that displayed the thumbnails, like my took that creates the list of past labs here on the wiki.  But moving them to Amazon seems good, so I'm just going to update that script.
  2. The format of the type=past-labs query (e.g. <a href="http://eterna.cmu.edu/get/?type=past_labs&skip=0&size=21">http://eterna.cmu.edu/get/?type=past_labs&skip=0&size=21</a> response has changed.  It may well be completely backward compatible; I'm not sure because I don't have a complete record of what it was.  But as it stands now, a solution has a field named "puzzles", which is an array of objects.  Each element of the array is an object which has a field also called "puzzles", which is also an array.  Each element of this array is a nid which seems to correspond to a secondary structure, because the query "https://s3.amazonaws.com/eterna/puzzle_mid_thumbnails/thumbnail<nid>.png" returns a thumbnail image of the target structure for that lab. I think this new level of indirection is there to support labs that allow sequences with differernt lengths and target structures. The reproducibility lab is one example, but I remember Rhiju talking about supporting this, long before the reproducibility lab came into being.

Omei (talk) 01:30, 28 September 2013 (UTC)

---

type=lab: Doesn't return anything meaningful for labs in last synthesis round

Apparently Justin restored the behavior of the lab query for existing labs, but didn't cary that over to new labs.  A query for a new lab returns

{"data":{"lab":null,"comments":[],"supercomments":[],"num_synthesized":0,"follow":[],"num_slots":false,"sum_picks":null,"num_solutions":"0","my_votes":null,"uid":"57675"},"memcache":true}

So any existing scripts that use the lab query are still broken for new labs.  I'll raise this issue with Justin.

Omei (talk) 18:14, 28 September 2013 (UTC)