MNX.io Docs
  • MNX.io Documentation
  • Getting started
    • SSH to an instance from Windows
    • Account password requirements
    • Improving security using two-factor authentication (2FA)
    • Generating an SSH key
      • Manually generating your SSH key in macOS
      • Manually generating your SSH key in Windows
    • API integrations and CLI usage
    • Provisioning limits
    • Cancelling your account
  • Data centers
  • Instances
    • Infrastructure containers
    • Virtual machines
    • Snapshots
      • Automating Snapshots
    • Tags and metadata
    • Connecting to containers and VMs
    • Instance Types
  • Triton CLI & Tools
    • Using the VNC console
    • Triton CLI tool
    • Hashicorp Packer and Terraform
      • Create and manage images with Packer
      • Manage infrastructure with Terraform
    • Container Monitor with Prometheus
  • Network
    • Networking and fabric user guide
    • Firewall
    • Firewall rules reference
    • Frequently Asked Questions
  • CloudAPI Documentation
    • Getting Started
    • RBAC: Users, Roles & Policies
    • API Introduction
    • API Details
      • Account
      • Keys
      • Users
      • Images
      • Instances
      • Packages
  • Contacting Support
  • Images
    • Linux
      • CentOS
      • Ubuntu
        • 20.04
      • Debian
    • FreeBSD
      • 12
Powered by GitBook
On this page
  • ListPackages (GET /:login/packages)
  • GetPackage (GET /:login/packages/:id)

Was this helpful?

  1. CloudAPI Documentation
  2. API Details

Packages

Packages are named collections of resources to describe the dimensions of either a container or a hardware virtual machine. These resources include (but are not limited to) RAM, DISK & CPU caps.

ListPackages (GET /:login/packages)

Provides a list of packages available in this datacenter.

Inputs

  • The following are all optional inputs:

Field

Type

Description

name

String

The "friendly" name for this package

memory

Number

How much memory will by available (in MiB)

disk

Number

How much disk space will be available (in MiB)

swap

Number

How much swap space will be available (in MiB)

lwps

Number

Maximum number of light-weight processes (threads) allowed

vcpus

Number

Number of vCPUs for this package

version

String

The version of this package

group

String

The group this package belongs to

flexible_disk

Boolean

Whether this is a flexible_disk package

When any values are provided for one or more of the aforementioned inputs, the retrieved packages will match all of them.

When querying, wildcards (i.e. '') are allowed for string fields. For example, to list all packages with a name that starts with "foo", give "foo" as the package name.

Returns

An array of objects, of the form:

Field

Type

Description

id

UUID

Unique id for this package

name

String

The "friendly" name for this package

memory

Number

How much memory will by available (in MiB)

disk

Number

How much disk space will be available (in MiB)

swap

Number

How much swap space will be available (in MiB)

lwps

Number

Maximum number of light-weight processes (threads) allowed

vcpus

Number

Number of vCPUs for this package

version

String

The version of this package

group

String

The group this package belongs to

description

String

A human-friendly description about this package

disks

Array

The disks this package contains (Allowed when flexible_disk is true)

flexible_disk

Boolean

Whether this is a flexible_disk package (bhyve only)

default

Boolean

(deprecated) Whether this is the default package in this datacenter

Errors

Error Code

Description

ResourceNotFound

If :login does not exist

CLI Command

triton package list

or

sdc-listpackages

Example Request

GET /my/packages HTTP/1.1
Host: api.example.com
Authorization: ...
Accept: application/json
Api-Version: ~8

Example Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 314
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, Api-Version, Response-Time
Access-Control-Allow-Methods: GET, HEAD
Access-Control-Expose-Headers: Api-Version, Request-Id, Response-Time
Connection: Keep-Alive
Content-MD5: u0+0E3G28WL4Y4K8p6+pIg==
Date: Thu, 21 Jan 2016 08:33:52 GMT
Server: Joyent Triton 8.0.0
Api-Version: 8.0.0
Request-Id: b24219e0-c019-11e5-99e1-8339f3270a9f
Response-Time: 1992

[
  {
    "id": "7b17343c-94af-6266-e0e8-893a3b9993d0",
    "name": "sdc_128",
    "memory": 128,
    "disk": 12288,
    "swap": 256,
    "vcpus": 1,
    "lwps": 1000,
    "default": false,
    "version": "1.0.0"
  },
  ...
]

GetPackage (GET /:login/packages/:id)

Gets a package by name or id.

Inputs

  • None

Returns

Field

Type

Description

id

UUID

Unique id for this package

name

String

The "friendly" name for this package

memory

Number

How much memory will by available (in MiB)

disk

Number

How much disk space will be available (in MiB)

swap

Number

How much swap space will be available (in MiB)

lwps

Number

Maximum number of light-weight processes (threads) allowed

vcpus

Number

Number of vCPUs for this package

version

String

The version of this package

group

String

The group this package belongs to

description

String

A human-friendly description about this package

disks

Array

The disks this package contains (Allowed when flexible_disk is true)

flexible_disk

Boolean

Whether this is a flexible_disk package (bhyve only)

default

Boolean

(deprecated) Whether this is the default package in this datacenter

Errors

Error Code

Description

ResourceNotFound

If :login or :id does not exist

CLI Command

triton package get 7b17343c-94af-6266-e0e8-893a3b9993d0

or

sdc-getpackage 7b17343c-94af-6266-e0e8-893a3b9993d0

Example Request

GET /my/packages/7b17343c-94af-6266-e0e8-893a3b9993d0 HTTP/1.1
Host: api.example.com
Authorization: ...
Accept: application/json
Api-Version: ~8

Example Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 156
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, Api-Version, Response-Time
Access-Control-Allow-Methods: GET, HEAD
Access-Control-Expose-Headers: Api-Version, Request-Id, Response-Time
Connection: Keep-Alive
Content-MD5: MEUpS89GsEaHBykatBp5rg==
Date: Thu, 21 Jan 2016 08:37:04 GMT
Server: Joyent Triton 8.0.0
Api-Version: 8.0.0
Request-Id: 253dd4c0-c01a-11e5-b5f9-2b49303f7fc4
Response-Time: 1482

{
  "id": "7b17343c-94af-6266-e0e8-893a3b9993d0",
  "name": "sdc_128",
  "memory": 128,
  "disk": 12288,
  "swap": 256,
  "vcpus": 1,
  "lwps": 1000,
  "default": false,
  "version": "1.0.0"
}
PreviousInstancesNextContacting Support

Last updated 5 years ago

Was this helpful?

For all possible errors, see .

For all possible errors, see .

CloudAPI HTTP Responses
CloudAPI HTTP Responses