# Analytics OData API Reference

Read-only, tenant-isolated OData v4 interface for Mesh analytics data. Browse the entity sets below and query them with standard OData options (for example from Power BI Desktop via Get Data → OData Feed).

## Authentication

**Method:** OAuth 2.0 / OIDC (user-authenticated)

The API is read-only and strictly tenant-isolated. Requests are authenticated with organization-approved user credentials (SSO / OAuth2 / OIDC), aligned with Mesh Dashboard authentication; each dataset is scoped to a single tenant. Send the bearer token in the `Authorization` header.

## Entity sets

| Entity set | Entity type |
| --- | --- |
| `MachineAssets` | [`MachineAsset`](#machineasset) |
| `SoftwareAssets` | [`SoftwareAsset`](#softwareasset) |
| `CryptoElements` | [`CryptoElement`](#cryptoelement) |
| `NhiAssets` | [`NhiAsset`](#nhiasset) |

## Entity types

### MachineAsset

| Property | Type | Nullable | Key |
| --- | --- | --- | --- |
| `id` | `Edm.String` | No | Yes |
| `name` | `Edm.String` | No | No |
| `assetType` | `Edm.String` | Yes | No |
| `riskScore` | `Edm.Int32` | Yes | No |
| `lastSeen` | `Edm.DateTimeOffset` | Yes | No |

### SoftwareAsset

| Property | Type | Nullable | Key |
| --- | --- | --- | --- |
| `id` | `Edm.String` | No | Yes |
| `name` | `Edm.String` | No | No |
| `version` | `Edm.String` | Yes | No |
| `vendor` | `Edm.String` | Yes | No |
| `riskScore` | `Edm.Int32` | Yes | No |

### CryptoElement

| Property | Type | Nullable | Key |
| --- | --- | --- | --- |
| `id` | `Edm.String` | No | Yes |
| `algorithm` | `Edm.String` | No | No |
| `keyLength` | `Edm.Int32` | Yes | No |
| `deprecated` | `Edm.Boolean` | Yes | No |

### NhiAsset

| Property | Type | Nullable | Key |
| --- | --- | --- | --- |
| `id` | `Edm.String` | No | Yes |
| `name` | `Edm.String` | No | No |
| `assetType` | `Edm.String` | Yes | No |
| `riskScore` | `Edm.Int32` | Yes | No |

## Query options

| Option | Description |
| --- | --- |
| `$filter` | Filter the collection by a boolean expression. |
| `$select` | Return only the named properties. |
| `$orderby` | Sort the collection by one or more properties. |
| `$top` | Return at most N records (pagination). |
| `$skip` | Skip the first N records (pagination). |
| `$count` | Include the total match count with the response. |
