Powered by Temper

JSON Chart Update API

KaiNexus 2.5.2 adds support for updating the chart data within your Chart Items in JSON format. 

 

Prior to 2.5.2, Chart Items were available for update from KaiNexus, but would only allow you to update the details about the Chart Item itself, such as Title, Description, Team, system Date Fields, etc. Now you have the option to make updates to the data captured within the Chart itself in your JSON imports. 



To update an individual Chart with its respective Chart data in the JSON format, use this URL:

 

https://api.kainexus.com/api/public/v1/json/item?id=xxxxxx&includeCharts

 

Example Curl Script:

curl -s -D - --user api:APIKEY https://api.kainexus.com/api/public/v1/json/itemUpdate&includeCharts -d @FILEPATH -X PUT -H "Content-Type: application/json"



This is similar to the JSON Item Update API URL for an individual Item, and with the addition of the “&includeCharts” this will now give you the option to include the data within the Chart on your JSON export.

 

See The API module for more information on how to configure API Keys or obtain the ID number of the list you would like to export.

 

Things to note:

  1. All dates use ISO 8601 format. Example: "2019-04-29T16:30:40.000+0000"

  2. Only Charts the User has permission to edit will be successfully able to push the updates to

  3. The Chart(s) being updated must be referenced by ID.

 

See the JSON Chart Export API support page for more info on how to configure the API to export your Chart data via JSON.



Example JSON format for a Chart:

 

