User Tools

Site Tools


api:networkmanagement:devicetplink:upload

API : Network Device TP Link Upload

Introduction

This request imports a list of devices (serial number + MAC address, typically parsed from a CSV file) into the TP-Link device catalogue, making later creation of network devices easier.

Request

URL https://api.telecomx.dk/network/device/import/csv
Method POST
Access level RESELLER_ADMIN
ADMIN.
Property Type Description
Body devices Array<Object> Array of devices to import
devices[].serialNumber String Serial number of the device - 11-13 characters.
devices[].macAddress String MAC address of the device - exactly 12 characters, no separators.

Query examples

{
  "devices": [
    {
      "serialNumber": "22TESTSN0001",
      "macAddress": "00005E005301"
    },
    {
      "serialNumber": "22TESTSN0002",
      "macAddress": "00005E005302"
    }
  ]
}

Response

Property Type Description
inserted Number Number of devices successfully imported.
skipped Number Number of devices skipped because their serial number or MAC address already exists.
duplicates Array<String> One message per skipped device, naming the duplicate serial number or MAC address.
errors Array<String> One message per device that failed to insert.

Example

{
  "inserted": 3,
  "skipped": 1,
  "duplicates": [
    "Device with serial 22TESTSN0001 already exists"
  ],
  "errors": [
    "Failed to insert device 22TESTSN0002"
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level
422 <field> Request body is invalid (e.g. serialNumber or macAddress fails validation).
500 internal_error <Unspecified>
api/networkmanagement/devicetplink/upload.txt · Last modified: by Mikkel Meerwaldt Jørgensen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki