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

Units

PreviousRegionsNextServers

Was this helpful?

Get unit version

get

Get the unit system version

Authorizations
Responses
200
Unit version
application/json
403
Forbidden
application/json
500
Server error
application/json
get
GET /api/units/version HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
{
  "version": "argon/unit:v3"
}

Get unit

get

Get unit details by ID

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
Unit details
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
get
GET /api/units/{id} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "shortName": "text",
  "description": "text",
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text",
  "dockerImage": "text",
  "defaultStartupCommand": "text",
  "configFiles": [
    {
      "path": "text",
      "content": "text"
    }
  ],
  "environmentVariables": [
    {
      "name": "text",
      "description": "text",
      "defaultValue": "text",
      "required": true,
      "userViewable": true,
      "userEditable": true,
      "rules": "text"
    }
  ],
  "installScript": {
    "dockerImage": "text",
    "entrypoint": "text",
    "script": "text"
  },
  "startup": {
    "userEditable": true,
    "readyRegex": "text",
    "stopCommand": "text"
  },
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ],
  "meta": {
    "version": "text",
    "author": "text",
    "website": "text",
    "supportUrl": "text"
  },
  "recommendedRequirements": {
    "memoryMiB": 1,
    "diskMiB": 1,
    "cpuPercent": 1
  },
  "createdAt": "2025-05-20T01:31:43.942Z",
  "updatedAt": "2025-05-20T01:31:43.942Z"
}

Delete unit

delete

Delete a server unit

Authorizations
Path parameters
idstring · uuidRequired
Responses
204
Unit deleted successfully
400
Cannot delete unit in use by servers
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
delete
DELETE /api/units/{id} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*

No content

Export unit

get

Export a unit configuration as JSON

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
Unit configuration
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
get
GET /api/units/{id}/export HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
{
  "name": "text",
  "shortName": "text",
  "description": "text",
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text",
  "dockerImage": "text",
  "defaultStartupCommand": "text",
  "configFiles": [
    {
      "path": "text",
      "content": "text"
    }
  ],
  "environmentVariables": [
    {
      "name": "text",
      "description": "text",
      "defaultValue": "text",
      "required": true,
      "userViewable": true,
      "userEditable": true,
      "rules": "text"
    }
  ],
  "installScript": {
    "dockerImage": "text",
    "entrypoint": "text",
    "script": "text"
  },
  "startup": {
    "userEditable": true,
    "readyRegex": "text",
    "stopCommand": "text"
  },
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ],
  "meta": {
    "version": "text",
    "author": "text",
    "website": "text",
    "supportUrl": "text"
  },
  "recommendedRequirements": {
    "memoryMiB": 1,
    "diskMiB": 1,
    "cpuPercent": 1
  }
}

Get unit Docker images

get

Get available Docker images for a unit

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
Unit Docker images
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
get
GET /api/units/{id}/docker-images HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
{
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text"
}

Get unit features

get

Get features for a unit

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
Unit features
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
get
GET /api/units/{id}/features HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
{
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ]
}

Delete unit feature

delete

Delete a feature from a unit

Authorizations
Path parameters
idstring · uuidRequired
featureNamestringRequired
Responses
204
Feature deleted successfully
403
Forbidden
application/json
404
Unit or feature not found
application/json
500
Server error
application/json
delete
DELETE /api/units/{id}/features/{featureName} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*

No content

Get unit metadata

get

Get metadata for a unit

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
Unit metadata
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
get
GET /api/units/{id}/meta HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
{
  "meta": {
    "version": "text",
    "author": "text",
    "website": "text",
    "supportUrl": "text"
  }
}

Get unit containers

get

Get cargo containers assigned to a unit

Authorizations
Path parameters
idstring · uuidRequired
Responses
200
List of cargo containers
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
get
GET /api/units/{id}/containers HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "description": "text",
    "items": [
      {
        "cargoId": "123e4567-e89b-12d3-a456-426614174000",
        "targetPath": "text"
      }
    ],
    "createdAt": "2025-05-20T01:31:43.942Z",
    "updatedAt": "2025-05-20T01:31:43.942Z"
  }
]

