LogoLogo
GitHubWebsite
  • Documentation
  • Client API
  • Application API
  • Client API
  • Authentication
  • Users
  • API Keys
  • Nodes
  • Allocations
  • Regions
  • Units
  • Servers
  • Cargo
  • Projects
  • System
  • Models
Powered by GitBook

© Argon Foundation

On this page

Was this helpful?

Export as PDF

Regions

PreviousAllocationsNextUnits

Was this helpful?

Get region

get

Get region details by ID

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
Region details
application/json
404
Region not found
application/json
500
Server error
application/json
get
GET /api/regions/{id} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "identifier": "text",
  "countryId": "text",
  "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
  "serverLimit": 1,
  "stats": {
    "serverCount": 1,
    "nodeCount": 1,
    "onlineNodeCount": 1,
    "atCapacity": true
  },
  "nodes": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "fqdn": "text",
      "port": 1,
      "regionId": "123e4567-e89b-12d3-a456-426614174000",
      "isOnline": true,
      "lastChecked": "2025-05-20T01:02:19.084Z",
      "allocations": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "nodeId": "123e4567-e89b-12d3-a456-426614174000",
          "bindAddress": "text",
          "port": 1,
          "alias": "text",
          "notes": "text",
          "assigned": true,
          "serverId": "123e4567-e89b-12d3-a456-426614174000",
          "createdAt": "2025-05-20T01:02:19.084Z",
          "updatedAt": "2025-05-20T01:02:19.084Z"
        }
      ],
      "region": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "identifier": "text",
        "countryId": "text",
        "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
        "serverLimit": 1,
        "stats": {
          "serverCount": 1,
          "nodeCount": 1,
          "onlineNodeCount": 1,
          "atCapacity": true
        },
        "nodes": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "text",
            "fqdn": "text",
            "port": 1,
            "regionId": "123e4567-e89b-12d3-a456-426614174000",
            "isOnline": true,
            "lastChecked": "2025-05-20T01:02:19.084Z",
            "allocations": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "nodeId": "123e4567-e89b-12d3-a456-426614174000",
                "bindAddress": "text",
                "port": 1,
                "alias": "text",
                "notes": "text",
                "assigned": true,
                "serverId": "123e4567-e89b-12d3-a456-426614174000",
                "createdAt": "2025-05-20T01:02:19.084Z",
                "updatedAt": "2025-05-20T01:02:19.084Z"
              }
            ],
            "region": "[Circular Reference]",
            "createdAt": "2025-05-20T01:02:19.084Z",
            "updatedAt": "2025-05-20T01:02:19.084Z"
          }
        ],
        "createdAt": "2025-05-20T01:02:19.084Z",
        "updatedAt": "2025-05-20T01:02:19.084Z"
      },
      "createdAt": "2025-05-20T01:02:19.084Z",
      "updatedAt": "2025-05-20T01:02:19.084Z"
    }
  ],
  "createdAt": "2025-05-20T01:02:19.084Z",
  "updatedAt": "2025-05-20T01:02:19.084Z"
}

Delete region

delete

Delete a server region

Authorizations
Path parameters
idstring · uuidRequired
Responses
204
Region deleted successfully
400
Cannot delete region with assigned nodes or used as fallback
application/json
403
Forbidden
application/json
404
Region not found
application/json
500
Server error
application/json
delete
DELETE /api/regions/{id} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*

No content

Get region allocations

get

List all unassigned allocations in a region

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
List of unassigned allocations in the region
application/json
404
Region not found
application/json
500
Server error
application/json
get
GET /api/regions/{id}/allocations HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "nodeId": "123e4567-e89b-12d3-a456-426614174000",
    "bindAddress": "text",
    "port": 1,
    "alias": "text",
    "notes": "text",
    "assigned": true,
    "serverId": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": "2025-05-20T01:02:19.084Z",
    "updatedAt": "2025-05-20T01:02:19.084Z",
    "node": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "fqdn": "text"
    }
  }
]
  • GETGet all regions
  • POSTCreate region
  • GETGet region
  • DELETEDelete region
  • PATCHUpdate region
  • GETGet region allocations

