Edit Server API

Update VPN server configuration including network settings, location, and credentials

Infrastructure

Edit Server API

Update existing VPN server configurations. Modify network settings, location data, SSH credentials, and advanced options without service interruption.

Update Config

Modify server settings live.

Rolling Updates

Change without downtime.

Full Control

Adjust any server parameter.


Endpoint Overview

MUTATION/graphql

Update an existing server's configuration. Only provided fields will be updated; omitted fields retain their current values.

Authentication:Bearer Token
Required scopes:admin

Request Parameters

idInt!Required

The unique identifier of the server to update.

hostNameString

Updated hostname or FQDN.

publicIpString

Updated public IP address.

privateIpString

Updated private/internal IP.

typeString

Server type (wireguard, openvpn, vless, etc.).

portsInt

Port configuration.

cityString

Updated city location.

countryString

Updated country code or name.

continentString

Updated continent for regional grouping.

sshUsernameString

Updated SSH username.

sshKeyString

Updated SSH key for authentication.

secretString

Updated server secret/API key.


GraphQL Mutation

mutation editServer($id: Int!, $server: ServerEdit!) {
  editServer(id: $id, server: $server) {
    id
    hostName
    publicIp
    privateIp
    type
    city
    country
    continent
    ports
    description
    updatedAt
  }
}

Variables:

{
  "id": 12345,
  "server": {
    "city": "San Francisco",
    "description": "Upgraded to higher capacity",
    "ports": 51821
  }
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "query": "mutation editServer($id: Int!, $server: ServerEdit!) { editServer(id: $id, server: $server) { id hostName city description } }",
    "variables": {
      "id": 12345,
      "server": {
        "city": "San Francisco",
        "description": "Upgraded to higher capacity"
      }
    }
  }'

Response

200Server Updated Successfully
{
  "data": {
    "editServer": {
      "id": "12345",
      "hostName": "us-west-1.vpn.example.com",
      "publicIp": "203.0.113.100",
      "privateIp": "10.0.1.100",
      "type": "wireguard",
      "city": "San Francisco",
      "country": "US",
      "continent": "North America",
      "ports": 51821,
      "description": "Upgraded to higher capacity",
      "updatedAt": "2024-01-16T14:20:00Z"
    }
  }
}
400Server Not Found
{
  "errors": [
    {
      "message": "Server with ID 12345 not found",
      "path": ["editServer"],
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ],
  "data": null
}

Common Update Scenarios

IP Change

Update public or private IP addresses.

Location Update

Correct or update geographic data.

Credential Rotation

Update SSH keys and secrets.

Protocol Change

Switch VPN protocol type.


Best Practices

Partial Updates

Only include fields you want to change.

Off-Peak Changes

Make major changes during low traffic.

Test After Update

Verify connectivity after changes.

Document Changes

Keep records of configuration changes.



Active Connections

Changing certain settings like IP address or ports may disconnect active users. Plan updates during maintenance windows when possible.

View Server Details

Check current server configuration before making updates.

Get Server