tag:help-archives.hannonhill.com,2010-02-09:/discussions/web-services/1531-publishing-destinations-via-scriptCascade CMS: Discussion 2018-10-18T20:37:38Ztag:help-archives.hannonhill.com,2010-02-09:Comment/375548722015-08-04T00:15:11Z2015-08-04T12:29:03ZPublishing destinations via script<div><p>Hi,</p>
<p>The <code>destinations</code> property should point to an array
of <code>stdClass</code> (<code>identifier</code>) objects, or to
an array of arrays (containing <code>type</code> and
<code>path</code>), not to a simple array.</p>
<pre>
<complexType name="destination-list">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="destination" type="impl:identifier"/>
</sequence>
</complexType>
</pre>
<p>Wing</p></div>Wing Ming Chantag:help-archives.hannonhill.com,2010-02-09:Comment/375548722015-08-04T14:58:12Z2015-08-04T14:58:12ZPublishing destinations via script<div><p>Can you show me what that would look like for the PHP code above
please?</p></div>thugsbtag:help-archives.hannonhill.com,2010-02-09:Comment/375548722015-08-04T15:02:01Z2015-08-04T15:04:32ZPublishing destinations via script<div><p>I don't work with raw code any more. Therefore, I have not
tested the code. But try the following:<br></p>
<pre>
$publish = $client->publish ( array (
'authentication' => $auth,
'publishInformation' => array(
'identifier' => array(
'type' => 'page',
'id' => $asset["id"] ),
'destinations' => array(
array(
'type' => 'destination',
'path' => array(
'path' => 'name-of-destination',
'siteId' => $asset["siteId"] ) ) ),
'unpublish' => false )
)
);
</pre>
<p>In case you have not looked at my library, you might want to
check it out.</p>
<p>Wing</p></div>Wing Ming Chantag:help-archives.hannonhill.com,2010-02-09:Comment/375548722015-08-04T15:08:41Z2015-08-04T15:08:41ZPublishing destinations via script<div><p>That works, thanks!</p></div>thugsb