GET /api/filters
List all filters

Examples

GET /api/filters
200
{
  "total": 62,
  "subtotal": 62,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "search": null,
      "resource_type": "Architecture",
      "resource_type_label": "Architecture",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 321349837,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_architectures",
          "id": 350275019,
          "resource_type": "Architecture"
        },
        {
          "name": "create_architectures",
          "id": 912770095,
          "resource_type": "Architecture"
        },
        {
          "name": "edit_architectures",
          "id": 874798611,
          "resource_type": "Architecture"
        },
        {
          "name": "destroy_architectures",
          "id": 586604735,
          "resource_type": "Architecture"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "AuthSource",
      "resource_type_label": "Auth source",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 170801529,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_authenticators",
          "id": 687843582,
          "resource_type": "AuthSource"
        },
        {
          "name": "create_authenticators",
          "id": 956119309,
          "resource_type": "AuthSource"
        },
        {
          "name": "edit_authenticators",
          "id": 395314704,
          "resource_type": "AuthSource"
        },
        {
          "name": "destroy_authenticators",
          "id": 1067518973,
          "resource_type": "AuthSource"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Environment",
      "resource_type_label": "Environment",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 1026099682,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_environments",
          "id": 189359466,
          "resource_type": "Environment"
        },
        {
          "name": "create_environments",
          "id": 290807607,
          "resource_type": "Environment"
        },
        {
          "name": "edit_environments",
          "id": 1063021050,
          "resource_type": "Environment"
        },
        {
          "name": "destroy_environments",
          "id": 505866180,
          "resource_type": "Environment"
        },
        {
          "name": "import_environments",
          "id": 782644867,
          "resource_type": "Environment"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Domain",
      "resource_type_label": "Domain",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 340438230,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_domains",
          "id": 623290985,
          "resource_type": "Domain"
        },
        {
          "name": "create_domains",
          "id": 776153244,
          "resource_type": "Domain"
        },
        {
          "name": "edit_domains",
          "id": 914687015,
          "resource_type": "Domain"
        },
        {
          "name": "destroy_domains",
          "id": 808331307,
          "resource_type": "Domain"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "CommonParameter",
      "resource_type_label": "Common parameter",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 222559602,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_globals",
          "id": 101322209,
          "resource_type": "CommonParameter"
        },
        {
          "name": "create_globals",
          "id": 225414942,
          "resource_type": "CommonParameter"
        },
        {
          "name": "edit_globals",
          "id": 363439011,
          "resource_type": "CommonParameter"
        },
        {
          "name": "destroy_globals",
          "id": 318934959,
          "resource_type": "CommonParameter"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Hostgroup",
      "resource_type_label": "Hostgroup",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 977587707,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_hostgroups",
          "id": 51094894,
          "resource_type": "Hostgroup"
        },
        {
          "name": "create_hostgroups",
          "id": 175778558,
          "resource_type": "Hostgroup"
        },
        {
          "name": "edit_hostgroups",
          "id": 214584076,
          "resource_type": "Hostgroup"
        },
        {
          "name": "destroy_hostgroups",
          "id": 1009240528,
          "resource_type": "Hostgroup"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Host",
      "resource_type_label": "Host",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 721145960,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_hosts",
          "id": 988725676,
          "resource_type": "Host"
        },
        {
          "name": "create_hosts",
          "id": 740433627,
          "resource_type": "Host"
        },
        {
          "name": "edit_hosts",
          "id": 561976263,
          "resource_type": "Host"
        },
        {
          "name": "destroy_hosts",
          "id": 619977594,
          "resource_type": "Host"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Medium",
      "resource_type_label": "Medium",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 503111935,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_media",
          "id": 135202335,
          "resource_type": "Medium"
        },
        {
          "name": "create_media",
          "id": 516151662,
          "resource_type": "Medium"
        },
        {
          "name": "edit_media",
          "id": 329176178,
          "resource_type": "Medium"
        },
        {
          "name": "destroy_media",
          "id": 370531533,
          "resource_type": "Medium"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Model",
      "resource_type_label": "Model",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 643462867,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_models",
          "id": 537547377,
          "resource_type": "Model"
        },
        {
          "name": "create_models",
          "id": 509054658,
          "resource_type": "Model"
        },
        {
          "name": "edit_models",
          "id": 173772800,
          "resource_type": "Model"
        },
        {
          "name": "destroy_models",
          "id": 147454802,
          "resource_type": "Model"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Operatingsystem",
      "resource_type_label": "Operatingsystem",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 291325508,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_operatingsystems",
          "id": 940057595,
          "resource_type": "Operatingsystem"
        },
        {
          "name": "create_operatingsystems",
          "id": 1038489107,
          "resource_type": "Operatingsystem"
        },
        {
          "name": "edit_operatingsystems",
          "id": 887912542,
          "resource_type": "Operatingsystem"
        },
        {
          "name": "destroy_operatingsystems",
          "id": 936871672,
          "resource_type": "Operatingsystem"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Ptable",
      "resource_type_label": "Ptable",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 139728896,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_ptables",
          "id": 769440046,
          "resource_type": "Ptable"
        },
        {
          "name": "create_ptables",
          "id": 649673681,
          "resource_type": "Ptable"
        },
        {
          "name": "edit_ptables",
          "id": 1048516464,
          "resource_type": "Ptable"
        },
        {
          "name": "destroy_ptables",
          "id": 953432930,
          "resource_type": "Ptable"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Puppetclass",
      "resource_type_label": "Puppetclass",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 1062414187,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_puppetclasses",
          "id": 849307952,
          "resource_type": "Puppetclass"
        },
        {
          "name": "create_puppetclasses",
          "id": 270035150,
          "resource_type": "Puppetclass"
        },
        {
          "name": "edit_puppetclasses",
          "id": 308015866,
          "resource_type": "Puppetclass"
        },
        {
          "name": "destroy_puppetclasses",
          "id": 76106844,
          "resource_type": "Puppetclass"
        },
        {
          "name": "import_puppetclasses",
          "id": 849710366,
          "resource_type": "Puppetclass"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Usergroup",
      "resource_type_label": "Usergroup",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 557298380,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_usergroups",
          "id": 44766150,
          "resource_type": "Usergroup"
        },
        {
          "name": "create_usergroups",
          "id": 198876242,
          "resource_type": "Usergroup"
        },
        {
          "name": "edit_usergroups",
          "id": 225115552,
          "resource_type": "Usergroup"
        },
        {
          "name": "destroy_usergroups",
          "id": 1032290172,
          "resource_type": "Usergroup"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "User",
      "resource_type_label": "User",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 372277853,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_users",
          "id": 916456187,
          "resource_type": "User"
        },
        {
          "name": "create_users",
          "id": 544005512,
          "resource_type": "User"
        },
        {
          "name": "edit_users",
          "id": 758239380,
          "resource_type": "User"
        },
        {
          "name": "destroy_users",
          "id": 683333673,
          "resource_type": "User"
        }
      ]
    },
    {
      "search": null,
      "resource_type": null,
      "resource_type_label": "(Miscellaneous)",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 255448041,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "access_dashboard",
          "id": 220719619,
          "resource_type": null
        },
        {
          "name": "access_settings",
          "id": 139485686,
          "resource_type": null
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Report",
      "resource_type_label": "Report",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 943645556,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_reports",
          "id": 407024322,
          "resource_type": "Report"
        },
        {
          "name": "destroy_reports",
          "id": 222966002,
          "resource_type": "Report"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "FactValue",
      "resource_type_label": "Fact value",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 679608033,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_facts",
          "id": 958901131,
          "resource_type": "FactValue"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Audit",
      "resource_type_label": "Audit",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 528928374,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_audit_logs",
          "id": 202577195,
          "resource_type": "Audit"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Location",
      "resource_type_label": "Location",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 225912082,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_locations",
          "id": 342396477,
          "resource_type": "Location"
        },
        {
          "name": "create_locations",
          "id": 919402658,
          "resource_type": "Location"
        },
        {
          "name": "edit_locations",
          "id": 360701043,
          "resource_type": "Location"
        },
        {
          "name": "destroy_locations",
          "id": 302614650,
          "resource_type": "Location"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Organization",
      "resource_type_label": "Organization",
      "unlimited?": true,
      "created_at": "2021-05-19 07:59:32 UTC",
      "updated_at": "2021-05-19 07:59:32 UTC",
      "override?": false,
      "id": 980424071,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_organizations",
          "id": 277779683,
          "resource_type": "Organization"
        },
        {
          "name": "create_organizations",
          "id": 839488775,
          "resource_type": "Organization"
        },
        {
          "name": "edit_organizations",
          "id": 810159931,
          "resource_type": "Organization"
        },
        {
          "name": "destroy_organizations",
          "id": 647541143,
          "resource_type": "Organization"
        }
      ]
    }
  ]
}

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 field and order, eg. ‘id 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
limited true, false
location string
location_id integer
organization string
organization_id integer
override true, false
permission string
resource string
role string
role_id integer
search text
unlimited true, false

GET /api/filters/:id
Show a filter

Examples

GET /api/filters/321349837
200
{
  "search": null,
  "resource_type": "Architecture",
  "resource_type_label": "Architecture",
  "unlimited?": true,
  "created_at": "2021-05-19 07:59:32 UTC",
  "updated_at": "2021-05-19 07:59:32 UTC",
  "override?": false,
  "id": 321349837,
  "role": {
    "name": "Manager",
    "id": 1,
    "description": null,
    "origin": "foreman"
  },
  "permissions": [
    {
      "name": "view_architectures",
      "id": 350275019,
      "resource_type": "Architecture"
    },
    {
      "name": "create_architectures",
      "id": 912770095,
      "resource_type": "Architecture"
    },
    {
      "name": "edit_architectures",
      "id": 874798611,
      "resource_type": "Architecture"
    },
    {
      "name": "destroy_architectures",
      "id": 586604735,
      "resource_type": "Architecture"
    }
  ],
  "locations": [],
  "organizations": []
}

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/filters
Create a filter

Examples

POST /api/filters
{
  "filter": {
    "role_id": 8,
    "permission_ids": [
      135202335
    ],
    "organization_ids": [
      447626439
    ],
    "override": true
  }
}
201
{
  "search": null,
  "resource_type": "Medium",
  "resource_type_label": "Medium",
  "unlimited?": true,
  "created_at": "2021-05-19 07:31:34 UTC",
  "updated_at": "2021-05-19 07:31:34 UTC",
  "override?": true,
  "id": 1062414188,
  "role": {
    "name": "Destroy hosts",
    "id": 8,
    "description": null,
    "origin": ""
  },
  "permissions": [
    {
      "name": "view_media",
      "id": 135202335,
      "resource_type": "Medium"
    }
  ],
  "locations": [],
  "organizations": [
    {
      "id": 447626439,
      "name": "org237",
      "title": "org237",
      "description": null
    }
  ]
}

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

