A semantic type describes what the values in a dataset field represent. For example, a text field might contain email addresses, country codes, or other values that follow a known dictionary or pattern.

Qlik Cloud determines semantic types during data discovery. You can use the predefined semantic types provided by Qlik or create custom dictionary-based, pattern-based, and compound types. In the Semantic types API, pattern-based types are represented by the REGEX type.

Semantic types are used to validate field values and can contribute to dataset data quality. They can also provide information used for data classification and regulatory review.

Use the Semantic types API to manage these definitions programmatically, including exporting and importing them for reuse or migration.

For more information about semantic types and how they are used in Qlik Cloud, see Managing semantic types on Qlik Help. For an import and export workflow, see Import and export semantic types.

Export semantic types

Exports semantic types from the current tenant as a downloadable JSON file. Supports optional filtering by type IDs, category, creator, or search term. Without filters, all types (user-created and Qlik defaults) are exported.

Facts

Rate limit Tier 2 (100 requests per minute)

Request Body

  • application/jsonobject

    Request body for exporting semantic types with optional filters.

    Show application/json properties
    • idsarray of strings

      List of semantic type IDs to export. When provided, only these types are included.

    • typesarray of strings

      Filter by semantic type categories. Supports multiple values for OR logic. When provided, only types matching the specified categories are included.

      Values may be any of: "REGEX""DICTIONARY""COMPOUND"

    • searchstring

      Case-insensitive substring search on label and description fields. Returns only semantic types where the label or description contains the search term. Special regex characters are automatically escaped for literal matching. Maximum length: 500 characters. Empty string returns no results.

    • createdBystring

      Filter by creator user ID. When provided, only types created by this user are included.

Responses

200

Export file containing the requested semantic types.

  • application/jsonobject

    Self-describing export envelope for Qlik Cloud semantic types.

    Show application/json properties
    • versionstring
      Required

      Schema version for forward compatibility.

    • exportFormatstring
      Required

      Format identifier for auto-detection on import.

      Can be one of: "QlikSemanticTypesExport"

    • exportedCountinteger

      Total number of semantic types included in this export. Helps API consumers quickly determine export size without parsing the entire array.

    • semanticTypesarray of objects
      Required

      A semantic type in the export file, stripped of internal fields.

      Show semanticTypes properties
      • typestring
        Required

        Can be one of: "REGEX""DICTIONARY""COMPOUND"

      • labelstring
        Required
      • configobject
        Required
        One of:
        • SemanticTypeRegexobject

          A semantic type for words matching a regex pattern

          Show SemanticTypeRegex properties
          • validationContentstring

            one of ANY_CHARACTER / ALPHABETIC / NUMERIC, ANY_CHARACTER: validates all characters, ALPHABETIC: validates only alphabetic content, NUMERIC: validate only number

            Can be one of: "ANY_CHARACTER""ALPHABETIC""NUMERIC"

          • validationPatternstring
            Required

            Regular expression

        • SemanticTypeDictionaryobject

          A semantic type for words matching a value in the list of values

          Show SemanticTypeDictionary properties
          • valuesarray of strings
            Required

            Values for dictionary

          • validationCriteriastring

            one of EXACT_VALUE / IGNORE_CASE_AND_ACCENTS, EXACT_VALUE: matches only the exact values in dictionary, IGNORE_CASE_AND_ACCENTS: case and accents are ignored

            Can be one of: "EXACT_VALUE""IGNORE_CASE_AND_ACCENTS"

        • ExportSemanticTypeCompoundobject

          COMPOUND config in the export file. Children are represented as enriched references with label and parentId for cross-tenant resolution, instead of raw IDs which are tenant-specific.

          Show ExportSemanticTypeCompound properties
          • childrenarray of objects
            Required

            Reference to a child type in a COMPOUND export. Contains resolution info (label + parentId) instead of a tenant-specific ID.

            Show children properties
            • labelstring
              Required

              Label of the child type. Primary resolution key at import time. The importer resolves children using a three-step cascade: first against types created earlier in the same import batch (by label), then against existing types in the target tenant (by label), and finally by parentId fallback.

            • parentIdstring

              Identifier of the child's parent default semantic type (Qlik-provisioned). Null for user-created children. Used as a fallback resolution key at import time: when the child's label does not match any type in the target tenant (e.g. because it was renamed after export), the importer looks up a type whose own parentId matches this value. If a child cannot be resolved by either label or parentId, the entire COMPOUND type is rejected with IMPORT_COMPOUND_CHILDREN_NOT_FOUND. Only that COMPOUND type is affected; the rest of the import proceeds normally (best-effort).

      • activatedboolean
        Required
      • defaultIdstring

        Identifier of the parent default semantic type (Qlik-provisioned). Null for user-created types. Used for identity preservation during cross-tenant import and as fallback for COMPOUND children resolution when labels differ across tenants.

      • descriptionstring
      • useForValidationboolean
        Required

