1,554
edits
(add paging →GET /v1/recordsets/{UUID}/records) |
(add content →GET /v1/recordsets/{UUID}/records) |
||
Line 1,031: | Line 1,031: | ||
;Optional Parameters | ;Optional Parameters | ||
{| 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, ... 1000, ..., 10000, ..., 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 record item that belongs to the recordset of the specified iDigBio UUID: | |||
<pre> | <pre> | ||
$ curl -s http://api.idigbio.org/v1/recordsets/7a8d946d-083f-4d2a-9cc9-cd590398194f/records?limit=1 | json_pp | |||
{ | |||
"idigbio:errors" : [], | |||
"idigbio:links" : { | |||
"idigbio:nextPage" : "http://api.idigbio.org/v1/recordsets/7a8d946d-083f-4d2a-9cc9-cd590398194f/records?limit=1&offset=1" | |||
}, | |||
"idigbio:items" : [ | |||
{ | |||
"idigbio:links" : { | |||
"record" : "http://api.idigbio.org/v1/records/0002b73f-9c48-477f-b90e-13c86733f1ab" | |||
}, | |||
"idigbio:uuid" : "0002b73f-9c48-477f-b90e-13c86733f1ab" | |||
} | |||
], | |||
"idigbio:itemCount" : "18889" | |||
} | |||
</pre> | </pre> | ||
edits