|
|
Line 662: |
Line 662: |
| === Fetch an Older Version of a Particular Media Record === | | === Fetch an Older Version of a Particular Media Record === |
|
| |
|
| Consider an iDigBio Media Record "idigbio:uuid" : "ff5fd841-6bc6-4241-80d3-def7e1b6d5e8" with multiple revisions of the record. The API shows that the current version of this particular record is version 1. | | Consider an iDigBio Media Record "idigbio:uuid" : "ff5fd841-6bc6-4241-80d3-def7e1b6d5e8" that has been updated over time so there are multiple revisions of the record. The API shows that the current version of this particular record is version 1. |
|
| |
|
| <pre> | | <pre> |
Line 669: |
Line 669: |
| </pre> | | </pre> |
|
| |
|
| We would like to look at the previous version (version 0) to see what has changed. We do this by adding <code>?version=0</code> as a parameter to the URL. | | We would like to look at the previous version (version 0) to see what has changed. Version 0 of a record is considered the "original" version of a record. We do this by adding <code>?version=0</code> as a parameter to the URL. |
|
| |
|
| <pre> | | <pre> |
| $ curl -s http://api.idigbio.org/v1/mediarecords/ff5fd841-6bc6-4241-80d3-def7e1b6d5e8?version=0 | json_pp
| | curl -s http://api.idigbio.org/v1/mediarecords/ff5fd841-6bc6-4241-80d3-def7e1b6d5e8?version=0 | json_pp | grep version |
| {
| |
| "idigbio:uuid" : "ff5fd841-6bc6-4241-80d3-def7e1b6d5e8",
| |
| "idigbio:etag" : "0a9effd5fc2803e87e4236e03a33ba3d00c3b305",
| |
| "idigbio:links" : {
| |
| "owner" : [
| |
| "872733a2-67a3-4c54-aa76-862735a5f334"
| |
| ],
| |
| "record" : [
| |
| "http://api.idigbio.org/v1/records/aebc99d6-3ba8-4d55-9434-83364b98d9b6"
| |
| ],
| |
| "recordset" : [
| |
| "http://api.idigbio.org/v1/recordsets/e70af26a-fb9e-43ab-96a0-d62a2df37e6d"
| |
| ]
| |
| },
| |
| "idigbio:version" : "0", | | "idigbio:version" : "0", |
| "idigbio:createdBy" : "872733a2-67a3-4c54-aa76-862735a5f334",
| |
| "idigbio:recordIds" : [
| |
| "e70af26a-fb9e-43ab-96a0-d62a2df37e6d\\media\\urn:catalog:UConn:CONN:Image:CONN00175018"
| |
| ],
| |
| "idigbio:dateModified" : "2014-03-05T23:38:31.326Z",
| |
| "idigbio:data" : {
| |
| "ac:licenseLogoURL" : "http://mirrors.creativecommons.org/presskit/buttons/80x15/png/by-nc-sa.png",
| |
| "ac:metadataLanguage" : "eng",
| |
| "dwc:occurrenceID" : "urn:catalog:UConn:CONN:CONN00175018",
| |
| "xmpRights:WebStatement" : "http://creativecommons.org/licenses/by-nc-sa/4.0/",
| |
| "ac:bestQualityAccessURI" : "http://bgbaseserver.eeb.uconn.edu/DATABASEIMAGES/CONN00175018.JPG",
| |
| "ac:bestQualityFormat" : "image/jpeg",
| |
| "dcterms:creator" : "CONN",
| |
| "dcterms:type" : "StillImage",
| |
| "xmpRights:Owner" : "G. S. Torrey Herbarium, University of Connecticut",
| |
| "dcterms:rights" : "© 2003 University of Connecticut",
| |
| "dcterms:title" : "specimen image",
| |
| "dcterms:identifier" : "urn:catalog:UConn:CONN:Image:CONN00175018"
| |
| }
| |
| }
| |
| </pre> | | </pre> |
| | |
| | The "version" parameter is available for any endpoint that returns a full entity record. |
|
| |
|
| === Fetch a list of five MediaRecord IDs === | | === Fetch a list of five MediaRecord IDs === |