Data credentials

Data credentials are the stored credentials leveraged by the data-connections service to connect to external data sources.

Download specification

Gets a credential by ID (or by name when bycredentialname=true is set in query)

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories manage

Query Parameters

  • byCredentialNameboolean

    If set to true, credentialId in the query will be interpreted as credential's name

Path Parameters

  • qIDstring
    Required

    Credential ID

Responses

200

application/json

Credential retrieved

  • application/jsonobject
    Show application/json properties
    • qIDstring
      Required

      UUID of the credential

    • linksobject
      Show links properties
      • selfobject
        Required

        Link to current query

        Show self properties
        • hrefstring
          Required

          URL pointing to the resource

    • qNamestring
      Required

      Name of the credential

    • qTypestring
      Required

      Type of credential

    • createdstring

      Datetime when the credential was created

    • updatedstring

      Datetime when the credential was last updated

    • qConnCountinteger
      Required

      Number of linked connections

    • datasourceIDstring

      ID datasource that the credential is created for

    • qReferenceKeystring

      Reference key of credential in redis

400

application/json

Empty value not permitted for dataName

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

404

application/json

Credential not found

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

GET /v1/data-credentials/{qID}
curl "https://your-tenant.us.qlikcloud.com/api/v1/data-credentials/{qID}" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/data-credentials/{qID}',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "qID": "065f977e-6eca-408c-b78b-ecded823712c",
  "links": {
    "self": {
      "href": "https://mytenant.us.qlikcloud.com/..."
    }
  },
  "qName": "MyCredential for REST datasource",
  "qType": "QvWebStorageProviderConnectorPackage.exe",
  "created": "2022-04-08T10:00:28.287Z",
  "updated": "2022-04-09T10:00:28.287Z",
  "qConnCount": 1,
  "datasourceID": "rest",
  "qReferenceKey": "credential:key"
}

Patches a credential specified by ID (or by name when bycredentialname=true is set in query)

Facts

Rate limit Tier 2 (100 requests per minute)
Categories manage

Query Parameters

  • byCredentialNameboolean

    If set to true, credentialId in the query will be interpreted as credential's name

Path Parameters

  • qIDstring
    Required

    Credential ID

Request Body

Required

application/json

  • application/jsonobject
    Show application/json properties
    • patchDataarray of objects
      Required
      Show patchData properties
      • opstring

        Operation type

        Can be one of: "add""replace""remove"

      • pathstring

        Path to the target field to be patched

      • valuestring

        The value used for the patch, only needed for 'add' or 'replace'. Value type could be either string or integer, should match with the type of the target field

Responses

204

Credential updated successfully

400

application/json

Connection ID changed

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

404

application/json

Credential not found

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

409

application/json

Credential already exists (when updated name conflicts with existing record)

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

PATCH /v1/data-credentials/{qID}
curl "https://your-tenant.us.qlikcloud.com/api/v1/data-credentials/{qID}" \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"patchData":[{"op":"add","path":"/qName","value":"New value"}]}'
const https = require('https')
  const data = JSON.stringify({"patchData":[{"op":"add","path":"/qName","value":"New value"}]})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/data-credentials/{qID}',
    'method': 'PATCH',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "patchData": [
    {
      "op": "add",
      "path": "/qName",
      "value": "New value"
    }
  ]
}

Updates a credential specified by ID (or by name when bycredentialname=true is set in query)

Facts

Rate limit Tier 2 (100 requests per minute)
Categories manage

Query Parameters

  • byCredentialNameboolean

    If set to true, credentialId in the query will be interpreted as credential's name

Path Parameters

  • qIDstring
    Required

    Credential ID

Request Body

Required

application/json

Credential

  • application/jsonobject

    Credential

    Show application/json properties
    • qIDstring

      UUID of the credential

    • qNamestring
      Required

      Name of the credential

    • qTypestring
      Required

      Type of credential (i.e. connector provider of the corresponding connection)

    • qPasswordstring
      Required

      Password

    • qUsernamestring
      Required

      User name

    • connectionIdstring

      ID of connection that will be associated with the credential

    • datasourceIDstring

      ID datasource that the credential is created for

Responses

204

Credential updated successfully

400

application/json

Connection ID changed

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

404

application/json

Credential not found

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

409

application/json

Credential already exists (when updated name conflicts with existing record)

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

