Importing domains

Copy

Command structure

[
  {
    "resourceType": "Domain",
    "identifier": {
      "name": "Technical Domain 1",
      "community": {
        "name": "Technical Community"
      }
    },
    "community": {
      "name": "Technical Community 2"
    },
    "description": "The Technical Domain is container for all technical assets of category 1.",
    "type": {
      "name": "Data Asset Domain"
    },
    "name": "Technical Domain 2",
    "responsibilities": {
      "00000000-0000-0000-0000-000000005018": [
        {
          "user": {
            "id": "00000000-0000-0000-0000-000000900001"
          }
        }
      ],
      "Business Steward": [
        {
          "userGroup": {
            "id": "00000000-0000-0000-0000-000001000002"
          }
        }
      ]
    }
  }
]

Identifier

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

  • id
  • name and community identified by id or by name
  • externalSystemId and externalEntityId
Note 
  • The community field has the same structure and requirements as the community identifier.
  • Code snippets in this section may show redundant data to demonstrate the fields accepted by the import API.
Copy

Identifier structure

{
  "id": "12345678-1234-1234-1234-123456788765",
  "name": "Sample Domain Name",
  "community": {
    "id": "43215678-1234-1234-1234-123456788765",
    "name": "Sample Community Name"
  },
  "externalSystemId": "EXT_SYSTEM",
  "externalEntityId": "Domain_1234"
}

Optional fields

Field name Field type Remarks
description String Sets the domain description.
type Identifier for domain type - can contain id or name. Sets the domain type.
community Same as identifier for community. Moves the domain to the community. Should only be used for updates.
name String Sets the domain name. Should only be used for updates.
responsibilities RESOURCE_ROLE_ID or RESOURCE_ROLE_NAME Creates or replaces responsibilities for the associated community.

Expected behavior

If a domain with the name Technical Domain 1 does not exist in the Technical Community community, the Import API performs an insert operation. It creates a domain with the specified name, description and of the specified type. The domain type is also set according to the specification.

Note 

The domain name is changed to Technical Domain 2 and the domain is moved to the New Technical Community 2 because of the implicit SET operation. If the target community does not exist, the import results in an error.

If a domain named Technical Domain 1 already exists, an update operation is performed. The community, description and domain type are updated based on the provided input.

Add operation

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

  • name
  • type
  • community

Responsibilities

You define a responsibility by specifying a resource role, identified by name or ID, and assigning to it one or more users or user groups, identified by ID:

Copy
{
  "00000000-0000-0000-0000-000000005018": [
    {
      "user": {
        "id": "00000000-0000-0000-0000-000000900001"
      }
    }
  ],
  "Business Steward": [
    {
      "userGroup": {
        "id": "00000000-0000-0000-0000-000001000002"
      }
    }
  ]
}

Note The resource roles, users and user groups that define the imported responsibilities must already exist in Collibra.

You must specify each role only once in the list of responsibilities.

You can assign multiple users and multiple user groups to the same role:

Copy
"responsibilities": {
  "Chief Data Officer": [
    {
      "user": {
        "id": "00000000-0000-0000-0000-000000900001"
      }
    },
    {
      "user": {
        "id": "00000000-0000-0000-0000-000000900002"
      }
    },
    {
      "userGroup": {
        "id": "00000000-0000-0000-0000-000001000002"
      }
    }
  ]
}

The Import API performs a query for the responsibilities in Collibra and:

  • If the same responsibilities exist, the Import API performs no action.
  • If responsibilities other than the ones provided in the input exist, they remain unchanged.
  • If a responsibility exists with the same role but different assignees, the Import API deletes the existing responsibility and replaces it with the one provided in the input.
  • If the responsibilities do not exist, the Import API creates them.