### Get Connections List (Example Usage) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=19 Demonstrates how to call the API to retrieve a list of connections, with an example of sorting by name in ascending order and creation date in descending order. ```HTTP GET /connections?sort=+name,-created HTTP/1.1 Host: your_qlik_nprinting_host Accept: application/json ``` -------------------------------- ### Get Tasks List - cURL Example Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=60 Example of how to fetch a list of tasks using cURL. This demonstrates making a GET request to the /tasks endpoint with optional query parameters for filtering and sorting. ```shell curl -X GET "https://your_qlik_nprinting_server/api/v1/tasks?appId=your_app_id&type=publish&sort=-created&limit=10&offset=0" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ``` -------------------------------- ### Example Data Connection Response Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=19 Provides an example of the JSON response structure for the 'Get Connections' API endpoint, showcasing the 'data' object with pagination information and a list of connection items. ```JSON { "data": { "totalItems": 0, "offset": 6, "limit": 1, "items": [ { "connectionString": "connectionString", "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "appId": "appId", "name": "name", "connectionStatus": "Unknown", "description": "description", "notificationsEnabled": true, "cacheStatus": "NeverGenerated", "id": "00000000-0000-0000-0000-000000000000", "source": "source" }, { "connectionString": "connectionString", "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "appId": "appId", "name": "name", "connectionStatus": "Unknown", "description": "description", "notificationsEnabled": true, "cacheStatus": "NeverGenerated", "id": "00000000-0000-0000-0000-000000000000", "source": "source" } ] } } ``` -------------------------------- ### Get Filters List - API Request Example Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=26 This example demonstrates how to make an API request to retrieve a list of filters. It shows how to include query parameters for sorting and filtering the results. The API returns a paginated list of filters visible to the user. ```HTTP GET /filters?sort=+name,-created&appId=00000000-0000-0000-0000-000000000000&enabled=true&offset=10&limit=20 ``` -------------------------------- ### Get Connection by ID (JavaScript Example) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=20 This JavaScript example shows how to fetch a connection's details from the Qlik NPrinting API using the `fetch` API. It makes a GET request to the `/connections/{id}` endpoint and handles the JSON response. Ensure you replace `{id}` with the actual connection ID. ```javascript async function getConnection(connectionId) { const response = await fetch(`https://your_qlik_nprinting_server/api/v1/connections/${connectionId}`, { method: 'GET', headers: { 'Accept': 'application/json' } }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return await response.json(); } // Example usage: // getConnection('00000000-0000-0000-0000-000000000000') // .then(data => console.log(data)) // .catch(error => console.error('Error fetching connection:', error)); ``` -------------------------------- ### Get Tasks List - JavaScript (Fetch API) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=60 Example of how to retrieve a list of tasks using the Fetch API in JavaScript. This shows how to construct the request, include authentication headers, and handle the JSON response. ```javascript async function getTasks(appId, type, sort, limit, offset) { const token = 'YOUR_ACCESS_TOKEN'; // Replace with your actual token const baseUrl = 'https://your_qlik_nprinting_server/api/v1'; let url = `${baseUrl}/tasks?`; if (appId) url += `appId=${appId}&`; if (type) url += `type=${type}&`; if (sort) url += `sort=${sort}&`; if (limit) url += `limit=${limit}&`; if (offset) url += `offset=${offset}&`; // Remove trailing '&' if present url = url.slice(0, -1); try { const response = await fetch(url, { method: 'GET', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' } }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); console.log(data); return data; } catch (error) { console.error('Error fetching tasks:', error); return null; } } // Example usage: // getTasks('your_app_id', 'publish', '-created', 10, 0); ``` -------------------------------- ### GET /apps/{id} Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=6 Retrieves detailed information about a specific app. The user must have authorization to view the app. ```APIDOC ## GET /apps/{id} ### Description Returns details about a specific app. This endpoint returns detailed information about the app specified by the `id` parameter. The calling user must be authorized to view the specified app. ### Method GET ### Endpoint /apps/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the app. ### Response #### Success Response (200) - **data** (object) - Contains the app details. - **created** (string) - The creation date of the app. - **lastUpdate** (string) - The last update date of the app. - **name** (string) - The name of the app. - **description** (string) - The description of the app. - **id** (string) - The unique identifier of the app. - **enabled** (boolean) - Indicates if the app is enabled. #### Error Response (400) - Description: The id parameter is malformed. #### Error Response (404) - Description: An app with the specified ID does not exist. ### Request Example ```json { "data": { "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "name": "name", "description": "description", "id": "00000000-0000-0000-0000-000000000000", "enabled": true } } ``` ### Response Example (200 OK) ```json { "data": { "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "name": "name", "description": "description", "id": "00000000-0000-0000-0000-000000000000", "enabled": true } } ``` ``` -------------------------------- ### Get Role by ID - Example Data Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=51 This snippet shows the structure of the data returned when a role is successfully retrieved. It includes details about the role's actions, name, description, ID, and enabled status. ```json { "data": { "hasAllActions": true, "isSystemRole": true, "hasAllApps": true, "name": "name", "description": "description", "id": "00000000-0000-0000-0000-000000000000", "enabled": true } } ``` -------------------------------- ### Get User by ID - API Request Example Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=67 This snippet demonstrates how to make an API request to retrieve a user's details using their ID. It specifies the HTTP method, endpoint, and expected response format. ```HTTP GET /users/{id} --- **Path Parameters:** * `id` (required): The ID of the user to retrieve. ``` -------------------------------- ### Get Group by ID (Example Data) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=34 This snippet shows the structure of the data returned when successfully retrieving a group by its ID. It includes details like creation date, last update, name, description, ID, and enabled status. ```json { "data": { "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "name": "name", "description": "description", "id": "00000000-0000-0000-0000-000000000000", "enabled": true } } ``` -------------------------------- ### GET /tasks Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=60 Retrieves a list of tasks. Supports filtering by appId and task type, and allows for pagination and sorting. ```APIDOC ## GET /tasks ### Description Gets the list of specified tasks. Returns the list of tasks. If the `appId` parameter is specified, only tasks related to that app are returned. ### Method GET ### Endpoint /tasks ### Parameters #### Query Parameters - **offset** (integer) - Optional - The number of entries to skip. Default is 0. - **limit** (integer) - Optional - The maximum number of entries to return. Default is 50. - **sort** (string) - Optional - A field to be used to sort the tasks. Currently the only supported field value is "created". It can be prefixed by "+" and "-" to indicate, respectively, ascending and descending order. Default is -created. Usage example: /tasks?sort=+created - **appId** (string) - Optional - The ID of the app to filter on. - **type** (string) - Optional - The task type to filter on. Available values: ["publish","import"]. Default is publish. Usage example: /tasks?type=publish ### Response #### Success Response (200) - **data** (object) - Contains the paginated list of tasks. - **totalItems** (integer) - The total number of items available. - **offset** (integer) - The current offset. - **limit** (integer) - The current limit. - **items** (array) - An array of task objects. - **created** (string) - The creation timestamp of the task. - **lastUpdate** (string) - The last update timestamp of the task. - **lastExecution** (string) - The last execution timestamp of the task. - **appId** (string) - The ID of the associated application. - **name** (string) - The name of the task. - **description** (string) - The description of the task. - **id** (string) - The unique identifier of the task. - **type** (string) - The type of the task (e.g., "publish", "import"). - **enabled** (boolean) - Indicates if the task is enabled. #### Error Response (400) - **message** (string) - Describes the error, such as an invalid parameter or an invalid GUID. ### Request Example (No request body for GET requests) ### Response Example ```json { "data": { "totalItems": 100, "offset": 0, "limit": 10, "items": [ { "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "lastExecution": "2000-01-23T04:56:07.000+00:00", "appId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "Example Task", "description": "This is an example task.", "id": "00000000-0000-0000-0000-000000000000", "type": "publish", "enabled": true } ] } } ``` ``` -------------------------------- ### GET /connections Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=19 Retrieves a list of NPrinting connections. The list can be filtered by a specific app and sorted according to the provided parameters. ```APIDOC ## GET /connections ### Description Gets the list of connections. The list can be filtered by a particular app, and is sorted in the order specified by the `sort` parameter. ### Method GET ### Endpoint /connections ### Parameters #### Query Parameters - **offset** (integer) - Optional - The number of entries to skip. Default is 0. - **limit** (integer) - Optional - The maximum number of entries to return. Default is 50. - **sort** (string) - Optional - A comma-separated list of fields to be used for sorting the connections. Allowed field values are "name" and "created". Fields can be prefixed by "+" and "-" to indicate, respectively, ascending and descending order. Default is -created. Usage example: `/connections?sort=+name,-created` - **appId** (string) - Optional - The ID of the app to filter on. ### Response #### Success Response (200) - **data** (object) - Contains the list of connections and pagination details. - **totalItems** (integer) - The total number of items available. - **offset** (integer) - The current offset. - **limit** (integer) - The current limit. - **items** (array) - An array of connection objects. - **connectionString** (string) - The connection string. - **created** (string) - The creation timestamp. - **lastUpdate** (string) - The last update timestamp. - **appId** (string) - The ID of the associated app. - **name** (string) - The name of the connection. - **connectionStatus** (string) - The status of the connection. - **description** (string) - A description of the connection. - **notificationsEnabled** (boolean) - Indicates if notifications are enabled. - **cacheStatus** (string) - The cache status. - **id** (string) - The unique identifier of the connection. - **source** (string) - The source of the connection. #### Error Response (400) - **message** (string) - Describes the error, e.g., "The specified ID is not a valid GUID." ### Request Example (No request body for GET requests) ### Response Example ```json { "data": { "totalItems": 2, "offset": 0, "limit": 50, "items": [ { "connectionString": "connectionString", "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "appId": "appId", "name": "name", "connectionStatus": "Unknown", "description": "description", "notificationsEnabled": true, "cacheStatus": "NeverGenerated", "id": "00000000-0000-0000-0000-000000000000", "source": "source" } ] } } ``` ``` -------------------------------- ### Get Qlik NPrinting Apps List (REST API) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=4 This snippet demonstrates how to make a GET request to the '/apps' endpoint to retrieve a list of Qlik NPrinting Apps. It shows how to include optional query parameters for pagination (offset, limit) and sorting (sort). The response is a JSON object containing app details. ```bash curl -X GET "https://your_qlik_nprinting_server/api/v1/apps?offset=0&limit=50&sort=-created" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ``` ```javascript fetch('https://your_qlik_nprinting_server/api/v1/apps?offset=0&limit=50&sort=-created', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` -------------------------------- ### QlikViewServerConnection Parameters Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=118 This section details the parameters required for establishing a QlikView server connection. It includes optional and required fields for authentication and document paths. ```APIDOC ## QlikViewServerConnection API ### Description This API endpoint facilitates the connection to a QlikView server. It supports various authentication methods and allows for the application of user-specific section access during report generation. ### Method POST ### Endpoint /websites/help_qlik_en-us_nprinting_february2025_apis_np_api/QlikViewServerConnection ### Parameters #### Query Parameters - **identity** (String) - Optional - The domain user credentials used to connect to the server. (Domain\Username) - **applyUserSectionAccess** (Boolean) - Required - Set to true to apply specific users' section access when generating reports. - **documentPath** (String) - Required - The path to QlikView document. Path must be escaped according to JSON standards, e.g. using \ for backslash. - **username** (String) - Optional - QlikView document username. Required for username password authentication. - **password** (String) - Optional - QlikView document password. Required for username password authentication. - **hasAuthentication** (String, Enum) - Required - The authentication type required by this connection. One of: None, UsernamePassword, Identity. ### Request Example ```json { "identity": "DOMAIN\Username", "applyUserSectionAccess": true, "documentPath": "C:\\QlikView\\Documents\\MyDocument.qvw", "username": "docUser", "password": "docPassword", "hasAuthentication": "UsernamePassword" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates the success of the connection attempt. - **message** (String) - A message providing details about the connection status. #### Response Example ```json { "status": "Success", "message": "Successfully connected to QlikView server." } ``` ``` -------------------------------- ### Retrieve Task by ID (REST API Example) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=61 This example demonstrates how to make a GET request to retrieve a specific task from the Qlik NPrinting API using its ID. It assumes the use of a tool or library capable of making HTTP requests. ```HTTP GET /tasks/{id} HTTP/1.1 Host: your_qlik_nprinting_host Authorization: Bearer your_access_token ``` -------------------------------- ### QlikSenseConnection Parameters Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=115 This section details the parameters required for establishing a connection to a Qlik Sense application. ```APIDOC ## QlikSenseConnection Parameters ### Description Parameters for establishing a connection to a Qlik Sense application, including server details, app identification, user access, and theme/section access options. ### Method N/A (Configuration Parameters) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **proxyUrl** (String) - Required - The full computer name of the Qlik Sense server. - **appId** (String) - Required - The ID of the Qlik Sense app. - **identity** (String) - Required - The Qlik Sense user who has access to the app. - **applyTheme** (Boolean) - Optional - Set to true to apply the Sense app theme to generated reports. - **applyUserSectionAccess** (Boolean) - Optional - Set to true to apply specific users' section access when generating reports. ### Request Example ```json { "proxyUrl": "your_qlik_sense_server.com", "appId": "your_app_id", "identity": "user@domain.com", "applyTheme": true, "applyUserSectionAccess": false } ``` ### Response #### Success Response (200) N/A (This describes connection parameters, not a direct API response) #### Response Example N/A ``` -------------------------------- ### POST /apps Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=8 Creates a new application within the NPrinting system. This endpoint accepts an AppRequest object and returns the ID of the newly created app upon success. ```APIDOC ## POST /apps ### Description Creates a new app, and returns its ID. ### Method POST ### Endpoint /apps ### Parameters #### Request Body - **appRequest** (AppRequest) - Required - The app request object containing details for the new app. ### Request Example ```json { "appName": "MyNewApp", "description": "This is a sample app created via API" } ``` ### Response #### Success Response (201) - **appId** (string) - The unique identifier of the newly created app. #### Response Example ```json { "appId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` #### Error Responses - **400** - Invalid request. The request body is malformed or missing required fields. - **403** - The user is not authorized to create a new app. - **409** - Conflict. An app with the same name already exists. ``` -------------------------------- ### Get User Roles by ID (REST API) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=71 Retrieves an ordered list of role IDs for a specified user. Supports pagination with offset and limit parameters. Requires a valid user ID (GUID). ```bash curl -X GET "https://your.qlik.server/api/v1/users/{id}/roles?offset=0&limit=50" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ``` ```javascript async function getUserRoles(userId, offset = 0, limit = 50) { const response = await fetch(`https://your.qlik.server/api/v1/users/${userId}/roles?offset=${offset}&limit=${limit}`, { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' } }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return await response.json(); } // Example usage: // getUserRoles('00000000-0000-0000-0000-000000000000').then(data => console.log(data)); ``` -------------------------------- ### GET /apps Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=4 Generates the list of Qlik NPrinting Apps. This endpoint returns the complete list of Qlik NPrinting apps that the current user has permission to see. The list is always filtered based on user permissions. The response includes the title and other details about each app, and lists the apps in the order specified by the `sort` parameter. ```APIDOC ## GET /apps ### Description Generates the list of Qlik NPrinting Apps. This endpoint returns the complete list of Qlik NPrinting apps that the current user has permission to see. The list is always filtered based on user permissions. The response includes the title and other details about each app, and lists the apps in the order specified by the `sort` parameter. ### Method GET ### Endpoint /apps ### Parameters #### Query Parameters - **offset** (integer) - Optional - The number of entries to skip. Default is 0. - **limit** (integer) - Optional - The maximum number of entries to return. Default is 50. - **sort** (string) - Optional - A comma separated list of fields to use for sorting the apps. Allowed field values are "name" and "created". Fields can be prefixed by "+" and "-" to indicate, respectively, ascending and descending order. Default is -created. Usage example: /apps?sort=+name,-created ### Response #### Success Response (200) - **data** (object) - A paginated list of apps is returned. - **totalItems** (integer) - The total number of items available. - **offset** (integer) - The number of items skipped. - **limit** (integer) - The maximum number of items returned. - **items** (array) - An array of app objects. - **created** (string) - The creation date of the app. - **lastUpdate** (string) - The last update date of the app. - **name** (string) - The name of the app. - **description** (string) - The description of the app. - **id** (string) - The unique identifier of the app. - **enabled** (boolean) - Indicates if the app is enabled. #### Response Example ```json { "data": { "totalItems": 0, "offset": 6, "limit": 1, "items": [ { "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "name": "name", "description": "description", "id": "00000000-0000-0000-0000-000000000000", "enabled": true }, { "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "name": "name", "description": "description", "id": "00000000-0000-0000-0000-000000000000", "enabled": true } ] } } ``` #### Error Response (400) - **message** (string) - The string of query parameters is malformed. ``` -------------------------------- ### QlikViewLocalConnection Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=117 Defines the parameters required to establish a local connection to a QlikView document. ```APIDOC ## QlikViewLocalConnection ### Description This section details the parameters for establishing a local connection to a QlikView document. ### Method POST (Assumed, as it involves creating a connection) ### Endpoint /websites/help_qlik_en-us_nprinting_february2025_apis_np_api/QlikViewLocalConnection ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **documentPath** (String) - Required - The path to the QlikView document. Path must be escaped according to JSON standards, e.g. using \ for backslash. - **username** (String) - Optional - QlikView document username. Required for username password authentication. - **password** (String) - Optional - QlikView document password. Required for username password authentication. - **hasAuthentication** (String - Enum) - Required - The authentication type required by this connection. One of: None, UsernamePassword, Identity ### Request Example ```json { "documentPath": "C:\\QlikView\\MyDocument.qvw", "username": "myuser", "password": "mypassword", "hasAuthentication": "UsernamePassword" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates the success of the connection establishment. - **message** (String) - A message providing details about the connection status. #### Response Example ```json { "status": "Success", "message": "QlikView document connected successfully." } ``` ``` -------------------------------- ### QlikView Cluster Connection Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=116 This section details the parameters required to establish a connection to a QlikView cluster. ```APIDOC ## QlikView Cluster Connection ### Description Establishes a connection to a QlikView cluster, specifying the QlikView Management Service (QMS) URL, cluster ID, document path, and optional authentication details. ### Method POST ### Endpoint /websites/help_qlik_en-us_nprinting_february2025_apis_np_api/qlikview/connect ### Parameters #### Request Body - **qmsUrl** (String) - Required - The address of the QMS in the Address form. - **clusterId** (String) - Required - The name of the cluster you want to connect to. - **documentPath** (String) - Required - The full path to the QlikView document. Path must be escaped according to JSON standards, e.g. using \ for backslash. - **identity** (String) - Optional - The domain user credentials used to connect to the server. (Domain\Username). - **hasAuthentication** (String) - Required (Enum) - The authentication type required by this connection. One of: None, UsernamePassword, Identity. - **applyUserSectionAccess** (Boolean) - Optional - Set to true to apply specific users' section access when generating reports. ### Request Example ```json { "qmsUrl": "http://qlikserver:4242", "clusterId": "MyCluster", "documentPath": "C:\\QlikView\\Documents\\MyDocument.qvw", "identity": "MYDOMAIN\\MyUser", "hasAuthentication": "Identity", "applyUserSectionAccess": true } ``` ### Response #### Success Response (200) - **connectionId** (String) - A unique identifier for the established connection. #### Response Example ```json { "connectionId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### Get On-Demand Request Status (Example) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=43 This snippet demonstrates how to retrieve the status of an On-Demand report request using the Qlik NPrinting API. It requires the request ID as a path parameter and returns the status and details of the request. ```http GET /ondemand/requests/00000000-0000-0000-0000-000000000000 HTTP/1.1 Host: your_qlik_nprinting_server Accept: application/json ``` -------------------------------- ### App Management API Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=74 This section details the parameters available for managing NPrinting apps. ```APIDOC ## App Management API ### Description This API allows for the retrieval and manipulation of NPrinting applications. ### Method GET, POST, PUT, DELETE (Assumed based on parameter descriptions) ### Endpoint /websites/help_qlik_en-us_nprinting_february2025_apis_np_api/apps ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **id** (uuid) - Optional - The unique identifier of the app. - **name** (String) - Optional - The name of the NPrinting app. - **description** (String) - Optional - The description of the app. - **enabled** (Boolean) - Optional - Indicates whether the app is enabled. - **created** (Date) - Optional - The creation date in RFC 3339 format. - **lastUpdate** (Date) - Optional - The last update date in RFC 3339 format. ### Request Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "Example App", "description": "This is an example NPrinting app.", "enabled": true, "created": "2023-10-27T10:00:00Z", "lastUpdate": "2023-10-27T10:30:00Z" } ``` ### Response #### Success Response (200) - **id** (uuid) - The unique identifier of the app. - **name** (String) - The name of the NPrinting app. - **description** (String) - The description of the app. - **enabled** (Boolean) - Indicates whether the app is enabled. - **created** (Date) - The creation date in RFC 3339 format. - **lastUpdate** (Date) - The last update date in RFC 3339 format. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "Example App", "description": "This is an example NPrinting app.", "enabled": true, "created": "2023-10-27T10:00:00Z", "lastUpdate": "2023-10-27T10:30:00Z" } ``` ``` -------------------------------- ### Get Connection by ID (cURL Example) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=20 This snippet demonstrates how to retrieve a specific connection using the Qlik NPrinting API via a cURL command. It requires the connection's ID as a path parameter. The expected output is a JSON object containing the connection details. ```bash curl -X GET "https://your_qlik_nprinting_server/api/v1/connections/{id}" -H "accept: application/json" ``` -------------------------------- ### Get User Roles (REST API) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=52 This snippet demonstrates how to call the Qlik NPrinting API to retrieve the roles assigned to a specific user. It requires the user's ID and can optionally use offset and limit parameters for pagination. The response is a JSON object containing a list of role GUIDs. ```shell GET /users/{id}/roles?offset=0&limit=50 -- Path Parameters -- id (required): The ID of the user. -- Query Parameters -- offset (optional): The number of entries to skip. Default is 0. limit (optional): The maximum number of entries to return. Default is 50. ``` -------------------------------- ### POST /connections Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=24 Creates a new connection in the NPrinting system. Upon successful creation, the API returns the unique ID of the newly created connection. ```APIDOC ## POST /connections ### Description Creates a new connection, and returns its ID. ### Method POST ### Endpoint /connections ### Parameters #### Request Body - **connectionRequest** (DataConnectionRequest) - Required - The connection request object containing details for the new connection. ### Request Example ```json { "connectionRequest": { "name": "ExampleConnection", "type": "Database", "details": { "server": "localhost", "database": "SampleDB" } } } ``` ### Response #### Success Response (201) - **connectionId** (string) - The unique identifier of the newly created connection. #### Response Example ```json { "connectionId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` #### Error Responses - **400** - Invalid request: The request body is malformed or missing required fields. - **403** - The user is not authorized to create a new connection. - **409** - Duplicate Data Connection Name: A connection with the same name already exists. ``` -------------------------------- ### AppList API Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=76 Retrieves a list of applications with pagination options. ```APIDOC ## GET /api/np/apps ### Description Retrieves a list of applications available in the NPrinting system. Supports pagination and filtering. ### Method GET ### Endpoint /api/np/apps ### Parameters #### Query Parameters - **items** (array[App]) - Optional - A list of application objects. - **totalItems** (Integer) - Optional - The total number of items available. - **offset** (Integer) - Optional - The starting index for the list of items. - **limit** (Integer) - Optional - The maximum number of items to return. ### Response #### Success Response (200) - **items** (array[App]) - A list of application objects. - **totalItems** (Integer) - The total number of items available. - **offset** (Integer) - The starting index for the list of items. - **limit** (Integer) - The maximum number of items to return. #### Response Example { "items": [ { "id": "app123", "name": "Sales Report App" } ], "totalItems": 10, "offset": 0, "limit": 10 } ``` -------------------------------- ### Get Users in a Group (NPrinting API) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=36 This snippet demonstrates how to retrieve a list of users associated with a specific group using the NPrinting API. It requires the group's ID as a path parameter and supports optional query parameters for pagination (offset and limit). The response is a JSON object containing a list of user GUIDs. ```HTTP GET /groups/{id}/users?offset=0&limit=50 HTTP/1.1 Host: your_nprinting_host Accept: application/json ``` -------------------------------- ### Example Task Response Data (JSON) Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=61 This JSON structure represents the data returned when a task is successfully retrieved using the Qlik NPrinting API. It includes various attributes of the task. ```JSON { "data": { "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "lastExecution": "2000-01-23T04:56:07.000+00:00", "appId": "appId", "name": "name", "description": "description", "id": "00000000-0000-0000-0000-000000000000", "type": "type", "enabled": true } } ``` -------------------------------- ### Get Specific Role Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=51 Retrieves details for a specific role using its unique identifier. ```APIDOC ## GET /roles/{id} ### Description Get a specific role. Returns the role specified by the `id` parameter. ### Method GET ### Endpoint `/roles/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the role. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **data** (object) - Contains role details. - **hasAllActions** (boolean) - Indicates if the role has all actions. - **isSystemRole** (boolean) - Indicates if the role is a system role. - **hasAllApps** (boolean) - Indicates if the role has access to all apps. - **name** (string) - The name of the role. - **description** (string) - The description of the role. - **id** (string) - The unique identifier of the role. - **enabled** (boolean) - Indicates if the role is enabled. #### Response Example ```json { "data": { "hasAllActions": true, "isSystemRole": true, "hasAllApps": true, "name": "name", "description": "description", "id": "00000000-0000-0000-0000-000000000000", "enabled": true } } ``` #### Error Responses - **400** - The id parameter is malformed. - **404** - The specified role was not found. ``` -------------------------------- ### Queue On-Demand Request - JSON Example Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=41 This snippet demonstrates the structure of a JSON request body to queue a new On-Demand report generation request. It specifies the report type, request type, and output format. The returned request ID can be used to track the status and download the report. ```json { "reportType": "Excel", "requestType": "report", "created": "2000-01-23T04:56:07.000+00:00", "id": "00000000-0000-0000-0000-000000000000", "title": "title", "outputFormat": "pdf", "status": "queued" } ``` -------------------------------- ### POST /apps/{id}/actions/export-templates Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=5 Exports report templates for usage in Qlik Cloud. This endpoint returns a ZIP file containing the report templates for the app specified by the `id` parameter exported for usage on Qlik Cloud. ```APIDOC ## POST /apps/{id}/actions/export-templates ### Description Exports report templates for usage in Qlik Cloud. This endpoint returns a ZIP file containing the report templates for the app specified by the `id` parameter exported for usage on Qlik Cloud. ### Method POST ### Endpoint /apps/{id}/actions/export-templates ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the app. #### Query Parameters None #### Request Body - **request** (object) - Required - AppExportTemplates The export request ### Request Example ```json { "request": { "template1": "value1", "template2": "value2" } } ``` ### Response #### Success Response (200) - **file** (binary) - A ZIP file with the exported templates is returned. #### Error Response (400) - **message** (string) - Invalid request #### Response Example (Binary data representing a ZIP file) ``` -------------------------------- ### GET /groups Source: https://help.qlik.com/en-US/nprinting/February2025/APIs/NP%2BAPI/index.html?page=32 Retrieves a list of groups. This endpoint supports filtering by group name, status (enabled/disabled), pagination, and sorting. ```APIDOC ## GET /groups ### Description Gets the groups. Returns the list of groups. ### Method GET ### Endpoint /groups ### Parameters #### Query Parameters - **groupname** (string) - Optional - The group name to use as a filter. - **enabled** (boolean) - Optional - Indicates whether to retrieve the active groups (true) or inactive groups (false). - **offset** (integer) - Optional - The number of entries to skip. Default is 0. - **limit** (integer) - Optional - The maximum number of entries to return. Default is 50. - **sort** (string) - Optional - A comma separated list of fields to use for sorting the entries. Allowed field values are "name" and "created". Fields can be prefixed by "+" and "-" to indicate, respectively, ascending and descending order. Default is -created. Usage example: /groups?sort=+name,-created ### Response #### Success Response (200) - **data** (object) - Contains the paginated list of groups. - **totalItems** (integer) - The total number of items. - **offset** (integer) - The current offset. - **limit** (integer) - The limit of items returned. - **items** (array) - An array of group objects. - **created** (string) - The creation date of the group. - **lastUpdate** (string) - The last update date of the group. - **name** (string) - The name of the group. - **description** (string) - The description of the group. - **id** (string) - The unique identifier of the group. - **enabled** (boolean) - Indicates if the group is enabled. #### Error Response (400) - **message** (string) - Describes the error, e.g., "The query string is malformed." ### Request Example ```json { "query": { "groupname": "ExampleGroup", "enabled": true, "offset": 0, "limit": 10, "sort": "+name" } } ``` ### Response Example (Success) ```json { "data": { "totalItems": 2, "offset": 0, "limit": 10, "items": [ { "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "name": "ExampleGroup1", "description": "This is an example group.", "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "enabled": true }, { "created": "2000-01-23T04:56:07.000+00:00", "lastUpdate": "2000-01-23T04:56:07.000+00:00", "name": "ExampleGroup2", "description": "Another example group.", "id": "b2c3d4e5-f6a7-8901-2345-67890abcdef1", "enabled": true } ] } } ``` ### Response Example (Error) ```json { "message": "The query string is malformed." } ``` ```