400

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring

401

User does not have valid authentication credentials.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring

403

User does not have access to the resource.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring

500

Internal Server Error.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring

503

Requested service is not available.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring
POST /api/data-governance/semantic-types/actions/export
// qlik-api has not implemented support for `POST /api/data-governance/semantic-types/actions/export` yet.
// In the meantime, you can use fetch like this:
const response = await fetch(
'/api/data-governance/semantic-types/actions/export',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
ids: [
'3b179e2b028c4306ab108b68116ae639',
'4d237dd47e594f789617041b0d09c66f',
],
types: ['REGEX', 'DICTIONARY'],
search: 'email',
createdBy:
'712020:291adc5e-c210-408b-a43a-776448c35ef4',
}),
},
)
# qlik-cli has not implemented support for POST /api/data-governance/semantic-types/actions/export yet.
curl "https://{tenant}.{region}.qlikcloud.com/api/data-governance/semantic-types/actions/export" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"ids":["3b179e2b028c4306ab108b68116ae639","4d237dd47e594f789617041b0d09c66f"],"types":["REGEX","DICTIONARY"],"search":"email","createdBy":"712020:291adc5e-c210-408b-a43a-776448c35ef4"}'

Example Response

{
"version": "1.0",
"exportFormat": "QlikSemanticTypesExport",
"exportedCount": 42,
"semanticTypes": [
{
"type": "REGEX",
"label": "string",
"config": {
"validationContent": "ANY_CHARACTER",
"validationPattern": "^(\\\\S+)\\\\s+(\\\\S+)$"
},
"activated": true,
"defaultId": "string",
"description": "string",
"useForValidation": true
}
]
}

Import semantic types

Imports semantic types from a JSON file. Supports Qlik Cloud format (QlikSemanticTypesExport) and Talend legacy format (DQDictionaryImportExport). Format is auto-detected from the exportFormat field in the payload.

Conflict handling is controlled by the skipConfirmation flag and the optional conflictResolutions array:

  • Preview (skipConfirmation false/absent, no conflictResolutions): the file is analysed but nothing is imported. Returns 200 with a per-type conflict/summary body. Re-submit with skipConfirmation=true or conflictResolutions to actually apply the import.

  • One-shot (skipConfirmation=true, no conflictResolutions): if real conflicts or in-file duplicates exist, returns 200 with the conflict body and imports nothing; otherwise the import is applied and 201 is returned with the import report.

  • Resolved (conflictResolutions provided): the import is applied using the per-label strategies, falling back to defaultConflictStrategy (defaults to SKIP) for unlisted labels. Returns 201 in both cases (conflicts present or not), with the import report.

Import is best-effort: each type is processed independently. Failures are logged in the response report without blocking other types.

Facts

Rate limit Tier 2 (100 requests per minute)

Request Body

