Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

D toc

Create a list of object-based import rules for the specified deployment. Delete all previous rules applied to the same object.

Info

NOTE: Import rules must be applied to individual deployments.

The generated rules apply to all flows that are imported into the deployment after they has been created.

Info

NOTE: Deployments pertain to Production instances of the

D s platform
rtrue
. For more information, see Overview of Deployment Management.

The response contains any previously created rules that have been deleted as a result of this change.

You can also make replacements in the import package based on value mappings. See API Deployments Value Import Rules Patch v3.

Version: v3

Required Permissions

D s api auth

Request

Request Type: PATCH

Endpoint:

Code Block
/v3/deployments/<id>/objectImportRules

where:

ParameterDescription
<id>Internal identifier for the deployment

Request URI - Example:

Code Block
/v3/deployments/4/objectImportRules

Request Body Example: Replace connection

The following JSON array describes replacing the connection specified by the UUID, which is a field on the connection object exported from the original platform instance.  This connection reference is replaced by a reference to connection ID 1 in the local platform instance and is applied to any release uploaded into the deployment after the rule has been created:

Code Block
[{"tableName":"connections","onCondition":{"uuid":"d75255f0-a245-11e7-8618-adc1dbb4bed0"},"withCondition":{"id":1}}]

You can specify matching values using string literals. 

Match TypeExample Syntax
string literal
{"uuid":"d75255f0-a245-11e7-8618-adc1dbb4bed0"}
string literal
{"id":"22"}
Info

NOTE: Use of

D s item
itempatterns
or regular expressions is not supported.

For more information on patterns, see Text Matching.

Request Body Example: Replace multiple connections

This example request includes replacements for multiple connection references.

Info

NOTE: Rules are applied in the listed order. If you are applying multiple rules to the same object in the import package, the second rule must reference the expected changes applied by the first rule.

This type of replacement applies if the imported packages contain sources that are imported through two separate connections:

Code Block
[
  {"tableName":"connections","onCondition":{"uuid":"d75255f0-a245-11e7-8618-adc1dbb4bed0"},"withCondition":{"id":1}},
  {"tableName":"connections","onCondition":{"uuid":"d552045e0-c314-22b5-9410-acd1bcd8eea2"},"withCondition":{"id":2}}
]

Response

Response Status Code - Success: 200 - OK

The response body contains any previously created rules that have been deleted as a result of this update.

Response Body Example: All new rule, no deletions

If the update does not overwrite any previous rules, then no rules are deleted. So, the response looks like the following:

Code Block
{
    "deleted": []
}

 

Response Body Example: Replace connection

If you submit the request again, the response contains the rule definition of the previous update, which has been deleted. This example applies to the one-rule change listed previously:

Code Block
{
    "deleted": [
        {
            "onCondition": {
                "uuid": "d75255f0-a245-11e7-8618-adc1dbb4bed0"
            },
            "withCondition": {
                "id": 1
            },
            "id": 1,
            "tableName": "connections",
            "createdBy": 3,
            "updatedBy": 3,
            "createdAt": "2017-11-07T01:42:46.798Z",
            "updatedAt": "2017-11-07T01:42:46.798Z",
            "deploymentId": 4
        }
    ]
}

Reference

PropertyDescription
onConditionThe matching object identifier and the specified literal or pattern to match.
withConditionThe identifier for the object type, as specified in by the tableName value, which is being modified.
idInternal identifier for the object import rule
tableName

Name of the table to which the mapping is applied. Values:

  • connections - applies to local connections
deploymentIdInternal identifier for the deployment to which to apply the import rule.