{

   "item": {

       "id": 4107,

       "summary": "2020 PMA Approvals",

       "chart": {

           "id": 266,

           "useDate": false,

           "chartState": "PRIMARY_MET",

           "chartType": "BAR_LINE",

           "series": [

               {

                   "id": 736,

                   "name": "2020 Forecast",

                   "type": "LINE",

                   "dataPoints": [

                       {

                           "id": 14214,

                           "value": 7.0,

                           "date": "2020-12-21T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       },

                       {

                           "id": 14219,

                           "value": 2.0,

                           "date": "2020-12-22T22:42:04.000+0000",

                           "category": "Feb",

                           "annotations": []

                       },

                       {

                           "id": 14215,

                           "value": 9.0,

                           "date": "2020-12-23T22:42:04.000+0000",

                           "category": "Mar",

                           "annotations": []

                       },

                       {

                           "id": 14220,

                           "value": 3.0,

                           "date": "2020-12-24T22:42:04.000+0000",

                           "category": "Apr",

                           "annotations": []

                       },

                       {

                           "id": 14209,

                           "value": 10.0,

                           "date": "2020-12-25T22:42:04.000+0000",

                           "category": "May",

                           "annotations": []

                       },

                       {

                           "id": 14213,

                           "value": 20.0,

                           "date": "2020-12-26T22:42:04.000+0000",

                           "category": "Jun",

                           "annotations": []

                       },

                       {

                           "id": 14218,

                           "value": 7.0,

                           "date": "2020-12-27T22:42:04.000+0000",

                           "category": "Jul",

                           "annotations": []

                       },

                       {

                           "id": 14212,

                           "value": 8.0,

                           "date": "2020-12-28T22:42:04.000+0000",

                           "category": "Aug",

                           "annotations": []

                       },

                       {

                           "id": 14211,

                           "value": 4.0,

                           "date": "2020-12-29T22:42:04.000+0000",

                           "category": "Sep",

                           "annotations": []

                       },

                       {

                           "id": 14216,

                           "value": 4.0,

                           "date": "2020-12-30T22:42:04.000+0000",

                           "category": "Oct",

                           "annotations": []

                       },

                       {

                           "id": 14210,

                           "value": 4.0,

                           "date": "2020-12-31T22:42:04.000+0000",

                           "category": "Nov",

                           "annotations": []

                       },

                       {

                           "id": 14217,

                           "value": 12.0,

                           "date": "2021-01-01T22:42:04.000+0000",

                           "category": "Dec",

                           "annotations": []

                       },

                       {

                           "id": 16650,

                           "value": 3.0,

                           "date": "2021-01-02T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       }

                   ]

               },

               {

                   "id": 734,

                   "name": "2019",

                   "type": "LINE",

                   "dataPoints": [

                       {

                           "id": 14193,

                           "value": 9.0,

                           "date": "2020-12-21T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       },

                       {

                           "id": 14189,

                           "value": 2.0,

                           "date": "2020-12-22T22:42:04.000+0000",

                           "category": "Feb",

                           "annotations": []

                       },

                       {

                           "id": 14186,

                           "value": 4.0,

                           "date": "2020-12-23T22:42:04.000+0000",

                           "category": "Mar",

                           "annotations": []

                       },

                       {

                           "id": 14194,

                           "value": 19.0,

                           "date": "2020-12-24T22:42:04.000+0000",

                           "category": "Apr",

                           "annotations": []

                       },

                       {

                           "id": 14196,

                           "value": 14.0,

                           "date": "2020-12-25T22:42:04.000+0000",

                           "category": "May",

                           "annotations": []

                       },

                       {

                           "id": 14188,

                           "value": 7.0,

                           "date": "2020-12-26T22:42:04.000+0000",

                           "category": "Jun",

                           "annotations": []

                       },

                       {

                           "id": 14190,

                           "value": 12.0,

                           "date": "2020-12-27T22:42:04.000+0000",

                           "category": "Jul",

                           "annotations": []

                       },

                       {

                           "id": 14195,

                           "value": 8.0,

                           "date": "2020-12-28T22:42:04.000+0000",

                           "category": "Aug",

                           "annotations": []

                       },

                       {

                           "id": 14185,

                           "value": 3.0,

                           "date": "2020-12-29T22:42:04.000+0000",

                           "category": "Sep",

                           "annotations": []

                       },

                       {

                           "id": 14191,

                           "value": 6.0,

                           "date": "2020-12-30T22:42:04.000+0000",

                           "category": "Oct",

                           "annotations": []

                       },

                       {

                           "id": 14187,

                           "value": 9.0,

                           "date": "2020-12-31T22:42:04.000+0000",

                           "category": "Nov",

                           "annotations": []

                       },

                       {

                           "id": 14192,

                           "value": 7.0,

                           "date": "2021-01-01T22:42:04.000+0000",

                           "category": "Dec",

                           "annotations": []

                       },

                       {

                           "id": 16653,

                           "date": "2021-01-02T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       }

                   ]

               },

               {

                   "id": 735,

                   "name": "2019 Approved PMA Starts",

                   "type": "THRESHOLD_PRIMARY",

                   "dataPoints": [

                       {

                           "id": 14207,

                           "value": 4.0,

                           "date": "2020-12-21T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       },

                       {

                           "id": 14198,

                           "value": 4.0,

                           "date": "2020-12-22T22:42:04.000+0000",

                           "category": "Feb",

                           "annotations": []

                       },

                       {

                           "id": 14208,

                           "value": 4.0,

                           "date": "2020-12-23T22:42:04.000+0000",

                           "category": "Mar",

                           "annotations": []

                       },

                       {

                           "id": 14205,

                           "value": 6.0,

                           "date": "2020-12-24T22:42:04.000+0000",

                           "category": "Apr",

                           "annotations": []

                       },

                       {

                           "id": 14204,

                           "value": 6.0,

                           "date": "2020-12-25T22:42:04.000+0000",

                           "category": "May",

                           "annotations": []

                       },

                       {

                           "id": 14201,

                           "value": 6.0,

                           "date": "2020-12-26T22:42:04.000+0000",

                           "category": "Jun",

                           "annotations": []

                       },

                       {

                           "id": 14202,

                           "value": 4.0,

                           "date": "2020-12-27T22:42:04.000+0000",

                           "category": "Jul",

                           "annotations": []

                       },

                       {

                           "id": 14199,

                           "value": 4.0,

                           "date": "2020-12-28T22:42:04.000+0000",

                           "category": "Aug",

                           "annotations": []

                       },

                       {

                           "id": 14200,

                           "value": 4.0,

                           "date": "2020-12-29T22:42:04.000+0000",

                           "category": "Sep",

                           "annotations": []

                       },

                       {

                           "id": 14206,

                           "value": 6.0,

                           "date": "2020-12-30T22:42:04.000+0000",

                           "category": "Oct",

                           "annotations": []

                       },

                       {

                           "id": 14197,

                           "value": 6.0,

                           "date": "2020-12-31T22:42:04.000+0000",

                           "category": "Nov",

                           "annotations": []

                       },

                       {

                           "id": 14203,

                           "value": 6.0,

                           "date": "2021-01-01T22:42:04.000+0000",

                           "category": "Dec",

                           "annotations": []

                       },

                       {

                           "id": 16654,

                           "value": 6.0,

                           "date": "2021-01-02T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       }

                   ]

               },

               {

                   "id": 733,

                   "name": "2019 Actual",

                   "type": "BAR",

                   "dataPoints": [

                       {

                           "id": 14183,

                           "value": 5.0,

                           "date": "2020-12-21T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       },

                       {

                           "id": 14178,

                           "value": 7.0,

                           "date": "2020-12-22T22:42:04.000+0000",

                           "category": "Feb",

                           "annotations": []

                       },

                       {

                           "id": 14181,

                           "value": 12.0,

                           "date": "2020-12-23T22:42:04.000+0000",

                           "category": "Mar",

                           "annotations": []

                       },

                       {

                           "id": 14182,

                           "value": 20.0,

                           "date": "2020-12-24T22:42:04.000+0000",

                           "category": "Apr",

                           "annotations": []

                       },

                       {

                           "id": 14175,

                           "value": 4.0,

                           "date": "2020-12-25T22:42:04.000+0000",

                           "category": "May",

                           "annotations": []

                       },

                       {

                           "id": 14176,

                           "value": 3.0,

                           "date": "2020-12-26T22:42:04.000+0000",

                           "category": "Jun",

                           "annotations": []

                       },

                       {

                           "id": 14184,

                           "value": 14.0,

                           "date": "2020-12-27T22:42:04.000+0000",

                           "category": "Jul",

                           "annotations": []

                       },

                       {

                           "id": 14180,

                           "value": 23.0,

                           "date": "2020-12-28T22:42:04.000+0000",

                           "category": "Aug",

                           "annotations": []

                       },

                       {

                           "id": 14174,

                           "value": 12.0,

                           "date": "2020-12-29T22:42:04.000+0000",

                           "category": "Sep",

                           "annotations": []

                       },

                       {

                           "id": 14177,

                           "value": 4.0,

                           "date": "2020-12-30T22:42:04.000+0000",

                           "category": "Oct",

                           "annotations": []

                       },

                       {

                           "id": 14173,

                           "value": 16.0,

                           "date": "2020-12-31T22:42:04.000+0000",

                           "category": "Nov",

                           "annotations": []

                       },

                       {

                           "id": 14179,

                           "value": 22.0,

                           "date": "2021-01-01T22:42:04.000+0000",

                           "category": "Dec",

                           "annotations": []

                       },

                       {

                           "id": 16652,

                           "date": "2021-01-02T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       }

                   ]

               },

               {

                   "id": 737,

                   "name": "Total",

                   "type": "LINE",

                   "dataPoints": [

                       {

                           "id": 14225,

                           "value": 1.8,

                           "date": "2020-12-21T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       },

                       {

                           "id": 14232,

                           "value": 0.2857142857142857,

                           "date": "2020-12-22T22:42:04.000+0000",

                           "category": "Feb",

                           "annotations": []

                       },

                       {

                           "id": 14221,

                           "value": 0.3333333333333333,

                           "date": "2020-12-23T22:42:04.000+0000",

                           "category": "Mar",

                           "annotations": []

                       },

                       {

                           "id": 14228,

                           "value": 0.95,

                           "date": "2020-12-24T22:42:04.000+0000",

                           "category": "Apr",

                           "annotations": []

                       },

                       {

                           "id": 14226,

                           "value": 3.5,

                           "date": "2020-12-25T22:42:04.000+0000",

                           "category": "May",

                           "annotations": []

                       },

                       {

                           "id": 14222,

                           "value": 2.3333333333333335,

                           "date": "2020-12-26T22:42:04.000+0000",

                           "category": "Jun",

                           "annotations": []

                       },

                       {

                           "id": 14229,

                           "value": 0.8571428571428571,

                           "date": "2020-12-27T22:42:04.000+0000",

                           "category": "Jul",

                           "annotations": []

                       },

                       {

                           "id": 14231,

                           "value": 0.34782608695652173,

                           "date": "2020-12-28T22:42:04.000+0000",

                           "category": "Aug",

                           "annotations": []

                       },

                       {

                           "id": 14230,

                           "value": 0.25,

                           "date": "2020-12-29T22:42:04.000+0000",

                           "category": "Sep",

                           "annotations": []

                       },

                       {

                           "id": 14223,

                           "value": 1.5,

                           "date": "2020-12-30T22:42:04.000+0000",

                           "category": "Oct",

                           "annotations": []

                       },

                       {

                           "id": 14224,

                           "value": 0.5625,

                           "date": "2020-12-31T22:42:04.000+0000",

                           "category": "Nov",

                           "annotations": []

                       },

                       {

                           "id": 14227,

                           "value": 0.3181818181818182,

                           "date": "2021-01-01T22:42:04.000+0000",

                           "category": "Dec",

                           "annotations": []

                       },

                       {

                           "id": 16651,

                           "date": "2021-01-02T22:42:04.000+0000",

                           "category": "Jan",

                           "annotations": []

                       }

                   ]

               }

           ]

       },

       "status": "NEW",

       "chartType": "BAR_LINE",

       "authors": [

           {

               "username": "showroom",

           }

       ],

       "participatingLocations": [],

       "originatingLocations": [],

       "responsibleLocations": [

           {

               "name": "Engineering"

           }

       ],

       "createDate": "2020-11-09T22:59:42.000+0000",

   },

   }

}

 

Have more questions? Submit a request