Additional endpoints can be created upon request via [email protected].
When requesting additional endpoints, make sure to add information about which parameters (filters) should be set and which fields the endpoint should return. An example of the table with mock data in Excel will help us give the best response about the possibility, implementation time and cost.
Create an API key (instructions here).
The connection to Evocon API uses Basic Authentication. Excel has built-in support for connecting using Basic Authentication. The steps to connect and authenticate are below.
Open a new Excel sheet
Optional - Set up dynamic parameters for the query. You can also write them in the API request URL and change them there if needed.
On the top ribbon, choose Data > Get Data > From Other Sources > From Web
Access Web content window appears (if it does not, click here)
A Power Query Editor window appears
You may see a “data privacy” message here. Choose Organizational for both data sources and click “Save”. Organizational level limits the visibility of a data source to a trusted group of people. It is isolated from all Public data sources, but is visible to other Organizational data sources. A common example is a Microsoft Word document on an intranet SharePoint site with permissions enabled for a trusted group.
Click on "List Tools" > "Transform" on the top ribbon and then "To Table" in the top left corner. Click OK in the next window
Click "Transform" on the top ribbon and then "Expand" in the far right. Make sure that all fields are checked, delete “Column1” from “Default column name prefix (optional)” field and click OK
Optional - If you set up parameters in step 2, right click oee_json?… in the left sidebar and choose “Advanced editor”
You will see the Power Query code that makes the request.
let
Source = Json.Document(Web.Contents("<https://api.evocon.com/api/reports/oee_json?stationId=1&stationId=2&startTime=2023-01-01&endTime=2025-06-10>")),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"date", "technicalStopTimeSec", "lastModifiedTime", "totalQty", "shift", "operatingTimeSec", "idealQty", "stationGroupId", "slowProduction", "station", "plannedTime", "plannedstops", "unplannedstops", "day", "stationId", "factory", "shiftId", "goodProdction", "goodProduction", "stationGroup", "goodQty", "downtime", "month", "weekofyear", "uncommented"}, {"date", "technicalStopTimeSec", "lastModifiedTime", "totalQty", "shift", "operatingTimeSec", "idealQty", "stationGroupId", "slowProduction", "station", "plannedTime", "plannedstops", "unplannedstops", "day", "stationId", "factory", "shiftId", "goodProdction", "goodProduction", "stationGroup", "goodQty", "downtime", "month", "weekofyear", "uncommented"})
in
#"Expanded Column1"
Here, add the lines between “let” and “Source” for the parameters that you set up in step 2. Do not add lines that are not configured in step 2.
start=Excel.CurrentWorkbook(){[Name="START"]}[Content]{0}[Column1],
end=Excel.CurrentWorkbook(){[Name="END"]}[Content]{0}[Column1],
station=Excel.CurrentWorkbook(){[Name="STATION"]}[Content]{0}[Column1],
Then change the Source line to use the parameters. Below is an example for oee_json connection. Make sure to change the report name if you use a different endpoint.
let
start=Excel.CurrentWorkbook(){[Name="START"]}[Content]{0}[Column1],
end=Excel.CurrentWorkbook(){[Name="END"]}[Content]{0}[Column1],
station=Excel.CurrentWorkbook(){[Name="STATION"]}[Content]{0}[Column1],
Source = Json.Document(Web.Contents("<https://api.evocon.com/api/reports/oee_json?stationId="&station&"&startTime="&start&"&endTime=>"&end)),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"date", "technicalStopTimeSec", "lastModifiedTime", "totalQty", "shift", "operatingTimeSec", "idealQty", "stationGroupId", "slowProduction", "station", "plannedTime", "plannedstops", "unplannedstops", "day", "stationId", "factory", "shiftId", "goodProdction", "goodProduction", "stationGroup", "goodQty", "downtime", "month", "weekofyear", "uncommented"}, {"date", "technicalStopTimeSec", "lastModifiedTime", "totalQty", "shift", "operatingTimeSec", "idealQty", "stationGroupId", "slowProduction", "station", "plannedTime", "plannedstops", "unplannedstops", "day", "stationId", "factory", "shiftId", "goodProdction", "goodProduction", "stationGroup", "goodQty", "downtime", "month", "weekofyear", "uncommented"})
in
#"Expanded Column1"
You can edit the ordering of the columns, types of the fields and rename the columns as you wish.
Finally, click "Home" on the top ribbon and then "Close & Load".