---
updatedAt: 2026-06-19T13:07:52.000Z
agentTools:
  projectIndex: https://docs.sixfab.com/llms.txt
---

# Set Network Interface Priorities

Set network interface priorities on the ALPON device.
The priority values must be sequential and start from 1, with no gaps or zeros. For example, the priorities should be 1, 2, 3, 4, etc.
If any of the provided priorities are invalid, the request will fail with a validation error.

Example payload:
```json
{
    "priorities": [
        {"name": "eth0", "value": 1},
        {"name": "usb0", "value": 2},
        {"name": "wlan0", "value": 3}
    ]
}
```

**Possible Error Codes:**
- **AssetNotFound:** The asset with the specified ID was not found.
- **AssetNotAlponDevice:** The device is not an ALPON device.
- **ErrorInvalidPriorityValue:** Priority values cannot be negative.
- **ErrorInvalidPrioritySequence:** The priority values must start from 1 and increment without gaps (e.g., 1, 2, 3, ...).
- **ErrorUpdatingNetworkPriorities:** Error updating network priorities, make sure the interface names are correct and exist on the device.
- **DeviceNotReachable:** The device is not reachable.

**Note:**
- The priority values should start from 1 and increment without gaps (e.g., 1, 2, 3, ...).
- No priority value can be `0` or skipped.

# OpenAPI definition

````json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Sixfab Developer API",
    "contact": {
      "name": "Sixfab Inc.",
      "url": "https://sixfab.com",
      "email": "hello@sixfab.com"
    },
    "version": "0.1.0",
    "x-logo": {
      "url": "/logo"
    }
  },
  "servers": [
    {
      "url": "https://api.sixfab.com/v1"
    }
  ],
  "paths": {
    "/assets/{asset_id}/alpon/network/priority": {
      "patch": {
        "tags": [
          "ALPON"
        ],
        "summary": "Set Network Interface Priorities",
        "description": "Set network interface priorities on the ALPON device.\nThe priority values must be sequential and start from 1, with no gaps or zeros. For example, the priorities should be 1, 2, 3, 4, etc.\nIf any of the provided priorities are invalid, the request will fail with a validation error.\n\nExample payload:\n```json\n{\n    \"priorities\": [\n        {\"name\": \"eth0\", \"value\": 1},\n        {\"name\": \"usb0\", \"value\": 2},\n        {\"name\": \"wlan0\", \"value\": 3}\n    ]\n}\n```\n\n**Possible Error Codes:**\n- **AssetNotFound:** The asset with the specified ID was not found.\n- **AssetNotAlponDevice:** The device is not an ALPON device.\n- **ErrorInvalidPriorityValue:** Priority values cannot be negative.\n- **ErrorInvalidPrioritySequence:** The priority values must start from 1 and increment without gaps (e.g., 1, 2, 3, ...).\n- **ErrorUpdatingNetworkPriorities:** Error updating network priorities, make sure the interface names are correct and exist on the device.\n- **DeviceNotReachable:** The device is not reachable.\n\n**Note:**\n- The priority values should start from 1 and increment without gaps (e.g., 1, 2, 3, ...).\n- No priority value can be `0` or skipped.",
        "operationId": "set_network_priorities_assets__asset_id__alpon_network_priority_patch",
        "parameters": [
          {
            "description": "Serial Number, UUID, SIM SID or SIM ICCID",
            "required": true,
            "schema": {
              "title": "Asset Id",
              "type": "string",
              "description": "Serial Number, UUID, SIM SID or SIM ICCID"
            },
            "name": "asset_id",
            "in": "path"
          },
          {
            "required": false,
            "schema": {
              "title": "X-Forwarded-For",
              "type": "string"
            },
            "name": "x-forwarded-for",
            "in": "header"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NetworkPrioritiesRequestModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Network priorities updated successfully and saved to database",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "message": "Network priorities updated successfully"
                }
              }
            }
          },
          "400": {
            "description": "Error updating network priorities",
            "content": {
              "application/json": {
                "example": {
                  "message": "Error updating network priorities, make sure the interface names are correct and exist on the device.",
                  "code": "ErrorUpdatingNetworkPriorities"
                }
              }
            }
          },
          "404": {
            "description": "Asset not found",
            "content": {
              "application/json": {
                "example": {
                  "message": "Asset not found",
                  "code": "AssetNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "502": {
            "description": "Device not reachable",
            "content": {
              "application/json": {
                "example": {
                  "message": "Device not reachable",
                  "code": "DeviceNotReachable"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "NetworkPrioritiesRequestModel": {
        "title": "NetworkPrioritiesRequestModel",
        "required": [
          "priorities"
        ],
        "type": "object",
        "properties": {
          "priorities": {
            "title": "Priorities",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetworkPriorityModel"
            },
            "description": "List of network interfaces with their priority values"
          }
        }
      },
      "NetworkPriorityModel": {
        "title": "NetworkPriorityModel",
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "description": "Network interface name"
          },
          "value": {
            "title": "Value",
            "type": "integer",
            "description": "Priority value for the interface"
          }
        }
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
````