fedora rest api

151 views
Skip to first unread message

Leandro Castro

unread,
May 18, 2012, 8:49:17 AM5/18/12
to isla...@googlegroups.com
Hi, I have a doubt: in islandora is factible to buil a web service using the fedora rest api???( https://wiki.duraspace.org/display/FEDORA34/REST+API )

Thanks!!!!

Leandro Castro

unread,
May 18, 2012, 6:32:01 PM5/18/12
to isla...@googlegroups.com
Hi!! Anybody knows something about this??? 

Thanks!!!

2012/5/18 Leandro Castro <castrol...@gmail.com>

Whitworth, Cliff

unread,
May 19, 2012, 12:18:33 AM5/19/12
to isla...@googlegroups.com
Hi Leandro,

Not sure what you are asking but maybe some of this can help? Have you seen https://github.com/alxp/islandora/blob/master/api/fedora_item.inc - function add_datastream_from_url ?

Here is some php borrowed from Paul and others,

function ingestXML($xml){
//if tidy is available
  $config = array(
           'clean' => true,
           'bare' => true,
           'input-xml' => true,
           'output-xml'   => true);
  $tidy = new tidy();
  $tidy->parseString($xml, $config, 'utf8');
  $tidy->cleanRepair();
  $xml = tidy_get_output($tidy);
  //$xml = utf8_encode(str_replace("�", "", $xml));//spiders live where they want
  //http://www.fileformat.info/info/unicode/char/fffd/index.htm
 
  $url = 'http://localhost:8080/fedora/services/management?wsdl';
  $foxml = new DOMDocument();
  $foxml->loadXML($xml);
  $params = array('objectXML' => $foxml->saveXML(), 'format' => "info:fedora/fedora-system:FOXML-1.1", 'logMessage'=>"Fedora Object Ingested");
  $client = new SoapClient($url, array (
                      'login' => 'fedoraAdmin',
                      'password' => 'fedoraAdmin'
  ));
  try {
    $client->__soapCall('ingest', array ('parameters' => $params));
  }catch (Exception $e){
    echo 'Caught exception: ',  $e->getMessage(), "\n";
  }   
echo '<pre>',print_r($params),'</pre>';   
}

some pages that may help
//https://wiki.duraspace.org/display/FCKB/mail/8753405 
//http://fedora-commons.org/documentation/3.0/userdocs/client/servlet/soapclient/index.html
//http://www.fedora-commons.org/documentation/3.0/userdocs/server/webservices/apia/index.html
//http://www.fedora-commons.org/documentation/3.0/userdocs/server/webservices/apim/index.html
//http://search.cpan.org/~dfielding/FedoraCommons-APIA-0.5/lib/FedoraCommons/APIA.pm
//http://search.cpan.org/~dfielding/FedoraCommons-APIM-0.6/lib/FedoraCommons/APIM.pm

best,


From: isla...@googlegroups.com [isla...@googlegroups.com] on behalf of Leandro Castro [castrol...@gmail.com]
Sent: Friday, May 18, 2012 5:32 PM
To: isla...@googlegroups.com
Subject: [islandora] Re: fedora rest api

--
You received this message because you are subscribed to the Google Groups "islandora" group.
To post to this group, send email to isla...@googlegroups.com.
To unsubscribe from this group, send email to islandora+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/islandora?hl=en.

Jonathan Green

unread,
May 19, 2012, 9:26:09 AM5/19/12
to isla...@googlegroups.com
Currently the Drupal 6 version of islandora primarily uses the Fedora SOAP API to access Fedora. The Drupal 7 version will use REST. If you would like to access Fedora using the REST API from PHP the API we have developed for the Drupal 7 version of Islandora should help:
https://github.com/Islandora/tuque
--
Jonathan Green
DiscoveryGarden Inc. 
Sims Office Suites Building, 3rd Floor, 118 Sydney Street 
Charlottetown, PE C1A 1G4 
902.367.3851 discoverygarden.ca 
jona...@discoverygarden.ca
skype: jonathan.edwards.green

Leandro Castro

unread,
May 19, 2012, 1:35:48 PM5/19/12
to isla...@googlegroups.com
Thanks both two, I have a question Jonathan: With drupal 6 version can i use Fedora Rest API???

2012/5/19 Jonathan Green <jona...@discoverygarden.ca>

Jonathan Green

unread,
May 19, 2012, 2:13:19 PM5/19/12
to isla...@googlegroups.com
If you are writing your own code you can access the Fedora REST API, you can do so using the PHP api I pointed you to if you would like to.

Leandro Castro

unread,
May 19, 2012, 2:16:46 PM5/19/12
to isla...@googlegroups.com
Thanks jonatrhan, i will try it and comment how everything goes!!!

2012/5/19 Jonathan Green <jona...@discoverygarden.ca>

jy

unread,
Feb 8, 2013, 3:25:55 PM2/8/13
to isla...@googlegroups.com
I used the Jonathan's tuque api to write a few back end server scripts and it went really well.  I used the documentation here: https://github.com/Islandora/islandora/wiki/Build,-Access,-Modify-and-Delete-Fedora-objects-with-theTuque-interface .

I have a simple script that reindexes a collection on my github https://github.com/jyobb .  I'll have a couple more scripts up there soon.

John 

On Fri, Feb 8, 2013 at 11:12 AM, Mark McFate <summitt...@gmail.com> wrote:
I'm looking at similar needs and just wondering how everything went?
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages