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-Match string
The
ETagvalue from a previous response. When it matches the current version, the server returns304 Not Modifiedinstead of the full response.
Query Parameters
- fields string
A comma-separated list of fields to include in the response. The
idfield is always returned regardless of this filter. - ids array of strings
Used to get semantic types with given ids.
- parentIds array of strings
Used to get semantic types with given parent ids.
Responses
200
List of semantic type definitions
- application/json object
application/json properties
- data any
-
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/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
401
User does not have valid authentication credentials.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
403
User does not have access to the resource.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
500
Internal Server Error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
503
Requested service is not available.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.dataGovernance.semanticTypes.getSemanticTypes( {},)qlik data-governance semantic-type lscurl "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/json object
A semantic type definition, expressed as a
REGEXpattern, aDICTIONARYof values, or aCOMPOUNDof other semantic types.One of:- CreateSemanticTypeRegexRequest object
Request to create a semantic type that matches words against a regex pattern.
CreateSemanticTypeRegexRequest properties
- type stringRequired
Category of the semantic type.
REGEX,DICTIONARY, orCOMPOUND. Determines whichconfigschema applies. - label stringRequired
label of semantic type
- config objectRequired
A semantic type for words matching a regex pattern
config properties
- validationContent string
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"
- validationPattern stringRequired
Regular expression
-
- activated boolean
When
true, the semantic type can be used in data quality compute. - description string
- useForValidation boolean
When
true, the semantic type is used for validation.
-
- CreateSemanticTypeCompoundRequest object
Request to create a compound semantic type composed of multiple child semantic types.
CreateSemanticTypeCompoundRequest properties
- type stringRequired
Category of the semantic type.
REGEX,DICTIONARY, orCOMPOUND. Determines whichconfigschema applies. - label stringRequired
label of semantic type
- config objectRequired
A coumpound of multiple kinds of semantic types
config properties
- children array of stringsRequired
Identifier of a child semantic type.
-
- activated boolean
When
true, the semantic type can be used in data quality compute. - description string
- useForValidation boolean
When
true, the semantic type is used for validation.
-
- CreateSemanticTypeDictionaryRequest object
Request to create a semantic type that matches words against a list of dictionary values.
CreateSemanticTypeDictionaryRequest properties
- type stringRequired
Category of the semantic type.
REGEX,DICTIONARY, orCOMPOUND. Determines whichconfigschema applies. - label stringRequired
label of semantic type
- config objectRequired
A semantic type for words matching a value in the list of values
config properties
- values array of stringsRequired
Values for dictionary
- validationCriteria string
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"
-
- activated boolean
When
true, the semantic type can be used in data quality compute. - description string
- useForValidation boolean
When
true, the semantic type is used for validation.
-
-
Responses
201
Semantic type created successfully.
- application/json object
application/json properties
- id stringRequired
- type stringRequired
Can be one of: "REGEX""DICTIONARY""COMPOUND"
- label stringRequired
- config objectRequiredOne of:
- SemanticTypeRegex object
A semantic type for words matching a regex pattern
SemanticTypeRegex properties
- validationContent string
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"
- validationPattern stringRequired
Regular expression
-
- SemanticTypeDictionary object
A semantic type for words matching a value in the list of values
SemanticTypeDictionary properties
- values array of stringsRequired
Values for dictionary
- validationCriteria string
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"
-
- SemanticTypeCompound object
A coumpound of multiple kinds of semantic types
SemanticTypeCompound properties
- children array of stringsRequired
Identifier of a child semantic type.
-
-
- parentId string
Parent semantic type identifier. This field is omitted from the default response and is only returned when explicitly requested with
fields=parentId. - activated booleanRequired
- createdAt stringRequired
- createdBy stringRequired
- updatedAt stringRequired
- updatedBy stringRequired
- description string
- useForValidation booleanRequired
-
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/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
401
User does not have valid authentication credentials.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
403
User does not have access to the resource.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
404
Resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
413
The payload Too Large.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
500
Internal Server Error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
503
Requested service is not available.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
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 data-governance semantic-type create \ --config-validationContent '' \ --config-validationPattern '' \ --config-children '' \ --config-validationCriteria '' \ --config-values ''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
- fields string
A comma-separated list of fields to include in the response. The
idfield is always returned regardless of this filter.
Path Parameters
- semanticTypeId stringRequired
The unique identifier of the semantic type.
Responses
200
Semantic type retrieved successfully.
- application/json object
application/json properties
- id stringRequired
- type stringRequired
Can be one of: "REGEX""DICTIONARY""COMPOUND"
- label stringRequired
- config objectRequiredOne of:
- SemanticTypeRegex object
A semantic type for words matching a regex pattern
SemanticTypeRegex properties
- validationContent string
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"
- validationPattern stringRequired
Regular expression
-
- SemanticTypeDictionary object
A semantic type for words matching a value in the list of values
SemanticTypeDictionary properties
- values array of stringsRequired
Values for dictionary
- validationCriteria string
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"
-
- SemanticTypeCompound object
A coumpound of multiple kinds of semantic types
SemanticTypeCompound properties
- children array of stringsRequired
Identifier of a child semantic type.
-
-
- parentId string
Parent semantic type identifier. This field is omitted from the default response and is only returned when explicitly requested with
fields=parentId. - activated booleanRequired
- createdAt stringRequired
- createdBy stringRequired
- updatedAt stringRequired
- updatedBy stringRequired
- description string
- useForValidation booleanRequired
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
401
User does not have valid authentication credentials.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
403
User does not have access to the resource.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
404
Resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
500
Internal Server Error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
503
Requested service is not available.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
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 data-governance semantic-type get 'string'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
- semanticTypeId stringRequired
The unique identifier of the semantic type.
Request Body
Required- application/json array of objects
application/json properties
- op stringRequired
Can be one of: "replace"
- path stringRequired
Can be one of: "/label""/description""/useForValidation""/activated""/config/validationContent""/config/validationPattern""/config/validationCriteria""/config/values""/config/children"
- value string|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/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
401
User does not have valid authentication credentials.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
403
User does not have access to the resource.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
404
Resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
413
The payload Too Large.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
500
Internal Server Error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
503
Requested service is not available.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
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 data-governance semantic-type patch 'string' \ --op 'replace' \ --path '/label'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
- semanticTypeId stringRequired
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/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
401
User does not have valid authentication credentials.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
403
User does not have access to the resource.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
404
Resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
500
Internal Server Error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
503
Requested service is not available.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
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 data-governance semantic-type rm 'string'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
- page integer
Page number for pagination (1-based).
- limit integer
Number of items per page.
- sort string
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
- semanticTypeId stringRequired
The unique identifier of the semantic type.
Responses
200
Dataset fields retrieved successfully.
- application/json object
application/json properties
- data array of objects
data properties
- datasetId string
The unique identifier of the dataset.
- fieldNames array of strings
The list of field names in the dataset associated with the semantic type.
-
- links object
JSON:API pagination links.
links properties
- last object
A pagination link object.
last properties
- href string
The URL for the link.
-
- next object
A pagination link object.
next properties
- href string
The URL for the link.
-
- prev object
A pagination link object.
prev properties
- href string
The URL for the link.
-
- first object
A pagination link object.
first properties
- href string
The URL for the link.
-
-
-
400
Bad request.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
401
User does not have valid authentication credentials.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
403
User does not have access to the resource.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
404
Resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
500
Internal Server Error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
503
Requested service is not available.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
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 data-governance semantic-type dataset-field ls 'string'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/json object
Request body for exporting semantic types with optional filters.
application/json properties
- ids array of strings
List of semantic type IDs to export. When provided, only these types are included.
- types array 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"
- search string
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.
- createdBy string
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/json object
Self-describing export envelope for Qlik Cloud semantic types.
application/json properties
- version stringRequired
Schema version for forward compatibility.
- exportFormat stringRequired
Format identifier for auto-detection on import.
Can be one of: "QlikSemanticTypesExport"
- exportedCount integer
Total number of semantic types included in this export. Helps API consumers quickly determine export size without parsing the entire array.
- semanticTypes array of objectsRequired
A semantic type in the export file, stripped of internal fields.
semanticTypes properties
- type stringRequired
Can be one of: "REGEX""DICTIONARY""COMPOUND"
- label stringRequired
- config objectRequiredOne of:
- SemanticTypeRegex object
A semantic type for words matching a regex pattern
SemanticTypeRegex properties
- validationContent string
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"
- validationPattern stringRequired
Regular expression
-
- SemanticTypeDictionary object
A semantic type for words matching a value in the list of values
SemanticTypeDictionary properties
- values array of stringsRequired
Values for dictionary
- validationCriteria string
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"
-
- ExportSemanticTypeCompound object
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
- children array of objectsRequired
Reference to a child type in a COMPOUND export. Contains resolution info (label + parentId) instead of a tenant-specific ID.
children properties
- label stringRequired
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. - parentId string
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).
-
-
-
- activated booleanRequired
- defaultId string
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.
- description string
- useForValidation booleanRequired
-
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
401
User does not have valid authentication credentials.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
403
User does not have access to the resource.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
500
Internal Server Error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
503
Requested service is not available.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
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 data-governance semantic-type exportcurl "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/json object
Import request wrapping the export file and optional conflict resolutions.
application/json properties
- file objectRequired
The export file payload as-is. Format is detected from the
exportFormatfield. AcceptsQlikSemanticTypesExport(Qlik native) orDQDictionaryImportExport(Talend legacy). - skipConfirmation boolean
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). - conflictResolutions array 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
- label stringRequired
Label of the conflicting semantic type.
- strategy stringRequired
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"
-
- defaultConflictStrategy string
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/json object
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
- code stringRequired
- types array 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
- diff object
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
- config object
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
- values object
A single field difference between the file value and the existing type.
values properties
- existing anyRequired
Value currently in the tenant.
- fromFile anyRequired
Value from the import file.
-
- children object
A single field difference between the file value and the existing type.
children properties
- existing anyRequired
Value currently in the tenant.
- fromFile anyRequired
Value from the import file.
-
- validationContent object
A single field difference between the file value and the existing type.
validationContent properties
- existing anyRequired
Value currently in the tenant.
- fromFile anyRequired
Value from the import file.
-
- validationPattern object
A single field difference between the file value and the existing type.
validationPattern properties
- existing anyRequired
Value currently in the tenant.
- fromFile anyRequired
Value from the import file.
-
- validationCriteria object
A single field difference between the file value and the existing type.
validationCriteria properties
- existing anyRequired
Value currently in the tenant.
- fromFile anyRequired
Value from the import file.
-
-
- category object
A single field difference between the file value and the existing type.
category properties
- existing anyRequired
Value currently in the tenant.
- fromFile anyRequired
Value from the import file.
-
- activated object
A single field difference between the file value and the existing type.
activated properties
- existing anyRequired
Value currently in the tenant.
- fromFile anyRequired
Value from the import file.
-
- description object
A single field difference between the file value and the existing type.
description properties
- existing anyRequired
Value currently in the tenant.
- fromFile anyRequired
Value from the import file.
-
- useForValidation object
A single field difference between the file value and the existing type.
useForValidation properties
- existing anyRequired
Value currently in the tenant.
- fromFile anyRequired
Value from the import file.
-
-
- type stringRequired
Category of the semantic type.
Can be one of: "REGEX""DICTIONARY""COMPOUND"
- error string
Human-readable error message. Only present when status is
ERROR. - label stringRequired
Label of the semantic type.
- status stringRequired
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"
- errorCode string
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"
-
- message stringRequired
-
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/json object
Result of a best-effort import operation.
application/json properties
- errors array of objectsRequired
Error detail for a single semantic type that could not be imported.
errors properties
- code stringRequired
Application error code identifying the failure reason.
- label stringRequired
Label of the semantic type that failed.
- message stringRequired
Human-readable error description in English.
-
- summary objectRequired
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
- errored objectRequired
Count and affected types for one import outcome.
errored properties
- count integerRequired
Number of types in this category.
- items array 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
- id string
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).
- label stringRequired
Label of the affected semantic type.
-
- labels array of stringsRequired
Labels of the affected semantic types.
-
- skipped objectRequired
Count and affected types for one import outcome.
skipped properties
- count integerRequired
Number of types in this category.
- items array 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
- id string
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).
- label stringRequired
Label of the affected semantic type.
-
- labels array of stringsRequired
Labels of the affected semantic types.
-
- updated objectRequired
Count and affected types for one import outcome.
updated properties
- count integerRequired
Number of types in this category.
- items array 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
- id string
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).
- label stringRequired
Label of the affected semantic type.
-
- labels array of stringsRequired
Labels of the affected semantic types.
-
- duplicates objectRequired
Count and affected types for one import outcome.
duplicates properties
- count integerRequired
Number of types in this category.
- items array 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
- id string
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).
- label stringRequired
Label of the affected semantic type.
-
- labels array of stringsRequired
Labels of the affected semantic types.
-
- totalCreated objectRequired
Count and affected types for one import outcome.
totalCreated properties
- count integerRequired
Number of types in this category.
- items array 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
- id string
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).
- label stringRequired
Label of the affected semantic type.
-
- labels array of stringsRequired
Labels of the affected semantic types.
-
-
-
400
Invalid payload — malformed JSON, unknown format, or structural error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
401
User does not have valid authentication credentials.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
403
User does not have access to the resource.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
500
Internal Server Error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
503
Requested service is not available.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
- status string
-
- traceId string
-
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 data-governance semantic-type import \ --conflictResolutions-label '' \ --conflictResolutions-strategy '' \ --file [object Object]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."}