GET /api/architectures
List all architectures

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

Examples

GET /api/architectures
200
{
  "total": 3,
  "subtotal": 3,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "name": "sparc",
      "id": 331892513
    },
    {
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "name": "s390",
      "id": 381564594
    },
    {
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "name": "x86_64",
      "id": 501905019
    }
  ]
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

search
optional

filter results

Validations:

  • Must be a String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
optional

paginate results

Validations:

  • Must be a String

per_page
optional

number of entries per request

Validations:

  • Must be a String

operatingsystem_id
optional

ID of operating system

Validations:

  • Must be a String

Search fields

Field name Type Possible values
name string

GET /api/architectures/:id
Show an architecture

Examples

GET /api/architectures/501905019-x86_64
200
{
  "created_at": "2018-11-15 19:01:27 UTC",
  "updated_at": "2018-11-15 19:01:27 UTC",
  "name": "x86_64",
  "id": 501905019,
  "operatingsystems": [
    {
      "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"
    },
    {
      "id": 309172073,
      "name": "centos",
      "title": "centos 5.3"
    }
  ],
  "images": [
    {
      "id": 298486374,
      "name": "centos-2"
    },
    {
      "id": 980190962,
      "name": "centos-1"
    }
  ]
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/architectures
Create an architecture

Examples

POST /api/architectures
{
  "architecture": {
    "name": ""
  }
}
422
{
  "error": {
    "id": null,
    "errors": {
      "name": [
        "can't be blank"
      ]
    },
    "full_messages": [
      "Name can't be blank"
    ]
  }
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

architecture
required

Validations:

  • Must be a Hash

architecture[name]
required

Validations:

  • Must be a 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"
  }
}
200
{
  "created_at": "2018-11-15 19:01:27 UTC",
  "updated_at": "2018-11-15 19:01:29 UTC",
  "name": "newx86_64",
  "id": 501905019,
  "operatingsystems": [
    {
      "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"
    },
    {
      "id": 309172073,
      "name": "centos",
      "title": "centos 5.3"
    }
  ],
  "images": [
    {
      "id": 298486374,
      "name": "centos-2"
    },
    {
      "id": 980190962,
      "name": "centos-1"
    }
  ]
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

architecture
required

Validations:

  • Must be a Hash

architecture[name]
optional

Validations:

  • Must be a 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 Parent",
        "x86_64 is used by db",
        "x86_64 is used by Common"
      ]
    },
    "full_messages": [
      "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

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.