# Connect an external application to a Published OData View

## Prerequisites

Ask an **Instance Admin** for the intended publication's full copied URL and
the instance's authorised OData credential pair. The endpoint must be enabled
and have completed its first data load. A person reading it in another
application does not need the Landit management page open.

Use an application with an OData connector that supports HTTPS and HTTP Basic
authentication, such as Power Query in a supported Excel or Power BI Desktop
version. Connector availability and menus vary by application and version.

## Expected result

Your external application reads the intended published rows using the instance's
OData credentials. Refreshing that connection rereads Landit's available
published result.

## Actions

1. Have an Instance Admin open
   [Published OData Views](https://app.landit.cloud/table/odata) in the correct
   instance, find the endpoint and check its status and refreshed time.
2. Use **Copy endpoint URL** beside its address. Use the full copied HTTPS URL,
   not the management-page URL or just the **Unique URL name**. The collection
   URL has this shape; the values below are placeholders:

   ```text
   https://odata.landit.cloud/odata/published/<instance-key>/v1/<url-name>
   ```

   The instance key is part of the service route, not the numeric `instanceId`
   in the web app's address. Copy it rather than guessing it.
3. Obtain the OData credentials securely from the responsible administrator.
   Administrators manage them under
   [Settings](https://app.landit.cloud/settings) → **OData credentials** →
   **Basic Auth credentials**. Use this mapping in the consumer:

   | Consumer credential field | Landit credential |
   | --- | --- |
   | Basic authentication username | **Public key** |
   | Basic authentication password | **Secret key** |

   These are different from your Landit sign-in credentials. Store them in the
   application's credential settings, not in a URL, query text or shared
   screenshot. The secret is shown only when generated; the settings page
   cannot reveal an existing secret later.
4. In the external application's get-data experience, select **OData** or
   **OData Feed**, enter the copied URL and choose **Basic** authentication
   when prompted. Supply the public key and secret key, then connect and
   inspect the returned columns and rows before loading them.
5. In Power Query Desktop, you may be offered **Transform Data** or **Load**.
   If the connector requires a service root and Navigator, use the copied URL
   up to and including `/v1/`, then select the intended URL name. Microsoft
   describes the connector's URL, authentication and Navigator steps in its
   [OData Feed guide](https://learn.microsoft.com/en-us/power-query/connectors/odata-feed).
6. Refresh the external connection and confirm that it can read again without
   changing the endpoint or its credentials. Agree the consumer's refresh
   schedule separately from Landit's data-processing schedule.

## Success criteria

The authenticated connection loads the expected publication and its fields.
Check meaningful values and row counts against the publication's current data;
a successful load can legitimately return zero rows. A small sample in Landit
does not prove that the entire external import succeeded.

OData property names can differ from the original column labels. A generated
**RowId** is a result key, not a lasting business key. Check the consumer's
handling of large integers, decimal precision and dates before building reports
that depend on those types.

## Understand refresh and freshness

A consumer refresh reads the active published result. It does not rerun the
saved View, adopt edits to it, trigger Landit's **Refresh data**, or import
records from the connected source system.

If the latest Landit refresh failed after an earlier success, consumers can
still receive that older successful data. Compare the publication's refreshed
time with your reporting needs. See
[management and refresh states](/help/manage-published-odata-views#read-the-publication-status).

## If the connection fails

- **Authentication:** confirm you selected Basic and used this instance's
  public key and secret key. An authenticated Landit browser session is not
  the consumer's OData credential. If credential loading in Settings fails,
  do not assume that credentials are absent or reset them to troubleshoot.
- **Missing endpoint:** ask an administrator whether its first load completed,
  whether it is enabled and whether its URL name changed. A rename replaces
  the old route after catalogue refresh; it does not redirect old connections.
- **Outdated data:** check the publication's status and refreshed time before
  refreshing the consumer repeatedly.
- **Lost or reset credentials:** coordinate with the instance administrator.
  **Reset credentials** invalidates the old pair and requires all affected
  OData integrations to be updated. It is not an endpoint-specific repair.

Power BI service and other hosted consumers can have additional credential,
gateway and refresh requirements. Desktop connection steps alone do not
establish that scheduled cloud refresh is configured or supported in your setup.