Get all regions

get

List all server regions

Authorizations
Responses
200
List of regions
application/json
500
Server error
application/json
get
GET /api/regions HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "identifier": "text",
    "countryId": "text",
    "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
    "serverLimit": 1,
    "stats": {
      "serverCount": 1,
      "nodeCount": 1,
      "onlineNodeCount": 1,
      "atCapacity": true
    },
    "nodes": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "fqdn": "text",
        "port": 1,
        "regionId": "123e4567-e89b-12d3-a456-426614174000",
        "isOnline": true,
        "lastChecked": "2025-05-20T01:02:19.084Z",
        "allocations": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "nodeId": "123e4567-e89b-12d3-a456-426614174000",
            "bindAddress": "text",
            "port": 1,
            "alias": "text",
            "notes": "text",
            "assigned": true,
            "serverId": "123e4567-e89b-12d3-a456-426614174000",
            "createdAt": "2025-05-20T01:02:19.084Z",
            "updatedAt": "2025-05-20T01:02:19.084Z"
          }
        ],
        "region": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "name": "text",
          "identifier": "text",
          "countryId": "text",
          "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
          "serverLimit": 1,
          "stats": {
            "serverCount": 1,
            "nodeCount": 1,
            "onlineNodeCount": 1,
            "atCapacity": true
          },
          "nodes": [
            "[Circular Reference]"
          ],
          "createdAt": "2025-05-20T01:02:19.084Z",
          "updatedAt": "2025-05-20T01:02:19.084Z"
        },
        "createdAt": "2025-05-20T01:02:19.084Z",
        "updatedAt": "2025-05-20T01:02:19.084Z"
      }
    ],
    "createdAt": "2025-05-20T01:02:19.084Z",
    "updatedAt": "2025-05-20T01:02:19.084Z"
  }
]

Create region

post

Create a new server region

Authorizations
Body
namestring · min: 1 · max: 100Required
identifierstring · min: 2 · max: 20RequiredPattern: ^[a-z0-9-]+$
countryIdstring · max: 2Optional
fallbackRegionIdstring · uuidOptional
serverLimitinteger · min: 1Optional
Responses
201
Region created successfully
application/json
400
Invalid request or duplicate identifier
application/json
403
Forbidden
application/json
500
Server error
application/json
post
POST /api/regions HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 128

{
  "name": "text",
  "identifier": "text",
  "countryId": "text",
  "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
  "serverLimit": 1
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "identifier": "text",
  "countryId": "text",
  "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
  "serverLimit": 1,
  "stats": {
    "serverCount": 1,
    "nodeCount": 1,
    "onlineNodeCount": 1,
    "atCapacity": true
  },
  "nodes": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "fqdn": "text",
      "port": 1,
      "regionId": "123e4567-e89b-12d3-a456-426614174000",
      "isOnline": true,
      "lastChecked": "2025-05-20T01:02:19.084Z",
      "allocations": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "nodeId": "123e4567-e89b-12d3-a456-426614174000",
          "bindAddress": "text",
          "port": 1,
          "alias": "text",
          "notes": "text",
          "assigned": true,
          "serverId": "123e4567-e89b-12d3-a456-426614174000",
          "createdAt": "2025-05-20T01:02:19.084Z",
          "updatedAt": "2025-05-20T01:02:19.084Z"
        }
      ],
      "region": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "identifier": "text",
        "countryId": "text",
        "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
        "serverLimit": 1,
        "stats": {
          "serverCount": 1,
          "nodeCount": 1,
          "onlineNodeCount": 1,
          "atCapacity": true
        },
        "nodes": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "text",
            "fqdn": "text",
            "port": 1,
            "regionId": "123e4567-e89b-12d3-a456-426614174000",
            "isOnline": true,
            "lastChecked": "2025-05-20T01:02:19.084Z",
            "allocations": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "nodeId": "123e4567-e89b-12d3-a456-426614174000",
                "bindAddress": "text",
                "port": 1,
                "alias": "text",
                "notes": "text",
                "assigned": true,
                "serverId": "123e4567-e89b-12d3-a456-426614174000",
                "createdAt": "2025-05-20T01:02:19.084Z",
                "updatedAt": "2025-05-20T01:02:19.084Z"
              }
            ],
            "region": "[Circular Reference]",
            "createdAt": "2025-05-20T01:02:19.084Z",
            "updatedAt": "2025-05-20T01:02:19.084Z"
          }
        ],
        "createdAt": "2025-05-20T01:02:19.084Z",
        "updatedAt": "2025-05-20T01:02:19.084Z"
      },
      "createdAt": "2025-05-20T01:02:19.084Z",
      "updatedAt": "2025-05-20T01:02:19.084Z"
    }
  ],
  "createdAt": "2025-05-20T01:02:19.084Z",
  "updatedAt": "2025-05-20T01:02:19.084Z"
}

