GET /api/compute_profiles
List of compute profiles

Examples

GET /api/compute_profiles
200
{
  "total": 4,
  "subtotal": 4,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "created_at": "2022-03-29 09:01:06 UTC",
      "updated_at": "2022-03-29 09:01:06 UTC",
      "id": 980190962,
      "name": "1-Small"
    },
    {
      "created_at": "2022-03-29 09:01:06 UTC",
      "updated_at": "2022-03-29 09:01:06 UTC",
      "id": 298486374,
      "name": "2-Medium"
    },
    {
      "created_at": "2022-03-29 09:01:06 UTC",
      "updated_at": "2022-03-29 09:01:06 UTC",
      "id": 113629430,
      "name": "3-Large"
    },
    {
      "created_at": "2022-03-29 09:01:06 UTC",
      "updated_at": "2022-03-29 09:01:06 UTC",
      "id": 281110143,
      "name": "4-Networking"
    }
  ]
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

search
optional

filter results

Validations:

  • Must be a String

order
optional

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

Validations:

  • Must be a 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$/.

Search fields

Field name Type Possible values
id integer
name string

GET /api/compute_profiles/:id
Show a compute profile

Examples

GET /api/compute_profiles/980190962-1-Small
200
{
  "created_at": "2022-03-29 08:52:27 UTC",
  "updated_at": "2022-03-29 08:52:27 UTC",
  "id": 980190962,
  "name": "1-Small",
  "compute_attributes": [
    {
      "id": 980190962,
      "name": null,
      "compute_resource_id": 928692541,
      "compute_resource_name": "amazon123",
      "provider_friendly_name": "EC2",
      "compute_profile_id": 980190962,
      "compute_profile_name": "1-Small",
      "vm_attrs": {
        "flavor_id": "m1.small",
        "availability_zone": "eu-west-1a"
      },
      "attributes": {}
    },
    {
      "id": 298486374,
      "name": null,
      "compute_resource_id": 980190962,
      "compute_resource_name": "bigcompute",
      "provider_friendly_name": "Libvirt",
      "compute_profile_id": 980190962,
      "compute_profile_name": "1-Small",
      "vm_attrs": {
        "cpus": 2,
        "memory": 536870912
      },
      "attributes": {
        "cpus": 2,
        "memory": 536870912,
        "image_id": null,
        "image_name": null,
        "volumes_attributes": {},
        "interfaces_attributes": {}
      }
    }
  ]
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

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/compute_profiles
Create a compute profile

Examples

POST /api/compute_profiles
{
  "compute_profile": {
    "name": "4-Xlarge"
  }
}
201
{
  "created_at": "2022-03-29 08:54:51 UTC",
  "updated_at": "2022-03-29 08:54:51 UTC",
  "id": 980190964,
  "name": "4-Xlarge",
  "compute_attributes": []
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

compute_profile
required

Validations:

  • Must be a Hash

compute_profile[name]
required

Validations:

  • Must be a String


PUT /api/compute_profiles/:id
Update a compute profile

Examples

PUT /api/compute_profiles/980190962-1-Small
{
  "compute_profile": {
    "name": "new name"
  }
}
200
{
  "created_at": "2022-03-29 08:52:27 UTC",
  "updated_at": "2022-03-29 08:54:51 UTC",
  "id": 980190962,
  "name": "new name",
  "compute_attributes": [
    {
      "id": 980190962,
      "name": null,
      "compute_resource_id": 928692541,
      "compute_resource_name": "amazon123",
      "provider_friendly_name": "EC2",
      "compute_profile_id": 980190962,
      "compute_profile_name": "new name",
      "vm_attrs": {
        "flavor_id": "m1.small",
        "availability_zone": "eu-west-1a"
      },
      "attributes": {}
    },
    {
      "id": 298486374,
      "name": null,
      "compute_resource_id": 980190962,
      "compute_resource_name": "bigcompute",
      "provider_friendly_name": "Libvirt",
      "compute_profile_id": 980190962,
      "compute_profile_name": "new name",
      "vm_attrs": {
        "cpus": 2,
        "memory": 536870912
      },
      "attributes": {
        "cpus": 2,
        "memory": 536870912,
        "image_id": null,
        "image_name": null,
        "volumes_attributes": {},
        "interfaces_attributes": {}
      }
    }
  ]
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String

compute_profile
required

Validations:

  • Must be a Hash

compute_profile[name]
optional

Validations:

  • Must be a String


DELETE /api/compute_profiles/:id
Delete a compute profile

Examples

DELETE /api/compute_profiles/113629430-3-Large
{
  "compute_profile": {}
}
200
{
  "id": 113629430,
  "name": "3-Large",
  "created_at": "2022-03-29T08:52:27.814Z",
  "updated_at": "2022-03-29T08:52:27.814Z"
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String