User Tools

Site Tools


api:zerotier:membercreate

API : ZeroTier : Create member

Introduction

This API will create a member on a network, and set the properties of the member.

Ideally this is only used for creating support accounts as the easiest way to add a member is to let the member join the network and then authorize the member.

Request

URL https://api.telecomx.dk/zerotier/network/NETWORK_ID/member
Method POST
Access level MAMAGER or OWNER that belongs to the customer
RESELLER, RESELLER_ADMIN for the customer or ADMIN
Params NETWORK_ID Id of the network
Body id String Id of the member
name String Name of the member
employeeId Id Id of employee member belongs to, if any.
activeBridge Boolean True if interface is in bridge mode.
authorized Boolean True if member is authorized to access the network.
ipAssignments Array List of IP addresses that is assigned to the member.
noAutoAssignIps Boolean False if IP address should not be auto-assigned.

Query example

Only the id property is required.

{
  id: '564756465789',
  name: 'Support John',
  employeeId: '1234567890124567890ABCD'
}

Response

Full settings after the member has been created.

Properties

Field Type Description
id String Id of the member
name String Name of the member
employeeId Id Id of employee member belongs to, if any.
employeeName String Name of employee, if any.
employeePicture Id Id if employee picture, if any.
activeBridge Boolean True if interface is in bridge mode.
authorized Boolean True if member is authorized to access the network.
creationTime Date When the member was added.
ipAssignments Array List of IP addresses that is assigned to the member.
lastAuthorizedTime Date When the member was last authorized.
lastDeauthorizedTime Date When the member was last deauthorized.
noAutoAssignIps Boolean True if IP address should not be auto-assigned.
latency Number Latency in ms.
version String Client version number
paths Array List of active connections
paths[].active Boolean
paths[].ipAddress String IP address.
paths[].port Number Port number.
paths[].lastReceive Date When the member last received data.
paths[].lastSend Date when the member last sent data.

Example

{
  id: '5647898745',
  name: 'Support John',
  employeeId: '12345678901234567890ABCD',
  employeeName: 'John Deer',
  activeBridge: false,
  authorized: true,
  creationTime: '2022-01-01T00:00:00:00.000Z',
  ipAssignments: [ '192.168.1.23' ],
  lastAuthorizedTime: '2022-01-01T00:00:00.000Z',
  lastDeauthorizedTime: null,
  noAutoAssignIps: false,
  latency: 12,
  version: '1.10.0',
  paths: [
    {
      active: true,
      ipAddress: '1.2.3.4',
      port: 34523,
      lastReceive: '2022-01-01T00:00:00.000Z',
      lastSend: '2022-01-01T00:00:00.000Z'
    },
    {
      ...
    }
  ]
}

Errors

Error code Message Description
422 name Name is invalid or too long
422 employeeId Employee not found
422 ipAssignments Invalid IP address found in assignments
403 access_denied Access denied
500 internal_error <Unspecified>
api/zerotier/membercreate.txt · Last modified: 2022/12/15 21:43 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki