fedora rest api

Showing 1-9 of 9 messages
fedora rest api Leandro Castro 5/18/12 5:49 AM
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!!!!
Re: fedora rest api Leandro Castro 5/18/12 3:32 PM
Hi!! Anybody knows something about this??? 

Thanks!!!

2012/5/18 Leandro Castro <castrol...@gmail.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!!!!

RE: [islandora] Re: fedora rest api Whitworth, Cliff 5/18/12 9:18 PM
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.
Re: [islandora] Re: fedora rest api Jonathan Green 5/19/12 6:26 AM
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

Re: [islandora] Re: fedora rest api Leandro Castro 5/19/12 10:35 AM
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>

Re: [islandora] Re: fedora rest api Jonathan Green 5/19/12 11:13 AM
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.
Re: [islandora] Re: fedora rest api Leandro Castro 5/19/12 11:16 AM
Thanks jonatrhan, i will try it and comment how everything goes!!!

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

Re: [islandora] Re: fedora rest api Mark McFate 2/8/13 9:12 AM
I'm looking at similar needs and just wondering how everything went?
Re: [islandora] Re: fedora rest api John 2/8/13 12:25 PM
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 

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.