GET /api/organizations
List all organizations

Examples

GET /api/organizations
200
{
  "total": 3,
  "subtotal": 3,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-02-20 13:25:27 UTC",
      "updated_at": "2019-02-20 13:25:27 UTC",
      "id": 114267492,
      "name": "Empty Organization",
      "title": "Empty Organization",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-02-20 13:25:27 UTC",
      "updated_at": "2019-02-20 13:25:27 UTC",
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-02-20 13:25:27 UTC",
      "updated_at": "2019-02-20 13:25:27 UTC",
      "id": 61304186,
      "name": "Organization 2",
      "title": "Organization 2",
      "description": null
    }
  ]
}

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


GET /api/organizations/:id
Show an organization

Examples

GET /api/organizations/447626455-org81
404
{
  "error": {
    "message": "Resource organization not found by id '447626455-org81'"
  }
}

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

show_hidden_parameters
optional

Display hidden parameter values

Validations:

  • Must be one of: true, false, 1, 0.

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/organizations
Create an organization

Examples

POST /api/organizations
{
  "organization": {
    "name": "uejNzgEBTX"
  }
}
201
{
  "select_all_types": [],
  "description": null,
  "created_at": "2019-02-20 13:25:42 UTC",
  "updated_at": "2019-02-20 13:25:42 UTC",
  "ancestry": null,
  "parent_id": null,
  "parent_name": null,
  "id": 447626456,
  "name": "uejNzgEBTX",
  "title": "uejNzgEBTX",
  "users": [],
  "smart_proxies": [],
  "subnets": [],
  "compute_resources": [],
  "media": [],
  "config_templates": [],
  "ptables": [],
  "provisioning_templates": [],
  "domains": [],
  "realms": [],
  "environments": [],
  "hostgroups": [],
  "locations": [],
  "hosts_count": 0,
  "parameters": []
}

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

organization
required

Validations:

  • Must be a Hash

organization[name]
required

Validations:

  • Must be a String

organization[description]
optional , nil allowed

Validations:

  • Must be a String

organization[user_ids]
optional , nil allowed

User IDs

Validations:

  • Must be an array of any type

organization[smart_proxy_ids]
optional , nil allowed

Smart proxy IDs

Validations:

  • Must be an array of any type

organization[compute_resource_ids]
optional , nil allowed

Compute resource IDs

Validations:

  • Must be an array of any type

organization[medium_ids]
optional , nil allowed

Medium IDs

Validations:

  • Must be an array of any type

organization[config_template_ids]
optional , nil allowed

Provisioning template IDs

Validations:

  • Must be an array of any type

organization[ptable_ids]
optional , nil allowed

Partition template IDs

Validations:

  • Must be an array of any type

organization[provisioning_template_ids]
optional , nil allowed

Provisioning template IDs

Validations:

  • Must be an array of any type

organization[domain_ids]
optional , nil allowed

Domain IDs

Validations:

  • Must be an array of any type

organization[realm_ids]
optional , nil allowed

Realm IDs

Validations:

  • Must be an array of any type

organization[hostgroup_ids]
optional , nil allowed

Host group IDs

Validations:

  • Must be an array of any type

organization[environment_ids]
optional , nil allowed

Environment IDs

Validations:

  • Must be an array of any type

organization[subnet_ids]
optional , nil allowed

Subnet IDs

Validations:

  • Must be an array of any type

organization[parent_id]
optional , nil allowed

Parent ID

Validations:

  • Must be a number.

organization[ignore_types]
optional , nil allowed

List of resources types that will be automatically associated

Validations:

  • Must be an array of any type


PUT /api/organizations/:id
Update an organization

Examples

POST /api/organizations/447626453
{
  "organization": {
    "name": "MSwkRmjQMJjBgfjkEdpN"
  }
}
201
{
  "select_all_types": [],
  "description": null,
  "created_at": "2019-02-20 13:25:41 UTC",
  "updated_at": "2019-02-20 13:25:41 UTC",
  "ancestry": null,
  "parent_id": null,
  "parent_name": null,
  "id": 447626453,
  "name": "MSwkRmjQMJjBgfjkEdpN",
  "title": "MSwkRmjQMJjBgfjkEdpN",
  "users": [],
  "smart_proxies": [],
  "subnets": [],
  "compute_resources": [],
  "media": [],
  "config_templates": [],
  "ptables": [],
  "provisioning_templates": [],
  "domains": [],
  "realms": [],
  "environments": [],
  "hostgroups": [],
  "locations": [],
  "hosts_count": 0,
  "parameters": []
}

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

organization
required

Validations:

  • Must be a Hash

organization[name]
optional

Validations:

  • Must be a String

organization[description]
optional , nil allowed

Validations:

  • Must be a String

organization[user_ids]
optional , nil allowed

User IDs

Validations:

  • Must be an array of any type

organization[smart_proxy_ids]
optional , nil allowed

Smart proxy IDs

Validations:

  • Must be an array of any type

organization[compute_resource_ids]
optional , nil allowed

Compute resource IDs

Validations:

  • Must be an array of any type

organization[medium_ids]
optional , nil allowed

Medium IDs

Validations:

  • Must be an array of any type

organization[config_template_ids]
optional , nil allowed

Provisioning template IDs

Validations:

  • Must be an array of any type

organization[ptable_ids]
optional , nil allowed

Partition template IDs

Validations:

  • Must be an array of any type

organization[provisioning_template_ids]
optional , nil allowed

Provisioning template IDs

Validations:

  • Must be an array of any type

organization[domain_ids]
optional , nil allowed

Domain IDs

Validations:

  • Must be an array of any type

organization[realm_ids]
optional , nil allowed

Realm IDs

Validations:

  • Must be an array of any type

organization[hostgroup_ids]
optional , nil allowed

Host group IDs

Validations:

  • Must be an array of any type

organization[environment_ids]
optional , nil allowed

Environment IDs

Validations:

  • Must be an array of any type

organization[subnet_ids]
optional , nil allowed

Subnet IDs

Validations:

  • Must be an array of any type

organization[parent_id]
optional , nil allowed

Parent ID

Validations:

  • Must be a number.

organization[ignore_types]
optional , nil allowed

List of resources types that will be automatically associated

Validations:

  • Must be an array of any type

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.


DELETE /api/organizations/:id
Delete an organization

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.