# Get sensor data | Orion Data API v1.1

> For the complete documentation index, see [llms.txt](https://docs.oriondata.io/llms.txt)

Deprecated

`GET /sensorData`

**Example request (javascript, fetch)**

```js
const url = 'https://api.oriondata.io/api/sensorData?startDate=2024-09-09&endDate=2024-09-16&offset=0&sensorIds=54321&softSensorIds=65432&version=1.1';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Example request (shell, curl)**

```sh
curl --request GET \
  --url 'https://api.oriondata.io/api/sensorData?startDate=2024-09-09&endDate=2024-09-16&offset=0&sensorIds=54321&softSensorIds=65432&version=1.1' \
  --header 'Authorization: Bearer <token>'
```

- Productionapi.oriondata.io/api/sensorData

Returns sensor readings for the supplied sensor and soft sensor IDs over a given period. Results are paginated; supply increasing `offset` values until an empty array is returned. At least one of `sensorIds` or `softSensorIds` must be supplied.

## Authorizations

- **[bearerAuth](https://docs.oriondata.io/api/orion-data/v1-1/#bearerauth)**

## Parameters

### Query Parameters

**startDate**

required

string format: date

The start of the period. Date (`yyyy-MM-dd`). DateTime values are supported from version 1.3.

#### Example

```
2024-09-09
```

**endDate**

required

string format: date

The end of the period. Date (`yyyy-MM-dd`). DateTime values are supported from version 1.3.

#### Example

```
2024-09-16
```

**offset**

required

integer

The page of results to return, starting at `0`. Each page contains up to 100 records.

#### Example

```json
0
```

**sensorIds**

Array\<integer>

Comma-separated list of raw Sensor IDs. At least one of `sensorIds` or `softSensorIds` must be supplied.

#### Example

```
?sensorIds=54321
```

**softSensorIds**

Array\<integer>

Comma-separated list of Soft Sensor IDs. At least one of `sensorIds` or `softSensorIds` must be supplied.

#### Example

```
?softSensorIds=65432
```

**version**

string

API version to target. Pin this to `1.1` for this version of the API; requests without it default to the lowest available version.

#### Example

```json
1.1
```

## Responses

### 200

An array of SensorData objects.

application/json

Array\<object>

object

**sensorId**

The Sensor ID the data point belongs to.

integer

**softSensorId**

The Soft Sensor ID the data point belongs to. Null if the data point belongs to a raw sensor.

integer

nullable

**readingDate**

The reading timestamp in the Device’s local standard time. Devices do not observe daylight saving.

string format: date-time

**sensorValue**

The reading value.

number format: double

#### Example

```json
[
  {
    "sensorId": 54321,
    "softSensorId": null,
    "readingDate": "2024-09-15T00:00:00",
    "sensorValue": 1025
  },
  {
    "sensorId": 54321,
    "softSensorId": null,
    "readingDate": "2024-09-15T00:15:00",
    "sensorValue": 1025
  },
  {
    "sensorId": 54321,
    "softSensorId": null,
    "readingDate": "2024-09-15T00:30:00",
    "sensorValue": 1025.0999755859375
  }
]
```

### 400

The server could not understand the request.

### 401

No valid token was provided.

### 429

Rate limit exceeded.
