Service: zimbraAdmin

Command: GetCreateObjectAttrs
Namespace: urn:zimbraAdmin
Description: Returns attributes, with defaults and constraints if any, that can be set by the authed admin when an object is created.
GetCreateObjectAttrsRequest returns the equivalent of setAttrs portion of GetEffectiveRightsResponse.
GetCreateObjectAttrsRequest is needed becasue GetEffectiveRightsRequest requires a target, but when we are creating a object, the target object does not exist yet.

The result can help the admin console decide on what tabs/attributes to display for creating objects.
e.g. 1. Creating an account:
 <GetCreateObjectAttrsRequest>
   <target type="account"/>
   <domain by="name">test.com</domain>
   <cos by="name">standard</cos>
 </GetCreateObjectAttrsRequest>
 
 <GetCreateObjectAttrsResponse>
     <setAttrs>
           <a n="zimbraMailQuota"/>
               <constraint>
                   <min>1</min>
                   <max>3</max>
               </constraint>
               <default>
                   <v>2</v>
               </default>
           <a n="zimbraMailStatus"/>
           <a n="zimbraFeatureCalendarEnabled"/>
           ...
     </setAttrs>
 </GetCreateObjectAttrsResponse>
 
e.g. 2. Creating a server:
 <GetCreateObjectAttrsRequest>
   <target type="server"/>
 </GetCreateObjectAttrsRequest>
 
 <GetCreateObjectAttrsResponse>
     <target type="server"/>
     <setAttrs>
           <a n="zimbraLmtpExposeVersionOnBanner"/>
           <a n="zimbraXMPPServerDialbackKey"/>
           <a n="zimbraReverseProxyImapEnabledCapability"/>
               <constraint>
                   <values>
                       <v>IMAP4rev1</v>
                       <v>BINARY</v>
                   </values>
               </constraint>
           ...
     </setAttrs>
 </GetCreateObjectAttrsResponse>
 
Properties:
Authorization token required true
Admin Authorization token required true

GetCreateObjectAttrsRequest

    <GetCreateObjectAttrsRequest> ## GetCreateObjectAttrsRequest
        <target type="{target-type}">{value}</target> ## TargetWithType
        <domain [by="{domain-selector-by} (id | name | virtualHostname | krb5Realm | foreignName)"]>{key}</domain> ## DomainSelector
        <cos [by="{cos-selector-by} (id | name)"]>{key}</cos> ## CosSelector
    </GetCreateObjectAttrsRequest>

elements and attributes you can define within a <GetCreateObjectAttrsRequest> element:

XPath Required / Optional Description
/target Required (only 1) Type: {value}
Target
Description for element text content:Value matching {target-type} if this is part of a response (otherwise blank)
/target@type Required (only 1) Type: String
Target type
/domain Optional (0 or 1) Type: {key}
Domain
required if {target-type} is account/calresource/dl/domain, ignored otherwise.
  • if {target-type} is account/calresource/dl: this is the domain in which the object will be in. the domain can be speciffied by id or by name
  • if {target-type} is domain, it is the domain name to be created. e.g. to create a subdomain named foo.bar.test.com, should pass in <domain by="name">foo.bar.test.com</domain>.

Description for element text content:The key used to identify the domain. Meaning determined by {domain-selector-by}
/domain@by Optional (0 or 1) Type: id | name | virtualHostname | krb5Realm | foreignName
Select the meaning of {domain-selector-key}
/cos Optional (0 or 1) Type: {key}
COS
Optional if {target-type} is account/calresource, ignored otherwise
If missing, default cos of the domain will be used
Description for element text content:The key used to identify the COS. Meaning determined by {cos-selector-by}
/cos@by Optional (0 or 1) Type: id | name
Select the meaning of {cos-selector-key}

GetCreateObjectAttrsResponse

    <GetCreateObjectAttrsResponse> ## GetCreateObjectAttrsResponse
        <setAttrs [all="{all-attrs-accessible} (0|1)"]> ## EffectiveAttrsInfo
            (<a n="{attribute-name}"> ## EffectiveAttrInfo
                <constraint> ## ConstraintInfo
                    <min>{min} (String)</min>
                    <max>{max} (String)</max>
                    <values>
                        (<v>{values} (String)</v>)*
                    </values>
                 </constraint>
                <default>
                    (<v>{values} (String)</v>)*
                </default>
              </a>)*
        </setAttrs>
    </GetCreateObjectAttrsResponse>

elements and attributes you can define within a <GetCreateObjectAttrsResponse> element:

XPath Required / Optional Description
/setAttrs Required (only 1) Set attributes
/setAttrs@all Optional (0 or 1) Type: 0|1
Flags whether all attributes on the target entry are accessible.
if set, no <a> elements will appear under the <setAttrs>/<getAttrs>
/setAttrs/a Optional (0 or more) Attributes
/setAttrs/a@n Required (only 1) Type: String
Attribute name
/setAttrs/a/constraint Optional (0 or 1) Constraint information
/setAttrs/a/constraint/min Optional (0 or 1) Type: {min} (String)
Minimum value
/setAttrs/a/constraint/max Optional (0 or 1) Type: {max} (String)
Maximum value
/setAttrs/a/constraint/values Required (only 1)
/setAttrs/a/constraint/values/v Optional (0 or more) Type: {values} (String)
/setAttrs/a/default Required (only 1)
/setAttrs/a/default/v Optional (0 or more) Type: {values} (String)