Required
  • application/jsonobject

    Import request wrapping the export file and optional conflict resolutions.

    Show application/json properties
    • fileobject
      Required

      The export file payload as-is. Format is detected from the exportFormat field. Accepts QlikSemanticTypesExport (Qlik native) or DQDictionaryImportExport (Talend legacy).

    • skipConfirmationboolean

      Controls preview vs. one-shot import when no conflictResolutions are supplied. When false (default) the call is a preview: the file is analysed and a per-type conflict/summary body is returned (HTTP 200) without importing anything. When true the import is attempted one-shot: if real conflicts or in-file duplicates exist the conflict body is returned (HTTP 200) and nothing is imported; otherwise all types are imported (HTTP 201). Ignored when conflictResolutions are provided (those always apply the import).

    • conflictResolutionsarray of objects

      Per-type conflict resolution. Each entry maps a conflicting label to its strategy. Labels not listed fall back to defaultConflictStrategy. Omit entirely (or send null) on the first call to trigger conflict detection. Sending an array — even an empty one — applies the import, using defaultConflictStrategy for every conflict not listed.

      Show conflictResolutions properties
      • labelstring
        Required

        Label of the conflicting semantic type.

      • strategystring
        Required

        OVERWRITE: replace the existing type with the version from the file. SKIP: keep the existing type unchanged, do not import. KEEP_BOTH: keep the existing type and create the version from the file with a deduplicated label.

        Can be one of: "OVERWRITE""SKIP""KEEP_BOTH"

    • defaultConflictStrategystring

      Fallback strategy applied to conflicting types not listed in conflictResolutions. Defaults to SKIP.

      Can be one of: "OVERWRITE""SKIP""KEEP_BOTH"

Responses

200

Nothing was imported. The body is an ImportConflictResponse:

  • when skipConfirmation=true but real conflicts or in-file duplicates exist — nothing was imported;

  • when skipConfirmation is false/absent (preview) — nothing was imported. Re-submit with skipConfirmation=true or conflictResolutions to apply.

  • application/jsonobject

    Returned when conflicts are detected and no resolutions were provided. Contains ALL types from the import file, each with a status indicating whether it is new or conflicts with an existing type.

    Show application/json properties
    • codestring
      Required
    • typesarray of objects
      Required

      Every type from the import file with its status. CONFLICT types include a diff showing field-level differences. ERROR types include an error message describing the validation failure. DUPLICATE types are either repeated labels within the same file, or types whose definition is identical to one already in the tenant (auto-skipped, no conflict resolution needed).

      Show types properties
      • diffobject

        Field-by-field comparison between the type from the import file and the existing type in the tenant. Only present when status is CONFLICT. Each field shows the value from the file and the existing value so the user can make an informed OVERWRITE / SKIP / KEEP_BOTH decision.

        Show diff properties
        • configobject

          Type-specific config differences. Only the fields relevant to the type's category are present (REGEX → validationContent/validationPattern, DICTIONARY → validationCriteria/values, COMPOUND → children), and only when they differ.

          Show config properties
          • valuesobject

            A single field difference between the file value and the existing type.

            Show values properties
            • existingany
              Required

              Value currently in the tenant.

            • fromFileany
              Required

              Value from the import file.

          • childrenobject

            A single field difference between the file value and the existing type.

            Show children properties
            • existingany
              Required

              Value currently in the tenant.

            • fromFileany
              Required

              Value from the import file.

          • validationContentobject

            A single field difference between the file value and the existing type.

            Show validationContent properties
            • existingany
              Required

              Value currently in the tenant.

            • fromFileany
              Required

              Value from the import file.

          • validationPatternobject

            A single field difference between the file value and the existing type.

            Show validationPattern properties
            • existingany
              Required

              Value currently in the tenant.

            • fromFileany
              Required

              Value from the import file.

          • validationCriteriaobject

            A single field difference between the file value and the existing type.

            Show validationCriteria properties
            • existingany
              Required

              Value currently in the tenant.

            • fromFileany
              Required

              Value from the import file.

        • categoryobject

          A single field difference between the file value and the existing type.

          Show category properties
          • existingany
            Required

            Value currently in the tenant.

          • fromFileany
            Required

            Value from the import file.

        • activatedobject

          A single field difference between the file value and the existing type.

          Show activated properties
          • existingany
            Required

            Value currently in the tenant.

          • fromFileany
            Required

            Value from the import file.

        • descriptionobject

          A single field difference between the file value and the existing type.

          Show description properties
          • existingany
            Required

            Value currently in the tenant.

          • fromFileany
            Required

            Value from the import file.

        • useForValidationobject

          A single field difference between the file value and the existing type.

          Show useForValidation properties
          • existingany
            Required

            Value currently in the tenant.

          • fromFileany
            Required

            Value from the import file.

      • typestring
        Required

        Category of the semantic type.

        Can be one of: "REGEX""DICTIONARY""COMPOUND"

      • errorstring

        Human-readable error message. Only present when status is ERROR.

      • labelstring
        Required

        Label of the semantic type.

      • statusstring
        Required

        NEW: no type with this label exists in the tenant. CONFLICT: a type with this label already exists but differs from the imported version. ERROR: the type has a validation error (missing field, invalid regex, etc.). DUPLICATE: the type is a duplicate — either another type with the same label appears earlier in the import file, or the imported type is identical to an existing type in the tenant (all user-visible fields match; auto-skipped with no conflict resolution needed).

        Can be one of: "NEW""CONFLICT""ERROR""DUPLICATE"

      • errorCodestring

        Machine-readable error code. Only present when status is ERROR.

        Can be one of: "IMPORT_REGEX_PATTERN_MISSING""IMPORT_REGEX_PATTERN_TOO_LONG""IMPORT_REGEX_PATTERN_INVALID""IMPORT_DICTIONARY_VALUES_MISSING""IMPORT_DICTIONARY_VALUE_BLANK""IMPORT_COMPOUND_CHILDREN_MISSING""IMPORT_COMPOUND_CHILDREN_NOT_FOUND"

    • messagestring
      Required

