IDigBio API v1 Specification: Difference between revisions

Line 1,079: Line 1,079:


;Description
;Description
:Returns a colleciton of mediarecord IDs that belong to the recordset of the specified entity ID
:Returns a list of mediarecord IDs that belong to the particular recordset of the specified iDigBio UUID


;Resource URL
;Resource URL
Line 1,089: Line 1,089:
;Optional Parameters
;Optional Parameters


* something goes here
{| class="wikitable" style="background-color: #ffffcc;" width="100%"
!parameter
!valid values
!detailed description
|-
|limit
|0, 1, 2, 10, ..., 100, ..., 1000, ..., n
|Controls the number of entities returned by a collection url. Large values may cause HTTP requests to time out. Recommended values are from 1 to 1000.
|-
|offset
|0, 1, 2, ... 100, ..., 1000, ..., n
|Controls the starting entity offset for paging through the API. Large offsets, greater than 1000000 (1 million) are extremely inefficient, so combinations of small limits and large offsets may cause requests to fail.
|}


;Sample Usage
;Sample Usage
Return a list with a single mediarecord that belongs to a particular recordset.


<pre>
<pre>
# CURL SOMETHING
$ curl -s http://api.idigbio.org/v1/recordsets/7a8d946d-083f-4d2a-9cc9-cd590398194f/mediarecords?limit=1 | json_pp
{
  "idigbio:errors" : [],
  "idigbio:links" : {
      "idigbio:nextPage" : "http://api.idigbio.org/v1/recordsets/7a8d946d-083f-4d2a-9cc9-cd590398194f/mediarecords?limit=1&offset=1"
  },
  "idigbio:items" : [
      {
        "idigbio:links" : {
            "mediarecord" : "http://api.idigbio.org/v1/mediarecords/0002429e-28a5-46ee-8bce-c4a7bc3870d9"
        },
        "idigbio:uuid" : "0002429e-28a5-46ee-8bce-c4a7bc3870d9"
      }
  ],
  "idigbio:itemCount" : "14897"
}
 
</pre>
</pre>


1,554

edits