get /katello/api/content_views/:content_view_id/filters
list filters

get /katello/api/content_view_filters
list filters

Examples

GET /katello/api/content_view_filters
200
{
  "total": 7,
  "subtotal": 0,
  "selectable": 0,
  "page": 1,
  "per_page": 20,
  "error": null,
  "search": "name = Simple Filter",
  "sort": {
    "by": "name",
    "order": "asc"
  },
  "results": []
}

Params

Param name Description
search
optional

Search string

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return

Validations:

  • Must be a number.

order
optional

Sort field and order, eg. 'id DESC'

Validations:

  • String

full_result
optional

Whether or not to show all results

Validations:

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

sort_by
optional

Field to sort the results on

Validations:

  • String

sort_order
optional

How to order the sorted results (e.g. ASC for ascending)

Validations:

  • String

content_view_id
required

content view identifier

Validations:

  • Must be a number.

name
optional

filter content view filters by name

Validations:

  • String

types
optional

types of filters

Validations:

  • Must be an array of any type

Search fields

Field name Type Possible values
content_type rpm, deb, package_group, erratum, docker, modulemd
inclusion_type include, exclude
name string

post /katello/api/content_views/:content_view_id/filters
create a filter for a content view

post /katello/api/content_view_filters
create a filter for a content view

Examples

POST /katello/api/content_views/909058347/filters
{
  "name": "My Filter",
  "type": "rpm",
  "content_view_filter": {
    "name": "My Filter",
    "type": "rpm"
  }
}
201
{
  "inclusion": false,
  "original_packages": false,
  "id": 703096779,
  "name": "My Filter",
  "description": null,
  "created_at": "2022-11-08 19:12:34 UTC",
  "updated_at": "2022-11-08 19:12:34 UTC",
  "content_view": {
    "composite": false,
    "component_ids": [],
    "default": false,
    "version_count": 1,
    "latest_version": "1.0",
    "latest_version_id": 172022917,
    "auto_publish": false,
    "solve_dependencies": false,
    "import_only": false,
    "generated_for": "none",
    "related_cv_count": 0,
    "related_composite_cvs": [],
    "repository_ids": [],
    "id": 909058347,
    "name": "Published Library and dev view",
    "label": "published_dev_view",
    "description": "A content view",
    "organization_id": 114267492,
    "organization": {
      "name": "Empty Organization",
      "label": "Empty_Organization",
      "id": 114267492
    },
    "created_at": "2022-11-08 19:09:32 UTC",
    "updated_at": "2022-11-08 19:09:32 UTC",
    "last_task": null,
    "latest_version_environments": [
      {
        "id": 562075838,
        "name": "Library",
        "label": "library_label"
      },
      {
        "id": 292811013,
        "name": "Dev",
        "label": "dev_label"
      },
      {
        "id": 292811013,
        "name": "Dev",
        "label": "dev_label"
      }
    ],
    "repositories": [],
    "versions": [
      {
        "id": 172022917,
        "version": "1.0",
        "published": "2022-11-08 19:09:32 UTC",
        "environment_ids": [
          562075838,
          292811013,
          292811013
        ]
      }
    ],
    "components": [],
    "content_view_components": [],
    "activation_keys": [],
    "hosts": [
      {
        "id": 298486374,
        "name": "host2.example.com"
      }
    ],
    "next_version": "2.0",
    "last_published": "2022-11-08 19:09:32 UTC",
    "environments": [
      {
        "id": 562075838,
        "label": "library_label",
        "name": "library_label",
        "activation_keys": [],
        "hosts": [],
        "permissions": {
          "readable": true
        }
      },
      {
        "id": 292811013,
        "label": "dev_label",
        "name": "dev_label",
        "activation_keys": [],
        "hosts": [
          298486374
        ],
        "permissions": {
          "readable": true
        }
      }
    ]
  },
  "repositories": [],
  "type": "rpm",
  "rules": []
}

Params

Param name Description
content_view_id
required

content view identifier

Validations:

  • Must be a number.

name
required

name of the filter

Validations:

  • String

type
required

type of filter (e.g. deb, rpm, package_group, erratum, erratum_id, erratum_date, docker, modulemd)

Validations:

  • String

original_packages
optional

add all packages without errata to the included/excluded list. (package filter only)

Validations:

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

original_module_streams
optional

add all module streams without errata to the included/excluded list. (module stream filter only)

Validations:

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

inclusion
optional

specifies if content should be included or excluded, default: inclusion=false

Validations:

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

repository_ids
optional

list of repository ids

Validations:

  • Must be an array of any type

