Skip to main content Skip to complementary content

Getting started

The Qlik NPrinting API is a REST API that you use to manage your Qlik NPrinting objects programmatically. A subset of the functionality that you find in the Qlik NPrinting Web Console is available through the API.

The objects you manipulate in the Qlik NPrinting Web Console are represented in the API as JSON entities. These entities have properties that correspond to the settings you find in the Qlik NPrinting Web Console. The API has a set of endpoints that allow you to create, retrieve, update, and delete entities for apps, users, groups, reports, and so on. For all requests, the data returned is filtered based on user permissions, that is, if a user is not authorized to access a certain entity, that entity is not returned in the response.

A user must have an associated domain account to log into the API as an authenticated Windows user. For more information about configuring a domain account, see Creating users with filters and groups.

To help familiarize you with the API, we will walk through some simple examples using a REST client called Postman. You will learn how to:

  • Connect and authenticate your user credentials
  • Retrieve a list of apps
  • Update an entity

Before you start, you will need to:

Information noteDepending on your environment, you may need to configure Chrome to accept self-signed certificates. See the Chrome documentation for additional information and instructions.

Connecting to Qlik NPrinting APIs

By default, Qlik NPrinting Server listens for REST requests on port 4993, so the URL is:

https://NPrinting.server.name:4993/api/v1/<path>

Authenticating your user credentials

Before you do anything with the NPrinting API, you must authenticate your user credentials.

In the example that follows, we will authenticate with the current Windows user name.

Open Postman and fill in the fields as shown below, replacing NPrinting.server.name with the URL of the computer where your Qlik NPrinting Server is installed:

Retrieving a list of apps

The following endpoint returns a complete list of Qlik NPrinting apps that the current user has permission to see.

Open Postman and fill in the fields as shown below, replacing NPrinting.server.name with the URL of the computer where your Qlik NPrinting Server is installed:

The response includes the ID, title, and other details about each app.

Updating an entity

You can update certain entities through the API by using the PUT method. When you update an entity, Qlik NPrinting Server may substitute default values for omitted properties, so we recommend that you always include the entire entity when you perform an update.

In this example, we will update the email property of the users entity.

To update the entity:

  1. If you do not know the ID of the user you want to update, enter the following path in Postman and send a GET request:

     /users

    Search for the user ID in the response.

  2. Append the user ID to the users path in Postman and send a GET request:

    /users/{id}

    The response should look something like this:

    { "data": { "id": "113ac265-163e-4feb-854e-ade3cdafc837", "email": "abc@example.com", "created": "2018-02-22T16:17:18Z", "lastUpdate": "2018-02-28T18:20:57Z", "enabled": true, "userName": "Test", "domainAccount": "domain\\test", "timezone": "Europe/Rome", "locale": "En", "folder": "test folder", "subFolder": "test subFolder" }

    }
  3. Copy the content surrounded by the inner parentheses from the returned entity and paste it into the body of a new PUT request.
  4. Change the value of email.
  5. Add the password property and corresponding value to the entity. The body of the request should look something like this:

    {
        "password": "test",
        "id": "113ac265-163e-4feb-854e-ade3cdafc837",
        "email": "xyz@example.com",
        "created": "2018-02-22T16:17:18Z",
        "lastUpdate": "2018-02-28T18:20:57Z",
        "enabled": true,
        "userName": "Test",
        "domainAccount": "domain\\test",
        "timezone": "Europe/Rome",
        "locale": "En",
        "folder": "test folder",
        "subFolder": "test subFolder"
    }

  6. With the updated entity in the body, send a PUT request using the following path. In this example, {id} would be 113ac265-163e-4feb-854e-ade3cdafc837.

    users/{id}

  7. Send a GET request using the same path to verify the change.

What to do next

Now that you have seen some requests in the Qlik NPrinting API, try some of the other API endpoints, for example, to start a new task execution.

Here are some additional resources that can help you:

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!