Examples

POST /api/filters
{
  "filter": {
    "role_id": 8,
    "permission_ids": [
      135202335
    ],
    "organization_ids": [
      447626451
    ],
    "override": true
  }
}
201
{
  "search": null,
  "resource_type": "Medium",
  "unlimited?": false,
  "created_at": "2018-07-24 12:56:16 UTC",
  "updated_at": "2018-07-24 12:56:16 UTC",
  "override?": true,
  "id": 1062414201,
  "role": {
    "name": "Destroy hosts",
    "id": 8,
    "description": null,
    "origin": ""
  },
  "permissions": [
    {
      "name": "view_media",
      "id": 135202335,
      "resource_type": "Medium"
    }
  ],
  "locations": [],
  "organizations": [
    {
      "id": 447626451,
      "name": "org117",
      "title": "org117",
      "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

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