Assign container

post

Assign a cargo container to a unit

Authorizations
Path parameters
unitIdstring · uuidRequired
containerIdstring · uuidRequired
Responses
204
Container assigned successfully
403
Forbidden
application/json
404
Unit or container not found
application/json
500
Server error
application/json
post
POST /api/units/{unitId}/containers/{containerId} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*

No content

Remove container

delete

Remove a cargo container from a unit

Authorizations
Path parameters
unitIdstring · uuidRequired
containerIdstring · uuidRequired
Responses
204
Container removed successfully
403
Forbidden
application/json
404
Unit or container not found
application/json
500
Server error
application/json
delete
DELETE /api/units/{unitId}/containers/{containerId} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*

No content

  • GETGet all units
  • POSTCreate unit
  • POSTImport unit
  • GETGet unit version
  • GETGet unit
  • DELETEDelete unit
  • PATCHUpdate unit
  • GETExport unit
  • GETGet unit Docker images
  • PATCHUpdate unit Docker images
  • GETGet unit features
  • POSTAdd unit feature
  • PATCHUpdate unit features
  • DELETEDelete unit feature
  • GETGet unit metadata
  • PATCHUpdate unit metadata
  • GETGet unit containers
  • POSTAssign container
  • DELETERemove container

Get all units

get

List all server units (images)

Authorizations
Responses
200
List of units
application/json
403
Forbidden
application/json
500
Server error
application/json
get
GET /api/units HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "shortName": "text",
    "description": "text",
    "dockerImages": [
      {
        "image": "text",
        "displayName": "text"
      }
    ],
    "defaultDockerImage": "text",
    "dockerImage": "text",
    "defaultStartupCommand": "text",
    "configFiles": [
      {
        "path": "text",
        "content": "text"
      }
    ],
    "environmentVariables": [
      {
        "name": "text",
        "description": "text",
        "defaultValue": "text",
        "required": true,
        "userViewable": true,
        "userEditable": true,
        "rules": "text"
      }
    ],
    "installScript": {
      "dockerImage": "text",
      "entrypoint": "text",
      "script": "text"
    },
    "startup": {
      "userEditable": true,
      "readyRegex": "text",
      "stopCommand": "text"
    },
    "features": [
      {
        "name": "text",
        "description": "text",
        "iconPath": "text",
        "type": "required",
        "uiData": {
          "component": "text",
          "props": {}
        }
      }
    ],
    "meta": {
      "version": "text",
      "author": "text",
      "website": "text",
      "supportUrl": "text"
    },
    "recommendedRequirements": {
      "memoryMiB": 1,
      "diskMiB": 1,
      "cpuPercent": 1
    },
    "createdAt": "2025-05-20T01:31:43.942Z",
    "updatedAt": "2025-05-20T01:31:43.942Z"
  }
]

Create unit

post

Create a new server unit

Authorizations
Body
namestring · min: 1 · max: 100Required
shortNamestring · min: 1 · max: 20RequiredPattern: ^[a-z0-9-]+$
descriptionstringRequired
defaultDockerImagestringRequired
dockerImagestringOptional
defaultStartupCommandstringRequired
Responses
201
Unit created successfully
application/json
400
Invalid request or duplicate shortname
application/json
403
Forbidden
application/json
500
Server error
application/json
post
POST /api/units HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 817

