Learning Center

Smoke-Test Your Power BI OData Connection

Before you build dashboards, verify that Power BI Desktop can actually reach your Standard Time® OData server. This guide walks you through installing Power BI, collecting your two credentials (CID and API key), and running a single M query that confirms a live data connection in under 10 minutes.

Flow diagram: Power BI Desktop sends HTTPS request with API key and CID to Standard Time® OData server, which returns JSON rows to the Power Query Editor
Power BI Desktop → Standard Time® OData server (stcloud67.com) → rows in Power Query. Smoke testing confirms all three links in the chain work before you build anything else.

Prerequisites Checklist

Before you start, confirm all three items:

ItemWhat you needWhere to get it
Windows PC Power BI Desktop is Windows-only. Windows 10 64-bit or later. Your existing machine — no additional hardware needed.
Customer ID (CID) A unique alphanumeric string that identifies your account on the Standard Time® cloud server. Found in Help → About inside Standard Time®, or in the URL after ?cid= when you open the web interface.
API Key A long alphanumeric key that authenticates your OData requests. Sent as the X-Api-Key HTTP header. Generated inside Standard Time® via View → Generate API Key. See Step 2.
On-premise vs. cloud: These instructions use the Standard Time® cloud server at stcloud67.com. If you run an on-premise installation, replace stcloud67.com in all URLs with your server's hostname or IP address. Everything else — credentials, M queries, entity paths — is identical.
CID not required for on-premise: The ?cid= parameter is only needed when connecting to the Standard Time® cloud server, where it identifies your account among many tenants. On an on-premise installation your server already knows which database to read — omit the ?cid= query string entirely. For example: http://yourserver/odata/Users rather than https://stcloud67.com/odata/Users?cid=….

Step 1 — Install Power BI Desktop

Power BI Desktop is a free Windows app. The Microsoft Store version auto-updates, which keeps the OData connector current without manual upgrades.

  1. Open the Microsoft Store.
    Press Win and type Microsoft Store, then press Enter. The Store opens to its home page.
  2. Search for Power BI Desktop.
    Click the search box at the top of the Store and type Power BI Desktop. Press Enter. Select the result published by Microsoft Corporation — it should be the first result.
  3. Click Get (or Install).
    The app is free. Click Get or Install. You may be prompted to sign in with a Microsoft account — a free personal account is sufficient for local use. Installation takes 2–5 minutes depending on your connection.
  4. Launch Power BI Desktop.
    After installation, click Open in the Store, or find Power BI Desktop in the Start menu. Dismiss any splash screen or sign-in prompt — a blank report canvas will appear. You are ready for Step 2. Power BI Desktop showing a blank report canvas at startup
Already have Power BI Desktop? Skip to Step 2. Any version released after January 2022 supports OData 4.0 with custom headers.

Step 2 — Get Your CID and API Key

Every OData request requires two pieces of information: your Customer ID (CID) passed in the URL, and your API Key passed in the request header. Collect both before you open Power BI.

Finding your CID

Your CID is the unique identifier that tells the OData server which Standard Time® account to read from. The OData URL pattern is:

https://stcloud67.com/?cid=YOUR_CID_HERE

To find your CID:

  • Open Standard Time® and click Help → About. The CID is listed on the About screen.
  • Or, log into the Standard Time® web interface — the CID appears after ?cid= in the browser address bar.
  • If you are not sure, ask your Standard Time® administrator.

Generating your API Key

The API key authenticates your OData requests without exposing your login credentials. Generate it once inside Standard Time® and reuse it across all your Power BI queries.

  1. Open the View menu in Standard Time®.
    Click View in the top menu bar. Scroll down to Generate API Key and click it. Standard Time View menu open with Generate API Key item highlighted
  2. Generate and copy the key.
    The dialog shows your current key. If none exists yet, click Generate. Click the key string to select it, then press Ctrl+C to copy. Paste it somewhere safe — a text file or password manager — before closing this dialog. API Key dialog showing the generated key with Generate and Revoke buttons
