Examples

POST /api/filters
{
  "filter": {
    "role_id": 22,
    "permission_ids": [
      623290985
    ],
    "override": true,
    "location_ids": [
      373111740
    ],
    "organization_ids": [
      61304186
    ]
  }
}
201
{
  "search": null,
  "resource_type_label": "Domain",
  "unlimited?": true,
  "created_at": "2021-11-26 08:12:16 UTC",
  "updated_at": "2021-11-26 08:12:16 UTC",
  "override?": true,
  "id": 1062414192,
  "resource_type": "Domain",
  "role": {
    "name": "New Role",
    "id": 22,
    "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