Create custom metadata definitions

POST /api/meta/types/typedefs#customMetadata

Create one or many custom metadata types.

Body Required

List of custom metadata types to create. The custom metadata definitions should be within the businessMetadataDefs array.

  • businessMetadataDefs array[object] | null Required

    Definition of a custom metadata type in Atlan.

    • category string | null Required

      Should always be BUSINESS_METADATA.

    • guid string | null

      Unique identifier that represents the type definition.

    • name string

      Static-hashed unique name of the custom metadata type. This is used internally for representing the custom metadata type, and allows the human-readable name to be changed without impacting any existing metadata. This hashed unique name must currently be used for any updates.

    • description string | null

      Description of the type definition.

    • typeVersion string | null

      Internal use only.

    • options object | null

      Optional properties of the type definition.

    • serviceType string | null

      Internal use only.

    • attributeDefs array[object]

      Definition of a custom metadata attribute in Atlan.

      • name string | null

        Unique name of this attribute definition. When provided during creation, this should be the human-readable name for the attribute. When returned (or provided for an update) this will be the static-hashed name that Atlan uses internally. (This is to allow the name to be changed by the user without impacting existing instances of the attribute.)

      • displayName string | null

        Name to use within all user interactions through the user interface. Note that this may not be the same name used to update or interact with the attribute through API operations, for that see the name property. (This property can be used instead of name for the creation of an attribute definition as well.)

      • description string | null

        Description of the attribute definition.

      • typeName string | null

        Type of this attribute.

        Values are string or array<string>. Default value is string.

      • When true, values for this attribute will be indexed for searching.

      • isOptional boolean

        When true, a value will not be required for this attribute.

        Default value is true.

      • isUnique boolean

        When true, this attribute must be unique across all assets.

        Default value is false.

      • indexType string | null

        Values are DEFAULT or STRING.

      • searchWeight number | null
      • cardinality string | null

        Whether the attribute allows a single or multiple values. In the case of multiple values, LIST indicates they are ordered and duplicates are allowed, while SET indicates they are unique and unordered.

        Values are SINGLE, LIST, or SET. Default value is SINGLE.

      • Minimum number of values for this attribute. If greater than 0, this attribute becomes required.

        Default value is 0.

      • Maximum number of values for this attribute. If greater than 1, this attribute allows multiple values.

        Default value is 1.

      • defaultValue string | null

        Default value for this attribute (if any).

      • options object

        Options that can be defined on custom metadata attributes.

        • List of entity types for which this property is available. The list is written as a string.

          Default value is ["Asset"].

        • List of sub types of the applicableEntityTypes for which this property is available. The list is written as a string.

          Default value is ["Database","MaterialisedView","PowerBIDataset","PowerBIDatasource", "Schema","Table","TablePartition","TableauDatasource","View","Column", "TableauCalculatedField","TableauDatasourceField","PowerBIDashboard", "PowerBIDataflow","PowerBIPage","PowerBIReport","PowerBIWorkspace", "TableauDashboard","TableauFlow","TableauProject","TableauSite", "TableauWorkbook","TableauWorksheet","Query","Folder","TableauMetric", "AtlasGlossary","AtlasGlossaryCategory","AtlasGlossaryTerm","Process", "ColumnProcess"]
          .

        • maxStrLength string | null

          Maximum length of a string value for the attribute.

        • isEnum boolean | null

          When true, the attribute's values must be selected from an list of options (enumeration).

        • enumType string | null

          Name of the options (enumeration) for the attribute's values. This must be defined when the isEnum property is true.

        • multiValueSelect boolean | null

          When true, users will be able to add multiple values for the attribute.

          Default value is false.

        • allowFiltering boolean | null

          When true, the attribute will be available in asset filtering.

          Default value is true.

        • allowSearch boolean | null

          When true, the attribute's values can be searched.

          Default value is true.

        • Basic type of the attribute's values.

          Value is string. Default value is string.

        • description string | null

          Description of the attribute.

      • constraints array[object]

        Internal use only.

    • displayName string Required

      Human-readable name of the custom metadata type. This is used in the UI and for creation, but cannot yet be used for updates.

