EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #10329
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Rest API permissions
- To: David R Newman <drn@ecs.soton.ac.uk>, "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] Rest API permissions
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- Date: Mon, 26 Jan 2026 17:10:00 +0000
|
CAUTION: This e-mail originated outside the University of Southampton.
Hi David!
Thank you for the information. I did notice this default setting:
$c->{public_roles} = [qw{
+eprint/archive/rest/get +subject/rest/get }];
In your answer, it wasn't clear, are these permissions necessary for OAI-PMH to harvesting to work correctly?
If I remove these permissions because I don't want public access to the API, will that break the OAI harvesting?
I guess I'm still a little confused if the public user needs this permission "eprint/archive/rest/get" and what would break if they didn't have it.
Tomasz
________________________________________________
Tomasz Neugebauer
Tel. / Tél. 514-848-2424 ext. / poste 7738
Mailing address / adresse postale: 1455 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8 library.concordia.ca
From: David R Newman <drn@ecs.soton.ac.uk>
Sent: January 26, 2026 11:56 AM To: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>; Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca> Subject: Re: [EP-tech] Rest API permissions Attention This email originates from outside the concordia.ca domain. // Ce courriel provient de l'extérieur du domaine de concordia.ca Hi Tomasz,
Read-only access is available to the REST API for public users. On the path /rest/. E.g. https://tryme.demo.eprints-hosting.org/rest/
lib/cfg.d/user_roles.pl defines that a public user can have GET (read-only) access to all subject data objects and all eprint records in the live archive. The configuration looks as follows:
$c->{public_roles} = [qw{
/rest/ also lists the user dataset but you need to authenticated to access the metadata for user data objects, albeit you can see what autoincrement user IDs exist.
The REST API allows you to get all the (XML) metadata for a eprint or subject data object or get the metadata for an individual field as either XML or plain text. Similarly, you can get metadata for the sub-data objects of an eprint, such as the document or file metadata.
I am not aware of crawlers or harvesters hitting this API (/rest/...) that much.
Beyond the API under /rest/ there is also a RESTful API that can be used through content negotiation using the URIs for data objects (e.g. https://tryme.demo.eprints-hosting.org/id/eprint/6 with and "Accept: application/vnd.eprints.data+xml". E.g.
curl --header "Accept: application/vnd.eprints.data+xml" https://tryme.demo.eprints-hosting.org/id/eprint/7
Similarly, although crawlers might request the above URL they are usually requesting text/html. Harvesters (such as OAI-PMH) uses this RESTful content-negotiation API to rpovide metadata and it can also be called by third-party applications to push data. E.g. the following can create an EPrint record using the XML stored in the local file at /home/eprints/eprint.xml:
Regards
David Newman
On 26/01/2026 15:57, Tomasz Neugebauer wrote:
|
- Follow-Ups:
- Re: [EP-tech] Rest API permissions
- From: David R Newman <drn@ecs.soton.ac.uk>
- Re: [EP-tech] Rest API permissions
- References:
- [EP-tech] Rest API permissions
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- Re: [EP-tech] Rest API permissions
- From: David R Newman <drn@ecs.soton.ac.uk>
- [EP-tech] Rest API permissions
- Prev by Date: Re: [EP-tech] Rest API permissions
- Next by Date: Re: [EP-tech] Rest API permissions
- Previous by thread: Re: [EP-tech] Rest API permissions
- Next by thread: Re: [EP-tech] Rest API permissions
- Index(es):
