---
title: Route API - Notehub API Reference - Blynk
description: 'Notehub route API reference for Blynk routes: create, read, update, and delete them, with the route''s JSON schema and example requests.'
source_url: https://dev.blues.io/api-reference/notehub-api/route-api/blynk/
canonical_url: https://dev.blues.io/api-reference/notehub-api/route-api/blynk/
markdown_url: https://dev.blues.io/api-reference/notehub-api/route-api/blynk.md
---

# Route API

The Notehub route API provides RESTful methods that can be used to `GET`, `PUT`, `POST`, and `DELETE` [Notehub routes](https://dev.blues.io/notehub/notehub-walkthrough.md#routing-data-with-notehub).

| Name                              | HTTP Request                                                              |
| --------------------------------- | ------------------------------------------------------------------------- |
| [Get Routes](#get-routes)         | **GET** `/v1/projects/{projectOrProductUID}/routes`                       |
| [Get Route](#get-route)           | **GET** `/v1/projects/{projectOrProductUID}/routes/{routeUID}`            |
| [Get Route Logs](#get-route-logs) | **GET** `/v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs` |
| [Create Route](#create-route)     | **POST** `/v1/projects/{projectOrProductUID}/routes`                      |
| [Delete Route](#delete-route)     | **DELETE** `/v1/projects/{projectOrProductUID}/routes/{routeUID}`         |
| [Update Route](#update-route)     | **PUT** `/v1/projects/{projectOrProductUID}/routes/{routeUID}`            |

## Get Routes (Notehub)

Get an array of [routes](https://dev.blues.io/api-reference/glossary.md#route) associated with a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                  |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/routes`                                                                                                                                    |
| 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>/routes'
    -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.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8";

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

**Python**

```python
import os
from pprint import pprint

import notehub_py

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:
    api_instance = notehub_py.RouteApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8"

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

**Response Members**

### `uid`

*string*

The globally-unique identifier of the route.

### `label`

*string*

The name of the route.

### `type`

*string*

The service to which this route connects (see [Create Route](https://dev.blues.io/api-reference/notehub-api/route-api.md#create-route) for a full list of route types).

### `modified`

*string*

The date and time this route was last modified.

### `disabled`

*boolean*

Whether or not this route is disabled.

Example Response

```json
[
  {
    "uid": "route:0ac565deb7b478a250bb82347b9cfdd2",
    "label": "My HTTP Route",
    "type": "http",
    "modified": "2020-03-09T17:58:36Z",
    "disabled": false
  },
  {
    "uid": "route:fb1b9e0aba1bf030311ba2c3c1e7efd1",
    "label": "My Proxy Route",
    "type": "proxy",
    "modified": "2020-03-09T17:58:35Z",
    "disabled": false
  }
]
```

## Get Route (Notehub)

Get a single [route](https://dev.blues.io/api-reference/glossary.md#route) by its [RouteUID](https://dev.blues.io/api-reference/glossary.md#routeuid).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                                       |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/routes/{routeUID}`                                                                                                                                                                                                                                              |
| 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.
- `routeUID` - The [RouteUID](https://dev.blues.io/api-reference/glossary.md#routeuid) of an existing Notehub route. |
| 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>/routes/<routeUID>'
    -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.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8";
let routeUID = "route:cbd20093cba58392c9f9bbdd0cdeb1a0";

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

**Python**

```python
import os
from pprint import pprint

import notehub_py

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:
    api_instance = notehub_py.RouteApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8"
    route_uid = "route:cbd20093cba58392c9f9bbdd0cdeb1a0"

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

**Response Members**

### `uid`

*string*

The globally-unique identifier of the route.

### `label`

*string*

The name of the route.

### `type`

*string*

The service to which this route connects (see above for a full list of route types).

### `modified`

*string*

The date and time this route was last modified.

### `disabled`

*boolean*

Whether or not this route is disabled.

### `schema`

*object*

Additional meta data specific to the type of route (see request members from [Create Route](https://dev.blues.io/api-reference/notehub-api/route-api.md#create-route) for a complete list).

Example Response

```json
{
  "uid": "route:0ac565deb7b478a250bb82347b9cfdd2",
  "label": "My HTTP Route",
  "type": "http",
  "modified": "2020-03-09T17:58:36Z",
  "disabled": false,
  "http": {
    "fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"],
    "filter": {
      "type": "",
      "system_notefiles": false
    },
    "transform": {},
    "throttle_ms": 100,
    "url": "http://route.url",
    "http_headers": null,
    "disable_http_headers": false,
    "timeout": 0
  }
}
```

## Get Route Logs (Notehub)

Get an array of route logs associated with a Notehub [project](https://dev.blues.io/api-reference/glossary.md#project).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `GET`                                                                                                                                                                                                                                                                                                                       |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/<projectOrProductUID>/routes/<routeUID>/route-logs`                                                                                                                                                                                                                                   |
| 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.
- `routeUID` - The [RouteUID](https://dev.blues.io/api-reference/glossary.md#routeuid) of an existing Notehub route. |
| 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 events 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 sessions that could be returned).

### `deviceUID`

*string (optional)*

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

You may alternatively provide a device serial number by prefixing this argument with `sn:`, for example `sn:my-device`.

### `sortBy`

*string (optional)*

Specifies a field in the result set to sort by, and must be one of the following: `date` or `event`.

### `sortOrder`

*string (optional)*

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

### `startDate`

*UNIX Epoch time (optional)*

Start date for filtering results, specified as a Unix timestamp.

### `endDate`

*UNIX Epoch time (optional)*

End date for filtering results, specified as a Unix timestamp.

### `systemFilesOnly`

*boolean (optional)*

If `true`, will only return [System Notefiles](https://dev.blues.io/api-reference/system-notefiles.md) in the response.

### `mostRecentOnly`

*boolean (optional)*

An event can be sent though a route multiple times via [manual rerouting](https://dev.blues.io/notehub/notehub-walkthrough.md#manually-routing-events) or [automatic retries](https://dev.blues.io/notehub/notehub-walkthrough.md#automatic-retry-of-failed-route).

By default, the request returns all routing attempts. If you only wish to see the most recent routing attempt per event, set `mostRecentOnly` to `true`.

### `files`

*string (optional)*

A comma-delimited list of Notefile(s) this request should return events from. For example, setting this argument to `track.qo,sensor.qo` would return events only from the `track.qo` and `sensor.qo` Notefiles.

**Basic**

**Bash**

```bash
curl -X GET
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/routes/<routeUID>/route-logs'
    -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.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8";
let routeUID = "route:cbd20093cba58392c9f9bbdd0cdeb1a0";
let opts = {
  pageSize: 50,
  pageNum: 1,
};

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

**Python**

```python
import os
from pprint import pprint

import notehub_py

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:
    api_instance = notehub_py.RouteApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8"
    route_uid = "route:cbd20093cba58392c9f9bbdd0cdeb1a0"

    try:
        api_response = api_instance.get_route_logs_by_route(
            project_or_product_uid, route_uid, page_size=50, page_num=1
        )
        print("The response of RouteApi->get_route_logs_by_route:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling RouteApi->get_route_logs_by_route: %s\n" % e
        )
```

**Optional Params**

**Bash**

```bash
curl -X GET
     -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/routes/<routeUID>/route-logs?pageSize=<pageSize>&pageNum=<pageNum>&deviceUID=<deviceUID>&sortBy=<sortBy>&sortOrder=<sortOrder>&startDate=<startDate>&endDate=<endDate>&systemFilesOnly=<systemFilesOnly>&mostRecentOnly=<mostRecentOnly>&files=<files>'
     -H 'Authorization: Bearer <access_token>'
```

**Response Members**

### `date`

*string*

The date/time stamp of the log entry.

### `routeUID`

*string*

The globally-unique identifier of the route.

### `eventUID`

*string*

The globally-unique identifier of the event.

### `attn`

*boolean*

If `true`, an error was returned when routing.

### `status`

*string*

The HTTP status code returned by the route's destination.

### `text`

*string*

The response body of the route.

### `url`

*string*

The URL of the route.

### `duration`

*integer*

The time in milliseconds the route took to process.

Example Response

```json
[
  {
      "date": "2023-05-06T05:40:51.80559Z",
      "routeUID": "app:4be5d3ac-998a-44f0-8ecd-6bd716858b3d/route:d632e16fc956162ae3db4f20ddacc2b8",
      "eventUID": "5ee2e385-e282-476e-afec-327498fe91a3",
      "attn": false,
      "status": "200",
      "text": "thanks",
      "url": "https://example.com/route"
  },
  {
      "date": "2023-05-06T05:40:51.318522Z",
      "routeUID": "app:4be5d3ac-998a-44f0-8ecd-6bd716858b3d/route:d632e16fc956162ae3db4f20ddacc2b8",
      "eventUID": "4fb2c905-080a-40c5-96f7-d8193fa18116",
      "attn": false,
      "status": "200",
      "text": "thanks",
      "url": "https://example.com/route"
  }
]
```

## Create Route (Notehub)

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

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `POST`                                                                                                                                                                                                 |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/routes`                                                                                                                                    |
| 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*

The name of the route.

### `disabled`

*boolean*

Whether or not this route is disabled.

### `notes`

*string (optional)*

Optional free-form text for annotating the route. Limited to 1024 characters.

### `type`

*string*

The specific service to which this route connects.

Must be one of: `"aws-iot-analytics"`, `"aws-lambda"`, `"aws-lambda-with-access-key"`, `"aws-sqs"`, `"aws-sqs-fifo"`, `"aws-sqs-fifo-with-access-key"`, `"aws-sqs-with-access-key"`, `"azure-function"`, `"azure-function-with-key"`, `"azure-service-bus-with-sas-token"`, `"blynk"`, `"datacake"`, `"google-function"`, `"http"`, `"mqtt"`, `"proxy"`, `"qubitro"`, `"radnote-radresp-fixed-survey"`, `"radnote-radresp-mobile-survey"`, `"slack-bearer"`, `"slack-webhook"`, `"snowflake"`, `"thingworx"`, `"twilio"`.

### `schema`

*string*

Name of the high-level route schema, used to supply settings specific to the chosen `type` above. This will be an object that includes route-specific configuration. For example, to specify the URL of an HTTPS route you would provide `{"http":{"url":"https://my-site.com"}}`.

Must be one of: `"aws"`, `"azure"`, `"blynk"`, `"datacake"`, `"google"`, `"http"`, `"mqtt"`, `"proxy"`, `"qubitro"`, `"radresponder"`, `"slack"`, `"snowflake"`, `"thingworx"`, `"twilio"`.

### `<schema>.fleets`

*string*

An array of fleetUIDs to which to apply the route. If empty, applies to all fleets.

### `<schema>.filter`

*object*

Route filtering settings; see below:

### `<schema>.filter.type`

*string*

Which Notefiles this route applies to. Must be one of: `"all"`, `"include"`, `"exclude"`.

### `<schema>.filter` `.system` `_notefiles`

*boolean*

Whether or not system Notefiles should be routed.

### `<schema>.filter.files`

*string*

An array of Notefile names to include in the filter. For example, if `include` is the `type`, these are the only Notefiles that will be included.

### `<schema>.transform`

*object*

Data transformation settings; see below:

### `<schema>.transform` `.format`

*string*

The data transformation to apply.

Must be one of: `"bridge"` (Azure only), `"jsonata"`, `"flatten"`, `"simple"`, `"body"`, `"payload"`.

### `<schema>.transform` `.jsonata`

*string*

If `jsonata` format, the JSONata expression used to transform the outgoing data payload.

### `<schema>.transform` `.jsonataIn`

*string*

If `jsonata` format, the JSONata expression used to transform inbound data payloads.

### `<schema>.throttle_ms`

*integer*

Minimum time between requests, in milliseconds.

### `<schema>.timeout`

*integer*

Timeout in seconds for each request.

### `<schema>.region`

*string*

The AWS region (e.g. `us-east-1`) - or - the Blynk region (e.g. `ny3`).

**Example**

**Bash**

```bash
curl -X POST
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/routes'
    -H 'Authorization: Bearer <access_token>'
    -H 'Content-Type: application/json'
    -d '{
            "label":"<label>",
            "type":"<type>",
            "<schema>":{
              "url":"<url>",
              "fleets": ["<fleetUID>"],
              "filter": {
                "type": "all",
                "system_notefiles": false
              }
            }
        }'
```

**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.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8";
let notehubRoute = {
  label: "My HTTP Route",
  type: "http",
  disabled: false,
  http: {
    url: "https://example.com/ingest",
    fleets: ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"],
    filter: {
      type: "all",
      system_notefiles: false,
    },
  },
}; // NotehubRoute

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

**Python**

```python
import os
from pprint import pprint

import notehub_py

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:
    api_instance = notehub_py.RouteApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8"
    notehub_route = notehub_py.NotehubRoute.from_dict(
        {
            "label": "My HTTP Route",
            "type": "http",
            "disabled": False,
            "http": {
                "url": "https://example.com/ingest",
                "fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"],
                "filter": {
                    "type": "all",
                    "system_notefiles": False,
                },
            },
        }
    )

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

**Response Members**

### `uid`

*string*

The globally-unique identifier of the route.

### `label`

*string*

The name of the route.

### `type`

*string*

The service to which this route connects (see above for a full list of route types).

### `modified`

*string*

The date and time this route was last modified.

### `disabled`

*boolean*

Whether or not this route is disabled.

### `schema`

*object*

Additional meta data specific to the type of route (see available arguments above for a complete list).

Example Response

```json
{
  "uid": "route:0ac565deb7b478a250bb82347b9cfdd2",
  "label": "My HTTP Route",
  "type": "http",
  "modified": "2020-03-09T17:58:36Z",
  "disabled": false,
  "http": {
    "fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"],
    "filter": {
      "type": "",
      "system_notefiles": false
    },
    "transform": {},
    "throttle_ms": 100,
    "url": "http://route.url",
    "http_headers": null,
    "disable_http_headers": false,
    "timeout": 0
  }
}
```

## Delete Route (Notehub)

Delete a single [route](https://dev.blues.io/api-reference/glossary.md#route) by its [RouteUID](https://dev.blues.io/api-reference/glossary.md#routeuid).

|                                                                                                               |                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| HTTP Method:                                                                                                  | `DELETE`                                                                                                                                                                                               |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/routes/{routeUID}`                                                                                                                         |
| 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

### `access_token`

**Example**

**Bash**

```bash
curl -X DELETE
     -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/routes/<routeUID>'
     -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.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8";
let routeUID = "route:cbd20093cba58392c9f9bbdd0cdeb1a0";

apiInstance.deleteRoute(projectOrProductUID, routeUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  },
);
```

**Python**

```python
import os

import notehub_py

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:
    api_instance = notehub_py.RouteApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8"
    route_uid = "route:cbd20093cba58392c9f9bbdd0cdeb1a0"

    try:
        api_instance.delete_route(project_or_product_uid, route_uid)
        print("RouteApi->delete_route called successfully.")
    except Exception as e:
        print("Exception when calling RouteApi->delete_route: %s\n" % e)
```

## Update Route (Notehub)

Update a [route](https://dev.blues.io/api-reference/glossary.md#route) by its [RouteUID](https://dev.blues.io/api-reference/glossary.md#routeuid).

|                                                                                                               |                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP Method:                                                                                                  | `PUT`                                                                                                                                                                                                                                                                                                                       |
| URL:                                                                                                          | `https://api.notefile.net/v1/projects/{projectOrProductUID}/routes/{routeUID}`                                                                                                                                                                                                                                              |
| 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.
- `routeUID` - The [RouteUID](https://dev.blues.io/api-reference/glossary.md#routeuid) of an existing Notehub route. |
| 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

### `object`

*object*

Additional meta data specific to the type of route.

Look up the specific argument list for your specified route in the [Create Route](https://dev.blues.io/api-reference/notehub-api/route-api.md#create-route) documentation.

**Example**

**Bash**

```bash
curl -X PUT
    -L 'https://api.notefile.net/v1/projects/<projectOrProductUID>/routes/<routeUID>'
    -H 'Authorization: Bearer <access_token>'
    -H 'Content-Type: application/json'
    -d '{
            "label":"<label>",
            "type":"<type>",
            "<schema>":{
              "url":"<url>"
            }
        }'
```

**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.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8";
let routeUID = "route:cbd20093cba58392c9f9bbdd0cdeb1a0";
let notehubRoute = {
  label: "My Renamed Route",
  type: "http",
  disabled: false,
  http: {
    url: "https://example.com/new-ingest",
  },
}; // NotehubRoute

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

**Python**

```python
import os
from pprint import pprint

import notehub_py

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:
    api_instance = notehub_py.RouteApi(api_client)
    project_or_product_uid = "app:2606f411-dea6-44a0-9743-1130f57d77d8"
    route_uid = "route:cbd20093cba58392c9f9bbdd0cdeb1a0"
    notehub_route = notehub_py.NotehubRoute.from_dict(
        {
            "label": "My Renamed Route",
            "type": "http",
            "disabled": False,
            "http": {
                "url": "https://example.com/new-ingest",
            },
        }
    )

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

**Response Members**

### `uid`

*string*

The globally-unique identifier of the route.

### `label`

*string*

The name of the route.

### `type`

*string*

The service to which this route connects (see above for a full list of route types).

### `modified`

*string*

The date and time this route was last modified.

### `disabled`

*boolean*

Whether or not this route is disabled.

### `schema`

*object*

Additional meta data specific to the type of route (see request members from [Create Route](https://dev.blues.io/api-reference/notehub-api/route-api.md#create-route) for a complete list).

Example Response

```json
{
  "uid": "route:0ac565deb7b478a250bb82347b9cfdd2",
  "label": "My HTTP Route",
  "type": "http",
  "modified": "2020-03-09T17:58:36Z",
  "disabled": false,
  "http": {
    "fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"],
    "filter": {
      "type": "",
      "system_notefiles": false
    },
    "transform": {},
    "throttle_ms": 100,
    "url": "http://route.url",
    "http_headers": null,
    "disable_http_headers": false,
    "timeout": 0
  }
}
```

[Project API](https://dev.blues.io/api-reference/notehub-api/project-api.md "Project API") [Usage API](https://dev.blues.io/api-reference/notehub-api/usage-api.md "Usage API")
