Examples

POST /katello/api/content_views/909058347/filters
{
  "name": "My Filter",
  "type": "modulemd",
  "original_module_streams": true,
  "content_view_filter": {
    "name": "My Filter",
    "type": "modulemd",
    "original_module_streams": true
  }
}
201
{
  "inclusion": false,
  "original_module_streams": true,
  "id": 703096772,
  "name": "My Filter",
  "description": null,
  "created_at": "2024-02-22 18:27:11 UTC",
  "updated_at": "2024-02-22 18:27:11 UTC",
  "content_view": {
    "composite": false,
    "component_ids": [],
    "duplicate_repositories_to_publish": [],
    "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": [],
    "needs_publish": null,
    "filtered": true,
    "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": "2024-02-22 18:22:29 UTC",
    "updated_at": "2024-02-22 18:22:29 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": "2024-02-22 18:22:29 UTC",
        "description": null,
        "environment_ids": [
          562075838,
          292811013,
          292811013
        ],
        "filters_applied": null,
        "published_at_words": "5 minutes"
      }
    ],
    "components": [],
    "content_view_components": [],
    "activation_keys": [],
    "hosts": [
      {
        "id": 298486374,
        "name": "host2.example.com"
      }
    ],
    "next_version": "2.0",
    "last_published": "2024-02-22 18:22:29 UTC",
    "environments": [
      {
        "id": 562075838,
        "label": "library_label",
        "name": "Library",
        "activation_keys": [],
        "hosts": [],
        "permissions": {
          "readable": true
        }
      },
      {
        "id": 292811013,
        "label": "dev_label",
        "name": "Dev",
        "activation_keys": [],
        "hosts": [
          298486374
        ],
        "permissions": {
          "readable": true
        }
      }
    ]
  },
  "repositories": [],
  "type": "modulemd",
  "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