Data sources

Lists data sources available on the tenant for the creation of data connections.

Get data sources

Gets the list of data sources available on the node.

Facts

Rate limit Tier 1 (1000 requests per minute)

Query Parameters

  • dataSourceId string

    Filtering on datasourceID, when multiple dataSourceId are set in query, last dataSourceId will be used

  • detail boolean

    Determines if provider detail is returned

  • includeDisabled boolean

    When true, disabled datasources are also included in the response

  • includeui boolean

    Determines if UI info is returned

Responses

200

An array of data source info

  • application/json object
    Show application/json properties
    • dataSources array of objects
      Required

      List of datasources metadata object

      Show dataSources properties
      • name string
        Required

        Datasource name

      • uiInfo object

        UI related metadata (only present when 'includeui' is set to true in query)

        Show uiInfo properties
        • iframe boolean

          If support iframe

        • selectUrl string

          Select URL

        • connectUrl string

          Connect URL

        • iconRectUrl string

          Icon URL

        • iconSquareUrl string

          Square icon URL

        • credentialsUrl string

          Credentials URL

        • connectorMainUrl string

          Connector main URL

        • loadModelSupport string

          Indicate if the datasource supports load model

      • disabled boolean

        Indicates whether the datasource is disabled

      • provider string
        Required

        Connector provider

      • capabilities array of strings

        List of capabilities supported by the datasource

      • dataSourceId string
        Required

        Unique identifier of datasource

      • providerName string
        Required

        Provider name

      • qriDefinition object

        Qri definition template

        Show qriDefinition properties
        • itemPart object

          Connection part of Qri template

          Show itemPart properties
          • prefix string

            Prefix of the template

          • template string
            Required

            Qri template

          • properties array of strings
            Required

            List of properties used in template

        • pathPart object
          Required

          Connection part of Qri template

          Show pathPart properties
          • prefix string

            Prefix of the template

          • template string
            Required

            Qri template

          • properties array of strings
            Required

            List of properties used in template

        • qriPrefix string
          Required

          Qri prefix

        • connectionPart object
          Required

          Connection part of Qri template

          Show connectionPart properties
          • template string
            Required

            Qri template

          • properties array of strings
            Required

            List of properties used in template

      • dataSourceType string

        Type of datasource

      • dataLoadUrlOverride string

        Override value of dataload URL (could be null)

      • dataSourcePropertyName string

        Datasource property name (could be null)

    • lastUpdated string
      Required

      Time stamp of last updated

    • connectorNodes array of objects

      List of connector nodes (only present when query parameter 'detail' is set to true)

      Show connectorNodes properties
      • url string
        Required

        URL of connector node

      • state string
        Required

        State of the connector node

      • contractType number
        Required

        Contract type used to communicate with the connector (between 0 and 3)

      • providerName string
        Required

        Connector provider name

      • cachedDataSources array of strings

        List of datasource IDs provided by the provider

      • dataSourcesUpdated boolean
        Required

        Indicates whether the datasources are up to date

401

Unauthorized request (Bad JWT token etc)

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

404

Datasource not found or it is not enabled

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

500

Internal errors

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

GET /api/v1/data-sources
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.dataSources.getDataSources({})
qlik data-source ls
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/data-sources" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"dataSources": [
{
"name": "Qlik® REST Connector",
"uiInfo": {
"iframe": true,
"selectUrl": "/customdata/64/QvRestConnector/web/standalone/select-dialog.html",
"connectUrl": "/customdata/64/QvRestConnector/web/standalone/connect-dialog.html",
"iconRectUrl": "/customdata/64/QvRestConnector/web/Icons/rest.png",
"iconSquareUrl": "/customdata/64/QvRestConnector/web/Icons/rest-square.png",
"credentialsUrl": "/customdata/64/QvRestConnector/web/standalone/credentials-dialog.html",
"connectorMainUrl": "/customdata/64/QvRestConnector/web/connector-main-iframe.js",
"loadModelSupport": "false"
},
"disabled": true,
"provider": "QvRestConnector.exe",
"capabilities": [
"datasource-specific-capabity"
],
"dataSourceId": "rest",
"providerName": "Qlik® REST Connector",
"qriDefinition": {
"itemPart": {
"prefix": "#",
"template": "{schema}.{table}",
"properties": [
"schema"
]
},
"pathPart": {
"prefix": "#",
"template": "{schema}.{table}",
"properties": [
"schema"
]
},
"qriPrefix": "qri:db:sap-sql://",
"connectionPart": {
"template": "{schema}.{table}",
"properties": [
"schema"
]
}
},
"dataSourceType": "connector",
"dataLoadUrlOverride": "ml-endpoints:50055",
"dataSourcePropertyName": "sourceType"
}
],
"lastUpdated": "2023-11-03T15:45:14.195Z",
"connectorNodes": [
{
"url": "localhost:50060",
"state": "READY",
"contractType": 2,
"providerName": "Qlik® REST Connector",
"cachedDataSources": [
"rest"
],
"dataSourcesUpdated": "true"
}
]
}

