GET /api/architectures
List all architectures

GET /api/operatingsystems/:operatingsystem_id/architectures
List all architectures for operating system

Examples

GET /api/architectures
403
{
  "error": {
    "message": "Access denied",
    "details": "Missing one of the required permissions: view_architectures",
    "missing_permissions": [
      "view_architectures"
    ]
  }
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

search
optional

filter results

Validations:

  • String

order
optional

Sort and order by a searchable field, e.g. '<field> DESC'

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, 'all' to return all results

Validations:

  • Must match regular expression /\A([1-9]\d*|all)\Z$/.

operatingsystem_id
optional

ID of operating system

Validations:

  • Must be a number.

Search fields

Field name Type Possible values
id integer
name string

GET /api/architectures/:id
Show an architecture

Examples

GET /api/architectures/501905019-x86_64
200
{
  "created_at": "2024-02-22 15:41:34 UTC",
  "updated_at": "2024-02-22 15:41:34 UTC",
  "name": "x86_64",
  "id": 501905019,
  "operatingsystems": [
    {
      "id": 309172073,
      "name": "centos",
      "title": "centos 5.3"
    },
    {
      "id": 750842046,
      "name": "OpenSuse",
      "title": "OpenSuSE 12.3"
    },
    {
      "id": 1073012828,
      "name": "Redhat",
      "title": "RHEL 6.1"
    },
    {
      "id": 331303656,
      "name": "Ubuntu",
      "title": "Ubuntu 10.10"
    },
    {
      "id": 272342666,
      "name": "Ubuntu",
      "title": "Ubuntu 12.10"
    }
  ],
  "images": [
    {
      "id": 980190962,
      "name": "centos-1"
    },
    {
      "id": 298486374,
      "name": "centos-2"
    }
  ]
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..


POST /api/architectures
Create an architecture

Examples

POST /api/architectures
{
  "architecture": {
    "name": "i386"
  }
}
201
{
  "created_at": "2024-02-22 15:41:38 UTC",
  "updated_at": "2024-02-22 15:41:38 UTC",
  "name": "i386",
  "id": 922134524,
  "operatingsystems": [],
  "images": []
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

architecture
required

Validations:

  • Hash

architecture[name]
required

Validations:

  • String

architecture[operatingsystem_ids]
optional , nil allowed

Operating system IDs

Validations:

  • Must be an array of any type


PUT /api/architectures/:id
Update an architecture

Examples

PUT /api/architectures/501905019-x86_64
{
  "architecture": {
    "name": "newx86_64"
  }
}
403
{
  "error": {
    "message": "Access denied",
    "details": "Missing one of the required permissions: edit_architectures",
    "missing_permissions": [
      "edit_architectures"
    ]
  }
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

architecture
required

Validations:

  • Hash

architecture[name]
optional

Validations:

  • String

architecture[operatingsystem_ids]
optional , nil allowed

Operating system IDs

Validations:

  • Must be an array of any type


DELETE /api/architectures/:id
Delete an architecture

Examples

DELETE /api/architectures/501905019-x86_64
{
  "architecture": {}
}
422
{
  "error": {
    "id": 501905019,
    "errors": {
      "base": [
        "x86_64 is used by host1.example.com",
        "x86_64 is used by Parent",
        "x86_64 is used by db",
        "x86_64 is used by Common"
      ]
    },
    "full_messages": [
      "x86_64 is used by host1.example.com",
      "x86_64 is used by Parent",
      "x86_64 is used by db",
      "x86_64 is used by Common"
    ]
  }
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..