General information

Available API endpoints for common use cases

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.

Authentication

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.

Step by step guide to set up a connection

  1. Open a new Excel sheet

  2. Optional - Set up dynamic parameters for the query. You can also write them in the API request URL and change them there if needed.

    1. Start time parameter - Required for most APIs
      1. Right click on a cell (A1 for example) and choose “Define name”.
      2. Write START in the “Name” field and click “OK”.
    2. End time parameter - Required for most APIs
      1. Right click on a cell (A2 for example) and choose “Define name”.
      2. Write END in the “Name” field and click “OK”.
    3. Station id parameter - Optional
      1. Right click on a cell (A3 for example) and choose “Define name”.
      2. Write STATION in the “Name” field and click “OK”.
    4. IMPORTANT - When the fields are named, select them, right click choose “Format cells” and set the field type to “Text”. This way, Excel is not changing the format of the date.
  3. On the top ribbon, choose Data > Get Data > From Other Sources > From Web

    1. Click on the Advanced radio button
      1. Fill in the endpoint URL (you will have to use the parameters and actual dates at this stage). You can split the parameters up in parts.
      2. Click OK to load data.
  4. Access Web content window appears (if it does not, click here)

    1. Insert API key as “User name” and Secret key as Password.
    2. Click “Connect”

    Untitled

  5. A Power Query Editor window appears

    1. 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.

      Untitled

    2. Click on "List Tools" > "Transform" on the top ribbon and then "To Table" in the top left corner. Click OK in the next window

      https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d93e1fd7-b0ed-4418-afd9-6f55bed8461b/Untitled.png

    3. 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

    4. Optional - If you set up parameters in step 2, right click oee_json?… in the left sidebar and choose “Advanced editor”

      1. 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"
        
      2. 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” in the beginning is the parameter used in Power Query.
        • Name="START" specifies the name defined for a cell.
        start=Excel.CurrentWorkbook(){[Name="START"]}[Content]{0}[Column1],
        end=Excel.CurrentWorkbook(){[Name="END"]}[Content]{0}[Column1],
        station=Excel.CurrentWorkbook(){[Name="STATION"]}[Content]{0}[Column1],
        
      3. 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"
        
    5. You can edit the ordering of the columns, types of the fields and rename the columns as you wish.

    6. Finally, click "Home" on the top ribbon and then "Close & Load".