Hi all!Is there anyone who know were to find specification for the Atom XML objects to use for different operations. What I done so far is to manage to upload a new document (I googled the solution).But how do I:- checkout- checkin - search- etc. Any help would be appreciated.This is the code for uploading a document to Alfresco using curl:
<?xml version='1.0' encoding='utf-8'?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:cmis='http://www.cmis.org/2008/05'>
<title>This is a document</title>
<summary>Summary….</summary>
<content type="text">this is some more data</content>
<cmis:object>
<cmis:properties>
<cmis:propertyString cmis:name='ObjectTypeId'>
<cmis:value>document</cmis:value>
</cmis:propertyString>
</cmis:properties>
</cmis:object>
</entry>
XML;
$url = "http://localhost:8080/alfresco/service/api/path/workspace/SpacesStore/Company%20Home/children";
$creds = "admin:admin";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
$curl_headers = array();
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/atom+xml;type=entry", "Authorization: Basic " . base64_encode($creds) ));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // ask for results to be returned
// Send to remote and return data to caller.
$result = curl_exec($ch);
curl_close($ch);