description
optional

description of the filter

Validations:

  • String


get /katello/api/content_views/:content_view_id/filters/:id
show filter info

get /katello/api/content_view_filters/:id
show filter info

Examples

GET /katello/api/content_views/405955044/filters/696247676
200
{
  "inclusion": false,
  "original_packages": false,
  "id": 696247676,
  "name": "Simple Filter",
  "description": null,
  "created_at": "2022-11-08 19:09:32 UTC",
  "updated_at": "2022-11-08 19:09:32 UTC",
  "content_view": {
    "composite": false,
    "component_ids": [],
    "default": false,
    "version_count": 2,
    "latest_version": "2.0",
    "latest_version_id": 111397700,
    "auto_publish": false,
    "solve_dependencies": false,
    "import_only": false,
    "generated_for": "none",
    "related_cv_count": 0,
    "related_composite_cvs": [],
    "repository_ids": [
      697316289,
      367202338
    ],
    "id": 405955044,
    "name": "Published LIbrary view",
    "label": "published_library_view",
    "description": "A content view",
    "organization_id": 114267492,
    "organization": {
      "name": "Empty Organization",
      "label": "Empty_Organization",
      "id": 114267492
    },
    "created_at": "2022-11-08 19:09:32 UTC",
    "updated_at": "2022-11-08 19:09:32 UTC",
    "last_task": null,
    "latest_version_environments": [
      {
        "id": 562075838,
        "name": "Library",
        "label": "library_label"
      }
    ],
    "repositories": [
      {
        "id": 697316289,
        "name": "Debian 10 amd64",
        "label": "debian_10_amd64_label",
        "content_type": "deb",
        "product": {
          "id": 867224909,
          "name": "Debian"
        },
        "content_counts": {
          "docker_manifest": 0,
          "docker_tag": 0,
          "rpm": 0,
          "package": 0,
          "package_group": 0,
          "erratum": 0,
          "module_stream": 0
        }
      },
      {
        "id": 367202338,
        "name": "Fedora 17 x86_64",
        "label": "fedora_17_x86_64_label",
        "content_type": "yum",
        "product": {
          "id": 785257261,
          "name": "Fedora"
        },
        "content_counts": {
          "docker_manifest": 0,
          "docker_tag": 0,
          "rpm": 5,
          "package": 5,
          "package_group": 2,
          "erratum": 1,
          "module_stream": 2
        }
      }
    ],
    "versions": [
      {
        "id": 531274492,
        "version": "1.0",
        "published": "2022-11-08 19:09:32 UTC",
        "environment_ids": []
      },
      {
        "id": 111397700,
        "version": "2.0",
        "published": "2022-11-08 19:09:32 UTC",
        "environment_ids": [
          562075838
        ]
      }
    ],
    "components": [],
    "content_view_components": [],
    "activation_keys": [],
    "hosts": [
      {
        "id": 980190962,
        "name": "host1.example.com"
      },
      {
        "id": 529902380,
        "name": "host4.example.com"
      }
    ],
    "next_version": "3.0",
    "last_published": "2022-11-08 19:09:32 UTC",
    "environments": [
      {
        "id": 562075838,
        "label": "library_label",
        "name": "library_label",
        "activation_keys": [],
        "hosts": [
          980190962,
          529902380
        ],
        "permissions": {
          "readable": true
        }
      }
    ]
  },
  "repositories": [],
  "type": "rpm",
  "rules": [
    {
      "content_view_filter_id": 696247676,
      "version": "1.0",
      "id": 36287325,
      "name": "package def",
      "created_at": "2022-11-08 19:09:32 UTC",
      "updated_at": "2022-11-08 19:09:32 UTC"
    },
    {
      "content_view_filter_id": 696247676,
      "id": 345632790,
      "name": "one",
      "created_at": "2022-11-08 19:09:32 UTC",
      "updated_at": "2022-11-08 19:09:32 UTC"
    },
    {
      "content_view_filter_id": 696247676,
      "id": 1022052800,
      "name": "one",
      "created_at": "2022-11-08 19:09:32 UTC",
      "updated_at": "2022-11-08 19:09:32 UTC"
    }
  ]
}

Params

Param name Description
content_view_id
optional

content view identifier

Validations:

  • Must be a number.

id
required

filter identifier

Validations:

  • Must be a number.


put /katello/api/content_views/:content_view_id/filters/:id
update a filter

put /katello/api/content_view_filters/:id
update a filter

Examples

PUT /katello/api/content_views/405955044/filters/696247676
{
  "name": "new name",
  "content_view_filter": {
    "name": "new name"
  }
}
204

