Skip to main content
Feedback

Create Model

The Create Model operation requests creation of a draft version of a model in a specified account accessible to the authenticated user

To perform this operation, send an HTTP POST request to:

https://api.boomi.com/mdm/api/rest/v1/<accountID>/models

note

This operation requires the authenticating user to have the MDM - Edit Models privilege in addition to the API Access privilege.

You can implement requests for this operation in processes using the HTTP Client connector.

The body of the request must conform with the following structure:

<mdm:CreateModelRequest xmlns:mdm="http://mdm.api.platform.boomi.com/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</mdm:CreateModelRequest>

where the content of <mdm:CreateModelRequest> defines how to create the XML representation of the model.

note

You have the option to apply data masking attributes to model fields. To see masked data, the user needs either the MDM - Reveal Masked Data privilege or the Reveal Masked Data entitlement. Read Setting up user accounts and access to learn more.

When masked fields use the ALL mask type, the masked field value shows as five asteriks to hide the actual character length of the value. Review the MDM:fields element structure to learn how to add a data masking attribute to a field's xml request body.

Path parameters

accountID
ID of the account

Request body example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mdm:CreateModelRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mdm="http://mdm.api.platform.boomi.com/">
<mdm:name>employer</mdm:name>
<mdm:fields>
<mdm:field name="employer" repeatable="false" required="false" type="STRING" uniqueId="EMPLOYER" maxLength="100"/>
<mdm:field name="name" repeatable="false" required="false" type="STRING" uniqueId="NAME" maxLength="100"/>
<mdm:field name="isEmployed" repeatable="false" required="false" type="BOOLEAN" uniqueId="ISEMPLOYED" maxLength="100" masked="ALL"/>
<mdm:field name="email" repeatable="false" required="false" type="STRING" uniqueId="EMAIL" maxLength="100" masked="ALL"/>
<mdm:fieldGroup name="address" repeatable="false" required="false" uniqueId="ADDRESS">
<mdm:field name="street" repeatable="false" required="false" type="STRING" uniqueId="STREET" masked="PARTIAL MASK" firstMaskCharsCount="2" lastMaskCharsCount ="3"/>
<mdm:field name="city" repeatable="false" required="false" type="STRING" uniqueId="CITY"/>
</mdm:fieldGroup>
</mdm:fields>
<mdm:sources>
<mdm:source id="SF" type="Both" allowMultipleLinks="false" default="true">
<mdm:inbound>
<mdm:createApproval required="false"/>
<mdm:updateApproval required="false"/>
<mdm:updateApprovalWithBaseValue>false</mdm:updateApprovalWithBaseValue>
<mdm:endDateApproval required="false"/>
<mdm:earlyChangeDetectionEnabled>true</mdm:earlyChangeDetectionEnabled>
</mdm:inbound>
<mdm:outbound>
<mdm:channelUpdatesFields>All</mdm:channelUpdatesFields>
<mdm:sendCreates>true</mdm:sendCreates>
</mdm:outbound>
</mdm:source>
</mdm:sources>
<mdm:dataQualitySteps/>
<mdm:recordTitle>
<mdm:titleParameters>
<mdm:parameter uniqueId="EMPLOYER"/>
<mdm:parameter staticConstant="."/>
<mdm:parameter uniqueId="NAME"/>
</mdm:titleParameters>
</mdm:recordTitle>
<mdm:matchRules>
<mdm:matchRule topLevelOperator="AND">
<mdm:simpleExpression>
<mdm:fieldUniqueId>EMPLOYER</mdm:fieldUniqueId>
</mdm:simpleExpression>
</mdm:matchRule>
</mdm:matchRules>
<mdm:tags/>
</mdm:CreateModelRequest>

Responses

  • 200 (OK) Created a model with the specified name in the account. The model is a draft version. Sample response body:

    <mdm:CreateModelResponse xmlns:mdm="http://mdm.api.platform.boomi.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <mdm:id>6789abcd-ef01-2345-6789-abcdef012345</mdm:id>
    </mdm:CreateModelResponse>

    <mdm:id> contains the system ID of the model, which you can use in a Get Model, Update Model, Publish Model, or Delete Model request.

  • 400 (Bad Request) The request body did not contain a <CreateModelRequest> element. Sample response body:

    <error>
    <message>Message body is invalid: expected CreateModelRequest</message>
    </error>
  • 400 (Bad Request) A model validation error occurred. Model validation continues until the entire XML representation of the model is processed. The response returns all validation errors. Sample response body:

    <mdm:CreateModelResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mdm="http://mdm.api.platform.boomi.com/">
    <mdm:errors>
    <mdm:error>Missing required properties for field alien</mdm:error>
    <mdm:error>Missing field ID in simple expression in match rule</mdm:error>
    <mdm:error>Title field ALIAS does not exist in the Model</mdm:error>
    </mdm:errors>
    </mdm:CreateModelResponse>

    The following validation error message indicates an invalid model name:

    <mdm:error>Model creation failed due to a null or invalid model name. The name must have at least 2 characters and no more than 40.</mdm:error>

    Other model validation errors are specific to individual model components and sub-components. Follow these links to view these error messages and their descriptions: fields, sources, data quality steps, record title format, match rules, tags, and business rules.

  • 400 (Bad Request) The authenticating user does not have the API Access and MDM - Edit Models privileges required for this operation. Sample response body:

    <error>
    <message>The authenticated user does not have access rights to this functionality</message>
    </error>
  • 403 (Forbidden) Authentication failure. Sample response body:

    <UserMessage id="error.user.login" type="error">
    <Data>Incorrect user name and password combination.</Data>
    </UserMessage>
  • 403 (Forbidden) accountID does not identify an account accessible to the authenticating user. Sample response body:

    <UserMessage id="error.user.login" type="error">
    <Data>Incorrect user name and password combination.</Data>
    </UserMessage>
note

For information about field validation errors, read mdm: fields validation errors

On this Page