Importing mappings

Command structure
[
  {
    "resourceType": "Mapping",
    "identifier": {
      "externalSystemId": "EXT_SYSTEM",
      "externalEntityId": "EXT_TABLE > EXT_COLUMN_ABC"
    },
    "asset": {
      "name": "Technical Asset 1",
      "domain": {
        "name": "Technical Domain 1",
        "community": {
          "name": "Technical Community"
        }
      }
    },
    "externalSystemId": "EXT_SYSTEM_NEW",
    "externalEntityId": "EXT_TABLE > EXT_COLUMN_ABC 2",
    "community": {
      "name": "Technical Community"
    },
    "dgcId": "43215678-1234-1234-1234-123456788765",
    "domain": {
      "name": "Technical Domain 1",
      "community": {
        "name": "Technical Community"
      }
    },
    "externalEntityUrl": "https://www.example.com",
    "lastSyncDate": "1509631247",
    "syncAction": "ADD",
    "description": "This is a sample mapping"
  }
]

The above command is not correct since mapping should point to only one resource. Because of that, only one of the asset, community, dgcId or domain fields should be provided.

Identifier

The identifier for a mapping may contain any of the following fields:

  • id
  • externalSystemId and externalEntityId or dgcId or asset or domain or community
  • The asset, community and domain fields have the same structure and requirements as the asset, community and domain identifiers.
  • Code snippets in this section may show redundant data to demonstrate the fields accepted by the import API.
Identifier structure
{
  "id": "12345678-1234-1234-1234-123456788765",
  "externalSystemId": "EXT_SYSTEM",
  "externalEntityId": "Domain_1234",
  "dgcId": "43215678-1234-1234-1234-123456788765",
  "asset": {
    "id": "12345678-1234-1234-1234-123456788765",
    "name": "Sample Asset Name",
    "domain": {
      "id": "98765678-1234-1234-1234-123456788765",
      "name": "Sample Domain Name",
      "community": {
        "id": "43215678-1234-1234-1234-123456788765",
        "name": "Sample Community Name"
      }
    },
    "externalSystemId": "EXT_SYSTEM",
    "externalEntityId": "Asset_1234"
  },
  "domain": {
    "id": "98765678-1234-1234-1234-123456788765",
    "name": "Sample Domain Name",
    "community": {
      "id": "43215678-1234-1234-1234-123456788765",
      "name": "Sample Community Name"
    }
  },
  "community": {
    "id": "43215678-1234-1234-1234-123456788765",
    "name": "Sample Community Name"
  }
}

Optional fields

Field name Field type Remarks
asset Same as identifier for asset Should only be used for updates.
community Same as identifier for community Should only be used for updates.
description String  
dgcId String (UUID) Should only be used for updates.
domain Same as identifier for domain Should only be used for updates.
externalEntityUrl String  
externalEntityId String Should only be used for updates.
externalSystemId String Should only be used for updates.
lastSyncDate Long The default value is the start date of the import/synchronization process.
syncAction ADD or UPDATE or REMOVE The default values are:
  • ADD for new mappings.
  • UPDATE for updated mappings

This field is deprecated and will be dropped in a future release.

Expected behavior

The behavior is similar to the commands for communities and domains.

Add operation

If the mapping needs to be created, the following fields have to be provided in order to import successfully:

  • externalSystemId
  • externalEntityId

A note on mappings

When you manually delete a resource that is referenced by a mapping, the mapping is not also deleted. Only the reference to the deleted resource in the mapping is removed. This helps external systems detect that Collibra used to store resources that are now deleted. The external systems can then decide to take appropriate action.