Updating many properties with the PHP client

Another query, as we're moving documents from one system to another, we need to set up lots of metadatas when a document gets uploaded/updated. According to the PHP Automation client, I believe I can set a single property (such as dc:title or dc:description) at a time by running following command…

$answer = $session->newRequest(“Document.SetProperty”)->set('input', 'doc:' . $path)->set('params', 'value', “New Title”)->set('params', 'xpath', “dc:title”)->sendRequest();

But the problem is that I need to run above command for every single property. So if I'm setting up 8 different properties for a document, I need to run the above command 8 times.

Is it possible to pass an associative array that sets up all the necessary properties in one go?

0 votes

1 answers



I belive that's what the 'Document.Update' request is for :


->set('input', 'doc:' . $newPath)
->set('params', 'properties', "dc:title=The Document Title

dc:description=foo bar”)


in this example it set the title and the description at once. ( note that the new line between the two properties is important )

0 votes

LOL -> the forum doesn't show new lines so you don't see it, but there should be one ;)