PUT /v1/data-credentials/{qID}
curl "https://your-tenant.us.qlikcloud.com/api/v1/data-credentials/{qID}" \
-X PUT \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"qID":"c2dd20e3-1842-42d0-81fe-1ecf08e6abde","qName":"MyCredential for REST datasource","qType":"QvWebStorageProviderConnectorPackage.exe","qPassword":"MyPassword","qUsername":"MyUsername","connectionId":"2eb98dea-5e3b-4f50-9967-841cec04b72f","datasourceID":"rest"}'
const https = require('https')
  const data = JSON.stringify({"qID":"c2dd20e3-1842-42d0-81fe-1ecf08e6abde","qName":"MyCredential for REST datasource","qType":"QvWebStorageProviderConnectorPackage.exe","qPassword":"MyPassword","qUsername":"MyUsername","connectionId":"2eb98dea-5e3b-4f50-9967-841cec04b72f","datasourceID":"rest"})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/data-credentials/{qID}',
    'method': 'PUT',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "qID": "c2dd20e3-1842-42d0-81fe-1ecf08e6abde",
  "qName": "MyCredential for REST datasource",
  "qType": "QvWebStorageProviderConnectorPackage.exe",
  "qPassword": "MyPassword",
  "qUsername": "MyUsername",
  "connectionId": "2eb98dea-5e3b-4f50-9967-841cec04b72f",
  "datasourceID": "rest"
}

Deletes the specified credential by ID (or by name when type=credentialname is set in query)

Facts

Rate limit Tier 2 (100 requests per minute)
Categories manage

Query Parameters

  • byCredentialNameboolean

    If set to true, credentialId in the query will be interpreted as credential's name

Path Parameters

  • qIDstring
    Required

    Credential ID

Responses

204

Credential deleted successfully

404

application/json

Credential not found

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

DELETE /v1/data-credentials/{qID}
curl "https://your-tenant.us.qlikcloud.com/api/v1/data-credentials/{qID}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/data-credentials/{qID}',
    'method': 'DELETE',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Gets list of orphan data credentials (i.e. credentials that are not associated to any data connection) filtering on properties defined in request body

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Request Body

Required

application/json

  • application/jsonobject
    Show application/json properties
    • qTypestring

      Filtering on type of credentials

    • qSeparatedinteger

      Filtering on separate status of credentials: * 0 - embedded credential * 1 - separated credential

      Can be one of: 01

    • datasourceIDstring

      Filtering on datasource ID of credentials

Responses

200

application/json

Orphan credentials returned

  • application/jsonobject
    Show application/json properties
    • dataarray of objects
      Required

      Orphan credential

      Show data properties
      • qIDstring
        Required

        UUID of the credential

      • userstring

        User ID of the credential's owner

      • qNamestring
        Required

        Name of the credential

      • qTypestring
        Required

        Type of credential (i.e. connector provider of the corresponding connection)

      • tenantstring

        Tenant ID of the credential's owner

      • createdstring
        Required

        Datetime when the credential was created

      • updatedstring
        Required

        Datetime when the credential was last updated

      • datasourceIDstring

        ID datasource that the credential is created for

    • countinteger
      Required

      Number of orphan credentials found

400

application/json

Bad request (Missing required field in request body)

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

403

application/json

User has no access to credentials

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Unique internal error code

      • titlestring

        A summary in english explaining what went wrong

      • detailstring

        More concrete details

      • statusinteger

        HTTP status code

POST /v1/data-credentials/actions/filter-orphan
curl "https://your-tenant.us.qlikcloud.com/api/v1/data-credentials/actions/filter-orphan" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"qType":"QvOdbcConnectorPackage.exe","qSeparated":0,"datasourceID":"snowflake"}'
const https = require('https')
  const data = JSON.stringify({"qType":"QvOdbcConnectorPackage.exe","qSeparated":0,"datasourceID":"snowflake"})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/data-credentials/actions/filter-orphan',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "qType": "QvOdbcConnectorPackage.exe",
  "qSeparated": 0,
  "datasourceID": "snowflake"
}

Response

{
  "data": [
    {
      "qID": "c2dd20e3-1842-42d0-81fe-1ecf08e6abde",
      "user": "rFdHeUOiVYgPX5iTbvL0x0Cs6F62QI",
      "qName": "MyCredential for REST datasource",
      "qType": "QvWebStorageProviderConnectorPackage.exe",
      "tenant": "xqFQ0k34vSR0d9G7J-vZtHZQkiYrCqc8",
      "created": "2022-04-08T10:00:28.287Z",
      "updated": "2022-04-09T10:00:28.287Z",
      "datasourceID": "rest"
    }
  ],
  "count": 1
}