(imported topic written by ewiborg)
I’m trying to create a custom site using the API. Here is the XML I post to /api/sites:
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
<CustomSite>
<Name>ACME</Name>
<Description></Description>
<Domain>BESC</Domain>
<GlobalReadPermission>false</GlobalReadPermission>
<Subscription>
<Mode>Custom</Mode>
<CustomGroup>
<SearchComponentPropertyReference PropertyName="Customer" Comparison="Equals">
<SearchText>ACME</SearchText>
<Relevance>exists (value of setting "Customer" of client) whose (it as string as lowercase = "ACME" as lowercase)</Relevance>
</SearchComponentPropertyReference>
</CustomGroup>
</Subscription>
</CustomSite>
</BES>
which is exactly the API-returned XML of a manually created site with the subscription criteria I want. The property “Customer” exists.
After posting, the site is created but has the message
This group contains references to groups and/or retrieved properties that did not exist at the time the group was last modified, but do exist now. The following references are not currently included in the group definition, but can be automatically resolved. To automatically resolve the references, please edit this group.
and the “Save changes” button is active. Clicking that button makes the site behave as expected.
What am I doing wrong? Is there a way to perform the same action as the “Save changes” button via the API?