tag:help-archives.hannonhill.com,2010-02-09:/discussions/web-services/252-adding-a-configuration-to-a-config-setCascade CMS: Discussion 2018-10-18T20:36:40Ztag:help-archives.hannonhill.com,2010-02-09:Comment/197813102012-10-18T16:09:31Z2012-10-18T17:34:26ZAdding a Configuration to a Config Set (Web Services)<div><p>Do I also need <code>'roleType' => 'site',</code> and
<code>'siteAbilities' => 'editPageLevelConfigurations'</code>
(or something)? They also don't allow it to work.</p>
<p>I see in the XML reference it refers to <code><!-- complex
type wrapping a list of page configurations --><complexType
name="page-configurations"></code>. This is in addition to
<code>pageConfigurationSet</code> (the parent asset I'm trying to
add the new config to) and <code>pageConfiguration</code> (the
thing I'm trying to add). Do I need to use
<code>page-configurations</code> somehow? If so, how? Thanks!</p></div>thugsbtag:help-archives.hannonhill.com,2010-02-09:Comment/197813102012-10-18T17:32:01Z2012-10-18T17:35:20ZAdding a Configuration to a Config Set (Web Services)<div><p>Can the Web Services AssetOperationService only create these
asset-types: <code>workflowConfiguration, feedBlock, indexBlock,
textBlock, xhtmlDataDefinitionBlock, xmlBlock, file, folder, page,
reference, xsltFormat, scriptFormat</code>? (They are the listed
types in the error that's being thrown).</p>
<p>Also, I should probably clarify: the ID for the
<code>parentContainerId</code> given is the ID of the
<code>pageConfigurationSet</code>.</p></div>thugsbtag:help-archives.hannonhill.com,2010-02-09:Comment/197813102012-10-18T17:59:21Z2012-10-18T17:59:21ZAdding a Configuration to a Config Set (Web Services)<div><p>Hi,</p>
<p>If the Configuration Set already exists, I think your best bet
would be to read the existing Configuration Set
<strong>cd6e45fd7f00000101f92de5d6fabf90</strong>, rebuild the
array, and pass it into the edit operation.</p>
<p>So you would rebuild a Configuration Set array based on the read
and append the new Configuration to it's
<strong>pageConfigurations</strong> sub-array. Then you would pass
this new re-build array it into the <code>edit()</code> operation
to update the existing Configuration Set. If the Configuration Set
does not exist, then you would need to build it from scratch.</p>
<p>Note: if you wish to "pre-fill" the template regions as well,
you would use the <strong>pageRegions</strong> element.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/197813102012-10-18T18:21:21Z2012-10-18T18:21:44ZAdding a Configuration to a Config Set (Web Services)<div><p>OK, thanks, I'll have a go tomorrow and close this if it works.
Will an ID for the new configuration be automatically created?</p></div>thugsbtag:help-archives.hannonhill.com,2010-02-09:Comment/197813102012-10-18T18:26:46Z2012-10-18T18:26:46ZAdding a Configuration to a Config Set (Web Services)<div><p>Good luck, let us know if you have any questions.</p>
<blockquote>
<p>Will an ID for the new configuration be automatically
created?</p>
</blockquote>
<p>Correct, the configuration ID is generated automatically when it
is added to the configuration set through the edit operation.</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/197813102012-10-22T17:28:39Z2012-10-22T17:29:16ZAdding a Configuration to a Config Set (Web Services)<div><p>Yep, edit worked perfectly, using this:</p>
<pre>
<code> $newConf = new stdClass();
$newConf->name = 'MobileIA';
$newConf->templateId = 'a4a773567f00000229bbbce6260f114b';
$newConf->outputExtension = '-ia.html';
$newConf->serializationType = 'HTML';
$newConf->publishable = '1';
$newConf->defaultConfiguration = '';
array_push($asset['pageConfigurations']->pageConfiguration, $newConf);</code>
</pre></div>thugsb