GET /api/permissions
List all permissions

Examples

GET /api/permissions
200
{
  "total": 161,
  "subtotal": 161,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "name": "view_usergroups",
      "id": 44766150,
      "resource_type": "Usergroup"
    },
    {
      "name": "view_hostgroups",
      "id": 51094894,
      "resource_type": "Hostgroup"
    },
    {
      "name": "destroy_external_parameters",
      "id": 63499797,
      "resource_type": "PuppetclassLookupKey"
    },
    {
      "name": "destroy_puppetclasses",
      "id": 76106844,
      "resource_type": "Puppetclass"
    },
    {
      "name": "create_smart_proxies",
      "id": 92702333,
      "resource_type": "SmartProxy"
    },
    {
      "name": "view_plugins",
      "id": 98100110,
      "resource_type": null
    },
    {
      "name": "view_globals",
      "id": 101322209,
      "resource_type": "CommonParameter"
    },
    {
      "name": "view_subnets",
      "id": 102149605,
      "resource_type": "Subnet"
    },
    {
      "name": "view_smart_proxies_autosign",
      "id": 120421563,
      "resource_type": "SmartProxy"
    },
    {
      "name": "console_hosts",
      "id": 124793742,
      "resource_type": "Host"
    },
    {
      "name": "create_realms",
      "id": 125033645,
      "resource_type": "Realm"
    },
    {
      "name": "deploy_provisioning_templates",
      "id": 129164932,
      "resource_type": "ProvisioningTemplate"
    },
    {
      "name": "edit_smart_proxies",
      "id": 130358337,
      "resource_type": "SmartProxy"
    },
    {
      "name": "view_media",
      "id": 135202335,
      "resource_type": "Medium"
    },
    {
      "name": "access_settings",
      "id": 139485686,
      "resource_type": null
    },
    {
      "name": "destroy_trends",
      "id": 139524545,
      "resource_type": "Trend"
    },
    {
      "name": "create_external_variables",
      "id": 140923897,
      "resource_type": "VariableLookupKey"
    },
    {
      "name": "destroy_models",
      "id": 147454802,
      "resource_type": "Model"
    },
    {
      "name": "edit_models",
      "id": 173772800,
      "resource_type": "Model"
    },
    {
      "name": "create_hostgroups",
      "id": 175778558,
      "resource_type": "Hostgroup"
    }
  ]
}

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

resource_type
optional

Validations:

  • Must be a String

name
optional

Validations:

  • Must be a String

Search fields

Field name Type Possible values
name string
resource_type string

GET /api/permissions/:id
Show a permission

Examples

GET /api/permissions/350275019
200
{
  "name": "view_architectures",
  "id": 350275019,
  "resource_type": "Architecture"
}

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.


GET /api/permissions/resource_types
List available resource types

Examples

GET /api/permissions/resource_types
200
{
  "total": 37,
  "subtotal": 37,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "name": "Architecture"
    },
    {
      "name": "Audit"
    },
    {
      "name": "AuthSource"
    },
    {
      "name": "Bookmark"
    },
    {
      "name": "CommonParameter"
    },
    {
      "name": "ComputeProfile"
    },
    {
      "name": "ComputeResource"
    },
    {
      "name": "ConfigReport"
    },
    {
      "name": "Domain"
    },
    {
      "name": "Environment"
    },
    {
      "name": "FactValue"
    },
    {
      "name": "Host"
    },
    {
      "name": "HostClass"
    },
    {
      "name": "Hostgroup"
    },
    {
      "name": "Image"
    },
    {
      "name": "Location"
    },
    {
      "name": "Medium"
    },
    {
      "name": "Model"
    },
    {
      "name": "Operatingsystem"
    },
    {
      "name": "Organization"
    },
    {
      "name": "Parameter"
    },
    {
      "name": "ProvisioningTemplate"
    },
    {
      "name": "Ptable"
    },
    {
      "name": "Puppetclass"
    },
    {
      "name": "PuppetclassLookupKey"
    },
    {
      "name": "Realm"
    },
    {
      "name": "Report"
    },
    {
      "name": "ReportTemplate"
    },
    {
      "name": "Role"
    },
    {
      "name": "Setting"
    },
    {
      "name": "SmartProxy"
    },
    {
      "name": "Subnet"
    },
    {
      "name": "Test::Resource"
    },
    {
      "name": "Trend"
    },
    {
      "name": "User"
    },
    {
      "name": "Usergroup"
    },
    {
      "name": "VariableLookupKey"
    }
  ]
}

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