Join GitHub today
Based on DSpace Rest API plugin, Revision 73
Authentication by email and password
email (string) : email registered at dspace
password (string) : password registered at dspace
Authentication by public and private api keys via digest.
api_key (string) : your public api key
api_digest (string) : api digest generated as described below
You can register one or more api_keys using api interface at /api_keys. Then you have to use SHA1 algorithm to generate api digest out of url’s path and your private key. You need first 8 characters of the digest. Url request will be authorized by your public key and generated api digest. Example below describes how to generate a digest in Ruby
require 'digest' # if url is http://example.org/rest/communities/14.xml?idOnly=true # public key is 12345678 # private key is 1234567890abcdef # concatenate path (without parameters and host name) with private key # use SHA1 algorithm to get hexdigest of the string. # take first 8 characters of the resulting string. digest = Digest::SHA1.hexdigest('/rest/communities/14.xml' + '1234567890abcdef')[0..7] # digest should be "596f9b32"
Final url would look like:
Other common parameters
When searching for entities in a list, the following parameters are handled specially in the system (note that all the RoR conventions are followed for sorting/paging):
_start (number): the position of the first entity to return (0 is the first), e.g. _start=5
_page (number): the page of data to display (0 is first), e.g. _page=2
_perpage (number): the number of entities to return for the page (0 means all), e.g. _perpage=20
_limit (number): the maximum number of entities to return (0 means all), e.g. _limit=50
_order (string): the sort order to return entities in (default is ascending), should be a comma separated list of entity field names which optionally include a suffix to determine order, suffix can be _reverse or _desc for descending order OR ’’ (blank) or _asc for ascending order, e.g. _order=name OR order=namereverse OR order=name,email_desc,firstname_asc,lastnamereverse
_sort (string): same as order
Please note that there are different fields supported for ordering accross entities. For information about supported options for specific entity, please consult related description page.
Returns info on requested bitstream, with xml extension, or downloads bitstream file if no extension is given.
#returns metadata /rest/bitstream/1.xml #returns bitsream itself with file data in the header /rest/bitstream/1
Returns list of collections
Returns list of communities
Returns items created/modified within specified time range
Returns list of items