Update region

patch

Update region details

Authorizations
Path parameters
idstring · uuidRequired
Body
namestring · min: 1 · max: 100Optional
identifierstring · min: 2 · max: 20OptionalPattern: ^[a-z0-9-]+$
countryIdstring · max: 2Optional
fallbackRegionIdstring · uuidOptional
serverLimitinteger · min: 1Optional
Responses
200
Region updated successfully
application/json
400
Invalid request or duplicate identifier
application/json
403
Forbidden
application/json
404
Region or fallback region not found
application/json
500
Server error
application/json
patch
PATCH /api/regions/{id} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 128

{
  "name": "text",
  "identifier": "text",
  "countryId": "text",
  "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
  "serverLimit": 1
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "identifier": "text",
  "countryId": "text",
  "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
  "serverLimit": 1,
  "stats": {
    "serverCount": 1,
    "nodeCount": 1,
    "onlineNodeCount": 1,
    "atCapacity": true
  },
  "nodes": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "fqdn": "text",
      "port": 1,
      "regionId": "123e4567-e89b-12d3-a456-426614174000",
      "isOnline": true,
      "lastChecked": "2025-05-20T01:02:19.084Z",
      "allocations": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "nodeId": "123e4567-e89b-12d3-a456-426614174000",
          "bindAddress": "text",
          "port": 1,
          "alias": "text",
          "notes": "text",
          "assigned": true,
          "serverId": "123e4567-e89b-12d3-a456-426614174000",
          "createdAt": "2025-05-20T01:02:19.084Z",
          "updatedAt": "2025-05-20T01:02:19.084Z"
        }
      ],
      "region": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "identifier": "text",
        "countryId": "text",
        "fallbackRegionId": "123e4567-e89b-12d3-a456-426614174000",
        "serverLimit": 1,
        "stats": {
          "serverCount": 1,
          "nodeCount": 1,
          "onlineNodeCount": 1,
          "atCapacity": true
        },
        "nodes": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "text",
            "fqdn": "text",
            "port": 1,
            "regionId": "123e4567-e89b-12d3-a456-426614174000",
            "isOnline": true,
            "lastChecked": "2025-05-20T01:02:19.084Z",
            "allocations": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "nodeId": "123e4567-e89b-12d3-a456-426614174000",
                "bindAddress": "text",
                "port": 1,
                "alias": "text",
                "notes": "text",
                "assigned": true,
                "serverId": "123e4567-e89b-12d3-a456-426614174000",
                "createdAt": "2025-05-20T01:02:19.084Z",
                "updatedAt": "2025-05-20T01:02:19.084Z"
              }
            ],
            "region": "[Circular Reference]",
            "createdAt": "2025-05-20T01:02:19.084Z",
            "updatedAt": "2025-05-20T01:02:19.084Z"
          }
        ],
        "createdAt": "2025-05-20T01:02:19.084Z",
        "updatedAt": "2025-05-20T01:02:19.084Z"
      },
      "createdAt": "2025-05-20T01:02:19.084Z",
      "updatedAt": "2025-05-20T01:02:19.084Z"
    }
  ],
  "createdAt": "2025-05-20T01:02:19.084Z",
  "updatedAt": "2025-05-20T01:02:19.084Z"
}