Params

Param name Description
content_view_id
optional

content view identifier

Validations:

  • Must be a number.

id
required

filter identifier

Validations:

  • Must be a number.

name
optional

new name for the filter

Validations:

  • String

original_packages
optional

add all packages without errata to the included/excluded list. (package filter only)

Validations:

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

original_module_streams
optional

add all module streams without errata to the included/excluded list. (module stream filter only)

Validations:

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

inclusion
optional

specifies if content should be included or excluded, default: inclusion=false

Validations:

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

repository_ids
optional

list of repository ids

Validations:

  • Must be an array of any type

description
optional

description of the filter

Validations:

  • String


delete /katello/api/content_views/:content_view_id/filters/:id
delete a filter

delete /katello/api/content_view_filters/:id
delete a filter

Examples

DELETE /katello/api/content_views/405955044/filters/696247676
{
  "content_view_filter": {}
}
200
{
  "inclusion": false,
  "original_packages": false,
  "id": 696247676,
  "name": "Simple Filter",
  "description": null,
  "created_at": "2022-11-08 19:09:32 UTC",
  "updated_at": "2022-11-08 19:09:32 UTC",
  "content_view": {
    "composite": false,
    "component_ids": [],
    "default": false,
    "version_count": 2,
    "latest_version": "2.0",
    "latest_version_id": 111397700,
    "auto_publish": false,
    "solve_dependencies": false,
    "import_only": false,
    "generated_for": "none",
    "related_cv_count": 0,
    "related_composite_cvs": [],
    "repository_ids": [
      697316289,
      367202338
    ],
    "id": 405955044,
    "name": "Published LIbrary view",
    "label": "published_library_view",
    "description": "A content view",
    "organization_id": 114267492,
    "organization": {
      "name": "Empty Organization",
      "label": "Empty_Organization",
      "id": 114267492
    },
    "created_at": "2022-11-08 19:09:32 UTC",
    "updated_at": "2022-11-08 19:09:32 UTC",
    "last_task": null,
    "latest_version_environments": [
      {
        "id": 562075838,
        "name": "Library",
        "label": "library_label"
      }
    ],
    "repositories": [
      {
        "id": 697316289,
        "name": "Debian 10 amd64",
        "label": "debian_10_amd64_label",
        "content_type": "deb",
        "product": {
          "id": 867224909,
          "name": "Debian"
        },
        "content_counts": {
          "docker_manifest": 0,
          "docker_tag": 0,
          "rpm": 0,
          "package": 0,
          "package_group": 0,
          "erratum": 0,
          "module_stream": 0
        }
      },
      {
        "id": 367202338,
        "name": "Fedora 17 x86_64",
        "label": "fedora_17_x86_64_label",
        "content_type": "yum",
        "product": {
          "id": 785257261,
          "name": "Fedora"
        },
        "content_counts": {
          "docker_manifest": 0,
          "docker_tag": 0,
          "rpm": 5,
          "package": 5,
          "package_group": 2,
          "erratum": 1,
          "module_stream": 2
        }
      }
    ],
    "versions": [
      {
        "id": 531274492,
        "version": "1.0",
        "published": "2022-11-08 19:09:32 UTC",
        "environment_ids": []
      },
      {
        "id": 111397700,
        "version": "2.0",
        "published": "2022-11-08 19:09:32 UTC",
        "environment_ids": [
          562075838
        ]
      }
    ],
    "components": [],
    "content_view_components": [],
    "activation_keys": [],
    "hosts": [
      {
        "id": 980190962,
        "name": "host1.example.com"
      },
      {
        "id": 529902380,
        "name": "host4.example.com"
      }
    ],
    "next_version": "3.0",
    "last_published": "2022-11-08 19:09:32 UTC",
    "environments": [
      {
        "id": 562075838,
        "label": "library_label",
        "name": "library_label",
        "activation_keys": [],
        "hosts": [
          980190962,
          529902380
        ],
        "permissions": {
          "readable": true
        }
      }
    ]
  },
  "repositories": [],
  "type": "rpm",
  "rules": []
}

Params

Param name Description
content_view_id
optional

content view identifier

Validations:

  • Must be a number.

id
required

filter identifier

Validations:

  • Must be a number.


put /katello/api/content_views/:content_view_id/filters/:id/remove_filter_rules
bulk delete filter rules

put /katello/api/content_view_filters/:id/remove_filter_rules
bulk delete filter rules

Examples

