Exemples

GET /api/compute_resources
200
{
  "total": 9,
  "subtotal": 9,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "description": "yourcompute",
      "url": "eu-west-1",
      "created_at": "2019-11-07 08:49:02 UTC",
      "updated_at": "2019-11-07 08:49:02 UTC",
      "id": 928692541,
      "name": "amazon123",
      "provider": "EC2",
      "provider_friendly_name": "EC2",
      "access_key": "MyString",
      "region": "eu-west-1"
    },
    {
      "description": "yourcompute",
      "url": "eu-west-1",
      "created_at": "2019-11-07 08:49:02 UTC",
      "updated_at": "2019-11-07 08:49:02 UTC",
      "id": 304431216,
      "name": "another-ec2",
      "provider": "EC2",
      "provider_friendly_name": "EC2",
      "access_key": "MyString",
      "region": "eu-west-1"
    },
    {
      "description": "MyString",
      "url": "qemu://stam/system",
      "created_at": "2019-11-07 08:49:02 UTC",
      "updated_at": "2019-11-07 08:49:02 UTC",
      "id": 980190962,
      "name": "bigcompute",
      "provider": "Libvirt",
      "provider_friendly_name": "Libvirt",
      "display_type": "vnc",
      "set_console_password": true
    },
    {
      "description": "yourcompute",
      "url": "us-central1-a",
      "created_at": "2019-11-07 08:49:02 UTC",
      "updated_at": "2019-11-07 08:49:02 UTC",
      "id": 30517511,
      "name": "gce123",
      "provider": "GCE",
      "provider_friendly_name": "Google",
      "email": null,
      "zone": "us-central1-a",
      "project": "foo",
      "key_path": null
    },
    {
      "description": "mycompute",
      "url": "test:///default",
      "created_at": "2019-11-07 08:49:02 UTC",
      "updated_at": "2019-11-07 08:49:02 UTC",
      "id": 367690737,
      "name": "mycompute",
      "provider": "Libvirt",
      "provider_friendly_name": "Libvirt",
      "display_type": "vnc",
      "set_console_password": true
    },
    {
      "description": "computeresource",
      "url": "test:///default/v2.0",
      "created_at": "2019-11-07 08:49:02 UTC",
      "updated_at": "2019-11-07 08:49:02 UTC",
      "id": 628705878,
      "name": "openstackcr",
      "provider": "Openstack",
      "provider_friendly_name": "OpenStack",
      "user": "MyString",
      "tenant": null,
      "domain": null,
      "project_domain_name": null,
      "project_domain_id": null
    },
    {
      "description": "ovirt resource",
      "url": "https://myovirt/api",
      "created_at": "2019-11-07 08:49:02 UTC",
      "updated_at": "2019-11-07 08:49:02 UTC",
      "id": 510899777,
      "name": "Ovirt",
      "provider": "Ovirt",
      "provider_friendly_name": "oVirt",
      "user": "MyString",
      "datacenter": "1234567891011",
      "use_v4": false,
      "ovirt_quota": null,
      "display_type": "vnc",
      "keyboard_layout": "en-us"
    },
    {
      "description": "vmware resource",
      "url": "https://myvmware/api",
      "created_at": "2019-11-07 08:49:02 UTC",
      "updated_at": "2019-11-07 08:49:02 UTC",
      "id": 305613588,
      "name": "Vmware",
      "provider": "Vmware",
      "provider_friendly_name": "VMware",
      "user": "MyString",
      "datacenter": "1234567891011",
      "server": "https://myvmware/api",
      "set_console_password": true,
      "caching_enabled": true,
      "display_type": "vmrc"
    },
    {
      "description": "yourcompute",
      "url": "test:///default",
      "created_at": "2019-11-07 08:49:02 UTC",
      "updated_at": "2019-11-07 08:49:02 UTC",
      "id": 932571420,
      "name": "yourcompute",
      "provider": "Libvirt",
      "provider_friendly_name": "Libvirt",
      "display_type": "vnc",
      "set_console_password": true
    }
  ]
}

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

search
optionel

filtrer les résultats

Validations:

  • Must be a String

order
optionel

Champ et sens de tri, ex: ‘id DESC’

Validations:

  • Must be a String

page
optionel

Numéro de la page, commençant par 1

Validations:

  • Must be a number.

per_page
optionel

Nombre de résultats par page à renvoyer

Validations:

  • Must be a number.

Rechercher les champs

Nom du champ Type Valeurs possibles
id integer
location string
location_id integer
name string
organization string
organization_id integer
type string