contentmanagement

Description

Provides methods to access and modify Content Lifecycle Management related entities (Projects, Environments, Filters, Sources).

Namespace:

contentmanagement

Method: attachFilter

Description:

Attach a Filter to a Project

Parameters:

  • string sessionKey

  • string projectLabel - Project label

  • int id - Filter id to attach

Returns:

  • * struct - Content Filter information

    • int "id"

    • string "name"

    • int "orgId"

    • entityType "Entity type (e.g. 'package')"

    • rule "Rule (e.g. 'deny')"

    • struct - criteria

      • string "matcher" - The matcher type of the filter (e.g. 'contains')

      • string "field" - The entity field to match (e.g. 'name'

      • string "value" - The field value to match (e.g. 'kernel')

Method: attachSource

Description:

Attach a Source to a Project

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

  • string sourceType - Project Source type, e.g. 'software'

  • string sourceLabel - Project Source label

  • int sourcePosition - Project Source position

Returns:

  • * struct - Content Project Source information

    • string "contentProjectLabel"

    • string "type"

    • string "state"

    • string "channelLabel" - (If type is SW_CHANNEL) The label of channel associated with the source

Method: attachSource

Description:

Attach a Source to a Project

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

  • string sourceType - Project Source type, e.g. 'software'

  • string sourceLabel - Project Source label

Returns:

  • * struct - Content Project Source information

    • string "contentProjectLabel"

    • string "type"

    • string "state"

    • string "channelLabel" - (If type is SW_CHANNEL) The label of channel associated with the source

Method: buildProject

Description:

Build a Project

Parameters:

  • string sessionKey

  • string projectLabel - Project label

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: buildProject

Description:

Build a Project

Parameters:

  • string sessionKey

  • string projectLabel - Project label

  • string message - Log message to be assigned to the build

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: createEnvironment

Description:

Create a Content Environment and appends it behind given Content Environment

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

  • string predecessorLabel - Predecessor Environment label

  • string label - new Content Environment label

  • string name - new Content Environment name

  • string description - new Content Environment description

Returns:

  • * struct - Content Environment information

    • int "id"

    • string "label"

    • string "name"

    • string "description"

    • int "version"

    • string "status"

    • string "contentProjectLabel"

    • string "previousEnvironmentLabel"

    • string "nextEnvironmentLabel"

Method: createFilter

Description:

Create a Content Filter

The following filters are available (you can get the list in machine-readable format using
the listFilterCriteria() endpoint):
Package filtering:
by name - field: name; matchers: contains or matches
by name, epoch, version, release and architecture - field: nevr or nevra; matcher: equals
Errata/Patch filtering:
 by advisory name - field: advisory_name; matcher: equals or matches
 by type - field: advisory_type (e.g. 'Security Advisory'); matcher: equals
 by synopsis - field: synopsis; matcher: equals, contains or matches
 by keyword - field: keyword; matcher: contains
 by date - field: issue_date; matcher: greater or greatereq
 by affected package name - field: package_name; matcher: contains_pkg_name or matches_pkg_name
 by affected package with version - field: package_nevr; matcher: contains_pkg_lt_evr,
contains_pkg_le_evr, contains_pkg_eq_evr, contains_pkg_ge_evr or contains_pkg_gt_evr
Appstream module/stream filtering:
by module name, stream - field: module_stream; matcher: equals; value: modulaneme:stream
Note: Only 'allow' rule is supported for appstream filters.
Note: The 'matches' matcher works on Java regular expressions.

Parameters:

  • string sessionKey

  • string name - Filter name

  • string rule - Filter rule ('deny' or 'allow')

  • string entityType - Filter entityType ('package' or 'erratum')

  • struct - criteria

    • string "matcher" - The matcher type of the filter (e.g. 'contains')

    • string "field" - The entity field to match (e.g. 'name'

    • string "value" - The field value to match (e.g. 'kernel')

Returns:

  • * struct - Content Filter information

    • int "id"

    • string "name"

    • int "orgId"

    • entityType "Entity type (e.g. 'package')"

    • rule "Rule (e.g. 'deny')"

    • struct - criteria

      • string "matcher" - The matcher type of the filter (e.g. 'contains')

      • string "field" - The entity field to match (e.g. 'name'

      • string "value" - The field value to match (e.g. 'kernel')

Method: createProject

Description:

Create Content Project

Parameters:

  • string sessionKey

  • string label - Content Project label

  • string name - Content Project name

  • string description - Content Project description

Returns:

  • * struct - Content Project information

    • int "id"

    • string "label"

    • string "name"

    • string "description"

    • int "orgId"

    • string "firstEnvironment label"

Method: detachFilter

Description:

Detach a Filter from a Project

Parameters:

  • string sessionKey

  • string projectLabel - Project label

  • int id - Filter id to detach

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: detachSource

Description:

Detach a Source from a Project

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

  • string sourceType - Project Source type, e.g. 'software'

  • string sourceLabel - Project Source label

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: listFilterCriteria

Description:

List of available filter criteria

Parameters:

  • string sessionKey

Returns:

  • array :

    • struct - Filter Criteria

      • string "type"

      • string "matcher"

      • string "field"

Method: listFilters

Description:

List all Content Filters visible to given user

Parameters:

  • string sessionKey

Returns:

  • array :

  • struct - Content Filter information

    • int "id"

    • string "name"

    • int "orgId"

    • entityType "Entity type (e.g. 'package')"

    • rule "Rule (e.g. 'deny')"

    • struct - criteria

      • string "matcher" - The matcher type of the filter (e.g. 'contains')

      • string "field" - The entity field to match (e.g. 'name'

      • string "value" - The field value to match (e.g. 'kernel')

Method: listProjectEnvironments

Description:

List Environments in a Content Project with the respect to their ordering

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

Returns:

  • array :

  • struct - Content Environment information

    • int "id"

    • string "label"

    • string "name"

    • string "description"

    • int "version"

    • string "status"

    • string "contentProjectLabel"

    • string "previousEnvironmentLabel"

    • string "nextEnvironmentLabel"

Method: listProjectFilters

Description:

List all Filters associated with a Project

Parameters:

  • string sessionKey

  • string projectLabel - Project label

Returns:

  • array :

  • struct - Assigned Content Filter information

    • string "state"

  • struct - Content Filter information

    • int "id"

    • string "name"

    • int "orgId"

    • entityType "Entity type (e.g. 'package')"

    • rule "Rule (e.g. 'deny')"

    • struct - criteria

      • string "matcher" - The matcher type of the filter (e.g. 'contains')

      • string "field" - The entity field to match (e.g. 'name'

      • string "value" - The field value to match (e.g. 'kernel')

Method: listProjectSources

Description:

List Content Project Sources

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

Returns:

  • array :

  • struct - Content Project Source information

    • string "contentProjectLabel"

    • string "type"

    • string "state"

    • string "channelLabel" - (If type is SW_CHANNEL) The label of channel associated with the source

Method: listProjects

Description:

List Content Projects visible to user

Parameters:

  • string sessionKey

Returns:

  • array :

  • struct - Content Project information

    • int "id"

    • string "label"

    • string "name"

    • string "description"

    • int "orgId"

    • string "firstEnvironment label"

Method: lookupEnvironment

Description:

Look up Content Environment based on Content Project and Content Environment label

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

  • string envLabel - Content Environment label

Returns:

  • * struct - Content Environment information

    • int "id"

    • string "label"

    • string "name"

    • string "description"

    • int "version"

    • string "status"

    • string "contentProjectLabel"

    • string "previousEnvironmentLabel"

    • string "nextEnvironmentLabel"

Method: lookupFilter

Description:

Lookup a Content Filter by id

Parameters:

  • string sessionKey

  • int id - Filter id

Returns:

  • * struct - Content Filter information

    • int "id"

    • string "name"

    • int "orgId"

    • entityType "Entity type (e.g. 'package')"

    • rule "Rule (e.g. 'deny')"

    • struct - criteria

      • string "matcher" - The matcher type of the filter (e.g. 'contains')

      • string "field" - The entity field to match (e.g. 'name'

      • string "value" - The field value to match (e.g. 'kernel')

Method: lookupProject

Description:

Look up Content Project with given label

Parameters:

  • string sessionKey

  • string label - Content Project label

Returns:

  • * struct - Content Project information

    • int "id"

    • string "label"

    • string "name"

    • string "description"

    • int "orgId"

    • string "firstEnvironment label"

Method: lookupSource

Description:

Look up Content Project Source

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

  • string sourceType - Project Source type, e.g. 'software'

  • string sourceLabel - Project Source label

Returns:

  • * struct - Content Project Source information

    • string "contentProjectLabel"

    • string "type"

    • string "state"

    • string "channelLabel" - (If type is SW_CHANNEL) The label of channel associated with the source

Method: promoteProject

Description:

Promote an Environment in a Project

Parameters:

  • string sessionKey

  • string projectLabel - Project label

  • string envLabel - Environment label

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: removeEnvironment

Description:

Remove a Content Environment

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

  • string envLabel - Content Environment label

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: removeFilter

Description:

Remove a Content Filter

Parameters:

  • string sessionKey

  • int id - Filter id

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: removeProject

Description:

Remove Content Project

Parameters:

  • string sessionKey

  • string label - Content Project label

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: updateEnvironment

Description:

Update Content Environment with given label

Parameters:

  • string sessionKey

  • string projectLabel - Content Project label

  • string envLabel - Content Environment label

  • struct - data

    • string "name" - Content Environment name

    • string "description" - Content Environment description

Returns:

  • * struct - Content Environment information

    • int "id"

    • string "label"

    • string "name"

    • string "description"

    • int "version"

    • string "status"

    • string "contentProjectLabel"

    • string "previousEnvironmentLabel"

    • string "nextEnvironmentLabel"

Method: updateFilter

Description:

Update a Content Filter

See also: createFilter(), listFilterCriteria()

Parameters:

  • string sessionKey

  • int filterId - Filter id

  • string name - New filter name

  • string rule - New filter rule ('deny' or 'allow')

  • struct - criteria

    • string "matcher" - The matcher type of the filter (e.g. 'contains')

    • string "field" - The entity field to match (e.g. 'name'

    • string "value" - The field value to match (e.g. 'kernel')

Returns:

  • * struct - Content Filter information

    • int "id"

    • string "name"

    • int "orgId"

    • entityType "Entity type (e.g. 'package')"

    • rule "Rule (e.g. 'deny')"

    • struct - criteria

      • string "matcher" - The matcher type of the filter (e.g. 'contains')

      • string "field" - The entity field to match (e.g. 'name'

      • string "value" - The field value to match (e.g. 'kernel')

Method: updateProject

Description:

Update Content Project with given label

Parameters:

  • string sessionKey

  • string label - Content Project label

  • struct - data

    • string "name" - Content Project name

    • string "description" - Content Project description

Returns:

  • * struct - Content Project information

    • int "id"

    • string "label"

    • string "name"

    • string "description"

    • int "orgId"

    • string "firstEnvironment label"