{
  "name": "text",
  "shortName": "text",
  "description": "text",
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text",
  "dockerImage": "text",
  "defaultStartupCommand": "text",
  "configFiles": [
    {
      "path": "text",
      "content": "text"
    }
  ],
  "environmentVariables": [
    {
      "name": "text",
      "description": "text",
      "defaultValue": "text",
      "required": true,
      "userViewable": true,
      "userEditable": true,
      "rules": "text"
    }
  ],
  "installScript": {
    "dockerImage": "text",
    "entrypoint": "text",
    "script": "text"
  },
  "startup": {
    "userEditable": true,
    "readyRegex": "text",
    "stopCommand": "text"
  },
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ],
  "meta": {
    "version": "text",
    "author": "text",
    "website": "text",
    "supportUrl": "text"
  },
  "recommendedRequirements": {
    "memoryMiB": 1,
    "diskMiB": 1,
    "cpuPercent": 1
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "shortName": "text",
  "description": "text",
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text",
  "dockerImage": "text",
  "defaultStartupCommand": "text",
  "configFiles": [
    {
      "path": "text",
      "content": "text"
    }
  ],
  "environmentVariables": [
    {
      "name": "text",
      "description": "text",
      "defaultValue": "text",
      "required": true,
      "userViewable": true,
      "userEditable": true,
      "rules": "text"
    }
  ],
  "installScript": {
    "dockerImage": "text",
    "entrypoint": "text",
    "script": "text"
  },
  "startup": {
    "userEditable": true,
    "readyRegex": "text",
    "stopCommand": "text"
  },
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ],
  "meta": {
    "version": "text",
    "author": "text",
    "website": "text",
    "supportUrl": "text"
  },
  "recommendedRequirements": {
    "memoryMiB": 1,
    "diskMiB": 1,
    "cpuPercent": 1
  },
  "createdAt": "2025-05-20T01:31:43.942Z",
  "updatedAt": "2025-05-20T01:31:43.942Z"
}

Import unit

post

Import a unit from a file

Authorizations
Body
filestring · binaryOptional
Responses
201
Unit imported successfully
application/json
400
Invalid file or configuration
application/json
403
Forbidden
application/json
500
Server error
application/json
post
POST /api/units/import HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "shortName": "text",
  "description": "text",
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text",
  "dockerImage": "text",
  "defaultStartupCommand": "text",
  "configFiles": [
    {
      "path": "text",
      "content": "text"
    }
  ],
  "environmentVariables": [
    {
      "name": "text",
      "description": "text",
      "defaultValue": "text",
      "required": true,
      "userViewable": true,
      "userEditable": true,
      "rules": "text"
    }
  ],
  "installScript": {
    "dockerImage": "text",
    "entrypoint": "text",
    "script": "text"
  },
  "startup": {
    "userEditable": true,
    "readyRegex": "text",
    "stopCommand": "text"
  },
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ],
  "meta": {
    "version": "text",
    "author": "text",
    "website": "text",
    "supportUrl": "text"
  },
  "recommendedRequirements": {
    "memoryMiB": 1,
    "diskMiB": 1,
    "cpuPercent": 1
  },
  "createdAt": "2025-05-20T01:31:43.942Z",
  "updatedAt": "2025-05-20T01:31:43.942Z"
}

Update unit

patch

Update unit details

Authorizations
Path parameters
idstring · uuidRequired
Body
namestring · min: 1 · max: 100Required
shortNamestring · min: 1 · max: 20RequiredPattern: ^[a-z0-9-]+$
descriptionstringRequired
defaultDockerImagestringRequired
dockerImagestringOptional
defaultStartupCommandstringRequired
Responses
200
Unit updated successfully
application/json
400
Invalid request or duplicate shortname
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
patch
PATCH /api/units/{id} HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 817

