示例

POST /api/filters
{
  "filter": {
    "role_id": 8,
    "permission_ids": [
      350275019
    ]
  }
}
201
{
  "search": null,
  "resource_type": "Architecture",
  "unlimited?": true,
  "created_at": "2019-09-11 14:35:59 UTC",
  "updated_at": "2019-09-11 14:35:59 UTC",
  "override?": false,
  "id": 1062414188,
  "role": {
    "name": "Destroy hosts",
    "id": 8,
    "description": null,
    "origin": ""
  },
  "permissions": [
    {
      "name": "view_architectures",
      "id": 350275019,
      "resource_type": "Architecture"
    }
  ],
  "locations": [],
  "organizations": []
}

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

filter
必填

Validations:

  • Must be a Hash

filter[role_id]
必填

Validations:

  • Must be a String

filter[search]
选填 , 允许空值

Validations:

  • Must be a String

filter[override]
选填 , 允许空值

Validations:

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

filter[permission_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

filter[organization_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

filter[location_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type