PUT /katello/api/content_view_filters/415240767/remove_filter_rules
{
  "rule_ids": [
    597557834
  ],
  "content_view_filter": {}
}
200
{
  "inclusion": false,
  "id": 415240767,
  "name": "Populated Package Group Filter",
  "description": null,
  "created_at": "2022-11-08 19:09:32 UTC",
  "updated_at": "2022-11-08 19:09:32 UTC",
  "content_view": {
    "composite": false,
    "component_ids": [],
    "default": false,
    "version_count": 2,
    "latest_version": "2.0",
    "latest_version_id": 111397700,
    "auto_publish": false,
    "solve_dependencies": false,
    "import_only": false,
    "generated_for": "none",
    "related_cv_count": 0,
    "related_composite_cvs": [],
    "repository_ids": [
      697316289,
      367202338
    ],
    "id": 405955044,
    "name": "Published LIbrary view",
    "label": "published_library_view",
    "description": "A content view",
    "organization_id": 114267492,
    "organization": {
      "name": "Empty Organization",
      "label": "Empty_Organization",
      "id": 114267492
    },
    "created_at": "2022-11-08 19:09:32 UTC",
    "updated_at": "2022-11-08 19:09:32 UTC",
    "last_task": null,
    "latest_version_environments": [
      {
        "id": 562075838,
        "name": "Library",
        "label": "library_label"
      }
    ],
    "repositories": [
      {
        "id": 697316289,
        "name": "Debian 10 amd64",
        "label": "debian_10_amd64_label",
        "content_type": "deb",
        "product": {
          "id": 867224909,
          "name": "Debian"
        },
        "content_counts": {
          "docker_manifest": 0,
          "docker_tag": 0,
          "rpm": 0,
          "package": 0,
          "package_group": 0,
          "erratum": 0,
          "module_stream": 0
        }
      },
      {
        "id": 367202338,
        "name": "Fedora 17 x86_64",
        "label": "fedora_17_x86_64_label",
        "content_type": "yum",
        "product": {
          "id": 785257261,
          "name": "Fedora"
        },
        "content_counts": {
          "docker_manifest": 0,
          "docker_tag": 0,
          "rpm": 5,
          "package": 5,
          "package_group": 2,
          "erratum": 1,
          "module_stream": 2
        }
      }
    ],
    "versions": [
      {
        "id": 531274492,
        "version": "1.0",
        "published": "2022-11-08 19:09:32 UTC",
        "environment_ids": []
      },
      {
        "id": 111397700,
        "version": "2.0",
        "published": "2022-11-08 19:09:32 UTC",
        "environment_ids": [
          562075838
        ]
      }
    ],
    "components": [],
    "content_view_components": [],
    "activation_keys": [],
    "hosts": [
      {
        "id": 980190962,
        "name": "host1.example.com"
      },
      {
        "id": 529902380,
        "name": "host4.example.com"
      }
    ],
    "next_version": "3.0",
    "last_published": "2022-11-08 19:09:32 UTC",
    "environments": [
      {
        "id": 562075838,
        "label": "library_label",
        "name": "library_label",
        "activation_keys": [],
        "hosts": [
          980190962,
          529902380
        ],
        "permissions": {
          "readable": true
        }
      }
    ]
  },
  "repositories": [],
  "type": "package_group",
  "rules": []
}

Params

Param name Description
content_view_id
optional

content view identifier

Validations:

  • Must be a number.

id
required

filter identifier

Validations:

  • Must be a number.

rule_ids
required

filter identifiers

Validations:

  • Must be an array of number


put /katello/api/content_views/:content_view_id/filters/:id/add_filter_rules
bulk add filter rules

put /katello/api/content_view_filters/:id/add_filter_rules
bulk add filter rules

Examples

