GET /api/filters
List all filters

Examples

GET /api/filters
200
{
  "total": 59,
  "subtotal": 59,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "search": null,
      "resource_type_label": "Architecture",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 321349837,
      "resource_type": "Architecture",
      "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_label": "Auth source",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 170801529,
      "resource_type": "AuthSource",
      "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_label": "Domain",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 340438230,
      "resource_type": "Domain",
      "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_label": "Common parameter",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 222559602,
      "resource_type": "CommonParameter",
      "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_label": "Hostgroup",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 977587707,
      "resource_type": "Hostgroup",
      "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_label": "Host",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 721145960,
      "resource_type": "Host",
      "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_label": "Medium",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 503111935,
      "resource_type": "Medium",
      "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_label": "Model",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 643462867,
      "resource_type": "Model",
      "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_label": "Operatingsystem",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 291325508,
      "resource_type": "Operatingsystem",
      "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_label": "Ptable",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 139728896,
      "resource_type": "Ptable",
      "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_label": "Puppetclass",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 1062414187,
      "resource_type": "Puppetclass",
      "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_label": "Usergroup",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 557298380,
      "resource_type": "Usergroup",
      "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_label": "User",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 372277853,
      "resource_type": "User",
      "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_label": "(Miscellaneous)",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 255448041,
      "resource_type": null,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "access_settings",
          "id": 139485686,
          "resource_type": null
        },
        {
          "name": "access_dashboard",
          "id": 220719619,
          "resource_type": null
        }
      ]
    },
    {
      "search": null,
      "resource_type_label": "Report",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 943645556,
      "resource_type": "Report",
      "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_label": "Fact value",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 679608033,
      "resource_type": "FactValue",
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_facts",
          "id": 958901131,
          "resource_type": "FactValue"
        }
      ]
    },
    {
      "search": null,
      "resource_type_label": "Audit",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 528928374,
      "resource_type": "Audit",
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_audit_logs",
          "id": 202577195,
          "resource_type": "Audit"
        }
      ]
    },
    {
      "search": null,
      "resource_type_label": "Location",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 225912082,
      "resource_type": "Location",
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_locations",
          "id": 342396477,
          "resource_type": "Location"
        },
        {
          "name": "edit_locations",
          "id": 360701043,
          "resource_type": "Location"
        },
        {
          "name": "create_locations",
          "id": 919402658,
          "resource_type": "Location"
        },
        {
          "name": "destroy_locations",
          "id": 302614650,
          "resource_type": "Location"
        }
      ]
    },
    {
      "search": null,
      "resource_type_label": "Organization",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 980424071,
      "resource_type": "Organization",
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_organizations",
          "id": 277779683,
          "resource_type": "Organization"
        },
        {
          "name": "edit_organizations",
          "id": 810159931,
          "resource_type": "Organization"
        },
        {
          "name": "create_organizations",
          "id": 839488775,
          "resource_type": "Organization"
        },
        {
          "name": "destroy_organizations",
          "id": 647541143,
          "resource_type": "Organization"
        }
      ]
    },
    {
      "search": null,
      "resource_type_label": "Realm",
      "unlimited?": true,
      "created_at": "2022-03-29 09:14:44 UTC",
      "updated_at": "2022-03-29 09:14:44 UTC",
      "override?": false,
      "id": 343831726,
      "resource_type": "Realm",
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_realms",
          "id": 959316070,
          "resource_type": "Realm"
        },
        {
          "name": "create_realms",
          "id": 125033645,
          "resource_type": "Realm"
        },
        {
          "name": "edit_realms",
          "id": 327146991,
          "resource_type": "Realm"
        },
        {
          "name": "destroy_realms",
          "id": 300788035,
          "resource_type": "Realm"
        }
      ]
    }
  ]
}

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
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_label": "Architecture",
  "unlimited?": true,
  "created_at": "2022-03-29 09:14:44 UTC",
  "updated_at": "2022-03-29 09:14:44 UTC",
  "override?": false,
  "id": 321349837,
  "resource_type": "Architecture",
  "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": 84,
    "permission_ids": [
      623290985
    ],
    "override": true,
    "location_ids": [
      373111740
    ],
    "organization_ids": [
      61304186
    ]
  }
}
201
{
  "search": null,
  "resource_type_label": "Domain",
  "unlimited?": true,
  "created_at": "2022-03-29 08:24:52 UTC",
  "updated_at": "2022-03-29 08:24:52 UTC",
  "override?": true,
  "id": 1062414218,
  "resource_type": "Domain",
  "role": {
    "name": "New Role",
    "id": 84,
    "description": null,
    "origin": null
  },
  "permissions": [
    {
      "name": "view_domains",
      "id": 623290985,
      "resource_type": "Domain"
    }
  ],
  "locations": [
    {
      "id": 373111740,
      "name": "Location 2",
      "title": "Location 2",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 61304186,
      "name": "Organization 2",
      "title": "Organization 2",
      "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/1062414220
{
  "filter": {
    "override": false
  }
}
200
{
  "search": null,
  "resource_type_label": "Domain",
  "unlimited?": false,
  "created_at": "2022-03-29 08:24:53 UTC",
  "updated_at": "2022-03-29 08:24:53 UTC",
  "override?": false,
  "id": 1062414220,
  "resource_type": "Domain",
  "role": {
    "name": "New Role",
    "id": 86,
    "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": "2022-03-29T09:14:44.533Z",
  "updated_at": "2022-03-29T09:14:44.533Z",
  "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