filter
required

Validations:

  • Must be a Hash

filter[role_id]
required

Validations:

  • Must be a String

filter[search]
optional , nil allowed

Validations:

  • Must be a String

filter[override]
optional , nil allowed

Validations:

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

filter[permission_ids]
optional , nil allowed

Validations:

  • Must be an array of any type

filter[organization_ids]
optional , nil allowed

Validations:

  • Must be an array of any type

filter[location_ids]
optional , nil allowed

Validations:

  • Must be an array of any type


PUT /api/filters/:id
Update a filter

Examples

PUT /api/filters/1062414190
{
  "filter": {
    "override": false
  }
}
200
{
  "search": null,
  "resource_type": "Domain",
  "resource_type_label": "Domain",
  "unlimited?": false,
  "created_at": "2021-05-19 07:35:42 UTC",
  "updated_at": "2021-05-19 07:35:42 UTC",
  "override?": false,
  "id": 1062414190,
  "role": {
    "name": "New Role",
    "id": 18,
    "description": null,
    "origin": null
  },
  "permissions": [
    {
      "name": "view_domains",
      "id": 623290985,
      "resource_type": "Domain"
    }
  ],
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

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

filter
required

Validations:

  • Must be a Hash

filter[role_id]
optional

Validations:

  • Must be a String

filter[search]
optional , nil allowed

Validations:

  • Must be a String

filter[override]
optional , nil allowed

Validations:

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

filter[permission_ids]
optional , nil allowed

Validations:

  • Must be an array of any type

filter[organization_ids]
optional , nil allowed

Validations:

  • Must be an array of any type

filter[location_ids]
optional , nil allowed

Validations:

  • Must be an array of any type


DELETE /api/filters/:id
Delete a filter

Examples

DELETE /api/filters/10997177
{
  "filter": {}
}
200
{
  "id": 10997177,
  "search": null,
  "role_id": 8,
  "created_at": "2021-05-19T07:59:32.273Z",
  "updated_at": "2021-05-19T07:59:32.273Z",
  "taxonomy_search": null,
  "override": false
}

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