PUT /katello/api/content_view_filters/415240767/add_filter_rules
{
  "rules_params": [
    {
      "uuid": "4f9eea2a-a124-497e-8492-828b64444abc"
    }
  ],
  "content_view_filter": {}
}
200
{
  "inclusion": false,
  "id": 415240767,
  "name": "Populated Package Group Filter",
  "description": null,
  "created_at": "2022-11-08 19:09:32 UTC",
  "updated_at": "2022-11-08 19:09:32 UTC",
  "content_view": {
    "composite": false,
    "component_ids": [],
    "default": false,
    "version_count": 2,
    "latest_version": "2.0",
    "latest_version_id": 111397700,
    "auto_publish": false,
    "solve_dependencies": false,
    "import_only": false,
    "generated_for": "none",
    "related_cv_count": 0,
    "related_composite_cvs": [],
    "repository_ids": [
      697316289,
      367202338
    ],
    "id": 405955044,
    "name": "Published LIbrary view",
    "label": "published_library_view",
    "description": "A content view",
    "organization_id": 114267492,
    "organization": {
      "name": "Empty Organization",
      "label": "Empty_Organization",
      "id": 114267492
    },
    "created_at": "2022-11-08 19:09:32 UTC",
    "updated_at": "2022-11-08 19:09:32 UTC",
    "last_task": null,
    "latest_version_environments": [
      {
        "id": 562075838,
        "name": "Library",
        "label": "library_label"
      }
    ],
    "repositories": [
      {
        "id": 697316289,
        "name": "Debian 10 amd64",
        "label": "debian_10_amd64_label",
        "content_type": "deb",
        "product": {
          "id": 867224909,
          "name": "Debian"
        },
        "content_counts": {
          "docker_manifest": 0,
          "docker_tag": 0,
          "rpm": 0,
          "package": 0,
          "package_group": 0,
          "erratum": 0,
          "module_stream": 0
        }
      },
      {
        "id": 367202338,
        "name": "Fedora 17 x86_64",
        "label": "fedora_17_x86_64_label",
        "content_type": "yum",
        "product": {
          "id": 785257261,
          "name": "Fedora"
        },
        "content_counts": {
          "docker_manifest": 0,
          "docker_tag": 0,
          "rpm": 5,
          "package": 5,
          "package_group": 2,
          "erratum": 1,
          "module_stream": 2
        }
      }
    ],
    "versions": [
      {
        "id": 531274492,
        "version": "1.0",
        "published": "2022-11-08 19:09:32 UTC",
        "environment_ids": []
      },
      {
        "id": 111397700,
        "version": "2.0",
        "published": "2022-11-08 19:09:32 UTC",
        "environment_ids": [
          562075838
        ]
      }
    ],
    "components": [],
    "content_view_components": [],
    "activation_keys": [],
    "hosts": [
      {
        "id": 980190962,
        "name": "host1.example.com"
      },
      {
        "id": 529902380,
        "name": "host4.example.com"
      }
    ],
    "next_version": "3.0",
    "last_published": "2022-11-08 19:09:32 UTC",
    "environments": [
      {
        "id": 562075838,
        "label": "library_label",
        "name": "library_label",
        "activation_keys": [],
        "hosts": [
          980190962,
          529902380
        ],
        "permissions": {
          "readable": true
        }
      }
    ]
  },
  "repositories": [],
  "type": "package_group",
  "rules": [
    {
      "content_view_filter_id": 415240767,
      "uuid": "4f9eea2a-a124-497e-8492-828b6d938aaa",
      "id": 597557834,
      "name": "Katello Server Development",
      "created_at": "2022-11-08 19:09:32 UTC",
      "updated_at": "2022-11-08 19:09:32 UTC"
    },
    {
      "content_view_filter_id": 415240767,
      "uuid": "4f9eea2a-a124-497e-8492-828b64444abc",
      "id": 597557836,
      "name": null,
      "created_at": "2022-11-08 19:12:34 UTC",
      "updated_at": "2022-11-08 19:12:34 UTC"
    }
  ]
}

Params

Param name Description
content_view_id
optional

content view identifier

Validations:

  • Must be a number.

id
required

filter identifier

Validations:

  • Must be a number.

rules_params
optional

Rules to be added

Validations:

  • Must be an Array of nested elements

rules_params[name]
optional

package, package group, or docker tag names

Validations:

  • Must be an array of [String]

rules_params[uuid]
optional

package group: uuid

Validations:

  • String

rules_params[version]
optional

package: version

Validations:

  • String

rules_params[architecture]
optional

package: architecture

Validations:

  • String

rules_params[min_version]
optional

package: minimum version

Validations:

  • String

rules_params[max_version]
optional

package: maximum version

Validations:

  • String

rules_params[errata_id]
optional

erratum: id

Validations:

  • String

rules_params[errata_ids]
optional

erratum: IDs or a select all object

Validations:

  • Must be an array of any type

rules_params[start_date]
optional

erratum: start date (YYYY-MM-DD)

Validations:

  • String

rules_params[end_date]
optional

erratum: end date (YYYY-MM-DD)

Validations:

  • String

rules_params[types]
optional

erratum: types (enhancement, bugfix, security)

Validations:

  • Must be an array of any type

rules_params[date_type]
optional

erratum: search using the 'Issued On' or 'Updated On' column of the errata. Values are 'issued'/'updated'

Validations:

  • String

rules_params[module_stream_ids]
optional

module stream ids

Validations:

  • Must be an array of any type