# prov.mandate.deviceEnrolments.list

prov.mandate.deviceEnrolments.list in Node SDK. `GET /v1/mandate/device_enrollments`: this account's enrollments, newest first.

## Signature

```ts
prov.mandate.deviceEnrolments.list(params?: ListDeviceEnrollmentsParams): Promise<ListResponse<DeviceEnrollment>>
```

## Parameters

- `params` (ListDeviceEnrollmentsParams, optional)

## Returns

`Promise<ListResponse<DeviceEnrollment>>`

## HTTP operation

[`GET /v1/mandate/device_enrollments`](https://provenanceauth.com/docs/api/grants.md#get-v1-mandate-device-enrollments): List device enrolments

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

## Example

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/device_enrollments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "display_name": "Maya", "reference": "ds_session_list" }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/device_enrollments?reference=ds_session_list&limit=1`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/device_enrollments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "display_name": "Maya",
    "reference": "ds_session_list"
}).json()
data = httpx.get(f"{api}/v1/mandate/device_enrollments?reference=ds_session_list&limit=1", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```