{
  "name": "text",
  "shortName": "text",
  "description": "text",
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text",
  "dockerImage": "text",
  "defaultStartupCommand": "text",
  "configFiles": [
    {
      "path": "text",
      "content": "text"
    }
  ],
  "environmentVariables": [
    {
      "name": "text",
      "description": "text",
      "defaultValue": "text",
      "required": true,
      "userViewable": true,
      "userEditable": true,
      "rules": "text"
    }
  ],
  "installScript": {
    "dockerImage": "text",
    "entrypoint": "text",
    "script": "text"
  },
  "startup": {
    "userEditable": true,
    "readyRegex": "text",
    "stopCommand": "text"
  },
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ],
  "meta": {
    "version": "text",
    "author": "text",
    "website": "text",
    "supportUrl": "text"
  },
  "recommendedRequirements": {
    "memoryMiB": 1,
    "diskMiB": 1,
    "cpuPercent": 1
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "shortName": "text",
  "description": "text",
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text",
  "dockerImage": "text",
  "defaultStartupCommand": "text",
  "configFiles": [
    {
      "path": "text",
      "content": "text"
    }
  ],
  "environmentVariables": [
    {
      "name": "text",
      "description": "text",
      "defaultValue": "text",
      "required": true,
      "userViewable": true,
      "userEditable": true,
      "rules": "text"
    }
  ],
  "installScript": {
    "dockerImage": "text",
    "entrypoint": "text",
    "script": "text"
  },
  "startup": {
    "userEditable": true,
    "readyRegex": "text",
    "stopCommand": "text"
  },
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ],
  "meta": {
    "version": "text",
    "author": "text",
    "website": "text",
    "supportUrl": "text"
  },
  "recommendedRequirements": {
    "memoryMiB": 1,
    "diskMiB": 1,
    "cpuPercent": 1
  },
  "createdAt": "2025-05-20T01:31:43.942Z",
  "updatedAt": "2025-05-20T01:31:43.942Z"
}

Update unit Docker images

patch

Update Docker images for a unit

Authorizations
Path parameters
idstring · uuidRequired
Body
defaultDockerImagestringOptional
Responses
200
Docker images updated successfully
application/json
400
Invalid request
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
patch
PATCH /api/units/{id}/docker-images HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 84

{
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text"
}
{
  "dockerImages": [
    {
      "image": "text",
      "displayName": "text"
    }
  ],
  "defaultDockerImage": "text"
}

Add unit feature

post

Add a new feature to a unit

Authorizations
Path parameters
idstring · uuidRequired
Body
namestring · min: 1Optional
descriptionstringOptional
iconPathstringOptional
typestring · enumOptionalPossible values:
Responses
201
Feature added successfully
application/json
400
Invalid request or duplicate feature name
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
post
POST /api/units/{id}/features HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 113

{
  "name": "text",
  "description": "text",
  "iconPath": "text",
  "type": "required",
  "uiData": {
    "component": "text",
    "props": {}
  }
}
{
  "feature": {
    "name": "text",
    "description": "text",
    "iconPath": "text",
    "type": "required",
    "uiData": {
      "component": "text",
      "props": {}
    }
  },
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ]
}

Update unit features

patch

Update all features for a unit

Authorizations
Path parameters
idstring · uuidRequired
Body
namestring · min: 1Optional
descriptionstringOptional
iconPathstringOptional
typestring · enumOptionalPossible values:
Responses
200
Features updated successfully
application/json
400
Invalid request or duplicate feature name
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
patch
PATCH /api/units/{id}/features HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 115

[
  {
    "name": "text",
    "description": "text",
    "iconPath": "text",
    "type": "required",
    "uiData": {
      "component": "text",
      "props": {}
    }
  }
]
{
  "features": [
    {
      "name": "text",
      "description": "text",
      "iconPath": "text",
      "type": "required",
      "uiData": {
        "component": "text",
        "props": {}
      }
    }
  ]
}

Update unit metadata

patch

Update metadata for a unit

Authorizations
Path parameters
idstring · uuidRequired
Body
versionstringOptional
authorstringOptional
websitestringOptional
supportUrlstringOptional
Responses
200
Metadata updated successfully
application/json
400
Invalid request
application/json
403
Forbidden
application/json
404
Unit not found
application/json
500
Server error
application/json
patch
PATCH /api/units/{id}/meta HTTP/1.1
Host: localhost:3000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "version": "text",
  "author": "text",
  "website": "text",
  "supportUrl": "text"
}
{
  "meta": {
    "version": "text",
    "author": "text",
    "website": "text",
    "supportUrl": "text"
  }
}