API:EPrints/Apache/REST

From EPrints Documentation
Revision as of 15:48, 15 March 2023 by Pod2wiki (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Apache::REST - Representational state transfer

User Comments


DESCRIPTION

REST API for EPrints

User Comments


METHODS

User Comments


handler

$rc = EPrints::Apache::REST::handler( $r )

Handler for EPrints' REST API

User Comments


redir_add_slash

$rc = EPrints::Apache::REST::redir_add_slash( $repository )

Redirect to the current request for the $repository with an added slash / at the end of the path.

User Comments


serve_top_level

$rc = EPrints::Apache::REST::serve_top_level( $repository, @path )

Serve top level list of datasets (i.e. eprint, user and subject) or pass onto serve_dataset. dependent of @path.

User Comments


serve_dataset

$rc = EPrints::Apache::REST::serve_dataset( $repository, $dataset, @path )

Serve listing of data objects for a particular dataset, pass onto serve_dataobj, get_dataobj_xml or put_dataobj_xml or return an appropriate HTTP error code.

User Comments


serve_dataobj

$rc = EPrints::Apache::REST::serve_dataobj( $repository, $object, $rights_object, @path )

Serve HTML, XML or text version of data object from GET or PUT request. Pass onto serve_field or otherwise return an appropriate HTTP error code.

User Comments


serve_field

$rc = EPrints::Apache::REST::serve_field( $repository, $object, $rights_object, $field, $value, @path )

Serve HTML, XML or text version of data object from GET requests. Pass on field requests onto serve_field_single or otherwise return an appropriate HTTP error code.

User Comments


serve_field_single

$rc = EPrints::Apache::REST::serve_field_single( $repository, $object, $rights_object, $field, $value, @path )

Serve single field representation by passing onto serve_subobject, serve_compound or /serve_name base on type of field.

User Comments


serve_suboject

$rc = EPrints::Apache::REST::serve_suboject( $repository, $object, $rights_object, $field, $value, @path )

Serves sub-object by passing onto serve_dataobj.

User Comments


serve_compound

$rc = EPrints::Apache::REST::serve_compound( $repository, $object, $rights_object, $field, $value, @path )

Serves compound field by iterating over sub-field, calling serve_field_single where appropriate.

User Comments


serve_compound

$rc = EPrints::Apache::REST::serve_compound( $repository, $object, $rights_object, $field, $value, @path )

Serves name field.

User Comments


render_html

$rc = EPrints::Apache::REST::render_html( $html, $title )

Renders HTML for REST request.

User Comments


send_html

$rc = EPrints::Apache::REST::send_html( $repository, $html, $title )

Sends HTML response for REST request.

User Comments


send_xml

$rc = EPrints::Apache::REST::send_xml( $repository, $xmldata )

Sends XML response for REST request.

User Comments


send_plaintext

$rc = EPrints::Apache::REST::send_plaintext( $repository, $content )

Sends plain text response for REST request.

User Comments


allowed_methods

$allowed = EPrints::Apache::REST::allowed_methods( $repository, @methods )

Checks if method for request is contained with the @methods array of allowed methods. Setting and sending HTTP response headers and code as appropriate.

Returns boolean depending on whether the request method is allowed.

User Comments


allowed_methods

$allowed = EPrints::Apache::REST::allowed_methods( $priv $repository, $rights_object )

Checks is privilege $priv is permitted for the current user and sets HTTP response code as appropriate.

Returns boolean depending on whether current user has permitted privilege.

User Comments


get_dataobj_xml

$rc = EPrints::Apache::REST::get_dataobj_xml( $repository, $object, $rights_object )

Returns XML for REST request to GET a data object.

User Comments


put_dataobj_xml

$rc = EPrints::Apache::REST::put_dataobj_xml( $repository, $object, $rights_object )

Returns XML for REST request to (non-implemented) PUT a data object.

User Comments


get_field_text

$rc = EPrints::Apache::REST::get_field_text( $repository, $object, $rights_object, $field )

Returns text for REST request to GET a field.

User Comments


get_field_xml

$rc = EPrints::Apache::REST::get_field_xml( $repository, $object, $rights_object, $field )

Returns XML for REST request to GET a field.

User Comments


put_field_xml

$rc = EPrints::Apache::REST::put_field_xml( $repository, $object, $rights_object, $field )

Returns XML for REST request to PUT a field.

User Comments


put_field_txt

$rc = EPrints::Apache::REST::put_field_txt( $repository, $object, $rights_object, $field )

Returns text for REST request to PUT a field.

User Comments


COPYRIGHT

© Copyright 2023 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE

This file is part of EPrints 3.4 http://www.eprints.org/.

EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.

EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.

User Comments