Semantic types
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.
Endpoints
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.
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.
application/json properties
- versionstringRequired
Schema version for forward compatibility.
- exportFormatstringRequired
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 objectsRequired
A semantic type in the export file, stripped of internal fields.
semanticTypes properties
- typestringRequired
Can be one of: "REGEX""DICTIONARY""COMPOUND"
- labelstringRequired
- configobjectRequiredOne of:
- SemanticTypeRegexobject
A semantic type for words matching a regex pattern
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"
- validationPatternstringRequired
Regular expression
-
- SemanticTypeDictionaryobject
A semantic type for words matching a value in the list of values
SemanticTypeDictionary properties
- valuesarray of stringsRequired
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.
ExportSemanticTypeCompound properties
- childrenarray of objectsRequired
Reference to a child type in a COMPOUND export. Contains resolution info (label + parentId) instead of a tenant-specific ID.
children properties
- labelstringRequired
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
parentIdfallback. - 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
parentIdmatches this value. If a child cannot be resolved by either label orparentId, the entire COMPOUND type is rejected withIMPORT_COMPOUND_CHILDREN_NOT_FOUND. Only that COMPOUND type is affected; the rest of the import proceeds normally (best-effort).
-
-
-
- activatedbooleanRequired
- 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
- useForValidationbooleanRequired
-
-
400
The request is in incorrect format.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
401
User does not have valid authentication credentials.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
403
User does not have access to the resource.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
500
Internal Server Error.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
503
Requested service is not available.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
// 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 } ]}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 (
skipConfirmationfalse/absent, noconflictResolutions): the file is analysed but nothing is imported. Returns200with a per-type conflict/summary body. Re-submit withskipConfirmation=trueorconflictResolutionsto actually apply the import. -
One-shot (
skipConfirmation=true, noconflictResolutions): if real conflicts or in-file duplicates exist, returns200with the conflict body and imports nothing; otherwise the import is applied and201is returned with the import report. -
Resolved (
conflictResolutionsprovided): the import is applied using the per-label strategies, falling back todefaultConflictStrategy(defaults toSKIP) for unlisted labels. Returns201in 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.
application/json properties
- fileobjectRequired
The export file payload as-is. Format is detected from the
exportFormatfield. AcceptsQlikSemanticTypesExport(Qlik native) orDQDictionaryImportExport(Talend legacy). - skipConfirmationboolean
Controls preview vs. one-shot import when no
conflictResolutionsare supplied. Whenfalse(default) the call is a preview: the file is analysed and a per-type conflict/summary body is returned (HTTP 200) without importing anything. Whentruethe 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 whenconflictResolutionsare 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 sendnull) on the first call to trigger conflict detection. Sending an array — even an empty one — applies the import, usingdefaultConflictStrategyfor every conflict not listed.conflictResolutions properties
- labelstringRequired
Label of the conflicting semantic type.
- strategystringRequired
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 toSKIP.Can be one of: "OVERWRITE""SKIP""KEEP_BOTH"
-
Responses
200
Nothing was imported. The body is an ImportConflictResponse:
-
when
skipConfirmation=truebut real conflicts or in-file duplicates exist — nothing was imported; -
when
skipConfirmationis false/absent (preview) — nothing was imported. Re-submit withskipConfirmation=trueorconflictResolutionsto 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.
application/json properties
- codestringRequired
- typesarray of objectsRequired
Every type from the import file with its status.
CONFLICTtypes include adiffshowing field-level differences.ERRORtypes include anerrormessage describing the validation failure.DUPLICATEtypes 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).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.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.
config properties
- valuesobject
A single field difference between the file value and the existing type.
values properties
- existinganyRequired
Value currently in the tenant.
- fromFileanyRequired
Value from the import file.
-
- childrenobject
A single field difference between the file value and the existing type.
children properties
- existinganyRequired
Value currently in the tenant.
- fromFileanyRequired
Value from the import file.
-
- validationContentobject
A single field difference between the file value and the existing type.
validationContent properties
- existinganyRequired
Value currently in the tenant.
- fromFileanyRequired
Value from the import file.
-
- validationPatternobject
A single field difference between the file value and the existing type.
validationPattern properties
- existinganyRequired
Value currently in the tenant.
- fromFileanyRequired
Value from the import file.
-
- validationCriteriaobject
A single field difference between the file value and the existing type.
validationCriteria properties
- existinganyRequired
Value currently in the tenant.
- fromFileanyRequired
Value from the import file.
-
-
- categoryobject
A single field difference between the file value and the existing type.
category properties
- existinganyRequired
Value currently in the tenant.
- fromFileanyRequired
Value from the import file.
-
- activatedobject
A single field difference between the file value and the existing type.
activated properties
- existinganyRequired
Value currently in the tenant.
- fromFileanyRequired
Value from the import file.
-
- descriptionobject
A single field difference between the file value and the existing type.
description properties
- existinganyRequired
Value currently in the tenant.
- fromFileanyRequired
Value from the import file.
-
- useForValidationobject
A single field difference between the file value and the existing type.
useForValidation properties
- existinganyRequired
Value currently in the tenant.
- fromFileanyRequired
Value from the import file.
-
-
- typestringRequired
Category of the semantic type.
Can be one of: "REGEX""DICTIONARY""COMPOUND"
- errorstring
Human-readable error message. Only present when status is
ERROR. - labelstringRequired
Label of the semantic type.
- statusstringRequired
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"
-
- messagestringRequired
-
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.
application/json properties
- errorsarray of objectsRequired
Error detail for a single semantic type that could not be imported.
errors properties
- codestringRequired
Application error code identifying the failure reason.
- labelstringRequired
Label of the semantic type that failed.
- messagestringRequired
Human-readable error description in English.
-
- summaryobjectRequired
Aggregate counts and per-status label details for the import result. Each status group includes a count and the list of affected type labels.
summary properties
- erroredobjectRequired
Count and affected types for one import outcome.
errored properties
- countintegerRequired
Number of types in this category.
- itemsarray of objectsRequired
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.
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).
- labelstringRequired
Label of the affected semantic type.
-
- labelsarray of stringsRequired
Labels of the affected semantic types.
-
- skippedobjectRequired
Count and affected types for one import outcome.
skipped properties
- countintegerRequired
Number of types in this category.
- itemsarray of objectsRequired
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.
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).
- labelstringRequired
Label of the affected semantic type.
-
- labelsarray of stringsRequired
Labels of the affected semantic types.
-
- updatedobjectRequired
Count and affected types for one import outcome.
updated properties
- countintegerRequired
Number of types in this category.
- itemsarray of objectsRequired
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.
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).
- labelstringRequired
Label of the affected semantic type.
-
- labelsarray of stringsRequired
Labels of the affected semantic types.
-
- duplicatesobjectRequired
Count and affected types for one import outcome.
duplicates properties
- countintegerRequired
Number of types in this category.
- itemsarray of objectsRequired
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.
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).
- labelstringRequired
Label of the affected semantic type.
-
- labelsarray of stringsRequired
Labels of the affected semantic types.
-
- totalCreatedobjectRequired
Count and affected types for one import outcome.
totalCreated properties
- countintegerRequired
Number of types in this category.
- itemsarray of objectsRequired
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.
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).
- labelstringRequired
Label of the affected semantic type.
-
- labelsarray of stringsRequired
Labels of the affected semantic types.
-
-
-
400
Invalid payload — malformed JSON, unknown format, or structural error.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
401
User does not have valid authentication credentials.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
403
User does not have access to the resource.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
500
Internal Server Error.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
503
Requested service is not available.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
// 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."}