GET /api/roles
List all roles.

Params

Param name Description
page
optional

paginate results


Value: Must be String
per_page
optional

number of entries per request


Value: Must be String

GET /api/roles/:id
Show an role.

Examples

GET /api/roles/1
200
{
  "role": {
    "name": "Manager",
    "id": 1,
    "builtin": 0,
    "permissions": [
      "view_architectures",
      "create_architectures",
      "edit_architectures",
      "destroy_architectures",
      "view_authenticators",
      "create_authenticators",
      "edit_authenticators",
      "destroy_authenticators",
      "view_environments",
      "create_environments",
      "edit_environments",
      "destroy_environments",
      "import_environments",
      "view_external_variables",
      "create_external_variables",
      "edit_external_variables",
      "destroy_external_variables",
      "view_domains",
      "create_domain",
      "edit_domains",
      "destroy_domains",
      "view_globals",
      "create_globals",
      "edit_globals",
      "destroy_globals",
      "view_hostgroups",
      "create_hostgroups",
      "edit_hostgroups",
      "destroy_hostgroups",
      "view_hosts",
      "create_hosts",
      "edit_hosts",
      "destroy_hosts",
      "view_media",
      "create_media",
      "edit_media",
      "destroy_media",
      "view_models",
      "create_models",
      "edit_models",
      "destroy_models",
      "view_operatingsystems",
      "create_operatingsystems",
      "edit_operatingsystems",
      "destroy_operatingsystems",
      "view_ptables",
      "create_ptables",
      "edit_ptables",
      "destroy_ptables",
      "view_puppetclasses",
      "create_puppetclasses",
      "edit_puppetclasses",
      "destroy_puppetclasses",
      "import_puppetclasses",
      "view_usergroups",
      "create_usergroups",
      "edit_usergroups",
      "destroy_usergroups",
      "view_users",
      "create_users",
      "edit_users",
      "destroy_users",
      "access_settings",
      "access_dashboard",
      "view_reports",
      "destroy_reports",
      "view_facts",
      "view_audit_logs",
      "view_statistics",
      "view_locations",
      "edit_locations",
      "create_locations",
      "destroy_locations",
      "view_organizations",
      "edit_organizations",
      "create_organizations",
      "destroy_organizations"
    ]
  }
}

Params

Param name Description
id
required

Value: 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/roles
Create an role.

Examples

POST /api/roles
{
  "role": {
    "name": "staff"
  }
}
200
{
  "role": {
    "name": "staff",
    "id": 11,
    "builtin": 0,
    "permissions": []
  }
}

Params

Param name Description
role
required

Value: Must be a Hash
role[name]
required

Value: Must be String

PUT /api/roles/:id
Update an role.

Examples

PUT /api/roles/1
{
  "role": {}
}
200
{
  "role": {
    "name": "Manager",
    "id": 1,
    "builtin": 0,
    "permissions": [
      "view_architectures",
      "create_architectures",
      "edit_architectures",
      "destroy_architectures",
      "view_authenticators",
      "create_authenticators",
      "edit_authenticators",
      "destroy_authenticators",
      "view_environments",
      "create_environments",
      "edit_environments",
      "destroy_environments",
      "import_environments",
      "view_external_variables",
      "create_external_variables",
      "edit_external_variables",
      "destroy_external_variables",
      "view_domains",
      "create_domain",
      "edit_domains",
      "destroy_domains",
      "view_globals",
      "create_globals",
      "edit_globals",
      "destroy_globals",
      "view_hostgroups",
      "create_hostgroups",
      "edit_hostgroups",
      "destroy_hostgroups",
      "view_hosts",
      "create_hosts",
      "edit_hosts",
      "destroy_hosts",
      "view_media",
      "create_media",
      "edit_media",
      "destroy_media",
      "view_models",
      "create_models",
      "edit_models",
      "destroy_models",
      "view_operatingsystems",
      "create_operatingsystems",
      "edit_operatingsystems",
      "destroy_operatingsystems",
      "view_ptables",
      "create_ptables",
      "edit_ptables",
      "destroy_ptables",
      "view_puppetclasses",
      "create_puppetclasses",
      "edit_puppetclasses",
      "destroy_puppetclasses",
      "import_puppetclasses",
      "view_usergroups",
      "create_usergroups",
      "edit_usergroups",
      "destroy_usergroups",
      "view_users",
      "create_users",
      "edit_users",
      "destroy_users",
      "access_settings",
      "access_dashboard",
      "view_reports",
      "destroy_reports",
      "view_facts",
      "view_audit_logs",
      "view_statistics",
      "view_locations",
      "edit_locations",
      "create_locations",
      "destroy_locations",
      "view_organizations",
      "edit_organizations",
      "create_organizations",
      "destroy_organizations"
    ]
  }
}

Params

Param name Description
id
required

Value: Must be String
role
required

Value: Must be a Hash
role[name]
optional

Value: Must be String

DELETE /api/roles/:id
Delete an role.

Examples

DELETE /api/roles/1
200
{
  "role": {
    "name": "Manager",
    "id": 1,
    "builtin": 0,
    "permissions": [
      "view_architectures",
      "create_architectures",
      "edit_architectures",
      "destroy_architectures",
      "view_authenticators",
      "create_authenticators",
      "edit_authenticators",
      "destroy_authenticators",
      "view_environments",
      "create_environments",
      "edit_environments",
      "destroy_environments",
      "import_environments",
      "view_external_variables",
      "create_external_variables",
      "edit_external_variables",
      "destroy_external_variables",
      "view_domains",
      "create_domain",
      "edit_domains",
      "destroy_domains",
      "view_globals",
      "create_globals",
      "edit_globals",
      "destroy_globals",
      "view_hostgroups",
      "create_hostgroups",
      "edit_hostgroups",
      "destroy_hostgroups",
      "view_hosts",
      "create_hosts",
      "edit_hosts",
      "destroy_hosts",
      "view_media",
      "create_media",
      "edit_media",
      "destroy_media",
      "view_models",
      "create_models",
      "edit_models",
      "destroy_models",
      "view_operatingsystems",
      "create_operatingsystems",
      "edit_operatingsystems",
      "destroy_operatingsystems",
      "view_ptables",
      "create_ptables",
      "edit_ptables",
      "destroy_ptables",
      "view_puppetclasses",
      "create_puppetclasses",
      "edit_puppetclasses",
      "destroy_puppetclasses",
      "import_puppetclasses",
      "view_usergroups",
      "create_usergroups",
      "edit_usergroups",
      "destroy_usergroups",
      "view_users",
      "create_users",
      "edit_users",
      "destroy_users",
      "access_settings",
      "access_dashboard",
      "view_reports",
      "destroy_reports",
      "view_facts",
      "view_audit_logs",
      "view_statistics",
      "view_locations",
      "edit_locations",
      "create_locations",
      "destroy_locations",
      "view_organizations",
      "edit_organizations",
      "create_organizations",
      "destroy_organizations"
    ]
  }
}

Params

Param name Description
id
required

Value: Must be String