ZeroTier API - Setting Description against node

Hi Guys,

Im using the ZeroTier API as part of a python script to authorise new nodes, everything is working great, I can display a list of the nodes pending authorisation across any network that the API has access to, select the node from a list of pending ones and set to authorise and set a name against that node.

One thing I have not been able to do is set a description on the node, the part of the script that handles the description looks like this:

def authorize_node(api_token, network_id, node_id, network_name, node_name=None):
headers = {“Authorization”: f"bearer {api_token}“}
url = f”{base_url}/network/{network_id}/member/{node_id}"
description = “Authorised by the ZTNAS” # Static description
data = {
“config”: {
“authorized”: True,
“description”: description # Setting the description

Am I missing something, the API documentation seems to suggest it can be set by using the API and its not listed as deprecated?

Thanks in advance!

You’re putting the description inside the config block. It actually goes in the outer object:

  "config": {...},
  "description": "My description",
  "name": "My device name"
1 Like

Brilliant, thank you, thats working a treat now! Thanks for the quick response too!

This topic was automatically closed after 30 days. New replies are no longer allowed.