Responses

  • 200 object

    List of the created type definitions. The custom metadata definitions will be in the businessMetadataDefs array of the response.

    • Maintenance details that apply to almost all objects.

      • category string | null

        Should always be BUSINESS_METADATA.

      • guid string | null

        Unique identifier that represents the type definition.

      • name string

        Static-hashed unique name of the custom metadata type. This is used internally for representing the custom metadata type, and allows the human-readable name to be changed without impacting any existing metadata. This hashed unique name must currently be used for any updates.

      • description string | null

        Description of the type definition.

      • typeVersion string | null

        Internal use only.

      • options object | null

        Optional properties of the type definition.

      • serviceType string | null

        Internal use only.

      • attributeDefs array[object]

        Definition of a custom metadata attribute in Atlan.

        • name string | null

          Unique name of this attribute definition. When provided during creation, this should be the human-readable name for the attribute. When returned (or provided for an update) this will be the static-hashed name that Atlan uses internally. (This is to allow the name to be changed by the user without impacting existing instances of the attribute.)

        • displayName string | null

          Name to use within all user interactions through the user interface. Note that this may not be the same name used to update or interact with the attribute through API operations, for that see the name property. (This property can be used instead of name for the creation of an attribute definition as well.)

        • description string | null

          Description of the attribute definition.

        • typeName string | null

          Type of this attribute.

          Values are string or array<string>. Default value is string.

        • When true, values for this attribute will be indexed for searching.

        • isOptional boolean

          When true, a value will not be required for this attribute.

          Default value is true.

        • isUnique boolean

          When true, this attribute must be unique across all assets.

          Default value is false.

        • indexType string | null

          Values are DEFAULT or STRING.

        • searchWeight number | null
        • cardinality string | null

          Whether the attribute allows a single or multiple values. In the case of multiple values, LIST indicates they are ordered and duplicates are allowed, while SET indicates they are unique and unordered.

          Values are SINGLE, LIST, or SET. Default value is SINGLE.

        • Minimum number of values for this attribute. If greater than 0, this attribute becomes required.

          Default value is 0.

        • Maximum number of values for this attribute. If greater than 1, this attribute allows multiple values.

          Default value is 1.

        • defaultValue string | null

          Default value for this attribute (if any).

        • options object

          Options that can be defined on custom metadata attributes.

          • List of entity types for which this property is available. The list is written as a string.

            Default value is ["Asset"].

          • List of sub types of the applicableEntityTypes for which this property is available. The list is written as a string.

            Default value is ["Database","MaterialisedView","PowerBIDataset","PowerBIDatasource", "Schema","Table","TablePartition","TableauDatasource","View","Column", "TableauCalculatedField","TableauDatasourceField","PowerBIDashboard", "PowerBIDataflow","PowerBIPage","PowerBIReport","PowerBIWorkspace", "TableauDashboard","TableauFlow","TableauProject","TableauSite", "TableauWorkbook","TableauWorksheet","Query","Folder","TableauMetric", "AtlasGlossary","AtlasGlossaryCategory","AtlasGlossaryTerm","Process", "ColumnProcess"]
            .

          • maxStrLength string | null

            Maximum length of a string value for the attribute.

          • isEnum boolean | null

            When true, the attribute's values must be selected from an list of options (enumeration).

          • enumType string | null

            Name of the options (enumeration) for the attribute's values. This must be defined when the isEnum property is true.

          • multiValueSelect boolean | null

            When true, users will be able to add multiple values for the attribute.

            Default value is false.

          • allowFiltering boolean | null

            When true, the attribute will be available in asset filtering.

            Default value is true.

          • allowSearch boolean | null

            When true, the attribute's values can be searched.

            Default value is true.

          • Basic type of the attribute's values.

            Value is string. Default value is string.

          • description string | null

            Description of the attribute.

        • constraints array[object]

          Internal use only.

      • Human-readable name of the custom metadata type. This is used in the UI and for creation, but cannot yet be used for updates.

      • createdBy string | null

        Username of the user who created the object.

      • updatedBy string | null

        Username of the user who last updated the object.

      • createTime integer | null

        Time (epoch) at which this object was created, in milliseconds.

      • updateTime integer | null

        Time (epoch) at which this object was last updated, in milliseconds.

      • version integer | null

        Version of this object.

    • enumDefs array[object] | null

      Enumeration (options) types (empty).

    • structDefs array[object] | null

      Structured types (empty).

    • classificationDefs array[object] | null

      Classification types (empty).

    • entityDefs array[object] | null

      Entity types (empty).

    • relationshipDefs array[object] | null

      Relationship types (empty).