201

Import applied. The report contains summary counts and a detailed error list for any types that could not be processed. Returned in both the no-conflict case and when conflictResolutions were provided (regardless of whether conflicts were present).

  • application/jsonobject

    Result of a best-effort import operation.

    Show application/json properties
    • errorsarray of objects
      Required

      Error detail for a single semantic type that could not be imported.

      Show errors properties
      • codestring
        Required

        Application error code identifying the failure reason.

      • labelstring
        Required

        Label of the semantic type that failed.

      • messagestring
        Required

        Human-readable error description in English.

    • summaryobject
      Required

      Aggregate counts and per-status label details for the import result. Each status group includes a count and the list of affected type labels.

      Show summary properties
      • erroredobject
        Required

        Count and affected types for one import outcome.

        Show errored properties
        • countinteger
          Required

          Number of types in this category.

        • itemsarray of objects
          Required

          Affected semantic types paired with their persisted resource id. Ids are present for created, updated, skipped and duplicate outcomes, and null for errored types that were never persisted.

          Show items properties
          • idstring

            Persisted resource id of the semantic type, or null when no resource exists for this outcome (for example, an errored type that was never created).

          • labelstring
            Required

            Label of the affected semantic type.

        • labelsarray of strings
          Required

          Labels of the affected semantic types.

      • skippedobject
        Required

        Count and affected types for one import outcome.

        Show skipped properties
        • countinteger
          Required

          Number of types in this category.

        • itemsarray of objects
          Required

          Affected semantic types paired with their persisted resource id. Ids are present for created, updated, skipped and duplicate outcomes, and null for errored types that were never persisted.

          Show items properties
          • idstring

            Persisted resource id of the semantic type, or null when no resource exists for this outcome (for example, an errored type that was never created).

          • labelstring
            Required

            Label of the affected semantic type.

        • labelsarray of strings
          Required

          Labels of the affected semantic types.

      • updatedobject
        Required

        Count and affected types for one import outcome.

        Show updated properties
        • countinteger
          Required

          Number of types in this category.

        • itemsarray of objects
          Required

          Affected semantic types paired with their persisted resource id. Ids are present for created, updated, skipped and duplicate outcomes, and null for errored types that were never persisted.

          Show items properties
          • idstring

            Persisted resource id of the semantic type, or null when no resource exists for this outcome (for example, an errored type that was never created).

          • labelstring
            Required

            Label of the affected semantic type.

        • labelsarray of strings
          Required

          Labels of the affected semantic types.

      • duplicatesobject
        Required

        Count and affected types for one import outcome.

        Show duplicates properties
        • countinteger
          Required

          Number of types in this category.

        • itemsarray of objects
          Required

          Affected semantic types paired with their persisted resource id. Ids are present for created, updated, skipped and duplicate outcomes, and null for errored types that were never persisted.

          Show items properties
          • idstring

            Persisted resource id of the semantic type, or null when no resource exists for this outcome (for example, an errored type that was never created).

          • labelstring
            Required

            Label of the affected semantic type.

        • labelsarray of strings
          Required

          Labels of the affected semantic types.

      • totalCreatedobject
        Required

        Count and affected types for one import outcome.

        Show totalCreated properties
        • countinteger
          Required

          Number of types in this category.

        • itemsarray of objects
          Required

          Affected semantic types paired with their persisted resource id. Ids are present for created, updated, skipped and duplicate outcomes, and null for errored types that were never persisted.

          Show items properties
          • idstring

            Persisted resource id of the semantic type, or null when no resource exists for this outcome (for example, an errored type that was never created).

          • labelstring
            Required

            Label of the affected semantic type.

        • labelsarray of strings
          Required

          Labels of the affected semantic types.

