Temp contents

Download specification

Uploads a temporary content file

This endpoint is used to upload a file as a temporary content resource. It returns a 201 Created with a location header that contains the location of the created resource. If filename or TTL is not properly set, a 400 Bad request is returned. For internal issues, a 500 Internal Server Error is returned.

Facts

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

Query Parameters

  • filenamestring

    The name of the file to upload.

  • ttlinteger

    The TTL parameter is used to define the time-to-live for the content resource in seconds. It defaults to one hour (3600) if no input is provided. Max TTL is 259200 (3 days).'

Request Body

Required

application/octet-stream

The file content (binary) to upload.

  • application/octet-streamstring

Responses

201

Created

400

application/json

Bad Request.

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

POST /v1/temp-contents
curl "https://your-tenant.us.qlikcloud.com/api/v1/temp-contents" \
-X POST \
-H "Content-type: application/octet-stream" \
-H "Authorization: Bearer <API-key>" \
--data-binary' \
          '"@/path/to/file"
const https = require('https')
  const data = JSON.stringify("string")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/temp-contents',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/octet-stream',
      'Authorization': 'Bearer <API-key>'
    }
  }
  const req = https.request(options)
  req.write(streamData)
  
This API is not included yet in qlik-cli

Request

"string"

Download a temporary content file

This endpoint is used to retrieve a temporary content file. It returns a valid (200 OK) in case the file exists and the user is authorized to view the contents. It returns a 410 Gone if the file has expired and 404 Not Found if the criteria is not met.

Facts

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

Header Parameters

  • Rangestring

    Set to unit=start-end (for example, bytes=0-100) where unit = bytes (only supported unit), and start/end is a positive integer, where start <= end. Will also handle "start-" and "-end as described in https://tools.ietf.org/html/rfc7233".

Query Parameters

  • inlinestring

    Set to "1" to download the file in inline mode. Useful for displaying a preview of the file in a browser.

Path Parameters

  • idstring
    Required

    The temporary contents ID.

Responses

200

*/*

Success

  • */*object

204

No Content, resource is incomplete.

206

*/*

Success

  • */*object

400

application/json

Bad Request

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

404

application/json

Not Found

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

410

application/json

Gone

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

416

application/json

Range Not Satisfiable.

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

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

Response

{}

Retrieve temporary content details

This endpoint is used to retrieve a summary of the metadata associated with a temporary content resource. It returns a 200 OK with a model if the temporary resource is valid. It returns a 410 Gone if the file has expired and 404 Not Found if the criteria is not met.

Facts

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

Path Parameters

  • idstring
    Required

    The temporary contents ID.

Responses

200

application/json

Success

  • application/jsonobject
    Show application/json properties
    • IDstring

      Identifier

    • Namestring

      File name of the file uploaded by the user.

    • Sizestring

      Size of resource (in bytes).

    • Expiresstring

      Datetime-stamp when the resource expired (in UTC).

    • CreatedAtstring

      Datetime-stamp when the resource was created (in UTC).

    • CreatorIDstring

      Identifier for the subject / resource creator.

    • UpdatedAtstring

      Datetime-stamp when the resource was updated (in UTC).

    • TTLSecondsinteger

      Time-to-live in seconds.

204

No Content, resource is incomplete.

400

application/json

Bad Request

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

404

application/json

Not Found

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

410

application/json

Gone

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

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

Response

{
  "ID": "string",
  "Name": "string",
  "Size": "string",
  "Expires": "string",
  "CreatedAt": "string",
  "CreatorID": "string",
  "UpdatedAt": "string",
  "TTLSeconds": 42
}

Creates a new upload resource (tus protocol `creation` extension POST request)

Request used to create a new upload resource. See tus.io for details.

Facts

Rate limit Special (800 requests per minute)
Categories externalmanage

Header Parameters

  • Tus-Resumablestring
    Required

    The version of the tus protocol used.

  • Upload-Lengthinteger
    Required

    The size of the entire upload in bytes.

  • Upload-Metadatastring

    One or more comma-separated key-value pairs. The key and value must be separated by a space. The key should be ASCII encoded, and the value must be Base64 encoded. All keys must be unique. See tus.io for details.

    The following keys are used; any other keys are ignored.

    • filename - the name of the file.
    • ttl - the time-to-live for the uploaded file in seconds. Note that the time is counted from the start of the upload creation, not when the upload has finished. The server will keep the file available for access for this period of time. The server may then delete it. The time defaults to one hour (3600) if not provided. The maximum value is 259200 (3 days).'

Responses

201

Created

400

application/json

Bad Request

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

412

application/json

Precondition Failed. tus protocol version not supported by the server.

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

413

application/json

Request Entity Too Large

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

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

Apply bytes contained in the message at a given offset (tus protocol PATCH request)

Request used to apply the bytes contained in the message at a given offset. Note that the tus server only accepts that the Content-Type response header is set to "application/offset+octet-stream". See tus.io for details.

Note that the server may return 423 Locked on this request. This happens if the client attempts to perform concurrent access to the resource, for example, if attempting to do a HEAD request during an ongoing PATCH request. It can also occur in situations where the connection is unexpectedly dropped between the client and the server and the client attempts to make a new request when the server is still busy processing the upload. When this happens, the client shall, after some period of time, try to resume the upload again.

Facts

Rate limit Special (800 requests per minute)
Categories externalmanage

Header Parameters

  • Content-Typestring
    Required

    Standard HTTP Content-Type header.

  • Tus-Resumablestring
    Required

    The version of the tus protocol used.

  • Upload-Offsetinteger
    Required

    The byte offset within the upload.

  • Content-Lengthinteger

    Standard HTTP Content-Length header.

Path Parameters

  • idstring
    Required

    The ID used to uniquely identify the upload.

Request Body

Required

application/offset+octet-stream

The patch content (binary, either a complete or a partial file) to upload.

  • application/offset+octet-streamstring

Responses

204

No Content. Patch successfully applied to upload.

400

application/json

Bad Request

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

404

application/json

Not Found. Non-existent upload resource.

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

409

application/json

Conflict. Upload offsets do not match.

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

410

application/json

Gone. The upload resource no longer exists (could have expired).

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

412

application/json

Precondition Failed. tus protocol version not supported by the server.

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

415

application/json

Unsupported Media Type

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

423

application/json

Locked. Concurrent access is not allowed.

An array of Error objects.

  • application/jsonobject

    An array of Error objects.

    Show application/json properties
    • errorsarray of objects
    • traceIdstring

      A way to trace the source of the error.

PATCH /v1/temp-contents/files/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/temp-contents/files/{id}" \
-X PATCH \
-H "Content-type: application/offset+octet-stream" \
-H "Authorization: Bearer <API-key>" \
-d '"string"'
const https = require('https')
  const data = JSON.stringify("string")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/temp-contents/files/{id}',
    'method': 'PATCH',
    'headers': {
      'Content-type': 'application/offset+octet-stream',
      'Authorization': 'Bearer <API-key>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

"string"