Difference between revisions of "API:EPrints/Apache/REST"
(Created page with "<!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment'...") |
|||
Line 117: | Line 117: | ||
$rc = EPrints::Apache::REST::serve_field_single( $repository, $object, $rights_object, $field, $value, @path ) | $rc = EPrints::Apache::REST::serve_field_single( $repository, $object, $rights_object, $field, $value, @path ) | ||
− | Servee single field representation by passing onto '''EPrints::Apache::REST::serve_subobject''', '''EPrints::Apache::REST:: | + | Servee single field representation by passing onto '''EPrints::Apache::REST::serve_subobject''', '''EPrints::Apache::REST::serve_compound''' or '''EPrints::Apache::REST::serve_name''' base on type of field. |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 143: | Line 143: | ||
$rc = EPrints::Apache::REST::serve_compound( $repository, $object, $rights_object, $field, $value, @path ) | $rc = EPrints::Apache::REST::serve_compound( $repository, $object, $rights_object, $field, $value, @path ) | ||
− | Serves compound field by iterating over sub-field, calling '''EPrints::Apache::REST::serve_field_single | + | Serves compound field by iterating over sub-field, calling '''EPrints::Apache::REST::serve_field_single''' where appropriate. |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
Revision as of 21:37, 14 December 2021
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
- 1 NAME
- 2 DESCRIPTION
- 3 METHODS
- 3.1 handler
- 3.2 redir_add_slash
- 3.3 serve_top_level
- 3.4 serve_dataset
- 3.5 serve_dataobj
- 3.6 serve_field
- 3.7 serve_field_single
- 3.8 serve_suboject
- 3.9 serve_compound
- 3.10 serve_compound
- 3.11 render_html
- 3.12 send_html
- 3.13 send_html
- 3.14 send_html
- 3.15 allowed_methods
- 3.16 allowed_methods
- 3.17 get_dataobj_xml
- 3.18 put_dataobj_xml
- 3.19 get_field_text
- 3.20 get_field_xml
- 3.21 put_field_xml
- 3.22 put_field_txt
- 4 COPYRIGHT
NAME
EPrints::Apache::REST - Representational state transfer
DESCRIPTION
REST API for EPrints
METHODS
handler
$rc = EPrints::Apache::REST::handler( $r )
Handler for EPrints' REST API
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.
serve_top_level
$rc = EPrints::Apache::Login::serve_top_level( $repository, @path )
Serve top level list of datasets (i.e. eprint, user and subject) or pass onto EPrints::Apache::Login::serve_datasets. dependent of @path.
serve_dataset
$rc = EPrints::Apache::REST::serve_dataset( $repository, $dataset, @path )
Serve listing of data objects for a particular dataset, pass onto EPrints::Apache::Login::serve_dataobj, EPrints::Apache::Login::get_dataobj_xml or EPrints::Apache::Login::put_dataobj_xml,or return an appropriate HTTP error code.
serve_dataobj
$rc = EPrints::Apache::REST::serve_dataobj( $repository, $object, $rights_object, @path )
Servee HTML, XML or text version of data object from GET or PUT request, pass onto EPrints::Apache::REST::serve_field or otherwise return an appropriate HTTP error code.
serve_field
$rc = EPrints::Apache::REST::serve_field( $repository, $object, $rights_object, $field, $value, @path )
Servee HTML, XML or text version of data object from GET requests passsingel field requests onto EPrints::Apache::REST::serve_field_single or otherwise return an appropriate HTTP error code.
serve_field_single
$rc = EPrints::Apache::REST::serve_field_single( $repository, $object, $rights_object, $field, $value, @path )
Servee single field representation by passing onto EPrints::Apache::REST::serve_subobject, EPrints::Apache::REST::serve_compound or EPrints::Apache::REST::serve_name base on type of field.
serve_suboject
$rc = EPrints::Apache::REST::serve_suboject( $repository, $object, $rights_object, $field, $value, @path )
Serves sub-object by passing onto EPrints::Apache::REST::serve_dataobj.
serve_compound
$rc = EPrints::Apache::REST::serve_compound( $repository, $object, $rights_object, $field, $value, @path )
Serves compound field by iterating over sub-field, calling EPrints::Apache::REST::serve_field_single where appropriate.
serve_compound
$rc = EPrints::Apache::REST::serve_compound( $repository, $object, $rights_object, $field, $value, @path )
Serves name field.
render_html
$rc = EPrints::Apache::REST::render_html( $html, $title )
Renders HTML for REST request.
send_html
$rc = EPrints::Apache::REST::send_html( $repository, $html, $title )
Sends HTML response for REST request.
send_html
$rc = EPrints::Apache::REST::send_html( $repository, $xmldata )
Sends XML response for REST request.
send_html
$rc = EPrints::Apache::REST::send_html( $repository, $content )
Sends plaintext response for REST request.
allowed_methods
$allowed = EPrints::Apache::REST::allowed_methods( $repository, @methods )
Checks if method for eequest 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.
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.
get_dataobj_xml
$rc = EPrints::Apache::REST::get_dataobj_xml( $repository, $object, $rights_object )
Returns XML ot REST request to get a data object.
put_dataobj_xml
$rc = EPrints::Apache::REST::put_dataobj_xml( $repository, $object, $rights_object )
Returns XML to REST request to (non-implemented) put data object.
get_field_text
$rc = EPrints::Apache::REST::get_field_text( $repository, $object, $rights_object, $field )
Returns text to to REST request to get field.
get_field_xml
$rc = EPrints::Apache::REST::get_field_xml( $repository, $object, $rights_object, $field )
Returns XML for REST request for a field.
put_field_xml
$rc = EPrints::Apache::REST::put_field_xml( $repository, $object, $rights_object, $field )
Returns XML for REST request to put a field.
put_field_txt
$rc = EPrints::Apache::REST::put_field_txt( $repository, $object, $rights_object, $field )
Returns text for REST request to put a field.
COPYRIGHT
© Copyright 2000-2024 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/.