# Themes

**Base URL:** `https://{tenant}.{region}.qlikcloud.com`

Themes enable you to customize/style the Qlik Sense client experience.

## Table of Contents

| Method | Path | Description |
|--------|------|-------------|
| `GET` | [`/api/v1/themes`](#get-apiv1themes) | Lists all imported themes in the tenant. |
| `POST` | [`/api/v1/themes`](#post-apiv1themes) | Creates a new theme. Accepts either provided file or data object. The name of the new theme must be different to any existing themes. |
| `GET` | [`/api/v1/themes/{id}`](#get-apiv1themesid) | Returns a specific theme matching either theme ID or theme name. |
| `PATCH` | [`/api/v1/themes/{id}`](#patch-apiv1themesid) | Updates a specific theme matching either theme ID or theme name. Accepts either provided file or data object. |
| `DELETE` | [`/api/v1/themes/{id}`](#delete-apiv1themesid) | Deletes a specific theme matching either theme ID or theme name. |
| `GET` | [`/api/v1/themes/{id}/file`](#get-apiv1themesidfile) | Downloads all files in the theme matching either theme ID or theme name as a `.zip` archive. |
| `GET` | [`/api/v1/themes/{id}/file/{filepath}`](#get-apiv1themesidfilefilepath) | Downloads a file from the theme matching either theme ID or theme name, identified by the file path within the imported extension. |

## API Reference

### GET /api/v1/themes

Lists all imported themes in the tenant.

- **Rate Limit:** Tier 1 (1000 requests per minute)

#### Responses

##### 200

OK. Lists all themes.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] | Yes | The theme model. |

<details>
<summary>Properties of `data`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | No |  |
| `file` | object | No | The file that was uploaded with the theme. |
| `icon` | string | No | Icon to show in the client. |
| `name` | string | No | The display name of this theme. |
| `tags` | string[] | No | List of tags. |
| `type` | string | No | The type of this theme (visualization, etc.). |
| `author` | string | No | Author of the theme. |
| `userId` | string | No |  |
| `license` | string | No | Under which license this theme is published. |
| `version` | string | No | Version of the theme. |
| `homepage` | string | No | Home page of the theme. |
| `keywords` | string | No | Keywords for the theme. |
| `supplier` | string | No | Supplier of the theme. |
| `tenantId` | string | No |  |
| `updateAt` | string | No |  |
| `createdAt` | string | No |  |
| `repository` | string | No | Link to the theme source code. |
| `description` | string | No | Description of the theme. |
| `qextVersion` | string | No | The version from the qext file that was uploaded with this extension. |
| `dependencies` | object | No | Map of dependencies describing version of the component it requires. |
| `qextFilename` | string | No | The name of the qext file that was uploaded with this theme. |
| `migrationState` | string | No | The migration state of the theme. It can be either "READY_TO_MOVE", "IN_PROGRESS" or "COMPLETED". |

</details>

#### Examples

**JavaScript:**

```javascript
// qlik-api has not implemented support for `GET /api/v1/themes` yet.
// In the meantime, you can use fetch like this:

const response = await fetch('/api/v1/themes', {
  method: 'GET',
  headers: { 'Content-Type': 'application/json' },
})

```

**Qlik CLI:**

```bash
qlik theme ls
```

**cURL:**

```bash
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/themes" \
-H "Authorization: Bearer <access_token>"
```

**Example Response:**

```json
{
  "data": [
    {
      "id": "string",
      "file": {},
      "icon": "string",
      "name": "string",
      "tags": [
        "string"
      ],
      "type": "string",
      "author": "string",
      "userId": "string",
      "license": "string",
      "version": "string",
      "homepage": "string",
      "keywords": "string",
      "supplier": "string",
      "tenantId": "string",
      "updateAt": "string",
      "createdAt": "string",
      "repository": "string",
      "description": "string",
      "qextVersion": "string",
      "dependencies": {},
      "qextFilename": "string",
      "migrationState": "string"
    }
  ]
}
```

---

### POST /api/v1/themes

Creates a new theme. Accepts either provided file or data object. The name of the new theme must be different to any existing themes.

- **Rate Limit:** Tier 2 (100 requests per minute)

#### Request Body

**Required**

**Content-Type:** `multipart/form-data`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object | No | The theme model. |
| `file` | string | No | Theme archive. |

<details>
<summary>Properties of `data`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | object | No | The file that was uploaded with the theme. |
| `icon` | string | No | Icon to show in the client. |
| `name` | string | No | The display name of this theme. |
| `tags` | string[] | No | List of tags. |
| `type` | string | No | The type of this theme (visualization, etc.). |
| `author` | string | No | Author of the theme. |
| `license` | string | No | Under which license this theme is published. |
| `version` | string | No | Version of the theme. |
| `homepage` | string | No | Home page of the theme. |
| `keywords` | string | No | Keywords for the theme. |
| `supplier` | string | No | Supplier of the theme. |
| `repository` | string | No | Link to the theme source code. |
| `description` | string | No | Description of the theme. |
| `qextVersion` | string | No | The version from the qext file that was uploaded with this extension. |
| `dependencies` | object | No | Map of dependencies describing version of the component it requires. |
| `qextFilename` | string | No | The name of the qext file that was uploaded with this theme. |

</details>

#### Responses

##### 201

Created. Creates a new theme and returns it.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | No |  |
| `file` | object | No | The file that was uploaded with the theme. |
| `icon` | string | No | Icon to show in the client. |
| `name` | string | No | The display name of this theme. |
| `tags` | string[] | No | List of tags. |
| `type` | string | No | The type of this theme (visualization, etc.). |
| `author` | string | No | Author of the theme. |
| `userId` | string | No |  |
| `license` | string | No | Under which license this theme is published. |
| `version` | string | No | Version of the theme. |
| `homepage` | string | No | Home page of the theme. |
| `keywords` | string | No | Keywords for the theme. |
| `supplier` | string | No | Supplier of the theme. |
| `tenantId` | string | No |  |
| `updateAt` | string | No |  |
| `createdAt` | string | No |  |
| `repository` | string | No | Link to the theme source code. |
| `description` | string | No | Description of the theme. |
| `qextVersion` | string | No | The version from the qext file that was uploaded with this extension. |
| `dependencies` | object | No | Map of dependencies describing version of the component it requires. |
| `qextFilename` | string | No | The name of the qext file that was uploaded with this theme. |
| `migrationState` | string | No | The migration state of the theme. It can be either "READY_TO_MOVE", "IN_PROGRESS" or "COMPLETED". |

##### 409

Conflict. Resource with same unique identity already exists.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 415

Unsupported media type. Body of the payload is not a valid JSON object.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 422

Unprocessable entity. Validation error.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### default

Unexpected error.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

#### Examples

**JavaScript:**

```javascript
// qlik-api has not implemented support for `POST /api/v1/themes` yet.
// In the meantime, you can use fetch like this:

const response = await fetch('/api/v1/themes', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
})

```

**Qlik CLI:**

```bash
qlik theme create \
--file="string"
```

**cURL:**

```bash
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/themes" \
-X POST \
-H "Content-type: multipart/form-data" \
-H "Authorization: Bearer <access_token>" \
-F "data={\"id\":\"string\",\"file\":{},\"icon\":\"string\",\"name\":\"string\",\"tags\":[\"string\"],\"type\":\"string\",\"author\":\"string\",\"userId\":\"string\",\"license\":\"string\",\"version\":\"string\",\"homepage\":\"string\",\"keywords\":\"string\",\"supplier\":\"string\",\"tenantId\":\"string\",\"updateAt\":\"string\",\"createdAt\":\"string\",\"repository\":\"string\",\"description\":\"string\",\"qextVersion\":\"string\",\"dependencies\":{},\"qextFilename\":\"string\",\"migrationState\":\"string\"}" \
-F "file=@/path/to/file"
```

**Example Response:**

```json
{
  "id": "string",
  "file": {},
  "icon": "string",
  "name": "string",
  "tags": [
    "string"
  ],
  "type": "string",
  "author": "string",
  "userId": "string",
  "license": "string",
  "version": "string",
  "homepage": "string",
  "keywords": "string",
  "supplier": "string",
  "tenantId": "string",
  "updateAt": "string",
  "createdAt": "string",
  "repository": "string",
  "description": "string",
  "qextVersion": "string",
  "dependencies": {},
  "qextFilename": "string",
  "migrationState": "string"
}
```

---

### GET /api/v1/themes/{id}

Returns a specific theme matching either theme ID or theme name.

- **Rate Limit:** Tier 1 (1000 requests per minute)

#### Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Theme identifier or its qextFilename |

#### Responses

##### 200

OK. Returns theme with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | No |  |
| `file` | object | No | The file that was uploaded with the theme. |
| `icon` | string | No | Icon to show in the client. |
| `name` | string | No | The display name of this theme. |
| `tags` | string[] | No | List of tags. |
| `type` | string | No | The type of this theme (visualization, etc.). |
| `author` | string | No | Author of the theme. |
| `userId` | string | No |  |
| `license` | string | No | Under which license this theme is published. |
| `version` | string | No | Version of the theme. |
| `homepage` | string | No | Home page of the theme. |
| `keywords` | string | No | Keywords for the theme. |
| `supplier` | string | No | Supplier of the theme. |
| `tenantId` | string | No |  |
| `updateAt` | string | No |  |
| `createdAt` | string | No |  |
| `repository` | string | No | Link to the theme source code. |
| `description` | string | No | Description of the theme. |
| `qextVersion` | string | No | The version from the qext file that was uploaded with this extension. |
| `dependencies` | object | No | Map of dependencies describing version of the component it requires. |
| `qextFilename` | string | No | The name of the qext file that was uploaded with this theme. |
| `migrationState` | string | No | The migration state of the theme. It can be either "READY_TO_MOVE", "IN_PROGRESS" or "COMPLETED". |

##### 403

Forbidden. User is not authorized to read theme with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 404

Not found. Could not find the theme with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 410

Gone. Theme with {id} has been deleted.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

#### Examples

**JavaScript:**

```javascript
// qlik-api has not implemented support for `GET /api/v1/themes/{id}` yet.
// In the meantime, you can use fetch like this:

const response = await fetch(
  '/api/v1/themes/{id}',
  {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
  },
)

```

**Qlik CLI:**

```bash
qlik theme get <themeId>
```

**cURL:**

```bash
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/themes/{id}" \
-H "Authorization: Bearer <access_token>"
```

**Example Response:**

```json
{
  "id": "string",
  "file": {},
  "icon": "string",
  "name": "string",
  "tags": [
    "string"
  ],
  "type": "string",
  "author": "string",
  "userId": "string",
  "license": "string",
  "version": "string",
  "homepage": "string",
  "keywords": "string",
  "supplier": "string",
  "tenantId": "string",
  "updateAt": "string",
  "createdAt": "string",
  "repository": "string",
  "description": "string",
  "qextVersion": "string",
  "dependencies": {},
  "qextFilename": "string",
  "migrationState": "string"
}
```

---

### PATCH /api/v1/themes/{id}

Updates a specific theme matching either theme ID or theme name. Accepts either provided file or data object.

- **Rate Limit:** Tier 2 (100 requests per minute)

#### Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Theme identifier or its qextFilename. |

#### Request Body

**Required**

**Content-Type:** `multipart/form-data`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object | No | The theme model. |
| `file` | string | No | Theme archive. |

<details>
<summary>Properties of `data`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | object | No | The file that was uploaded with the theme. |
| `icon` | string | No | Icon to show in the client. |
| `name` | string | No | The display name of this theme. |
| `tags` | string[] | No | List of tags. |
| `type` | string | No | The type of this theme (visualization, etc.). |
| `author` | string | No | Author of the theme. |
| `license` | string | No | Under which license this theme is published. |
| `version` | string | No | Version of the theme. |
| `homepage` | string | No | Home page of the theme. |
| `keywords` | string | No | Keywords for the theme. |
| `supplier` | string | No | Supplier of the theme. |
| `repository` | string | No | Link to the theme source code. |
| `description` | string | No | Description of the theme. |
| `qextVersion` | string | No | The version from the qext file that was uploaded with this extension. |
| `dependencies` | object | No | Map of dependencies describing version of the component it requires. |
| `qextFilename` | string | No | The name of the qext file that was uploaded with this theme. |

</details>

#### Responses

##### 200

OK. Theme has been updated.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] | Yes | The theme model. |

<details>
<summary>Properties of `data`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | No |  |
| `file` | object | No | The file that was uploaded with the theme. |
| `icon` | string | No | Icon to show in the client. |
| `name` | string | No | The display name of this theme. |
| `tags` | string[] | No | List of tags. |
| `type` | string | No | The type of this theme (visualization, etc.). |
| `author` | string | No | Author of the theme. |
| `userId` | string | No |  |
| `license` | string | No | Under which license this theme is published. |
| `version` | string | No | Version of the theme. |
| `homepage` | string | No | Home page of the theme. |
| `keywords` | string | No | Keywords for the theme. |
| `supplier` | string | No | Supplier of the theme. |
| `tenantId` | string | No |  |
| `updateAt` | string | No |  |
| `createdAt` | string | No |  |
| `repository` | string | No | Link to the theme source code. |
| `description` | string | No | Description of the theme. |
| `qextVersion` | string | No | The version from the qext file that was uploaded with this extension. |
| `dependencies` | object | No | Map of dependencies describing version of the component it requires. |
| `qextFilename` | string | No | The name of the qext file that was uploaded with this theme. |
| `migrationState` | string | No | The migration state of the theme. It can be either "READY_TO_MOVE", "IN_PROGRESS" or "COMPLETED". |

</details>

##### 403

Forbidden. User is not authorized to update theme with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 404

Not found. Could not find the theme with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 409

Conflict. Resource with same unique identity already exists.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 415

Unsupported media type. Body of the payload is not a valid JSON object.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 422

Unprocessable entity. Validation error.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### default

Unexpected error.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

#### Examples

**JavaScript:**

```javascript
// qlik-api has not implemented support for `PATCH /api/v1/themes/{id}` yet.
// In the meantime, you can use fetch like this:

const response = await fetch(
  '/api/v1/themes/{id}',
  {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json',
    },
  },
)

```

**Qlik CLI:**

```bash
qlik theme patch <themeId> \
--file="string"
```

**cURL:**

```bash
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/themes/{id}" \
-X PATCH \
-H "Content-type: multipart/form-data" \
-H "Authorization: Bearer <access_token>" \
-F "data={\"id\":\"string\",\"file\":{},\"icon\":\"string\",\"name\":\"string\",\"tags\":[\"string\"],\"type\":\"string\",\"author\":\"string\",\"userId\":\"string\",\"license\":\"string\",\"version\":\"string\",\"homepage\":\"string\",\"keywords\":\"string\",\"supplier\":\"string\",\"tenantId\":\"string\",\"updateAt\":\"string\",\"createdAt\":\"string\",\"repository\":\"string\",\"description\":\"string\",\"qextVersion\":\"string\",\"dependencies\":{},\"qextFilename\":\"string\",\"migrationState\":\"string\"}" \
-F "file=@/path/to/file"
```

**Example Response:**

```json
{
  "data": [
    {
      "id": "string",
      "file": {},
      "icon": "string",
      "name": "string",
      "tags": [
        "string"
      ],
      "type": "string",
      "author": "string",
      "userId": "string",
      "license": "string",
      "version": "string",
      "homepage": "string",
      "keywords": "string",
      "supplier": "string",
      "tenantId": "string",
      "updateAt": "string",
      "createdAt": "string",
      "repository": "string",
      "description": "string",
      "qextVersion": "string",
      "dependencies": {},
      "qextFilename": "string",
      "migrationState": "string"
    }
  ]
}
```

---

### DELETE /api/v1/themes/{id}

Deletes a specific theme matching either theme ID or theme name.

- **Rate Limit:** Tier 2 (100 requests per minute)

#### Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Theme identifier or its qextFilename. |

#### Responses

##### 204

No content. Soft deletes the theme.

##### 403

Forbidden. User is not authorized to delete themes with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 404

Not found. Could not find the theme with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 410

Gone. Theme with {id} has been deleted.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

#### Examples

**JavaScript:**

```javascript
// qlik-api has not implemented support for `DELETE /api/v1/themes/{id}` yet.
// In the meantime, you can use fetch like this:

const response = await fetch(
  '/api/v1/themes/{id}',
  {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json',
    },
  },
)

```

**Qlik CLI:**

```bash
qlik theme rm <themeId>
```

**cURL:**

```bash
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/themes/{id}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"
```

---

### GET /api/v1/themes/{id}/file

Downloads all files in the theme matching either theme ID or theme name as a `.zip` archive.

- **Rate Limit:** Tier 1 (1000 requests per minute)

#### Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Theme identifier or its qextFilename |

#### Responses

##### 200

OK. Theme exists. Returns the theme archive.

**Content-Type:** `application/zip`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `application/zip` | string | No |  |

**Content-Type:** `application/octet-stream`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `application/octet-stream` | string | No |  |

##### 403

Forbidden. User is not authorized to read theme with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 404

Not found. Could not find the theme with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 410

Gone. Theme with {id} has been deleted.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

#### Examples

**JavaScript:**

```javascript
// qlik-api has not implemented support for `GET /api/v1/themes/{id}/file` yet.
// In the meantime, you can use fetch like this:

const response = await fetch(
  '/api/v1/themes/{id}/file',
  {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
  },
)

```

**Qlik CLI:**

```bash
qlik theme file ls
```

**cURL:**

```bash
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/themes/{id}/file" \
-H "Authorization: Bearer <access_token>"
```

**Example Response:**

```json
"string"
```

---

### GET /api/v1/themes/{id}/file/{filepath}

Downloads a file from the theme matching either theme ID or theme name, identified by the file path within the imported extension.

- **Rate Limit:** Tier 1 (1000 requests per minute)

#### Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `filepath` | string | Yes | Path to the file location within the specified theme archive. Folders separated with forward slashes. |
| `id` | string | Yes | Theme identifier or its qextFilename. |

#### Responses

##### 200

OK. Theme exists and the file specified exists. Returns the specific file.

##### 403

Forbidden. User is not authorized to read theme with {id}.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 404

Not found. Could not find a theme with {id} or the file does not exist in the archive.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

##### 410

Gone. Theme with {id} has been deleted.

**Content-Type:** `application/json`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Object containing meta data regarding an error. It does not necessarily contain all the properties. |
| `title` | string | Yes | Title of the HTTP status code. |
| `source` | object | No | Optional JSON patch object pointing to an invalid property. |
| `status` | number | No | The HTTP status code. |
| `traceId` | string | No | The active traceId. |

<details>
<summary>Properties of `meta`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stack` | string | No | Full stack trace of the error that was raised. |
| `message` | string | No | A more detailed message explaining the error. |
| `resourceName` | string | No | Name of the resource related to the error. If there is a conflict, it is the name of the model attempting to be created. |

</details>

#### Examples

**JavaScript:**

```javascript
// qlik-api has not implemented support for `GET /api/v1/themes/{id}/file/{filepath}` yet.
// In the meantime, you can use fetch like this:

const response = await fetch(
  '/api/v1/themes/{id}/file/{filepath}',
  {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
  },
)

```

**Qlik CLI:**

```bash
qlik theme file get <filepath>
```

**cURL:**

```bash
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/themes/{id}/file/{filepath}" \
-H "Authorization: Bearer <access_token>"
```

---
