API beschrijving

De API documentatie is beschikbaar in het Engels.

Data upload >=100kb

URL

https://www.intchart.com/api/{id}/files/{name}/data

Headers

Authorization Mandatory API key
Content-Type Optional Media types : text/html
Accept Optional Media types : text/html or application/json

Parameters

{id} API user ID
{name} The name of your file
difference Optional Calculates the difference of two consecutive values ( e.g. for consumption ) Possible values : y or n Default : n

For uploads >100kb, no additional parameters have to be specified. However the data should follow these rules:

  • the first line has the legend names
  • the first column has the x-value
  • the data separator is ; | , or TAB
  • the decimal character is .
  • the file encoding is UTF-8

Format of the x-value (1st colom) can be:

  • Year Month Day
  • Year Month Day Hour Minutes Seconds
  • Year Month Day Hour Minutes Seconds Milliseconds

Data example

Request

https://www.intchart.com/api/ABCDEFGH/files/File1/data

Header

Authorization: Bearer TNz7QwucuGythvQa71vYMQY0gKfyBP82DQ5LAaS9

Data (only text) - first lines

date,line1,line2 2016-06-01,58.13,3.41 2016-06-02,63.98,14.55 2016-06-03,87,26.78 2016-06-04,119.7,37.85 2016-06-05,139,48.92 2016-06-06,180.28,59.92 2016-06-07,226.7,90.13 2016-06-08,304.98,222.23 ...

Response

{ "message":"File2 has sucessfully been uploaded.", "version":"1.0", "href":"https://www.intchart.com/api/ABCDEFGH/files/File2/data", "doc":"https://www.intchart.com/overview/api", "data characteristics": { "data separator":",", "decimal character":".", "language":"", "column x-values":"0", "name x-values":"Day", "format x-values":"Year Month Day", "name y-values":"Meter 1 Meter 2 Meter 3 " } }