POST /api/meta/types/typedefs#customMetadata
curl \
 -X POST https://tenant.atlan.com/api/meta/types/typedefs#customMetadata \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"businessMetadataDefs":[{"category":"BUSINESS_METADATA","guid":"917ffec9-fa84-4c59-8e6c-c7b114d04be3","name":"NQCB512fDtTlLFn00Arfar","description":"Custom metadata that is specific to our organization.","typeVersion":"1.0","options":{},"serviceType":"atlan","attributeDefs":[{"name":"string","displayName":"Custom Field 1","description":"Our first custom metadata field.","typeName":"string","includeInNotification":false,"isIndexable":true,"isOptional":true,"isUnique":false,"indexType":"DEFAULT","searchWeight":42.0,"cardinality":"SINGLE","valuesMinCount":0,"valuesMaxCount":1,"defaultValue":"abc123","options":{"applicableEntityTypes":"[\"Asset\"]","customApplicableEntityTypes":"[\"Database\",\"Schema\",\"Table\"]\n","maxStrLength":"100000000","isEnum":true,"enumType":"Custom Field Status","multiValueSelect":false,"allowFiltering":true,"allowSearch":true,"primitiveType":"string","description":"Our first custom metadata field."},"constraints":[{}]}],"displayName":"Organization Specific Metadata"}]}'
Request example
{
  "businessMetadataDefs": [
    {
      "category": "BUSINESS_METADATA",
      "guid": "917ffec9-fa84-4c59-8e6c-c7b114d04be3",
      "name": "NQCB512fDtTlLFn00Arfar",
      "description": "Custom metadata that is specific to our organization.",
      "typeVersion": "1.0",
      "options": {},
      "serviceType": "atlan",
      "attributeDefs": [
        {
          "name": "string",
          "displayName": "Custom Field 1",
          "description": "Our first custom metadata field.",
          "typeName": "string",
          "includeInNotification": false,
          "isIndexable": true,
          "isOptional": true,
          "isUnique": false,
          "indexType": "DEFAULT",
          "searchWeight": 42.0,
          "cardinality": "SINGLE",
          "valuesMinCount": 0,
          "valuesMaxCount": 1,
          "defaultValue": "abc123",
          "options": {
            "applicableEntityTypes": "[\"Asset\"]",
            "customApplicableEntityTypes": "[\"Database\",\"Schema\",\"Table\"]\n",
            "maxStrLength": "100000000",
            "isEnum": true,
            "enumType": "Custom Field Status",
            "multiValueSelect": false,
            "allowFiltering": true,
            "allowSearch": true,
            "primitiveType": "string",
            "description": "Our first custom metadata field."
          },
          "constraints": [
            {}
          ]
        }
      ],
      "displayName": "Organization Specific Metadata"
    }
  ]
}
Response example (200)
{
  "businessMetadataDefs": [
    {
      "category": "BUSINESS_METADATA",
      "guid": "917ffec9-fa84-4c59-8e6c-c7b114d04be3",
      "name": "NQCB512fDtTlLFn00Arfar",
      "description": "Custom metadata that is specific to our organization.",
      "typeVersion": "1.0",
      "options": {},
      "serviceType": "atlan",
      "attributeDefs": [
        {
          "name": "string",
          "displayName": "Custom Field 1",
          "description": "Our first custom metadata field.",
          "typeName": "string",
          "includeInNotification": false,
          "isIndexable": true,
          "isOptional": true,
          "isUnique": false,
          "indexType": "DEFAULT",
          "searchWeight": 42.0,
          "cardinality": "SINGLE",
          "valuesMinCount": 0,
          "valuesMaxCount": 1,
          "defaultValue": "abc123",
          "options": {
            "applicableEntityTypes": "[\"Asset\"]",
            "customApplicableEntityTypes": "[\"Database\",\"Schema\",\"Table\"]\n",
            "maxStrLength": "100000000",
            "isEnum": true,
            "enumType": "Custom Field Status",
            "multiValueSelect": false,
            "allowFiltering": true,
            "allowSearch": true,
            "primitiveType": "string",
            "description": "Our first custom metadata field."
          },
          "constraints": [
            {}
          ]
        }
      ],
      "displayName": "Organization Specific Metadata",
      "createdBy": "jsmith",
      "updatedBy": "jsmith",
      "createTime": 1648852296555,
      "updateTime": 1649172284333,
      "version": 2
    }
  ],
  "enumDefs": [
    {}
  ],
  "structDefs": [
    {}
  ],
  "classificationDefs": [
    {}
  ],
  "entityDefs": [
    {}
  ],
  "relationshipDefs": [
    {}
  ]
}