Keep the API key private. It grants read access to your Standard Time® data. Do not commit it to source control, paste it into shared documents, or include it in screenshots. If a key is compromised, return to this dialog and click Revoke, then generate a new one.

Step 3 — Open the Power Query Editor

You will enter the smoke-test M query in the Power Query Advanced Editor. Here is how to get there from a blank report.

  1. On the Home ribbon, click Get Data → Blank Query.
    In Power BI Desktop, click the Home tab. Click the small dropdown arrow on Get Data. In the menu that opens, look under New Source for Blank Query — or choose More… to open the full connector list and select Blank Query there. Power BI Home ribbon showing the New Source Blank Query menu option Get Data dialog with Blank Query option highlighted
  2. The Power Query Editor opens with Query1.
    A new window appears — the Power Query Editor. You will see Query1 in the Queries pane on the left. The main area shows an empty preview. This is where you will paste the smoke-test query. Power Query Editor with an empty Query1 in the Queries pane
  3. Right-click Query1 → Advanced Editor.
    In the Queries pane, right-click the Query1 item. In the context menu, click Advanced Editor. This opens the M formula editor — a dark text box where you can type or paste raw M code. Right-click context menu on Query1 showing Advanced Editor option
Power user shortcut: If you are already in the Power Query Editor from a previous session, go to Home → New Source → Blank Query or press Alt+H then NS to add a new query. Then right-click it and choose Advanced Editor.

Step 4 — Run the Entity List Smoke-Test Query