Get 'connectionProperties' for a given datasource

Facts

Rate limit Tier 1 (1000 requests per minute)

Path Parameters

  • dataSourceId string
    Required

    Datasource ID

Responses

200

API spec returned

  • application/json object
    Show application/json properties
    • connectorVersion string
      Required

      Datasource provider (i.e. connector) version

    • connectorProvider string
      Required

      Datasource provider

    • connectionProperties object
      Required

      List of properties required for the given datasource

401

Unauthorized request (Bad JWT token etc)

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

404

Datasource not found or it is not enabled

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

500

Internal errors

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

503

Service unavailable, happens when request to connector or down stream services fails

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

GET /api/v1/data-sources/{dataSourceId}/api-specs
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.dataSources.getDataSourceApiSpecs(
'rest',
)
qlik data-source connection-properties 'rest'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/data-sources/{dataSourceId}/api-specs" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"connectorVersion": "1.180.0",
"connectorProvider": "QvRestConnector.exe",
"connectionProperties": "{\"property1\": \"value\", \"property2\": \"value2\"}"
}

Get list available gateway ID's for a given datasource

Facts

Rate limit Tier 1 (1000 requests per minute)

Query Parameters

  • forceRefresh boolean

    Force to get a refreshed list from backend. Cached list will be returned if not set or set to false.

Path Parameters

  • dataSourceId string
    Required

    Datasource ID

Responses

200

Gateways list returned

  • application/json object
    Show application/json properties
    • gateways array of objects

      List of gateway ID's for given datasource ID

      Show gateways properties
      • id string

        Gateway ID

      • name string

        Gateway name

      • default boolean

        Whether the gateway is default

    • refreshedAt string

      Time stamp when the gateways data were refreshed

401

Unauthorized request (Bad JWT token etc)

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

404

Datasource not found (or not enabled), or no gateway is configured for the tenant

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

500

General internal errors

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

GET /api/v1/data-sources/{dataSourceId}/gateways
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.dataSources.getDataSourceGateways(
'rest',
{},
)
qlik data-source list-gateways 'rest'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/data-sources/{dataSourceId}/gateways" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"gateways": [
{
"id": "051YTx0OGDlfQ_66H3NyXwK24HEEyyJI::a6CxFtkInvsJnrNXCOVWR8pQOwaphpU0",
"name": "MyGateway",
"default": true
}
],
"refreshedAt": "2024-01-18T02:25:59.521Z"
}

Get data source settings

Retrieves the settings for a data source.

Facts

Rate limit Tier 1 (1000 requests per minute)

Path Parameters

  • dataSourceId string
    Required

    Datasource ID

Responses

200

A JSON object containing the data source settings.

  • application/json object

    Represents the current settings of a data source.

    Show application/json properties
    • disabled boolean

      Indicates whether the data source is disabled.

400

Bad request

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

401

Unauthorized request (Bad JWT token etc)

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

404

Data source not found

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

500

Internal errors

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

GET /api/v1/data-sources/{dataSourceId}/settings
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.dataSources.getDataSourceSettings(
'rest',
)
qlik data-source settings get 'rest'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/data-sources/{dataSourceId}/settings" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"disabled": false
}

Update data source settings

Updates the settings for a data source.

Facts

Rate limit Tier 2 (100 requests per minute)

Path Parameters

  • dataSourceId string
    Required

    Datasource ID

Request Body

Required
  • application/json object

    Defines configuration settings for a data source.

    Show application/json properties
    • disabled boolean
      Required

      Indicates whether the data source is disabled.

Responses

200

Data source settings updated successfully.

  • application/json object

    Represents the current settings of a data source.

    Show application/json properties
    • disabled boolean

      Indicates whether the data source is disabled.

400

Bad request

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

401

Unauthorized request (Bad JWT token etc)

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

404

Data source not found

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

500

Internal errors

  • application/json object
    Show application/json properties
    • errors array of objects
      Show errors properties
      • code string
        Required

        A service specific error code string

      • meta object

        Additional metadata associated with the error

      • title string
        Required

        Summary of the error

      • detail string

        Concrete detail about the error

PUT /api/v1/data-sources/{dataSourceId}/settings
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.dataSources.putDataSourceSettings(
'rest',
{},
)
qlik data-source settings update 'rest' \
--disabled false
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/data-sources/{dataSourceId}/settings" \
-X PUT \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"disabled":false}'

Example Response

{
"disabled": false
}