400

Invalid payload — malformed JSON, unknown format, or structural error.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring

401

User does not have valid authentication credentials.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring

403

User does not have access to the resource.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring

500

Internal Server Error.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring

503

Requested service is not available.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
      • statusstring
    • traceIdstring
POST /api/data-governance/semantic-types/actions/import
// qlik-api has not implemented support for `POST /api/data-governance/semantic-types/actions/import` yet.
// In the meantime, you can use fetch like this:
const response = await fetch(
'/api/data-governance/semantic-types/actions/import',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
file: {
exportedAt: '2024-01-01T00:00:00Z',
exportFormat: 'QlikSemanticTypesExport',
semanticTypes: [],
},
skipConfirmation: false,
conflictResolutions: [
{
label: 'Email Address',
strategy: 'SKIP',
},
],
defaultConflictStrategy: 'SKIP',
}),
},
)
# qlik-cli has not implemented support for POST /api/data-governance/semantic-types/actions/import yet.
curl "https://{tenant}.{region}.qlikcloud.com/api/data-governance/semantic-types/actions/import" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"file":{"exportedAt":"2024-01-01T00:00:00Z","exportFormat":"QlikSemanticTypesExport","semanticTypes":[]},"skipConfirmation":false,"conflictResolutions":[{"label":"Email Address","strategy":"SKIP"}],"defaultConflictStrategy":"SKIP"}'

Example Response

{
"code": "IMPORT_CONFLICT",
"types": [
{
"diff": {
"config": {
"values": {},
"children": {},
"validationContent": {},
"validationPattern": {},
"validationCriteria": {}
},
"category": {},
"activated": {},
"description": {},
"useForValidation": {}
},
"type": "REGEX",
"error": "string",
"label": "string",
"status": "NEW",
"errorCode": "IMPORT_REGEX_PATTERN_MISSING"
}
],
"message": "Conflicts: 2 of 10, Unchanged: 3."
}