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
Retrieves all semantic types for a tenant. Supports conditional requests via the If-None-Match header.
Facts
| Rate limit | Tier 1 (1000 requests per minute) |
Header Parameters
- If-None-Matchstring
The
ETagvalue from a previous response. When it matches the current version, the server returns304 Not Modifiedinstead of the full response.
Query Parameters
- fieldsstring
A comma-separated list of fields to include in the response. The
idfield is always returned regardless of this filter. - idsarray of strings
Used to get semantic types with given ids.
- parentIdsarray of strings
Used to get semantic types with given parent ids.
Responses
200
List of semantic type definitions
- application/jsonobject
application/json properties
- dataany
-
304
The semantic type list has not changed since the ETag provided in the If-None-Match request header.
400
The request contains invalid fields.
- 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
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.dataGovernance.semanticTypes.getSemanticTypes( {},)# qlik-cli has not implemented support for GET /api/data-governance/semantic-types yet.curl "https://{tenant}.{region}.qlikcloud.com/api/data-governance/semantic-types" \-H "Authorization: Bearer <access_token>"Example Response
{}Creates a new semantic type for the current tenant. A semantic type can be defined as a regular expression, a dictionary of values, or a compound of other semantic types, as specified by the type field in the request body.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Request Body
Required- application/jsonobject
A semantic type definition, expressed as a
REGEXpattern, aDICTIONARYof values, or aCOMPOUNDof other semantic types.One of:- CreateSemanticTypeRegexRequestobject
Request to create a semantic type that matches words against a regex pattern.
CreateSemanticTypeRegexRequest properties
- typestringRequired
Category of the semantic type.
REGEX,DICTIONARY, orCOMPOUND. Determines whichconfigschema applies. - labelstringRequired
label of semantic type
- configobjectRequired
A semantic type for words matching a regex pattern
config 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
-
- activatedboolean
When
true, the semantic type can be used in data quality compute. - descriptionstring
- useForValidationboolean
When
true, the semantic type is used for validation.
-
- CreateSemanticTypeCompoundRequestobject
Request to create a compound semantic type composed of multiple child semantic types.
CreateSemanticTypeCompoundRequest properties
- typestringRequired
Category of the semantic type.
REGEX,DICTIONARY, orCOMPOUND. Determines whichconfigschema applies. - labelstringRequired
label of semantic type
- configobjectRequired
A coumpound of multiple kinds of semantic types
config properties
- childrenarray of stringsRequired
Identifier of a child semantic type.
-
- activatedboolean
When
true, the semantic type can be used in data quality compute. - descriptionstring
- useForValidationboolean
When
true, the semantic type is used for validation.
-
- CreateSemanticTypeDictionaryRequestobject
Request to create a semantic type that matches words against a list of dictionary values.
CreateSemanticTypeDictionaryRequest properties
- typestringRequired
Category of the semantic type.
REGEX,DICTIONARY, orCOMPOUND. Determines whichconfigschema applies. - labelstringRequired
label of semantic type
- configobjectRequired
A semantic type for words matching a value in the list of values
config 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"
-
- activatedboolean
When
true, the semantic type can be used in data quality compute. - descriptionstring
- useForValidationboolean
When
true, the semantic type is used for validation.
-
-
Responses
201
Semantic type created successfully.
- application/jsonobject
application/json properties
- idstringRequired
- 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"
-
- SemanticTypeCompoundobject
A coumpound of multiple kinds of semantic types
SemanticTypeCompound properties
- childrenarray of stringsRequired
Identifier of a child semantic type.
-
-
- parentIdstring
Parent semantic type identifier. This field is omitted from the default response and is only returned when explicitly requested with
fields=parentId. - activatedbooleanRequired
- createdAtstringRequired
- createdBystringRequired
- updatedAtstringRequired
- updatedBystringRequired
- descriptionstring
- useForValidationbooleanRequired
-
400
The request is in incorrect format, or the semantic type failed validation (for example, a duplicate label, an invalid validationPattern, or missing dictionary values).
- 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
-
404
Resource does not exist.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
413
The payload Too Large.
- 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
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.dataGovernance.semanticTypes.createSemanticType( { type: 'REGEX', label: 'Qlik email', description: 'qlik email is a trigram followed by @qlik', validationPattern: '^[a-z]{3}@qlik\\.com$', },)# qlik-cli has not implemented support for POST /api/data-governance/semantic-types yet.curl "https://{tenant}.{region}.qlikcloud.com/api/data-governance/semantic-types" \-X POST \-H "Content-type: application/json" \-H "Authorization: Bearer <access_token>" \-d '{"type":"REGEX","label":"Qlik email","description":"qlik email is a trigram followed by @qlik","validationPattern":"^[a-z]{3}@qlik\\.com$"}'Example Response
{ "type": "REGEX", "label": "Qlik email", "config": { "validationContent": "ANY_CHARACTER", "validationPattern": "^[a-z]{3}@qlik\\.com$" }, "activated": true, "createdAt": "2025-07-16T13:38:03Z", "createdBy": "685bc460dcdf02ef734cd2e6", "updatedAt": "2025-07-16T13:38:03Z", "updatedBy": "685bc460dcdf02ef734cd2e6", "description": "qlik email is a trigram followed by @qlik", "useForValidation": true}Returns the definition of a single semantic type identified by its ID, including its configuration (regex, dictionary, or compound rules).
Facts
| Rate limit | Tier 1 (1000 requests per minute) |
Query Parameters
- fieldsstring
A comma-separated list of fields to include in the response. The
idfield is always returned regardless of this filter.
Path Parameters
- semanticTypeIdstringRequired
The unique identifier of the semantic type.
Responses
200
Semantic type retrieved successfully.
- application/jsonobject
application/json properties
- idstringRequired
- 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"
-
- SemanticTypeCompoundobject
A coumpound of multiple kinds of semantic types
SemanticTypeCompound properties
- childrenarray of stringsRequired
Identifier of a child semantic type.
-
-
- parentIdstring
Parent semantic type identifier. This field is omitted from the default response and is only returned when explicitly requested with
fields=parentId. - activatedbooleanRequired
- createdAtstringRequired
- createdBystringRequired
- updatedAtstringRequired
- updatedBystringRequired
- 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
-
404
Resource does not exist.
- 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
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.dataGovernance.semanticTypes.getSemanticType( 'string', {},)# qlik-cli has not implemented support for GET /api/data-governance/semantic-types/{semanticTypeId} yet.curl "https://{tenant}.{region}.qlikcloud.com/api/data-governance/semantic-types/{semanticTypeId}" \-H "Authorization: Bearer <access_token>"Example Response
{ "type": "REGEX", "label": "Qlik email", "config": { "validationContent": "ANY_CHARACTER", "validationPattern": "^[a-z]{3}@qlik\\.com$" }, "activated": true, "createdAt": "2025-07-16T13:38:03Z", "createdBy": "685bc460dcdf02ef734cd2e6", "updatedAt": "2025-07-16T13:38:03Z", "updatedBy": "685bc460dcdf02ef734cd2e6", "description": "qlik email is a trigram followed by @qlik", "useForValidation": true}Partially updates an existing semantic type identified by its ID. Only the fields included in the request payload are modified; omitted fields keep their current values.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- semanticTypeIdstringRequired
The unique identifier of the semantic type.
Request Body
Required- application/jsonarray of objects
application/json properties
- opstringRequired
Can be one of: "replace"
- pathstringRequired
Can be one of: "/label""/description""/useForValidation""/activated""/config/validationContent""/config/validationPattern""/config/validationCriteria""/config/values""/config/children"
- valuestring|boolean|array
The new value to apply at the given
path. The accepted type depends on the target path: a string for/label,/description,/config/validationContent,/config/validationPattern, and/config/validationCriteria; a boolean for/useForValidationand/activated; an array for/config/valuesand/config/children.One of:- string
- boolean
- array of undefineds
-
-
Responses
204
Semantic type updated successfully.
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
-
404
Resource does not exist.
- application/jsonobject
application/json properties
- errorsarray of objects
errors properties
- codestring
- titlestring
- detailstring
- statusstring
-
- traceIdstring
-
413
The payload Too Large.
- 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
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.dataGovernance.semanticTypes.patchSemanticType( 'string', [ { op: 'replace', path: '/label', value: 'string', }, ],)# qlik-cli has not implemented support for PATCH /api/data-governance/semantic-types/{semanticTypeId} yet.curl "https://{tenant}.{region}.qlikcloud.com/api/data-governance/semantic-types/{semanticTypeId}" \-X PATCH \-H "Content-type: application/json" \-H "Authorization: Bearer <access_token>" \-d '[{"op":"replace","path":"/label","value":"string"}]'Permanently deletes a semantic type identified by its ID. This operation cannot be undone. Any dataset fields previously associated with the semantic type will no longer be classified by it. A semantic type used as a child of a COMPOUND type cannot be deleted until it is removed from that COMPOUND type.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- semanticTypeIdstringRequired
The unique identifier of the semantic type.
Responses
204
Semantic type deleted successfully.
400
The request is in incorrect format, or the semantic type cannot be deleted because it is used as a child of a COMPOUND type.
- 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
-
404
Resource does not exist.
- 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
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.dataGovernance.semanticTypes.deleteSemanticType( 'string',)# qlik-cli has not implemented support for DELETE /api/data-governance/semantic-types/{semanticTypeId} yet.curl "https://{tenant}.{region}.qlikcloud.com/api/data-governance/semantic-types/{semanticTypeId}" \-X DELETE \-H "Authorization: Bearer <access_token>"Returns a paginated list of datasets and their field names that are associated with the specified semantic type. Data is pre-computed from the dataset relationship collection and populated lazily when data quality events are processed.
Facts
| Rate limit | Tier 1 (1000 requests per minute) |
Query Parameters
- pageinteger
Page number for pagination (1-based).
- limitinteger
Number of items per page.
- sortstring
Optional resource field name to sort on. Can be prefixed with +/- to determine order, defaults to (+) ascending. In URLs, "+" should be percent-encoded as "%2B".
Can be one of: "+datasetId""-datasetId"
Path Parameters
- semanticTypeIdstringRequired
The unique identifier of the semantic type.
Responses
200
Dataset fields retrieved successfully.
- application/jsonobject
application/json properties
- dataarray of objects
data properties
- datasetIdstring
The unique identifier of the dataset.
- fieldNamesarray of strings
The list of field names in the dataset associated with the semantic type.
-
- linksobject
JSON:API pagination links.
links properties
- lastobject
A pagination link object.
last properties
- hrefstring
The URL for the link.
-
- nextobject
A pagination link object.
next properties
- hrefstring
The URL for the link.
-
- prevobject
A pagination link object.
prev properties
- hrefstring
The URL for the link.
-
- firstobject
A pagination link object.
first properties
- hrefstring
The URL for the link.
-
-
-
400
Bad request.
- 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
-
404
Resource does not exist.
- 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
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.dataGovernance.semanticTypes.getSemanticTypeDatasetFields( 'string', {},)# qlik-cli has not implemented support for GET /api/data-governance/semantic-types/{semanticTypeId}/dataset-fields yet.curl "https://{tenant}.{region}.qlikcloud.com/api/data-governance/semantic-types/{semanticTypeId}/dataset-fields" \-H "Authorization: Bearer <access_token>"Example Response
{ "data": [ { "datasetId": "string", "fieldNames": [ "string" ] } ], "links": { "last": { "href": "string" }, "next": { "href": "string" }, "prev": { "href": "string" }, "first": { "href": "string" } }}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
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.dataGovernance.semanticTypes.exportSemanticTypes( { createdBy: '712020:291adc5e-c210-408b-a43a-776448c35ef4', ids: [ '3b179e2b028c4306ab108b68116ae639',
'4d237dd47e594f789617041b0d09c66f', ], search: 'email', types: ['REGEX', 'DICTIONARY'], },)# 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""IMPORT_DICTIONARY_VALIDATION_CRITERIA_INVALID"
-
- 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
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.dataGovernance.semanticTypes.importSemanticTypes( { conflictResolutions: [ { label: 'Email Address', strategy: 'SKIP', }, ], defaultConflictStrategy: 'SKIP', file: { exportedAt: '2024-01-01T00:00:00Z', exportFormat: 'QlikSemanticTypesExport', semanticTypes: [], }, },)# 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."}