GET /api/architectures
Listar todas as arquiteturas

GET /api/operatingsystems/:operatingsystem_id/architectures
Listar todas as arquiteturas para sistemas operacionais

Exemplos

GET /api/architectures
200
{
  "total": 4,
  "subtotal": 4,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "created_at": "2019-11-07 09:10:05 UTC",
      "updated_at": "2019-11-07 09:10:05 UTC",
      "name": "x86_64",
      "id": 501905019
    },
    {
      "created_at": "2019-11-07 09:10:05 UTC",
      "updated_at": "2019-11-07 09:10:05 UTC",
      "name": "sparc",
      "id": 331892513
    },
    {
      "created_at": "2019-11-07 09:10:05 UTC",
      "updated_at": "2019-11-07 09:10:05 UTC",
      "name": "s390",
      "id": 381564594
    },
    {
      "created_at": "2019-11-07 09:10:05 UTC",
      "updated_at": "2019-11-07 09:10:05 UTC",
      "name": "ASIC",
      "id": 578327757
    }
  ]
}

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

search
opcional

filtrar resultados

Validations:

  • Must be a String

order
opcional

Classificar campo e ordem, ex.: ‘id DESC’

Validations:

  • Must be a String

page
opcional

Número de página, iniciando em 1

Validations:

  • Must be a number.

per_page
opcional

Número de resultados por página para retornar

Validations:

  • Must be a number.

operatingsystem_id
opcional

ID do sistema operacional

Validations:

  • Must be a String

Pesquisar campos

Nome do campo Tipo Valores possíveis
name string

GET /api/architectures/:id
Exibir uma arquitetura

Exemplos

GET /api/architectures/501905019-x86_64
200
{
  "created_at": "2019-11-07 09:10:05 UTC",
  "updated_at": "2019-11-07 09:10:05 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"
    }
  ]
}

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requerido

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
Criar uma arquitetura

Exemplos

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

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

architecture
requerido

Validations:

  • Must be a Hash

architecture[name]
requerido

Validations:

  • Must be a String

architecture[operatingsystem_ids]
opcional , nulo permitido

IDs de sistemas operacionais

Validations:

  • Must be an array of any type


PUT /api/architectures/:id
Atualizar uma arquitetura

Exemplos

PUT /api/architectures/501905019-x86_64
{
  "architecture": {
    "name": "newx86_64"
  }
}
200
{
  "created_at": "2019-11-07 09:10:05 UTC",
  "updated_at": "2019-11-07 09:10:07 UTC",
  "name": "newx86_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"
    }
  ]
}

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requerido

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
requerido

Validations:

  • Must be a Hash

architecture[name]
opcional

Validations:

  • Must be a String

architecture[operatingsystem_ids]
opcional , nulo permitido

IDs de sistemas operacionais

Validations:

  • Must be an array of any type


DELETE /api/architectures/:id
Apagar um arquitetura

Exemplos

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

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requerido

Validations:

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