The simplest possible smoke test is to call the OData service root — the base endpoint with no entity name appended. It returns a two-column table listing every available entity set by name. No data rows are loaded, it is instant, and it works even when the database is completely empty.

  1. In the Advanced Editor, select all and delete.
    Press Ctrl+A to select the placeholder text, then press Delete.
  2. Paste the service-root query below.
    Copy the entire block, paste it into the Advanced Editor, then replace YOUR_CID_HERE with your actual CID and YOUR_API_KEY_HERE with your API key. M — entity list smoke test (paste into Advanced Editor)
    let
        Source = OData.Feed(
            "https://stcloud67.com/odata/?cid=YOUR_CID_HERE",
            null,
            [Headers = [#"X-Api-Key" = "YOUR_API_KEY_HERE"]]
        )
    in
        Source
  3. Click Done.
    Power BI evaluates the query and displays a preview. If the connection is successful you will see a two-column table — Name and Url — with one row for each of the 11 Standard Time® entity sets. Advanced Editor showing entity list data preview after clicking Done
Power Query Editor showing the OData service root result — a table with Name and Url columns listing all 11 entity sets
A successful service-root query returns a table like this — one row per entity set. All 11 means your credentials and server path are fully working.
Success indicator: Seeing all 11 entity set names confirms your API key, CID, and network path are correct. This query loads no actual data rows, so it works even on a brand-new or empty installation.

Step 5 — Run the TimeLogs Smoke-Test Query

Once Users works, confirm that your primary data table — TimeLogs — is also reachable. This is the table that drives most dashboards. Add a new Blank Query and run this in its Advanced Editor:

M — TimeLogs smoke test (paste into Advanced Editor)
let
    Source = OData.Feed(
        "https://stcloud67.com/odata/TimeLogs?cid=YOUR_CID_HERE&$top=10",
        null,
        [Headers = [#"X-Api-Key" = "YOUR_API_KEY_HERE"]]
    )
in
    Source

For completeness, here is the Projects smoke test as well:

M — Projects smoke test
let
    Source = OData.Feed(
        "https://stcloud67.com/odata/Projects?cid=YOUR_CID_HERE&$top=10",
        null,
        [Headers = [#"X-Api-Key" = "YOUR_API_KEY_HERE"]]
    )
in
    Source
New databases: TimeLogs and Projects return zero rows if your Standard Time® installation has no data yet. That is not a connection error — it means the connection is healthy but the database is empty. The Users table always has at least one record (the admin account), which is why it is the best first smoke test.
Power Query Editor with multiple named queries loaded and data previewed

Step 6 — Verify the Result

After clicking Done in the Advanced Editor, Power BI runs the query and shows a preview. Here is what to look for:

What you seeWhat it means
A table with column headers and rows of data Connection confirmed. Your CID, API key, and network path are all correct. Click Close & Apply in the Power Query Editor to load the table into your report model.
A table with column headers but zero rows Connection is working, but the entity is empty. This is normal for TimeLogs and Projects on a new installation. The Users query always returns at least one row for admin.
Error: DataSource.Error: 401 API key is wrong, missing, or has been revoked. Re-copy the key from Standard Time® and verify there are no extra spaces. See Troubleshooting.
Error: DataSource.Error: 404 The URL path is wrong — usually the wrong CID or a typo in the entity name. Double-check your CID and the exact URL path (e.g. /odata/Users).
Error: Expression.Error or Token expected M syntax problem. Copy the query fresh from this page — a single missing quotation mark breaks the parser.
Could not connect / connection refused Network issue: server unreachable. Check your internet connection, confirm the server is online, and verify your firewall allows outbound HTTPS to stcloud67.com.

Troubleshooting

401 Unauthorized

Symptoms: Query returns DataSource.Error: Web.Contents failed to get contents from ... (401): Unauthorized.
Causes and fixes:
  • API key not copied correctly — extra whitespace at the start or end is invisible and fatal. Re-copy directly from Standard Time®.
  • API key revoked — someone clicked Revoke in the Standard Time® API Key dialog. Generate a new key.
  • Key not pasted into the right part of the M query — verify it is between the inner quote marks after #"X-Api-Key" = .

404 Not Found

Symptoms: Query returns DataSource.Error: 404 or not found.
Causes and fixes:
  • Wrong CID — verify your CID from Help → About in Standard Time®. CIDs are long alphanumeric strings, not short numbers.
  • Typo in the entity path — the URL must be exactly /odata/Users, /odata/TimeLogs, etc. Capitalization matters.
  • Wrong server hostname — if you are on-premise, replace stcloud67.com with your own server address.

Power BI prompts for credentials

Symptom: Power BI pops up a credential dialog asking for a username and password.
Fix: Click Anonymous or Web API (not Windows or Basic). Authentication is handled entirely by the X-Api-Key header inside your M query — there is no separate Power BI credential to configure. If the dialog keeps appearing, delete the cached data source under File → Options → Data Source Settings and run the query again.

M syntax errors

Symptom: The Advanced Editor shows a yellow warning strip: Token expected or Expression.Error.
Fix: Copy the query fresh from this page. Common causes: smart quotes substituted for straight quotes, an ampersand typed as & instead of & (the HTML entity), or a line break inside a string literal. The entire query must use ASCII straight quotes only.

Connection works but data is stale

Explanation: Power BI caches data locally after the first load. To refresh, click Home → Refresh in the main Power BI Desktop window. For live-refreshing dashboards on a schedule, publish to the Power BI service and configure a Data Gateway or use Power BI's scheduled refresh against the cloud endpoint.

Next Steps — All OData Guides

Your connection is confirmed. Now you are ready to load all 11 entity sets, build relationships, write DAX measures, and publish production dashboards. Every guide below picks up where this smoke test leaves off.

OData & Power BI Integration

Full walkthrough: all 11 entity M queries, relationship setup, DAX starter measures, and sample reports. The authoritative guide for the complete integration.

Read Guide →

Build Four Dashboards

Visual-by-visual instructions for four production dashboards: Shop Floor Time & Utilization, Project Budget vs. Actuals, Full Job Cost, and Inventory Health.

Read Guide →

OData Schema Reference

Every entity set, every column name, OData type, primary key, and foreign key in one reference. Use this while writing M queries and DAX measures.

Read Reference →

All Integrations

OData is one of several integration paths. Also available: Google Sheets, Google Drive, QuickBooks Online, Zapier, and AI providers.

Browse Integrations →
Related FAQ: For common questions about OData setup, API key management, and Power BI connectivity, see the Integrations & Data FAQ.
Back to Learning Center

Ready to Build Live Dashboards from Your Shop Floor?

Start a free 30-day trial and connect Power BI, Excel, or any OData tool to your real Standard Time® data.

View Pricing Contact Us