---
title: Project API - Notehub API Reference
description: The Notehub project API provides RESTful methods that can be used to GET project data.
source_url: https://dev.blues.io/api-reference/notehub-api/project-api/
canonical_url: https://dev.blues.io/api-reference/notehub-api/project-api/
markdown_url: https://dev.blues.io/api-reference/notehub-api/project-api.md
---

# Project API

The Notehub project API provides RESTful methods that can be used to `GET` and `POST` project data.

| Name                                                                        | HTTP Request                                                                                  |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [Get Projects](#get-projects)                                               | **GET** `/v1/projects`                                                                        |
| [Get Project](#get-project)                                                 | **GET** `/v1/projects/{projectUID}`                                                           |
| [Get Project by Product](#get-project-by-product)                           | **GET** `/v1/products/{productUID}/project`                                                   |
| [Create Project](#create-project)                                           | **POST** `/v1/projects`                                                                       |
| [Delete Project](#delete-project)                                           | **DELETE** `/v1/projects/{projectUID}`                                                        |
| [Clone Project](#clone-project)                                             | **POST** `/v1/projects/{projectOrProductUID}/clone`                                           |
| [Get Project Members](#get-project-members)                                 | **GET** `/v1/projects/{projectOrProductUID}/members`                                          |
| [Create Product](#create-product)                                           | **POST** `/v1/projects/{projectOrProductUID}/products`                                        |
| [Delete Product](#delete-product)                                           | **DELETE** `/v1/projects/{projectOrProductUID}/products/{productUID}`                         |
| [Get Products](#get-products)                                               | **GET** `/v1/projects/{projectOrProductUID}/products`                                         |
| [Get Project Environment Hierarchy](#get-project-environment-hierarchy)     | **GET** `/v1/projects/{projectOrProductUID}/environment_hierarchy`                            |
| [Get Project Environment Variables](#get-project-environment-variables)     | **GET** `/v1/projects/{projectOrProductUID}/environment_variables`                            |
| [Delete Project Environment Variable](#delete-project-environment-variable) | **DELETE** `/v1/projects/{projectOrProductUID}/environment_variables/{key}`                   |
| [Set Project Environment Variables](#set-project-environment-variables)     | **PUT** `/v1/projects/{projectOrProductUID}/environment_variables`                            |
| [Get Fleet Environment Hierarchy](#get-fleet-environment-hierarchy)         | **GET** `/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy`          |
| [Get Fleet Environment Variables](#get-fleet-environment-variables)         | **GET** `/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables`          |
| [Delete Fleet Environment Variable](#delete-fleet-environment-variable)     | **DELETE** `/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}` |
| [Set Fleet Environment Variables](#set-fleet-environment-variables)         | **PUT** `/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables`          |
| [Get Fleet](#get-fleet)                                                     | **GET** `/v1/projects/{projectOrProductUID}/fleets/{fleetUID}`                                |
| [Get Fleets](#get-fleets)                                                   | **GET** `/v1/projects/{projectOrProductUID}/fleets`                                           |
| [Create Fleet](#create-fleet)                                               | **POST** `/v1/projects/{projectOrProductUID}/fleets`                                          |
| [Update Fleet](#update-fleet)                                               | **PUT** `/v1/projects/{projectOrProductUID}/fleets/{fleetUID}`                                |
| [Delete Fleet](#delete-fleet)                                               | **DELETE** `/v1/projects/{projectOrProductUID}/fleets/{fleetUID}`                             |
| [Get Device Fleets](#get-device-fleets)                                     | **GET** `/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets`                       |
| [Add Device to Fleets](#add-device-to-fleets)                               | **PUT** `/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets`                       |
| [Delete Device from Fleets](#delete-device-from-fleets)                     | **DELETE** `/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets`                    |
| [Set Global JSONata Transform](#set-global-jsonata-transform)               | **POST** `/v1/projects/{projectOrProductUID}/global-transformation`                           |
| [Enable Global JSONata Transform](#enable-global-jsonata-transform)         | **POST** `/v1/projects/{projectOrProductUID}/global-transformation/enable`                    |
| [Disable Global JSONata Transform](#disable-global-jsonata-transform)       | **POST** `/v1/projects/{projectOrProductUID}/global-transformation/disable`                   |
| [Get Devices DFU History](#get-devices-dfu-history)                         | **GET** `/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history`                       |
| [Get Devices DFU Status](#get-devices-dfu-status)                           | **GET** `/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status`                        |
| [Get Device DFU History](#get-device-dfu-history)                           | **GET** `/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history`   |
| [Get Device DFU Status](#get-device-dfu-status)                             | **GET** `/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status`    |
| [Get Available Firmware](#get-available-firmware)                           | **GET** `/v1/projects/{projectOrProductUID}/firmware`                                         |
| [Perform DFU Action](#perform-dfu-action)                                   | **POST** `/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}`                     |
| [Download Firmware](#download-firmware)                                     | **GET** `/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}`               |
| [Upload Firmware](#upload-firmware)                                         | **PUT** `/v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}`               |
| [Update Firmware](#update-firmware)                                         | **POST** `/v1/projects/{projectOrProductUID}/firmware/host/{filename}`                        |
| [Delete Firmware](#delete-firmware)                                         | **DELETE** `/v1/projects/{projectOrProductUID}/firmware/host/{filename}`                      |
| [Get AWS Role Config](#get-aws-role-config)                                 | **GET** `/v1/projects/{projectOrProductUID}/aws-role-config`                                  |
| [Get Project Secrets](#get-project-secrets)                                 | **GET** `/v1/projects/{projectOrProductUID}/secrets`                                          |
| [Create Project Secret](#create-project-secret)                             | **POST** `/v1/projects/{projectOrProductUID}/secrets`                                         |
| [Update Project Secret](#update-project-secret)                             | **PUT** `/v1/projects/{projectOrProductUID}/secrets/{secretName}`                             |
| [Delete Project Secret](#delete-project-secret)                             | **DELETE** `/v1/projects/{projectOrProductUID}/secrets/{secretName}`                          |

## Get Projects (Notehub)

Get all Notehub [projects](https://dev.blues.io/api-reference/glossary.md#project) accessible by provided [authentication token](https://dev.blues.io/api-reference/notehub-api.md).

|                                                                                                               |                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects`                                                                                                                |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication). |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
apiInstance.getProjects().then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.get_projects200_response import GetProjects200Response
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)

    try:
        api_response = api_instance.get_projects()
        print("The response of ProjectApi->get_projects:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_projects: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the project.

### `label`

*string*

The user-assigned label for the project.

### `created`

*string*

The date and time the project was created in Notehub.

### `administrative_contact`

*object*

Contact information for the administrative contact assigned in Notehub.

### `technical_contact`

*object*

Contact information for the technical contact assigned in Notehub.

### `role`

*string*

The role of the project member creating the API request.

Example Response

```json
{
  "projects": [
    {
      "uid": "app:00000000-0000-0000-0000-000000000000",
      "label": "First Notehub Project",
      "created": "2021-04-26T19:11:05Z",
      "administrative_contact": {
        "name": "John Doe",
        "email": "someone@example.com",
        "role": "Admin",
        "organization": "Blues"
      },
      "technical_contact": {
        "name": "Jane Doe",
        "email": "someone@example.com",
        "role": "Tech",
        "organization": "Blues"
      },
      "role": "owner"
    },
    {
      "uid": "app:00000000-0000-0000-0000-000000000000",
      "label": "Second Notehub Project",
      "created": "2022-07-26T19:11:05Z",
      "administrative_contact": {
        "name": "Jane Doe",
        "email": "someone@example.com",
        "role": "Admin",
        "organization": "Blues"
      },
      "technical_contact": {
        "name": "John Doe",
        "email": "someone@example.com",
        "role": "Tech",
        "organization": "Blues"
      },
      "role": "owner"
    }
  ]
}
```

## Get Project (Notehub)

Get information about a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project) by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

|                                                                                                               |                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectUID}`                                                                                                   |
| Path Parameters:                                                                                              | - `projectUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) of a Notehub project.                                    |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication). |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectUID>'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProject(projectUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.project import Project
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 

    try:
        api_response = api_instance.get_project(project_uid)
        print("The response of ProjectApi->get_project:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_project: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the project.

### `label`

*string*

The user-assigned label for the project.

### `created`

*string*

The date and time the project was created in Notehub.

### `administrative_contact`

*object*

Contact information for the administrative contact assigned in Notehub.

### `technical_contact`

*object*

Contact information for the technical contact assigned in Notehub.

### `role`

*string*

The role of the project member creating the API request.

Example Response

```json
{
  "uid": "app:00000000-0000-0000-0000-000000000000",
  "label": "My Notehub Project",
  "created": "2021-04-26T19:11:05Z",
  "administrative_contact": {
    "name": "John Doe",
    "email": "someone@example.com",
    "role": "Admin",
    "organization": "Blues"
  },
  "technical_contact": {
    "name": "Jane Doe",
    "email": "someone@example.com",
    "role": "Tech",
    "organization": "Blues"
  },
  "role": "owner"
}
```

## Get Project by Product (Notehub)

Get information about a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project) by [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid).

|                                                                                                               |                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/products/{productUID}/project`                                                                                           |
| Path Parameters:                                                                                              | - `productUID` - The [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.                                    |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication). |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/products/<productUID>/project'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let productUID = "com.blues.airnote;" // String |
apiInstance.getProjectByProduct(productUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.project import Project
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    product_uid = "com.blues.airnote" # str | 

    try:
        api_response = api_instance.get_project_by_product(product_uid)
        print("The response of ProjectApi->get_project_by_product:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_project_by_product: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the project.

### `label`

*string*

The user-assigned label for the project.

### `created`

*string*

The date and time the project was created in Notehub.

### `administrative_contact`

*object*

Contact information for the administrative contact assigned in Notehub.

### `technical_contact`

*object*

Contact information for the technical contact assigned in Notehub.

### `role`

*string*

The role of the project member creating the API request.

Example Response

```json
{
  "uid": "app:00000000-0000-0000-0000-000000000000",
  "label": "My Notehub Project",
  "created": "2021-04-26T19:11:05Z",
  "administrative_contact": {
    "name": "John Doe",
    "email": "someone@example.com",
    "role": "Admin",
    "organization": "Blues"
  },
  "technical_contact": {
    "name": "Jane Doe",
    "email": "someone@example.com",
    "role": "Tech",
    "organization": "Blues"
  },
  "role": "owner"
}
```

## Create Project (Notehub)

Create a new Notehub [project](https://dev.blues.io/api-reference/glossary.md#project).

|                                                                                                               |                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects`                                                                                                                |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | owner                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication). |

Arguments

### `label`

*string*

The label of the Notehub project.

### `billing_account_uid`

*string*

The globally-unique identifier of the billing account. The caller of the API must be able to create projects within the specified billing account, otherwise an error will be returned. This identifier is available with a call to [Get Billing Accounts](https://dev.blues.io/api-reference/notehub-api/billing-account-api.md#get-billing-accounts).

**Example**

**Bash**

```bash
curl -X POST
    -L 'https://api.notefile.net/v1/projects'
    -H 'Authorization: Bearer <access_token>'
    -d '{"label":"<label>", "billing_account_uid":"<my_billing_account_here>"}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let createProjectProps = {
  label: "My New Project", // String |
  billingAccountUid: "billing-account-uid" // String |
}
let createProjectRequest = new NotehubJs.CreateProjectRequest(createProjectProps); // CreateProjectRequest | Project to be created
apiInstance.createProject(createProjectRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.create_project_request import CreateProjectRequest
from notehub_py.models.project import Project
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_request_props = {
        "label": "label_example",
        "billing_account_uid": "billing_account_uid_example"
    }
    create_project_request = notehub_py.CreateProjectRequest() # CreateProjectRequest | Project to be created

    try:
        api_response = api_instance.create_project(create_project_request)
        print("The response of ProjectApi->create_project:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->create_project: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the project.

### `label`

*string*

The user-assigned label for the project.

### `created`

*string*

The date and time the project was created in Notehub.

### `administrative_contact`

*object*

Contact information for the administrative contact assigned in Notehub. Will be `null` on newly-created projects.

### `technical_contact`

*object*

Contact information for the technical contact assigned in Notehub. Will be `null` on newly-created projects.

### `role`

*string*

The role of the project member creating the API request.

Example Response

```json
{
  "uid": "app:00000000-0000-0000-0000-000000000000",
  "label": "My Notehub Project",
  "created": "2021-04-26T19:11:05Z",
  "administrative_contact": null,
  "technical_contact": null,
  "role": "owner"
}
```

## Delete Project (Notehub)

Delete a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project) by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

|                                                                                                               |                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `DELETE`                                                                                                                                              |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectUID}`                                                                                                   |
| Path Parameters:                                                                                              | - `projectUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) of a Notehub project.                                    |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | owner                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication). |

Arguments

None

**Example**

**Bash**

```bash
curl -X DELETE
    -L 'https://api.notefile.net/v1/projects/<projectUID>'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.deleteProject(projectUID).then(() => {
  console.log("API called successfully.");
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 

    try:
        api_instance.delete_project(project_uid)
    except Exception as e:
        print("Exception when calling ProjectApi->delete_project: %s\n" % e)
```

**Response Members**

None: an empty object `{}` means success.

## Clone Project (Notehub)

Clone a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/clone`                                                                                                                                     |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | owner                                                                                                                                                                                                  |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

### `label`

*string*

The user-assigned label for the project.

### `billing_account_uid`

*string*

The globally-unique identifier of the billing account. The caller of the API must be able to create projects within the specified billing account, otherwise an error will be returned. This identifier is available with a call to [Get Billing Accounts](https://dev.blues.io/api-reference/notehub-api/billing-account-api.md#get-billing-accounts).

### `disable_clone_routes`

*boolean (optional)*

By default routes are cloned from the parent project. Set this to `true` to disallow cloning routes.

### `disable_clone_fleets`

*boolean (optional)*

By default fleets are cloned from the parent project. Set this to `true` to disallow cloning fleets.

**Example**

**Bash**

```bash
curl -X POST
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/clone'
    -H 'Authorization: Bearer <access_token>'
    -d '{"label":"<label>","billing_account_uid":"<billing_account_uid>"}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String | The project UID to be cloned.
let cloneProjectProps = {
  label: "My Cloned Project", // String |
  billingAccountUid: "billing-account-uid", // String |
  disableCloneRoutes: false, // Boolean |
  disableCloneFleets: false // Boolean |
}
let cloneProjectRequest = new NotehubJs.CloneProjectRequest(cloneProjectProps); // CloneProjectRequest | Project to be cloned
apiInstance.cloneProject(projectOrProductUID, cloneProjectRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.clone_project_request import CloneProjectRequest
from notehub_py.models.project import Project
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "project_or_product_uid_example" # str | The project UID to be cloned.
    clone_project_props = {
        "label": "label_example",
        "billing_account_uid": "billing_account_uid_example",
        "disable_clone_routes": False,
        "disable_clone_fleets": False
    }
    clone_project_request = notehub_py.CloneProjectRequest(clone_project_props) # CloneProjectRequest | Project to be cloned

    try:
        api_response = api_instance.clone_project(project_or_product_uid, clone_project_request)
        print("The response of ProjectApi->clone_project:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->clone_project: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the project.

### `label`

*string*

The user-assigned label for the project.

### `created`

*string*

The date and time the project was created in Notehub.

### `administrative_contact`

*object*

Contact information for the administrative contact assigned in Notehub. Will be `null` on newly-created projects.

### `technical_contact`

*object*

Contact information for the technical contact assigned in Notehub. Will be `null` on newly-created projects.

### `role`

*string*

The role of the project member creating the API request.

Example Response

```json
{
  "uid": "app:00000000-0000-0000-0000-000000000000",
  "label": "My Cloned Notehub Project",
  "created": "2021-04-26T19:11:05Z",
  "administrative_contact": null,
  "technical_contact": null,
  "role": "owner"
}
```

## Get Project Members (Notehub)

Get all members from a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/members`                                                                                                                                   |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/members'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProjectMembers(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.get_project_members200_response import GetProjectMembers200Response
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 

    try:
        api_response = api_instance.get_project_members(project_or_product_uid)
        print("The response of ProjectApi->get_project_members:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_project_members: %s\n" % e)
```

**Response Members**

### `name`

*string*

The name of the project member.

### `email`

*string*

The email address of the project member (only provided if the auth token provider is an owner of the project).

### `role`

*string*

The role of the project member (e.g. viewer, developer, or owner).

Example Response

```json
{
  "members": [
    {
      "name": "Jane Doe",
      "email": "someone@blues.com",
      "role": "owner"
    },
    {
      "name": "John Doe",
      "email": "someone@blues.com",
      "role": "developer"
    }
  ]
}
```

## Create Product (Notehub)

Create a new Notehub [product](https://dev.blues.io/api-reference/glossary.md#productuid) using a [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/products`                                                                                                                                  |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                              |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

### `product_uid`

*string*

The requested ProductUID (**without** the reverse URL prefix notation).

### `label`

*string*

The requested label for the product.

### `fleet_uids`

*string array (optional)*

An array of [FleetUIDs](https://dev.blues.io/api-reference/glossary.md#fleetuid) to which new devices should be auto-assigned.

### `disable_devices`

*boolean (optional)*

If `true`, devices provisioned to this product will be automatically disabled by default.

**Basic**

**Bash**

```bash
curl -X POST
     -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/products'
     -H 'Authorization: Bearer <access_token>'
     -d '{"product_uid":"<product_uid>", "label":"<label>"}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let createProductProps = {
  productUid: "product_uid", // String |
  label: "Product 1", // String |
  autoProvisionFleets: ["fleet_uid_1", "fleet_uid_2"], // [String] |
  disableDevicesByDefault: true // Boolean |
}
let createProductRequest = new NotehubJs.CreateProductRequest(createProductProps); // CreateProductRequest | Product to be created
apiInstance.createProduct(projectOrProductUID, createProductRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.create_product_request import CreateProductRequest
from notehub_py.models.product import Product
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    product_request_props = {
        "product_uid": "product_uid_example",
        "label": "label_example",
        "auto_provision_fleets": [
            "fleet_id_1",
            "fleet_id_2"
        ],
        "disable_devices_by_default": True
    }
    create_product_request = notehub_py.CreateProductRequest(product_request_props) # CreateProductRequest | Product to be created

    try:
        api_response = api_instance.create_product(project_or_product_uid, create_product_request)
        print("The response of ProjectApi->create_product:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->create_product: %s\n" % e)
```

**Optional Params**

**Bash**

```bash
curl -X POST
     -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/products'
     -H 'Authorization: Bearer <access_token>'
     -d '{"product_uid":"<product_uid>", "label":"<label>", "auto_provision_fleets":"<fleet_uids>", "disable_devices_by_default":"<disable_devices>"}'
```

**Response Members**

### `uid`

*string*

The globally-unique identifier for the product.

### `label`

*string*

The user-defined label of the product.

### `auto_provision_fleets`

*string array*

The globally-unique fleet identifiers to which new devices will automatically be provisioned.

### `disable_devices_by_default`

*boolean*

Whether or not new devices will be disabled by default.

Example Response

```json
{
  "uid": "com.blues.test:product",
  "label": "My Product Label",
  "auto_provision_fleets": null,
  "disable_devices_by_default": false
}
```

## Delete Product (Notehub)

Delete a product from Notehub [project](https://dev.blues.io/api-reference/glossary.md#project), using a [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) and [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid).

|                                                                                                               |                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `DELETE`                                                                                                                                                                                                                              |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/products/{productUID}`                                                                                                                                                    |
| Path Parameters:                                                                                              | - `projectUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) of a Notehub project.
- `productUID` - The [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | owner                                                                                                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                 |

Arguments

None

**Example**

**Bash**

```bash
curl -X DELETE
    -L 'https://api.notefile.net/v1/projects/<projectUID>/products/<productUID>'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let productUID = "com.blues.bridge:sensors"; // String |
apiInstance.deleteProduct(projectOrProductUID, productUID).then(() => {
  console.log("API called successfully.");
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str |
    product_uid = "com.blues.bridge:sensors" # str |

    try:
        api_instance.delete_product(project_or_product_uid, product_uid)
    except Exception as e:
        print("Exception when calling ProjectApi->delete_product: %s\n" % e)
```

**Response Members**

None: an empty object `{}` means success.

## Get Products (Notehub)

Get an array of products from a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project), using a [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

|                                                                                                               |                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/products`                                                                                 |
| Path Parameters:                                                                                              | - `projectUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) of a Notehub project.                                    |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication). |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectUID>/products'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProjectProducts(projectUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.get_project_products200_response import GetProjectProducts200Response
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 

    try:
        api_response = api_instance.get_project_products(project_uid)
        print("The response of ProjectApi->get_project_products:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_project_products: %s\n" % e)
```

**Response Members**

### `product_uid`

*string*

The globally-unique identifier for the product.

### `label`

*string*

The user-defined label of the product.

### `auto_provision_fleets`

*string*

An array of globally-unique [FleetUIDs](https://dev.blues.io/api-reference/glossary.md#fleetuid) to which new devices will automatically be provisioned.

### `disable_devices_by_default`

*boolean*

If `true`, devices provisioned to this product will be automatically disabled by default.

Example Response

```json
{
  "products": [
    {
      "uid": "product:com.your-company.your-name:project",
      "label": "My Notehub Product",
      "auto_provision_fleets": ["fleet:00000000-0000-0000-0000-000000000000"],
      "disable_devices_by_default": false
    }
  ]
}
```

## Get Project Environment Hierarchy (Notehub)

Get environment variable hierarchy by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

The environment variable hierarchy lets you view all variables available to your device—including those set at the device, fleet, and project levels—and shows you exactly which value is applied when multiple levels define the same variable.

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/environment_hierarchy`                                                                                                                     |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/environment_hierarchy'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProjectEnvironmentHierarchy(projectOrProductUID).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.env_tree_json_node import EnvTreeJsonNode
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str |

    try:
        # Get environment variable hierarchy for a device
        api_response = api_instance.get_project_environment_hierarchy(project_or_product_uid)
        print("The response of ProjectApi->get_project_environment_hierarchy:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_project_environment_hierarchy: %s\n" % e)
```

**Response Members**

### `var_count`

\_integer

Total number of environment variables in the hierarchy.

### `inherited_var_count`

*integer*

Total number of inherited environment variables in the hierarchy.

### `type`

*string*

Type of the environment variable.

### `variables`

*array*

JSON array containing environment variables with the following properties:

`"key"` - *string* - The name of the environment variable.

`"value"` - *string* - The value of the environment variable.

`"used"` - *boolean* - Indicates if the variable is currently active on the device.

`"precedence"` - *number* - The precedence of the variable in the hierarchy.

`"note"` - *string* - An optional free-form annotation for the variable.

### `children`

*array*

JSON array of child nodes in the hierarchy, each represented by a nested object with details.

### `device_uid`

*string (optional)*

The unique identifier of the Notehub [device](https://dev.blues.io/api-reference/glossary.md#device).

### `fleet_label`

*string (optional)*

The label of the fleet the Notehub device belongs to.

### `fleet_uid`

*string (optional)*

The unique identifier of the [fleet](https://dev.blues.io/api-reference/glossary.md#fleetuid) the device belongs to.

### `app_uid`

*string (optional)*

The globally-unique [AppUID](https://dev.blues.io/api-reference/glossary.md#appuid) for the device's current Notehub application.

### `app_label`

*string (optional)*

The label of the application the Notehub device is associated with.

### `url`

*string (optional)*

The URL to access the device's environment hierarchy.

Example Response

```json
[
  {
    "var_count": 5,
    "inherited_var_count": 2,
    "type": "device",
    "variables": [
      {
        "key": "VAR1",
        "value": "value1",
        "used": true,
        "precedence": 1,
        "note": "Calibrated 2026-06-01"
      },
      {
        "key": "VAR2",
        "value": "value2",
        "used": false,
        "precedence": 2
      }
    ],
    "children": [],
    "device_uid": "dev:000000000000000",
    "fleet_label": "Fleet 1",
    "fleet_uid": "fleet:000000000000000",
    "app_uid": "app:000000000000000",
    "app_label": "App 1",
    "url": "https://api.notefile.net/v1/projects/app:2606f411-dea6-44a0-9743-1130f57d77d8/devices/dev:000000000000000/environment_hierarchy"
  }
]
```

## Get Project Environment Variables (Notehub)

Get all project-level environment variables by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/environment_variables`                                                                                                                     |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/environment_variables'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProjectEnvironmentVariables(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.environment_variables import EnvironmentVariables
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 

    try:
        api_response = api_instance.get_project_environment_variables(project_or_product_uid)
        print("The response of ProjectApi->get_project_environment_variables:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_project_environment_variables: %s\n" % e)
```

**Response Members**

### `environment_variables`

*object*

JSON object containing environment variables in `"key":"value"` format.

### `environment_variable_notes`

*object*

JSON object containing optional per-variable annotations, keyed by variable name.

Example Response

```json
{
  "environment_variables": {
    "project_humidity": "33.4",
    "project_temp": "24.1"
  },
  "environment_variable_notes": {
    "project_humidity": "Set by the provisioning script"
  }
}
```

## Delete Project Environment Variable (Notehub)

Delete a project-level environment variable by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) and environment variable key.

|                                                                                                               |                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `DELETE`                                                                                                                                                                                                                                              |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/environment_variables/{key}`                                                                                                                                                              |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `key` - The key of the environment variable. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                             |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                 |

Arguments

None

**Example**

**Bash**

```bash
curl -X DELETE
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/environment_variables/<key>'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let key = "key_example"; // String | The environment variable key to delete.
apiInstance.deleteProjectEnvironmentVariable(projectOrProductUID, key).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.environment_variables import EnvironmentVariables
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    key = "key_example" # str | The environment variable key to delete.

    try:
        api_response = api_instance.delete_project_environment_variable(project_or_product_uid, key)
        print("The response of ProjectApi->delete_project_environment_variable:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->delete_project_environment_variable: %s\n" % e)
```

**Response Members**

### `environment_variables`

*object*

JSON object containing environment variables in `"key":"value"` format.

### `environment_variable_notes`

*object*

JSON object containing optional per-variable annotations, keyed by variable name.

Example Response

```json
{
  "environment_variables": {
    "project_humidity": "33.4",
    "project_temp": "24.1"
  },
  "environment_variable_notes": {
    "project_humidity": "Set by the provisioning script"
  }
}
```

## Set Project Environment Variables (Notehub)

Set project-level environment variables by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `PUT`                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/environment_variables`                                                                                                                     |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                              |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

### `environment_variables`

*object*

A JSON object containing the key-value pair(s) of environment variable(s) to add. For example: `{"key1":"value1","key2":"value2"}`.

### `environment_variable_notes`

*object (optional)*

A JSON object of optional per-variable annotations, keyed by variable name. Setting a key to an empty string removes its note. A `400` error is returned for any key that does not already exist as a stored variable and is not included in `environment_variables` in the same request. For example: `{"key1":"A note about key1","key2":"A note about key2"}`.

**Example**

**Bash**

```bash
curl -X PUT
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/environment_variables'
    -H 'Authorization: Bearer <access_token>'
    -d '{"environment_variables":<env_vars>}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let envVars = {key1: "value1", key2: "value2"} // {String: String}
let opts = {
  environmentVariables: new NotehubJs.EnvironmentVariables(envVars), // EnvironmentVariables |
};
apiInstance.setProjectEnvironmentVariables(projectOrProductUID, opts).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.environment_variables import EnvironmentVariables
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    env_vars = {"key_1": "value_1", "key_2": "value_2"} # Dict[str, str] | 
    environment_variables = notehub_py.EnvironmentVariables(env_vars) # EnvironmentVariables |  (optional)

    try:
        api_response = api_instance.set_project_environment_variables(project_or_product_uid, environment_variables=environment_variables)
        print("The response of ProjectApi->set_project_environment_variables:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->set_project_environment_variables: %s\n" % e)
```

**Response Members**

### `environment_variables`

*object*

JSON object containing environment variables in `"key":"value"` format.

### `environment_variable_notes`

*object*

JSON object containing optional per-variable annotations, keyed by variable name.

Example Response

```json
{
  "environment_variables": {
    "project_humidity": "33.4",
    "project_temp": "24.1"
  },
  "environment_variable_notes": {
    "project_humidity": "Set by the provisioning script"
  }
}
```

## Get Fleet Environment Hierarchy (Notehub)

Get environment variable hierarchy by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) and [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid).

The environment variable hierarchy lets you view all variables available to your device—including those set at the device, fleet, and project levels—and shows you exactly which value is applied when multiple levels define the same variable.

|                                                                                                               |                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                             |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchy`                                                                                                                                                                                                              |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `fleetUID` - The [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid) of a Notehub fleet. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                                                                                                                            |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                             |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/fleets/<fleetUID>/environment_hierarchy'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
apiInstance.getFleetEnvironmentHierarchy(projectOrProductUID, fleetUID).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.env_tree_json_node import EnvTreeJsonNode
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str |
    fleet_uid = "fleet_uid_example" # str |

    try:
        # Get environment variable hierarchy for a device
        api_response = api_instance.get_fleet_environment_hierarchy(project_or_product_uid, fleet_uid)
        print("The response of ProjectApi->get_fleet_environment_hierarchy:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_fleet_environment_hierarchy: %s\n" % e)
```

**Response Members**

### `var_count`

*integer*

Total number of environment variables in the hierarchy.

### `inherited_var_count`

*integer*

Total number of inherited environment variables in the hierarchy.

### `type`

*string*

Type of the environment variable.

### `variables`

*array*

JSON array containing environment variables with the following properties:

`"key"` - *string* - The name of the environment variable.

`"value"` - *string* - The value of the environment variable.

`"used"` - *boolean* - Indicates if the variable is currently active on the device.

`"precedence"` - *number* - The precedence of the variable in the hierarchy.

`"note"` - *string* - An optional free-form annotation for the variable.

### `children`

*array*

JSON array of child nodes in the hierarchy, each represented by a nested object with details.

### `device_uid`

*string (optional)*

The unique identifier of the Notehub [device](https://dev.blues.io/api-reference/glossary.md#device).

### `fleet_label`

*string (optional)*

The label of the fleet the Notehub device belongs to.

### `fleet_uid`

*string (optional)*

The unique identifier of the [fleet](https://dev.blues.io/api-reference/glossary.md#fleetuid) the device belongs to.

### `app_uid`

*string (optional)*

The globally-unique [AppUID](https://dev.blues.io/api-reference/glossary.md#appuid) for the device's current Notehub application.

### `app_label`

*string (optional)*

The label of the application the Notehub device is associated with.

### `url`

*string (optional)*

The URL to access the device's environment hierarchy.

Example Response

```json
[
  {
    "var_count": 5,
    "inherited_var_count": 2,
    "type": "device",
    "variables": [
      {
        "key": "VAR1",
        "value": "value1",
        "used": true,
        "precedence": 1,
        "note": "Calibrated 2026-06-01"
      },
      {
        "key": "VAR2",
        "value": "value2",
        "used": false,
        "precedence": 2
      }
    ],
    "children": [],
    "device_uid": "dev:000000000000000",
    "fleet_label": "Fleet 1",
    "fleet_uid": "fleet:000000000000000",
    "app_uid": "app:000000000000000",
    "app_label": "App 1",
    "url": "https://api.notefile.net/v1/projects/app:2606f411-dea6-44a0-9743-1130f57d77d8/devices/dev:000000000000000/environment_hierarchy"
  }
]
```

## Get Fleet Environment Variables (Notehub)

Get all fleet-level environment variables by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) and [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                             |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables`                                                                                                                                                                                                              |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `fleetUID` - The [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid) of a Notehub fleet. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                                                                                                                            |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                             |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/fleets/<fleetUID>/environment_variables'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
apiInstance.getFleetEnvironmentVariables(projectOrProductUID, fleetUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.environment_variables import EnvironmentVariables
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    fleet_uid = "fleet_uid_example" # str | 

    try:
        api_response = api_instance.get_fleet_environment_variables(project_or_product_uid, fleet_uid)
        print("The response of ProjectApi->get_fleet_environment_variables:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_fleet_environment_variables: %s\n" % e)
```

**Response Members**

### `environment_variables`

*object*

JSON object containing environment variables in `"key":"value"` format.

### `environment_variable_notes`

*object*

JSON object containing optional per-variable annotations, keyed by variable name.

Example Response

```json
{
  "environment_variables": {
    "fleet_humidity": "33.4",
    "fleet_temp": "24.1"
  },
  "environment_variable_notes": {
    "fleet_humidity": "Threshold agreed with the field team"
  }
}
```

## Delete Fleet Environment Variable (Notehub)

Delete a fleet-level environment variable on a Notehub project by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid), [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid), and environment variable key.

|                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `DELETE`                                                                                                                                                                                                                                                                                                                                                         |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}`                                                                                                                                                                                                                                                       |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `fleetUID` - The [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid) of a Notehub fleet.
- `key` - The key of the environment variable. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                                                                                                                        |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                                                                            |

Arguments

None

**Example**

**Bash**

```bash
curl -X DELETE
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/fleets/<fleetUID>/environment_variables/<key>'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let key = "key_example"; // String | The environment variable key to delete.
apiInstance.deleteFleetEnvironmentVariable(projectOrProductUID, fleetUID, key).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.environment_variables import EnvironmentVariables
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    fleet_uid = "fleet_uid_example" # str | 
    key = "key_example" # str | The environment variable key to delete.

    try:
        api_response = api_instance.delete_fleet_environment_variable(project_or_product_uid, fleet_uid, key)
        print("The response of ProjectApi->delete_fleet_environment_variable:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->delete_fleet_environment_variable: %s\n" % e)
```

**Response Members**

### `environment_variables`

*object*

JSON object containing environment variables in `"key":"value"` format.

### `environment_variable_notes`

*object*

JSON object containing optional per-variable annotations, keyed by variable name.

Example Response

```json
{
  "environment_variables": {
    "fleet_humidity": "33.4",
    "fleet_temp": "24.1"
  },
  "environment_variable_notes": {
    "fleet_humidity": "Threshold agreed with the field team"
  }
}
```

## Set Fleet Environment Variables (Notehub)

Set fleet-level environment variables by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) and [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `PUT`                                                                                                                                                                                                                                                                                                             |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables`                                                                                                                                                                                                              |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `fleetUID` - The [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid) of a Notehub fleet. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                                                                         |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                             |

Arguments

### `environment_variables`

*object*

A JSON object containing the key-value pair(s) of environment variable(s) to be added to the fleet. For example: `{"key1":"value1","key2":"value2"}`.

### `environment_variable_notes`

*object (optional)*

A JSON object of optional per-variable annotations, keyed by variable name. Setting a key to an empty string removes its note. A `400` error is returned for any key that does not already exist as a stored variable and is not included in `environment_variables` in the same request. For example: `{"key1":"A note about key1","key2":"A note about key2"}`.

**Example**

**Bash**

```bash
curl -X PUT
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/fleets/<fleetUID>/environment_variables'
    -H 'Authorization: Bearer <access_token>'
    -d '{"environment_variables":<env_vars>}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let envVars = {key1: "value1", key2: "value2"} // {String: String}
let environmentVariables = new NotehubJs.EnvironmentVariables(envVars); // EnvironmentVariables | Environment variables to be added to the fleet
apiInstance.setFleetEnvironmentVariables(projectOrProductUID, fleetUID, environmentVariables).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.environment_variables import EnvironmentVariables
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    fleet_uid = "fleet_uid_example" # str | 
    env_vars = {"key_1": "value_1", "key_2": "value_2"} # Dict[str, str] | 
    environment_variables = notehub_py.EnvironmentVariables(env_vars) # EnvironmentVariables | Environment variables to be added to the fleet

    try:
        api_response = api_instance.set_fleet_environment_variables(project_or_product_uid, fleet_uid, environment_variables)
        print("The response of ProjectApi->set_fleet_environment_variables:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->set_fleet_environment_variables: %s\n" % e)
```

**Response Members**

### `environment_variables`

*object*

JSON object containing environment variables in `"key":"value"` format.

### `environment_variable_notes`

*object*

JSON object containing optional per-variable annotations, keyed by variable name.

Example Response

```json
{
  "environment_variables": {
    "fleet_humidity": "33.4",
    "fleet_temp": "24.1"
  },
  "environment_variable_notes": {
    "fleet_humidity": "Threshold agreed with the field team"
  }
}
```

## Get Fleet (Notehub)

Get a [fleet](https://dev.blues.io/api-reference/glossary.md#fleet) associated with a [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                             |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/fleets/{fleetUID}`                                                                                                                                                                                                                                    |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `fleetUID` - The [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid) of a Notehub fleet. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                                                                                                                            |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                             |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/fleets/<fleetUID>'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getFleet(projectOrProductUID, fleetUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.fleet import Fleet
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    fleet_uid = "fleet_uid_example" # str | 

    try:
        api_response = api_instance.get_fleet(project_or_product_uid, fleet_uid)
        print("The response of ProjectApi->get_fleet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_fleet: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the fleet.

### `label`

*string*

The user-defined label of the fleet.

### `created`

*string*

The date and time the fleet was created.

### `environment_variables`

*object (optional)*

JSON object containing environment variables in `"key":"value"` format.

### `smart_rule`

*string (optional)*

JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged.

See [Using Smart Fleet Rules](https://dev.blues.io/notehub/notehub-walkthrough.md#using-smart-fleet-rules) for examples.

### `connectivity_assurance`

*object (optional)*

Indicates whether Connectivity Assurance is enabled for this fleet.

JSON object with the following format: `"enabled": true|false`.

Example Response

```json
{
  "uid": "fleet:00000000-0000-0000-0000-000000000000",
  "label": "Production",
  "created": "2021-04-10T21:18:38Z",
  "connectivity_assurance": {
    "enabled": true
  }
}
```

## Get Fleets (Notehub)

Get an array of [fleets](https://dev.blues.io/api-reference/glossary.md#fleet) associated with a [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/fleets`                                                                                                                                    |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getFleets(projectOrProductUID).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.get_device_fleets200_response import GetDeviceFleets200Response
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 

    try:
        api_response = api_instance.get_fleets(project_or_product_uid)
        print("The response of ProjectApi->get_fleets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_fleets: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the fleet.

### `label`

*string*

The user-defined label of the fleet.

### `created`

*string*

The date and time the fleet was created.

Example Response

```json
{
  "fleets": [
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Production",
      "created": "2021-04-10T21:18:38Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Staging",
      "created": "2021-02-11T01:03:46Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Testing",
      "created": "2021-02-11T01:03:32Z"
    }
  ]
}
```

## Create Fleet (Notehub)

Create a new device [fleet](https://dev.blues.io/api-reference/glossary.md#fleet) within a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/fleets`                                                                                                                                    |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                              |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

### `label`

*string*

A label for the fleet.

### `smart_rule`

*string (optional)*

JSONata expression that will be evaluated to determine device membership into this fleet. If the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged.

See [Using Smart Fleet Rules](https://dev.blues.io/notehub/notehub-walkthrough.md#using-smart-fleet-rules) for examples.

### `smart_rule_enabled`

*boolean (optional)*

Whether this fleet's [smart fleet rules](https://dev.blues.io/notehub/notehub-walkthrough.md#using-smart-fleet-rules) should be enabled.

### `connectivity_assurance`

*object (optional)*

Indicates whether to enable Connectivity Assurance for this fleet.

JSON object with the following format: `"enabled": true|false`.

**Example**

**Bash**

```bash
curl -X POST
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
    -d '{"label":"<label>"}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let createFleetRequest = new NotehubJs.CreateFleetRequest(); // CreateFleetRequest | Fleet to be added
apiInstance.createFleet(projectOrProductUID, createFleetRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.create_fleet_request import CreateFleetRequest
from notehub_py.models.fleet import Fleet
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    create_fleet_request = notehub_py.CreateFleetRequest() # CreateFleetRequest | Fleet to be added

    try:
        api_response = api_instance.create_fleet(project_or_product_uid, create_fleet_request)
        print("The response of ProjectApi->create_fleet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->create_fleet: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier for the fleet.

### `label`

*string*

The user-defined label of the fleet.

### `created`

*time stamp*

The date/time the fleet was created.

### `environment_variables`

*object (optional)*

JSON object containing environment variables in `"key":"value"` format.

### `smart_rule`

*string (optional)*

JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged.

See [Using Smart Fleet Rules](https://dev.blues.io/notehub/notehub-walkthrough.md#using-smart-fleet-rules) for examples.

### `smart_rule_enabled`

Whether this fleet's smart fleet rules are enabled.

### `connectivity_assurance`

*object (optional)*

Indicates whether Connectivity Assurance is enabled for this fleet.

JSON object with the following format: `"enabled": true|false`.

Example Response

```json
{
  "uid": "fleet:00000000-0000-0000-0000-000000000000",
  "label": "My Fleet Label",
  "created": "2021-10-12T16:21:54Z",
  "connectivity_assurance": {
    "enabled": true
  }
}
```

## Update Fleet (Notehub)

Update a fleet's label or devices by FleetUID.

|                                                                                                               |                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `PUT`                                                                                                                                                                                                                                                                                                             |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/fleets/{fleetUID}`                                                                                                                                                                                                                                    |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `fleetUID` - The [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid) of a Notehub fleet. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                                                                         |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                             |

Arguments

### `label`

*string*

The updated label for the fleet.

### `addDevices`

*array (optional)*

A list of DeviceUIDs to add to the fleet.

### `removeDevices`

*array (optional)*

A list of DeviceUIDs to remove from the fleet.

### `smart_rule`

*string (optional)*

JSONata expression that will be evaluated to determine device membership into this fleet. If the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged.

See [Using Smart Fleet Rules](https://dev.blues.io/notehub/notehub-walkthrough.md#using-smart-fleet-rules) for examples.

### `smart_rule_enabled`

*boolean (optional)*

Whether this fleet's [smart fleet rules](https://dev.blues.io/notehub/notehub-walkthrough.md#using-smart-fleet-rules) should be enabled.

### `watchdog_mins`

*integer (optional)*

A watchdog timer is used to generate an event every N minutes of inactivity. 0 means no watchdog timer is set.

### `connectivity_assurance`

*object (optional)*

Indicates whether to enable Connectivity Assurance for this fleet.

JSON object with the following format: `"enabled": true|false`.

**Example**

**Bash**

```bash
curl -X PUT
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/fleets/<fleetUID>'
    -H 'Authorization: Bearer <access_token>'
    -d '{"label":"<label>"}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |

let updateFleetRequest = {
  label: "Fleet Label",
  addDevices: ["device_id_1", "device_id_2"],
  removeDevices: ["device_id_3", "device_id_4"],
  watchdogMins: 30, // Optional, in minutes
} // UpdateFleetRequest | Fleet details to update

apiInstance.updateFleet(projectOrProductUID, fleetUID, updateFleetRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.fleet import Fleet
from notehub_py.models.update_fleet_request import UpdateFleetRequest
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    fleet_uid = "fleet_uid_example" # str | 
    fleet_request_properties = {
        "label": "fleet_label_1",
        "add_devices": ["device_uid_1", "device_uid_2"],
        "remove_devices": ["device_uid_3", "device_uid_4"],
        "watchdog_mins": 30  # Optional, in minutes
    }
    update_fleet_request = notehub_py.UpdateFleetRequest(fleet_request_properties) # UpdateFleetRequest | Fleet details to update

    try:
        api_response = api_instance.update_fleet(project_or_product_uid, fleet_uid, update_fleet_request)
        print("The response of ProjectApi->update_fleet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->update_fleet: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier for the fleet.

### `label`

*string*

The user-defined label of the fleet.

### `created`

*time stamp*

The date/time the fleet was created.

### `environment_variables`

*object (optional)*

JSON object containing environment variables in `"key":"value"` format.

### `smart_rule`

*string (optional)*

JSONata expression that will be evaluated to determine device membership into this fleet, if the expression evaluates to a 1, the device will be included, if it evaluates to -1 it will be removed, and if it evaluates to 0 or errors it will be left unchanged.

See [Using Smart Fleet Rules](https://dev.blues.io/notehub/notehub-walkthrough.md#using-smart-fleet-rules) for examples.

### `smart_rule_enabled`

*boolean (optional)*

Whether this fleet's smart fleet rules are enabled.

### `connectivity_assurance`

*object (optional)*

Indicates whether Connectivity Assurance is enabled for this fleet.

JSON object with the following format: `"enabled": true|false`.

Example Response

```json
{
  "uid": "fleet:00000000-0000-0000-0000-000000000000",
  "label": "My Fleet Label",
  "created": "2021-10-12T16:21:54Z",
  "connectivity_assurance": {
    "enabled": true
  }
}
```

## Delete Fleet (Notehub)

Delete a device [fleet](https://dev.blues.io/api-reference/glossary.md#fleet).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `DELETE`                                                                                                                                                                                                                                                                                                          |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/fleets/{fleetUID}`                                                                                                                                                                                                                                    |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `fleetUID` - The [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid) of a Notehub fleet. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                                                                         |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                             |

Arguments

None

**Example**

**Bash**

```bash
curl -X DELETE
     -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/fleets/<fleetUID>'
     -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
apiInstance.deleteFleet(projectOrProductUID, fleetUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    fleet_uid = "fleet_uid_example" # str | 

    try:
        api_instance.delete_fleet(project_or_product_uid, fleet_uid)
    except Exception as e:
        print("Exception when calling ProjectApi->delete_fleet: %s\n" % e)
```

## Get Device Fleets (Notehub)

Get an array of [fleets](https://dev.blues.io/api-reference/glossary.md#fleet) associated with a [device](https://dev.blues.io/api-reference/glossary.md#device).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets`                                                                                                                                                                                                                                                                                                                                                       |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `deviceUID` - The [DeviceUID](https://dev.blues.io/api-reference/glossary.md#deviceuid) of a Notehub device. You may alternatively provide a device serial number by prefixing this argument with `sn:`, for example `sn:my-device`. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                                                                                                                                                         |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/devices/<deviceUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDeviceFleets(projectOrProductUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
```

**Python**

```python
import notehub_py
from notehub_py.models.get_device_fleets200_response import GetDeviceFleets200Response
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    device_uid = "device_uid_example" # str | 

    try:
        api_response = api_instance.get_device_fleets(project_or_product_uid, device_uid)
        print("The response of ProjectApi->get_device_fleets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_device_fleets: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the fleet.

### `label`

*string*

The user-defined label of the fleet.

### `created`

*string*

The date and time the fleet was created.

Example Response

```json
{
  "fleets": [
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Production",
      "created": "2021-04-10T21:18:38Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Staging",
      "created": "2021-02-11T01:03:46Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Testing",
      "created": "2021-02-11T01:03:32Z"
    }
  ]
}
```

## Add Device to Fleets (Notehub)

Add a [device](https://dev.blues.io/api-reference/glossary.md#device) to one of more [fleets](https://dev.blues.io/api-reference/glossary.md#fleet).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `PUT`                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets`                                                                                                                                                                                                                                                                                                                                                       |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `deviceUID` - The [DeviceUID](https://dev.blues.io/api-reference/glossary.md#deviceuid) of a Notehub device. You may alternatively provide a device serial number by prefixing this argument with `sn:`, for example `sn:my-device`. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                                                                                                                                                         |

Arguments

### `fleet_uids`

*string array*

A comma-separated list of globally-unique [FleetUIDs](https://dev.blues.io/api-reference/glossary.md#fleetuid).

**Example**

**Bash**

```bash
curl -X PUT
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/devices/<deviceUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
    -d '{"fleet_uids":[<fleet_uids>]}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let putDeviceFleetUids = ["fleetUID1", "fleetUID2"] // [String]
let AddDeviceToFleetsRequest = new NotehubJs.AddDeviceToFleetsRequest(addDeviceFleetUids); // AddDeviceToFleetsRequest | The fleets to add to the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
apiInstance.addDeviceToFleets(projectOrProductUID, deviceUID, addDeviceToFleetsRequest).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.add_device_to_fleets_request import AddDeviceToFleetsRequest
from notehub_py.models.get_device_fleets200_response import GetDeviceFleets200Response
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    device_uid = "device_uid_example" # str | 
    fleet_uids = ["fleet_uid_1", "fleet_uid_2"] # List[str] | An array of Fleet UIDs.
    add_device_to_fleets_request = notehub_py.AddDeviceToFleetsRequest(fleet_uids) # AddDeviceToFleetsRequest | The fleets to add to the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error. 

    try:
        api_response = api_instance.add_device_to_fleets(project_or_product_uid, device_uid, add_device_to_fleets_request)
        print("The response of ProjectApi->add_device_to_fleets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->add_device_to_fleets: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the fleet.

### `label`

*string*

The user-defined label of the fleet.

### `created`

*string*

The date and time the fleet was created.

Example Response

```json
{
  "fleets": [
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Production",
      "created": "2021-04-10T21:18:38Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Staging",
      "created": "2021-02-11T01:03:46Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Testing",
      "created": "2021-02-11T01:03:32Z"
    }
  ]
}
```

## Delete Device from Fleets (Notehub)

Deletes a [device](https://dev.blues.io/api-reference/glossary.md#device) from one or more [fleets](https://dev.blues.io/api-reference/glossary.md#fleet).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `DELETE`                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets`                                                                                                                                                                                                                                                                                                                                                       |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `deviceUID` - The [DeviceUID](https://dev.blues.io/api-reference/glossary.md#deviceuid) of a Notehub device. You may alternatively provide a device serial number by prefixing this argument with `sn:`, for example `sn:my-device`. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                                                                                                                                                         |

Arguments

### `fleet_uids`

*string array*

An array of globally-unique [FleetUIDs](https://dev.blues.io/api-reference/glossary.md#fleetuid).

**Example**

**Bash**

```bash
curl -X DELETE
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/devices/<deviceUID>/fleets'
    -H 'Authorization: Bearer <access_token>'
    -d '{"fleet_uids":[<fleet_uids>]}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let deleteDeviceFleetUids = ["fleetUID1", "fleetUID2"] // [String]
let deleteDeviceFromFleetsRequest = new NotehubJs.DeleteDeviceFromFleetsRequest(deleteDeviceFleetUids); // DeleteDeviceFromFleetsRequest | The fleets to remove from the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
apiInstance.deleteDeviceFromFleets(projectOrProductUID, deviceUID, deleteDeviceFromFleetsRequest).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.delete_device_from_fleets_request import DeleteDeviceFromFleetsRequest
from notehub_py.models.get_device_fleets200_response import GetDeviceFleets200Response
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    device_uid = "device_uid_example" # str | 
    fleet_uids = [
        "fleet_uid_1",
        "fleet_uid_2"
    ]
    delete_device_from_fleets_request = notehub_py.DeleteDeviceFromFleetsRequest(fleet_uids) # DeleteDeviceFromFleetsRequest | The fleets to remove from the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error. 

    try:
        api_response = api_instance.delete_device_from_fleets(project_or_product_uid, device_uid, delete_device_from_fleets_request)
        print("The response of ProjectApi->delete_device_from_fleets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->delete_device_from_fleets: %s\n" % e)
```

**Response Members**

### `uid`

*string*

The globally-unique identifier of the fleet.

### `label`

*string*

The user-defined label of the fleet.

### `created`

*string*

The date and time the fleet was created.

Example Response

```json
{
  "fleets": [
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Production",
      "created": "2021-04-10T21:18:38Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Staging",
      "created": "2021-02-11T01:03:46Z"
    },
    {
      "uid": "fleet:00000000-0000-0000-0000-000000000000",
      "label": "Testing",
      "created": "2021-02-11T01:03:32Z"
    }
  ]
}
```

## Set Global JSONata Transform (Notehub)

Set the global JSONata transform for a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/global-transformation`                                                                                                                     |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                              |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

### `jsonata`

*string*

The [JSONata expression](https://dev.blues.io/guides-and-tutorials/notecard-guides/using-jsonata-to-transform-json-in-notehub.md) to be applied to all events of the Notehub project.

**Example**

**Bash**

```bash
curl -X POST
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/global-transformation'
    -H 'Authorization: Bearer <access_token>'
    -d '<jsonata>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let body = {key: null}; // Object | JSONata expression which will be applied to each event before it is persisted and routed
apiInstance.setGlobalEventTransformation(projectOrProductUID, body).then(() => {
  console.log("API called successfully.");
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    body = None # object | JSONata expression which will be applied to each event before it is persisted and routed

    try:
        api_instance.set_global_event_transformation(project_or_product_uid, body)
    except Exception as e:
        print("Exception when calling ProjectApi->set_global_event_transformation: %s\n" % e)
```

**Response Members**

None: an empty object `{}` means success.

## Enable Global JSONata Transform (Notehub)

Enables the global JSONata transform for a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/global-transformation/enable`                                                                                                              |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                              |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

None

**Example**

**Bash**

```bash
curl -X POST
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/global-transformation/enable'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.enableGlobalEventTransformation(projectOrProductUID).then(() => {
  console.log("API called successfully.");
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 

    try:
        api_instance.enable_global_event_transformation(project_or_product_uid)
    except Exception as e:
        print("Exception when calling ProjectApi->enable_global_event_transformation: %s\n" % e)
```

**Response Members**

None: an empty object `{}` means success.

## Disable Global JSONata Transform (Notehub)

Disables the global JSONata transform for a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/global-transformation/disable`                                                                                                             |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                              |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

None

**Example**

**Bash**

```bash
curl -X POST
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/global-transformation/disable'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.disableGlobalEventTransformation(projectOrProductUID).then(() => {
  console.log("API called successfully.");
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 

    try:
        api_instance.disable_global_event_transformation(project_or_product_uid)
    except Exception as e:
        print("Exception when calling ProjectApi->disable_global_event_transformation: %s\n" % e)
```

**Response Members**

None: an empty object `{}` means success.

## Get Devices DFU History (Notehub)

Get host MCU or Notecard DFU history for all devices that match the filter criteria.

|                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                                                                                    |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history`                                                                                                                                                                                                                                                                                  |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `firmwareType` - The type of firmware update to perform. Available values are `notecard` for updating Notecard firmware, and `host` for updating host firmware. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                                                                                                                                                                                   |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                                                                                    |

Arguments

### `pageSize`

*integer (optional)*

Specifies the number of devices to be returned by a request (default 50).

### `pageNum`

*integer (optional)*

Specifies the page number of the results returned (useful when the `pageSize` is less than the total number of devices that could be returned). When provided, the `pageNum` must be >= `1`.

### `sortBy`

*string (optional)*

Specifies a field in the result set to sort by, and must be one of the following: `best_id`, `device_serial`, `device_uid`, `captured`, `modified`, `device_location`, `tower_location`, `triangulated_location`, `best_location`.

### `sortOrder`

*string (optional)*

Specifies the ascending (`asc`) or descending (`desc`) order of the result set when paired with `sortBy`. The default is `asc`.

### `deviceUID`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of DeviceUIDs of Notehub [devices](https://dev.blues.io/api-reference/glossary.md#device).

### `tag`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more tags to filter the devices by.

### `serialNumber`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of device [serial numbers](https://dev.blues.io/api-reference/glossary.md#serial-number) to filter by.

### `fleetUID`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of [FleetUIDs](https://dev.blues.io/api-reference/glossary.md#fleetuid) to filter by.

### `notecardFirmware`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more Notecard firmware versions to filter the devices by. Any numeric portion of the firmware name like "7.4.2.16888" or "7.4" is acceptable.

### `location`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more locations to filter the devices by. Provide city, state, or country code like "Boston, MA", "Boston", "MA", or "Guildford, ENG, GB" (this field supports partial/case insensitive matches).

### `hostFirmware`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more host firmware versions to filter the devices by. Any string of host firmware like "foo-3.4" or "8.7.6" or "baz-bar-01" is acceptable.

### `productUID`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more [ProductUIDs](https://dev.blues.io/api-reference/glossary.md#productuid) to filter the devices by.

### `sku`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more Notecard SKUs to filter the devices by.

**Basic**

**Bash**

```bash
curl -X GET
     -L '/v1/projects/<projectOrProductUID>/dfu/<firmwareType>/history'
     -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = "NotehubJs.ApiClient.instance";
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";
let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let firmwareType = "firmwareType_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  sortBy: "captured", // String |
  sortOrder: "asc", // String |
  deviceUID: ["null"], // [String] | A Device UID.
  tag: ["null"], // [String] | Tag filter
  serialNumber: ["null"], // [String] | Serial number filter
  fleetUID: "fleetUID_example", // String |
  notecardFirmware: ["null"], // [String] | Firmware version filter
  location: ["null"], // [String] | Location filter
  hostFirmware: ["null"], // [String] | Host firmware filter
  productUID: ["null"], // [String] |
  sku: ["null"] // [String] | SKU filter
};
apiInstance.getDevicesDfuHistory(projectOrProductUID, firmwareType, opts).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.device_dfu_history_page import DeviceDfuHistoryPage
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    firmware_type = "firmware_type_example" # str | 
    page_size = 50 # int |  (optional) (default to 50)
    page_num = 1 # int |  (optional) (default to 1)
    sort_by = "captured" # str |  (optional) (default to "captured")
    sort_order = "asc" # str |  (optional) (default to "asc")
    device_uid = ["device_uid_example"] # List[str] | A Device UID. (optional)
    tag = ["tag_example"] # List[str] | Tag filter (optional)
    serial_number = ["serial_number_example"] # List[str] | Serial number filter (optional)
    fleet_uid = "fleet_uid_example" # str |  (optional)
    notecard_firmware = ["notecard_firmware_example"] # List[str] | Firmware version filter (optional)
    location = ["location_example"] # List[str] | Location filter (optional)
    host_firmware = ["host_firmware_example"] # List[str] | Host firmware filter (optional)
    product_uid = ["product_uid_example"] # List[str] |  (optional)
    sku = ["sku_example"] # List[str] | SKU filter (optional)

    try:
        api_response = api_instance.get_devices_dfu_history(project_or_product_uid, firmware_type, page_size=page_size, page_num=page_num, sort_by=sort_by, sort_order=sort_order, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku)
        print("The response of ProjectApi->get_devices_dfu_history:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_devices_dfu_history: %s\n" % e)
```

**Optional Params**

**Bash**

```bash
curl -X GET
     -L '/v1/projects/<projectOrProductUID>/dfu/<firmwareType>/history?pageSize=<pageSize>&pageNum=<pageNum>&sortBy=<sortBy>&sortOrder=<sortOrder>&deviceUID=<deviceUID>&tag=<tag>&serialNumber=<serialNumber>&fleetUID=<fleetUID>&notecardFirmware=<notecardFirmware>&location=<location>&hostFirmware=<hostFirmware>&productUID=<productUID>&sku=<sku>'
     -H 'Authorization: Bearer <access_token>'
```

**Response Members**

### `device_uid`

*string*

The unique DeviceUID of the Notehub [device](https://dev.blues.io/api-reference/glossary.md#device)

### `current.version`

*string*

The current version number of the firmware file.

### `current.organization`

*string*

The organization distributing the firmware.

### `current.product`

*string*

The [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of the Notecard device.

### `current.built`

*string*

The date and time the firmware was built.

Example Response

```json
{
"devices": [
    {
      "device_uid": "dev:000000000000000",
      "current": {
          "version": "1.5.3.12345",
          "organization": "Blues Wireless",
          "product": "Notecard",
          "built": "Feb 19 2021 13:45:28"
      }
    },
    {
      "device_uid": "dev:000000000000001",
      "current": {
          "version": "1.5.3.67890",
          "organization": "Blues Wireless",
          "product": "Notecard",
          "built": "Feb 19 2021 13:45:28"
      }
    },
    {
      "device_uid": "dev:000000000000002",
      "current": {
          "version": "1.5.3.12606",
          "organization": "Blues Wireless",
          "product": "Notecard",
          "built": "Mar 23 2021 08:31:26"
      }
    }
  ],
}
```

## Get Devices DFU Status (Notehub)

Get host MCU or Notecard DFU status information for all devices that match the filter criteria.

|                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                                                                                    |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status`                                                                                                                                                                                                                                                                                   |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `firmwareType` - The type of firmware update to perform. Available values are `notecard` for updating Notecard firmware, and `host` for updating host firmware. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                                                                                                                                                                                   |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                                                                                    |

Arguments

### `pageSize`

*integer (optional)*

Specifies the number of devices to be returned by a request (default 50).

### `pageNum`

*integer (optional)*

Specifies the page number of the results returned (useful when the `pageSize` is less than the total number of devices that could be returned). When provided, the `pageNum` must be >= `1`.

### `sortBy`

*string (optional)*

Specifies a field in the result set to sort by, and must be one of the following: `best_id`, `device_serial`, `device_uid`, `captured`, `modified`, `device_location`, `tower_location`, `triangulated_location`, `best_location`.

### `sortOrder`

*string (optional)*

Specifies the ascending (`asc`) or descending (`desc`) order of the result set when paired with `sortBy`. The default is `asc`.

### `deviceUID`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of DeviceUIDs of Notehub [devices](https://dev.blues.io/api-reference/glossary.md#device).

### `tag`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more tags to filter the devices by.

### `serialNumber`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of device [serial numbers](https://dev.blues.io/api-reference/glossary.md#serial-number) to filter by.

### `fleetUID`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of [FleetUIDs](https://dev.blues.io/api-reference/glossary.md#fleetuid) to filter by.

### `notecardFirmware`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more Notecard firmware versions to filter the devices by. Any numeric portion of the firmware name like "7.4.2.16888" or "7.4" is acceptable.

### `location`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more locations to filter the devices by. Provide city, state, or country code like "Boston, MA", "Boston", "MA", or "Guildford, ENG, GB" (this field supports partial/case insensitive matches).

### `hostFirmware`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more host firmware versions to filter the devices by. Any string of host firmware like "foo-3.4" or "8.7.6" or "baz-bar-01" is acceptable.

### `productUID`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more [ProductUIDs](https://dev.blues.io/api-reference/glossary.md#productuid) to filter the devices by.

### `sku`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more Notecard SKUs to filter the devices by.

**Basic**

**Bash**

```bash
curl -X GET
     -L '/v1/projects/<projectOrProductUID>/dfu/<firmwareType>/status'
     -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";
let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let firmwareType = "firmwareType_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  sortBy: "captured", // String |
  sortOrder: "asc", // String |
  deviceUID: ["null"], // [String] | A Device UID.
  tag: ["null"], // [String] | Tag filter
  serialNumber: ["null"], // [String] | Serial number filter
  fleetUID: "fleetUID_example", // String |
  notecardFirmware: ["null"], // [String] | Firmware version filter
  location: ["null"], // [String] | Location filter
  hostFirmware: ["null"], // [String] | Host firmware filter
  productUID: ["null"], // [String] |
  sku: ["null"] // [String] | SKU filter
};
apiInstance.getDevicesDfuStatus(projectOrProductUID, firmwareType, opts).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.device_dfu_status_page import DeviceDfuStatusPage
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    firmware_type = "firmware_type_example" # str | 
    page_size = 50 # int |  (optional) (default to 50)
    page_num = 1 # int |  (optional) (default to 1)
    sort_by = "captured" # str |  (optional) (default to "captured")
    sort_order = "asc" # str |  (optional) (default to "asc")
    device_uid = ["device_uid_example"] # List[str] | A Device UID. (optional)
    tag = ["tag_example"] # List[str] | Tag filter (optional)
    serial_number = ["serial_number_example"] # List[str] | Serial number filter (optional)
    fleet_uid = "fleet_uid_example" # str |  (optional)
    notecard_firmware = ["notecard_firmware_example"] # List[str] | Firmware version filter (optional)
    location = ["location_example"] # List[str] | Location filter (optional)
    host_firmware = ["host_firmware_example"] # List[str] | Host firmware filter (optional)
    product_uid = ["product_uid_example"] # List[str] |  (optional)
    sku = ["sku_example"] # List[str] | SKU filter (optional)

    try:
        api_response = api_instance.get_devices_dfu_status(project_or_product_uid, firmware_type, page_size=page_size, page_num=page_num, sort_by=sort_by, sort_order=sort_order, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku)
        print("The response of ProjectApi->get_devices_dfu_status:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_devices_dfu_status: %s\n" % e)
```

**Optional Params**

**Bash**

```bash
curl -X GET
     -L '/v1/projects/<projectOrProductUID>/dfu/<firmwareType>/status?pageSize=<pageSize>&pageNum=<pageNum>&sortBy=<sortBy>&sortOrder=<sortOrder>&deviceUID=<deviceUID>&tag=<tag>&serialNumber=<serialNumber>&fleetUID=<fleetUID>&notecardFirmware=<notecardFirmware>&location=<location>&hostFirmware=<hostFirmware>&productUID=<productUID>&sku=<sku>'
     -H 'Authorization: Bearer <access_token>'
```

**Response Members**

### `device_uid`

*string*

The unique DeviceUID of the Notehub [device](https://dev.blues.io/api-reference/glossary.md#device).

### `dfu_in_progress`

*boolean*

Indicates if a DFU is in progress.

### `current.version`

*string*

The current version number of the firmware file.

### `current.organization`

*string*

The organization distributing the firmware.

### `current.product`

*string*

The [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of the Notecard device.

### `current.built`

*string*

The date and time the firmware was built.

### `status`

*object*

The status of the DFU.

Example Response

```json
{
    "devices": [
        {
            "device_uid": "dev:000000000000000",
            "current": {
                "version": "1.5.3.12345",
                "organization": "Blues Wireless",
                "product": "Notecard",
                "built": "Feb 19 2021 13:45:28"
            },
            "status": {}
        },
        {
            "device_uid": "dev:000000000000001",
            "current": {
                    "version": "1.5.3.67890",
                    "organization": "Blues Wireless",
                    "product": "Notecard",
                    "built": "Feb 19 2021 13:45:28"
            },
            "status": {}
        },
        {
            "device_uid": "dev:000000000000002",
            "dfu_in_progress": true,
            "current": {
                "version": "1.5.3.12606",
                "organization": "Blues Wireless",
                "product": "Notecard",
                "built": "Mar 23 2021 08:31:26"
            },
            "status": {}
        },
    ]
}
```

## Get Device DFU History (Notehub)

Get device DFU history for host MCU or Notecard firmware updates.

|                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/<projectOrProductUID>/devices/<deviceUID>/dfu/<firmwareType>/history`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `deviceUID` - The [DeviceUID](https://dev.blues.io/api-reference/glossary.md#deviceuid) of a Notehub device. You may alternatively provide a device serial number by prefixing this argument with `sn:`, for example `sn:my-device`.
- `firmwareType` - The type of firmware update to perform. Available values are `notecard` for updating Notecard firmware, and `host` for updating host firmware. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

Arguments

None

**Basic**

**Bash**

```bash
curl -X GET
     -L '/v1/projects/<projectOrProductUID>/devices/<deviceUID>/dfu/<firmwareType>/history'
     -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";
let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let firmwareType = "firmwareType_example"; // String |
apiInstance.getDeviceDfuHistory(projectOrProductUID, deviceUID, firmwareType).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.device_dfu_history import DeviceDfuHistory
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    device_uid = "dev:000000000000000" # str | 
    firmware_type = "firmware_type_example" # str | 

    try:
        api_response = api_instance.get_device_dfu_history(project_or_product_uid, device_uid, firmware_type)
        print("The response of ProjectApi->get_device_dfu_history:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_device_dfu_history: %s\n" % e)
```

**Response Members**

### `device_uid`

*string*

The unique DeviceUID of the Notehub [device](https://dev.blues.io/api-reference/glossary.md#device)

### `current.version`

*string*

The current version number of the firmware file.

### `current.organization`

*string*

The organization distributing the firmware.

### `current.product`

*string*

The [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of the Notecard device.

### `current.built`

*string*

The date and time the firmware was built.

Example Response

```json
{
  "device_uid": "dev:000000000000000",
  "current": {
    "version": "1.5.3.12345",
    "organization": "Blues Wireless",
    "product": "Notecard",
    "built": "Feb 19 2021 13:45:28"
  },
}
```

## Get Device DFU Status (Notehub)

Get device DFU status information for host MCU or Notecard firmware.

|                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `deviceUID` - The [DeviceUID](https://dev.blues.io/api-reference/glossary.md#deviceuid) of a Notehub device. You may alternatively provide a device serial number by prefixing this argument with `sn:`, for example `sn:my-device`.
- `firmwareType` - The type of firmware update to perform. Available values are `notecard` for updating Notecard firmware, and `host` for updating host firmware. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

Arguments

None

**Basic**

**Bash**

```bash
curl -X GET
     -L '/v1/projects/<projectOrProductUID>/devices/<deviceUID>/dfu/<firmwareType>/status'
     -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";
let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let firmwareType = "firmwareType_example"; // String |
apiInstance.getDeviceDfuStatus(projectOrProductUID, deviceUID, firmwareType).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.device_dfu_status import DeviceDfuStatus
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    device_uid = "dev:000000000000000" # str | 
    firmware_type = "firmware_type_example" # str | 

    try:
        api_response = api_instance.get_device_dfu_status(project_or_product_uid, device_uid, firmware_type)
        print("The response of ProjectApi->get_device_dfu_status:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_device_dfu_status: %s\n" % e)
```

**Response Members**

### `device_uid`

*string*

The unique DeviceUID of the Notehub [device](https://dev.blues.io/api-reference/glossary.md#device).

### `dfu_in_progress`

*boolean*

Indicates if a DFU is in progress.

### `current.version`

*string*

The current version number of the firmware file.

### `current.organization`

*string*

The organization distributing the firmware.

### `current.product`

*string*

The [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of the Notecard device.

### `current.built`

*string*

The date and time the firmware was built.

### `status`

*object*

The status of the DFU.

Example Response

```json
{
    "device_uid": "dev:000000000000000",
    "dfu_in_progress": true,
    "current": {
        "version": "1.5.3.12345",
        "organization": "Blues Wireless",
        "product": "Notecard",
        "built": "Mar 23 2021 08:31:26"
    },
    "status": {}
}
```

## Get Available Firmware (Notehub)

Get an array of available host MCU or Notecard firmware files by [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/firmware`                                                                                                                                  |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

### `filename`

*string (optional)*

Filter the query by the provided filename. The filter uses partial matching, so for example `filename=1.2` will match any filename containing that string, such as `notecard-1.2.3.456789.bin`.

### `firmwareType`

*string (optional)*

Filter the query by firmware type. Available options are `notecard` for Notecard firmware or `host` for host firmware.

### `md5`

*string (optional)*

Filter the query by the provided MD5 hash.

### `sortBy`

*string (optional)*

The field to use to sort the returned firmware. Available values: `"created"` (default), `length`, `"name"`, `"version"`.

### `sortOrder`

\_string (optional)\`

The sort order of the returned firmware. Available values: `"desc"` (default), `"asc"`.

### `target`

*string (optional)*

Filter the query by the target architecture of Notecard firmware to return. Available values: `"r5"`, `"s3"`, `"u5"`, `"wl"`.

See [Notecard Firmware Updates](https://dev.blues.io/notecard/notecard-firmware-releases.md) for details.

### `version`

*string (optional)*

Filter the query by the provided version number. The filter uses partial matching, so for example `version=1.2` will match any version containing that string, such as `1.2.3`.

**Basic**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/firmware'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  product: "product_example", // String |
  firmwareType: "firmwareType_example", // String |
  version: "version_example", // String |
  target: "target_example", // String |
  filename: "notecard-7.2.2.16518$20240410043100.bin", // String |
  md5: "md5_example", // String |
  unpublished: true, // Boolean |
  sortBy: "version", // String |
  sortOrder: "desc" // String |
};
apiInstance.getFirmwareInfo(projectOrProductUID, opts).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.firmware_info import FirmwareInfo
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    product = "product_example" # str |  (optional)
    firmware_type = "firmware_type_example" # str |  (optional)
    version = "version_example" # str |  (optional)
    target = "target_example" # str |  (optional)
    filename = "notecard-7.2.2.16518$20240410043100.bin" # str |  (optional)
    md5 = "md5_example" # str |  (optional)
    unpublished = True # bool |  (optional)
    sort_by = "version" # str |  (optional)
    sort_order = "desc" # str |  (optional)

    try:
        api_response = api_instance.get_firmware_info(project_or_product_uid, product=product, firmware_type=firmware_type, version=version, target=target, filename=filename, md5=md5, unpublished=unpublished)
        print("The response of ProjectApi->get_firmware_info:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_firmware_info: %s\n" % e)
```

**Response Members**

### `filename`

*string*

The filename of the firmware file.

### `version`

*string*

The version number of the firmware file.

### `MD5`

*string*

The MD5 hash of the firmware file.

### `organization`

*string*

The organization distributing the firmware.

### `type`

*string*

The type of firmware file, either `"notecard"` or `"host"`.

### `created`

*UNIX Epoch time*

A timestamp for when the firmware file was created.

### `target`

*string*

The target architecture for Notecard firmware file.

### `notes`

*string*

Any user-defined notes provided for the firmware file.

### `info`

*object*

Any user-defined JSON metadata provided for the firmware file.

Example Response

```json
[
  {
    "filename": "notecard-wl-7.2.2.16518$20240410043100.bin",
    "version": "notecard-wl-7.2.2",
    "MD5": "8c1f7737a134f108dab02ec6d6b4bf25",
    "organization": "Blues Wireless",
    "type": "notecard",
    "created": "1712780230",
    "target": "wl"
  },
  ...
]
```

## Perform DFU Action (Notehub)

Update or cancel [host MCU firmware updates](https://dev.blues.io/notehub/host-firmware-updates/host-dfu-overview.md) or [Notecard firmware updates](https://dev.blues.io/notecard/notecard-walkthrough/updating-notecard-firmware.md).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}`                                                                                                                                                                                                                                                                                                                                                                                                                |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `firmwareType` - The type of firmware update to perform. Available values are `notecard` for updating Notecard firmware, and `host` for updating host firmware.
- `action` - The action to perform. Available values are `update` for updating firmware, and `cancel` for canceling an update. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                                                                                                                                                                                                                                                                   |

Arguments

### `deviceUID`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of DeviceUIDs of Notehub [devices](https://dev.blues.io/api-reference/glossary.md#device).

This argument must be provided in the query string, e.g. `?deviceUID=dev:123456789`.

### `tag`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of tags to filter devices.

This argument must be provided in the query string, e.g. `?tag=mytag`.

### `serialNumber`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of serial numbers to filter devices.

This argument must be provided in the query string, e.g. `?serialNumber=mySerialNumber`.

### `fleetUID`

*string (optional)*

A [FleetUID](https://dev.blues.io/api-reference/glossary.md#fleetuid) of a Notehub fleet.

This argument must be provided in the query string, e.g. `?fleetUID=fleet:abc-123`.

### `notecardFirmware`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of Notecard firmware versions to filter devices.

This argument must be provided in the query string, e.g. `?notecardFirmware=7.5.2.17004`.

### `location`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of locations to filter devices.

This argument must be provided in the query string, e.g. `?location=Michigan`.

### `hostFirmware`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of host firmware versions to filter devices.

This argument must be provided in the query string, e.g. `?hostFirmware=1.0.0`.

### `productUID`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of one or more [ProductUIDs](https://dev.blues.io/api-reference/glossary.md#productuid) to filter the devices by.

This argument must be provided in the query string, e.g. `?productUID=com.company.name:projectName`.

### `sku`

*Array (optional)*

An [array](https://dev.blues.io/api-reference/notehub-api.md#using-array-arguments) of SKUs to filter devices.

This argument must be provided in the query string, e.g. `?sku=NOTE-WBNAW`.

### `filename`

*string*

The name of the firmware file to upload.

This argument must be provided in the `POST` body, e.g. `{"filename":"notecard-u5-8.1.3.17044$20241220135610.bin"}`.

**Basic**

**Bash**

```bash
curl -X POST
     -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/dfu/<firmwareType>/<action>'
     -H 'Authorization: Bearer <access_token>'
     -d '{"filename":<filename>}'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let firmwareType = "firmwareType_example"; // String |
let action = "action_example"; // String |
let opts = {
  deviceUID: ["null"], // [String] | A Device UID.
  tag: ["null"], // [String] | Tag filter
  serialNumber: ["null"], // [String] | Serial number filter
  fleetUID: "fleetUID_example", // String |
  notecardFirmware: ["null"], // [String] | Firmware version filter
  location: ["null"], // [String] | Location filter
  hostFirmware: ["null"], // [String] | Host firmware filter
  productUID: ["null"], // [String] |
  sku: ["null"], // [String] | SKU filter
  dfuActionRequest: new NotehubJs.DfuActionRequest() // DfuActionRequest | Which firmware in the case of an update action
};
apiInstance.performDfuAction(projectOrProductUID, firmwareType, action, opts).then(() => {
  console.log("API called successfully.");
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.dfu_action_request import DfuActionRequest
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str | 
    firmware_type = "firmware_type_example" # str | 
    action = "action_example" # str | 
    device_uid = ["device_uid_example"] # List[str] | A Device UID. (optional)
    tag = ["tag_example"] # List[str] | Tag filter (optional)
    serial_number = ["serial_number_example"] # List[str] | Serial number filter (optional)
    fleet_uid = "fleet_uid_example" # str |  (optional)
    notecard_firmware = ["notecard_firmware_example"] # List[str] | Firmware version filter (optional)
    location = ["location_example"] # List[str] | Location filter (optional)
    host_firmware = ["host_firmware_example"] # List[str] | Host firmware filter (optional)
    product_uid = ["product_uid_example"] # List[str] |  (optional)
    sku = ["sku_example"] # List[str] | SKU filter (optional)
    dfu_action_request = notehub_py.DfuActionRequest() # DfuActionRequest | Which firmware in the case of an update action (optional)

    try:
        api_instance.perform_dfu_action(project_or_product_uid, firmware_type, action, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku, dfu_action_request=dfu_action_request)
    except Exception as e:
        print("Exception when calling ProjectApi->perform_dfu_action: %s\n" % e)
```

**Optional Params**

**Bash**

```bash
curl -X POST
     -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/products?deviceUID=<deviceUID>&tag=<tag>&serialNumber=<serialNumber>&fleetUID=<fleetUID>&notecardFirmware=<notecardFirmware>&location=<location>&hostFirmware=<hostFirmware>&productUID=<productUID>&sku=<sku>'
     -H 'Authorization: Bearer <access_token>'
     -d '{"filename":<filename>}'
     -H 'Authorization: Bearer <access_token>'
```

**Response Members**

None: an empty object `{}` means success.

## Download Firmware

Download a firmware binary from your project.

|                                                                                                               |                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                      |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/firmware/host/{filename}`                                                                                                                                                                      |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `filename` - The filename of the firmware binary. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                  |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                      |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/firmware/host/<filename>'
    -H 'Authorization: Bearer <access_token>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = app:2606f411-dea6-44a0-9743-1130f57d77d8; // String |
let firmwareType = "firmwareType_example"; // String |
let filename = "filename_example"; // String |
apiInstance.downloadFirmware(projectOrProductUID, firmwareType, filename).then((data) => {
  console.log("API called successfully. Returned data: " + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str |
    firmware_type = "firmware_type_example" # str |
    filename = "filename_example" # str |

    try:
        api_response = api_instance.download_firmware(project_or_product_uid, firmware_type, filename)
        print("The response of ProjectApi->download_firmware:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->download_firmware: %s\n" % e)
```

## Upload Firmware (Notehub)

Upload firmware binary to project.

|                                                                                                               |                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `PUT`                                                                                                                                                                                                                                                      |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/firmware/host/{filename}`                                                                                                                                                                      |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `filename` - The filename of the firmware binary. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                  |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                      |

Arguments

### `body`

*bytearray*

The contents of the firmware binary file to upload. The binary must be provided as the body of the PUT request.

### `notes`

*string (optional)*

An optional note describing the host firmware binary.

This argument must be provided in the request's query string, e.g. `?notes=my notes`.

### `version`

*string (optional)*

The version number of the host firmware, e.g. `1.0.0`. If not provided, the version will be extracted from the firmware binary.

This argument must be provided in the request's query string, e.g. `?version=1.0.0`.

**Example**

**Bash**

```bash
curl -X PUT
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/firmware/host/<filename>'
    -H 'Authorization: Bearer <access_token>'
    -d '<binary file contents>'
```

**JS**

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let firmwareType = "host"; // String |
let filename = "filename_example"; // String |
let body = "file_contents"; // File | contents of the firmware binary
apiInstance.uploadFirmware(projectOrProductUID, firmwareType, filename, body).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
```

**Python**

```python
import notehub_py
from notehub_py.models.firmware_info import FirmwareInfo
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.ProjectApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8" # str |
    firmware_type = "host" # str |
    filename = "filename_example" # str |
    body = None # bytearray | contents of the firmware binary

    try:
        api_response = api_instance.upload_firmware(project_or_product_uid, firmware_type, filename, body)
        print("The response of ProjectApi->upload_firmware:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->upload_firmware: %s\n" % e)
```

**Response Members**

### `filename`

*string (optional)*

The filename of the firmware file.

### `version`

*string (optional)*

The version number of the firmware file.

### `MD5`

*string (optional)*

The MD5 hash of the firmware file.

### `organization`

*string (optional)*

The organization distributing the firmware.

### `built`

*string (optional)*

The date and time the firmware was built.

### `product`

*string (optional)*

The product that the firmware is for.

### `description`

*string (optional)*

The description of the firmware.

### `tags`

*string (optional)*

A list of tags associted with the firmware.

### `type`

*string (optional)*

For this endpoint, the type of firmware file will always be `host`.

### `created`

*string (optional)*

The date and time the firmware was created.

### `target`

*string (optional)*

The target architecture of Notecard firmware to return. Available values: `"r5"`, `"s3"`, `"u5"`, `"wl"`.

See [Notecard Firmware Updates](https://dev.blues.io/notecard/notecard-firmware-releases.md) for details.

### `published`

*boolean (optional)*

True if the firmware is published, false otherwise.

Example Response

```json
{
  "filename": "my-firmware-16518$20240410043100",
  "MD5": "d41d8cd98f00b204e9800998ecf8427e",
  "type": "host",
  "created": "1748373857",
  "published": true
}
```

## Update Firmware (Notehub)

Update the metadata of an existing host firmware entry. The `filename` must be the full stored filename including the timestamp suffix (e.g. `test$20260324190911.bin`) as returned by the [Upload Firmware](#upload-firmware) or [Get Available Firmware](#get-available-firmware) endpoints.

|                                                                                                               |                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                                                                     |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/firmware/host/{filename}`                                                                                                                                                                      |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `filename` - The filename of the firmware binary. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                  |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                      |

Arguments

### `info`

*JSON object (optional)*

Arbitrary JSON metadata associated with this firmware entry.

### `notes`

*string (optional)*

A description or notes for the firmware binary.

### `version`

*string (optional)*

The version number of the host firmware, e.g. `1.0.0`.

**Example**

**Bash**

```bash
curl -X POST
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/firmware/host/<filename>'
    -H 'Authorization: Bearer <access_token>'
    -H 'Content-Type: application/json'
    -d '{"notes":"Production release"}'
```

**Response Members**

### `filename`

*string (optional)*

The filename of the firmware file.

### `version`

*string (optional)*

The version number of the firmware file.

### `md5`

*string (optional)*

The MD5 hash of the firmware file.

### `organization`

*string (optional)*

The organization distributing the firmware.

### `type`

*string (optional)*

For this endpoint, the type of firmware file will always be `host`.

### `created`

*string (optional)*

The date and time the firmware was created.

### `published`

*boolean (optional)*

True if the firmware is published, false otherwise.

### `notes`

*string (optional)*

User-defined notes for the firmware file.

### `info`

*JSON object (optional)*

Arbitrary JSON metadata associated with this firmware entry.

Example Response

```json
{
    "filename": "test2$20260217170713.binpack",
    "version": "1.0.0",
    "md5": "3ff01bd9d918f5c8c024072756eeb526",
    "organization": "My Organization",
    "built": "Jan 14 2026 11:47:19",
    "product": "My Product",
    "type": "host",
    "created": "1771348033",
    "published": true,
    "notes": "Initial firmware release",
    "info": {
      "staging": true
    }
}
```

## Delete Firmware (Notehub)

Delete a host firmware binary from your project. The `filename` must be the full stored filename including the timestamp suffix (e.g. `test$20260324190911.bin`) as returned by the [Upload Firmware](#upload-firmware) or [Get Available Firmware](#get-available-firmware) endpoints.

|                                                                                                               |                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `DELETE`                                                                                                                                                                                                                                                   |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/firmware/host/{filename}`                                                                                                                                                                      |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `filename` - The filename of the firmware binary. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                                  |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                      |

Arguments

None

**Example**

**Bash**

```bash
curl -X DELETE
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/firmware/host/<filename>'
    -H 'Authorization: Bearer <access_token>'
```

## Get AWS Role Config (Notehub)

Get the AWS Account ID and External ID needed to configure an IAM role trust policy for role-based authentication on AWS routes.

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/aws-role-config`                                                                                                                           |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/aws-role-config'
    -H 'Authorization: Bearer <access_token>'
```

**Response Members**

### `aws_account_id`

*string*

The Blues AWS Account ID to trust in your IAM role's trust policy.

### `external_id`

*string*

The External ID to use in your IAM role's trust policy condition.

Example Response

```json
{
  "aws_account_id": "123456789012",
  "external_id": "00000000-0000-0000-0000-000000000000"
}
```

## Get Project Secrets (Notehub)

List all [project secrets](https://dev.blues.io/api-reference/glossary.md#project-secret) for a project. Only metadata is returned and the encrypted values are never exposed.

> **Note:**
>
> Secret values are write-only. This endpoint returns metadata only (name, timestamps, and the users who created or last modified each secret). To change a secret's value, [update](#update-project-secret) it.

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/secrets`                                                                                                                                   |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | viewer                                                                                                                                                                                                 |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

None

**Example**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/secrets'
    -H 'Authorization: Bearer <access_token>'
```

**Response Members**

### `secrets`

*array*

An array of secret metadata objects.

Example Response

```json
{
  "secrets": [
    {
      "name": "api_key",
      "created": "2026-05-18T14:22:01Z",
      "modified": "2026-05-18T14:22:01Z",
      "created_by": "alice@example.com",
      "modified_by": "alice@example.com"
    },
    {
      "name": "twilio_auth_token",
      "created": "2026-05-18T14:24:18Z",
      "modified": "2026-05-19T09:11:42Z",
      "created_by": "alice@example.com",
      "modified_by": "bob@example.com"
    }
  ]
}
```

## Create Project Secret (Notehub)

Create a new [project secret](https://dev.blues.io/api-reference/glossary.md#project-secret) on a project. The value is encrypted at rest and is not returned by any subsequent API call.

> **Note:**
>
> The plaintext `value` is only ever transmitted on the create and update requests. It is never returned by `GET /secrets`, never written to logs, and never shown in the Notehub UI after this call completes.

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/secrets`                                                                                                                                   |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                              |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                  |

Arguments

### `name`

*string*

The secret name. Must match the pattern `[A-Za-z0-9_]{1,64}`(letters, digits, and underscores only), up to 64 characters. This is the name you reference in Route fields as `[$$name]`.

### `value`

*string*

The plaintext secret value to store. Encrypted at rest and never returned by any API endpoint after this call.

**Example**

**Bash**

```bash
curl -X POST
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/secrets'
    -H 'Authorization: Bearer <access_token>'
    -H 'Content-Type: application/json'
    -d '{"name":"api_key","value":"sk_live_4eC39HqLyjWDarjtT1zdp7dc"}'
```

**Response Members**

### `name`

*string*

The name of the created secret.

### `created`

*string*

ISO-8601 timestamp of when the secret was created.

### `modified`

*string*

ISO-8601 timestamp of when the secret was last modified (equal to `created` on a fresh create).

### `created_by`

*string*

Email of the user who created the secret.

### `modified_by`

*string*

Email of the user who last modified the secret.

Example Response

```json
{
  "name": "api_key",
  "created": "2026-05-18T14:22:01Z",
  "modified": "2026-05-18T14:22:01Z",
  "created_by": "alice@example.com",
  "modified_by": "alice@example.com"
}
```

## Update Project Secret (Notehub)

Replace the value of an existing [project secret](https://dev.blues.io/api-reference/glossary.md#project-secret). Because secrets are write-only, this is also how you can rotate a secret, by overwriting it with a new value.

|                                                                                                               |                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `PUT`                                                                                                                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/secrets/{secretName}`                                                                                                                                                                     |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `secretName` - The name of a project secret. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                             |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                 |

Arguments

### `value`

*string*

The new plaintext secret value. Encrypted at rest and never returned by any subsequent API call.

**Example**

**Bash**

```bash
curl -X PUT
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/secrets/<secretName>'
    -H 'Authorization: Bearer <access_token>'
    -H 'Content-Type: application/json'
    -d '{"value":"sk_live_replacement_value"}'
```

**Response Members**

### `name`

*string*

The name of the updated secret.

### `created`

*string*

ISO-8601 timestamp of when the secret was originally created.

### `modified`

*string*

ISO-8601 timestamp of this update.

### `created_by`

*string*

Email of the user who originally created the secret.

### `modified_by`

*string*

Email of the user who performed this update.

Example Response

```json
{
  "name": "api_key",
  "created": "2026-05-18T14:22:01Z",
  "modified": "2026-05-20T08:47:33Z",
  "created_by": "alice@example.com",
  "modified_by": "bob@example.com"
}
```

## Delete Project Secret (Notehub)

Delete a [project secret](https://dev.blues.io/api-reference/glossary.md#project-secret).

> **Warning:**
>
> Any Route that references the deleted secret name will resolve the `[$$SECRET_NAME]` placeholder to an empty string at dispatch — the same behavior described in [Unrecognized Placeholder Strings](https://dev.blues.io/notehub/notehub-walkthrough.md#unrecognized-placeholder-strings). Remove or update those Routes before deleting a secret in active use.

|                                                                                                               |                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `DELETE`                                                                                                                                                                                                                                              |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/secrets/{secretName}`                                                                                                                                                                     |
| Path Parameters:                                                                                              | - `projectOrProductUID` - The [ProjectUID](https://dev.blues.io/api-reference/glossary.md#projectuid) or [ProductUID](https://dev.blues.io/api-reference/glossary.md#productuid) of a Notehub project.
- `secretName` - The name of a project secret. |
| Minimum Notehub [project-level role:](https://dev.blues.io/notehub/notehub-walkthrough.md#collaborator-roles) | developer                                                                                                                                                                                                                                             |
| Required HTTP Headers:                                                                                        | `Authorization: Bearer <token>`, where the token is a valid [authentication token](https://dev.blues.io/api-reference/notehub-api.md#authentication).                                                                                                 |

Arguments

None

**Example**

**Bash**

```bash
curl -X DELETE
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/secrets/<secretName>'
    -H 'Authorization: Bearer <access_token>'
```

**Response Members**

### `name`

*string*

The name of the deleted secret.

Example Response

```json
{
  "name": "api_key"
}
```

[Organization API](https://dev.blues.io/api-reference/notehub-api/organization-api.md "Organization API") [Route API](https://dev.blues.io/api-reference/notehub-api/route-api.md "Route API")
