Chart Update API

XLSX Chart Update API

An XLSX Chart Update API can be used to update Charts' data in KaiNexus.

Two Line OfieREQUIRED: Your organization must have the API Module enabled to perform the actions mentioned in this article. Reach out to your Customer Success Manager if you're interested in this module.


An XLSX Chart Update API lets you update the data for many Charts simultaneously. This not only streamlines the process of updating Charts in the system but also helps you update information in KaiNexus based on information from other systems.

Some customers automatically feed chart data into KaiNexus via a Chart Update API from their manufacturing intelligence systems. These metrics automatically update on team boards to help show team members their progress toward their goals.

Two Line OfieIf you're looking for information on updating non-Chart Items or if you want to update the Charts' details, like any of their fields, dates, or Attributes, you'll need to use a JSON Item Update API instead. To learn about JSON Item Update APIs, check out this support article.

Two Line OfieWe strongly recommend using the JSON Chart Update API instead of the XLSX Chart Update API. To learn about the JSON Chart Update API, check out this support article.

How does it work?

KaiNexus provides an endpoint where you can access Chart information. To make a call, you will need an API Key and an API tool. 

Two Line OfiePro Tip: We recommend using Postman for your API calls. It's easy to use and works well with KaiNexus API. 

Authentication

API Keys are used for authenticating calls to KaiNexus API. Check out this article for instructions on how you can find your organization's API Keys and copy them to your clipboard. 

If you are using Postman, select Basic Auth as the Authorization Type.

  • Enter "api" as the username.
  • Enter the API Key as the password. 

Two Line OfieMake sure your API Key has been granted the necessary permission to "view" and edit any Charts you want to update. For an API to be able to edit all Charts in KaiNexus, the View, View New, View Private, and Edit permissions need to be granted and set to "Everywhere" for all Workflows. Check out this support article for more information on each of these permissions.

Updating Charts

After authentication, you can make your first XLSX Chart Update API call. We recommend starting with a GET request to export your list of Charts in proper XLSX format. This will be useful as a reference for the correct XLSX format when updating the Charts' data.

To update multiple Charts, make a POST request to this URL:

https://api.kainexus.com/api/public/v1/excel/multiChartImport
  • If you're using Postman or a similar program:
    • In the request body, click form-data.
      • Enter "file" (without the quotation marks) under Key and set the drop-down under Key to "File" as well.
      • Click Select files and choose the files you want to upload from your local machine.

Example: Curl Script for importing Chart data

curl -s -D - --user api:APIKEY https://api.kainexus.com/api/public/v1/excel/multiChartImport -F "file=@FILEPATH;type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" --output importErrors
  • Replace APIKEY with the API Key generated in KaiNexus

  • The file must be UTF-8 encoded