Updates — bodhi 3.1.0 documentation

# Updates

## Update service at /updates/{id}

Update submission service

### GET

Accepted content types:

- text/html

Return a single update from an id, title, or alias.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with the following key mappings:
    update: The update that was requested. can_edit: A boolean indicating whether the update can be edited.

Ensure that a given update id exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: update.html

### GET

Accepted content types:

- application/javascript

Return a single update from an id, title, or alias.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with the following key mappings:
    update: The update that was requested. can_edit: A boolean indicating whether the update can be edited.

Ensure that a given update id exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: jsonp

### GET

Accepted content types:

- application/json
- text/json

Return a single update from an id, title, or alias.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with the following key mappings:
    update: The update that was requested. can_edit: A boolean indicating whether the update can be edited.

Ensure that a given update id exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: json

## Update_Edit service at /updates/{id}/edit

Update submission service

### GET

Accepted content types:

- text/html

Return a single update from an id, title, or alias for the edit form.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with the following key mappings:
    update: The update to be edited. types: The possible values for update types. severities: The possible values for update severity. suggestions: The possible values for update suggestion.

Ensure that a given update id exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure the user has commit privs to these builds or is an admin.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: new_update.html

## Updates service at /updates/

Update submission service

### GET

values in the querystring

- display_user (Boolean) - (default: true)
- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- alias (Sequence) - (optional)
- approved_since (DateTime) - (optional)
- approved_before (DateTime) - (optional)
- bugs (Sequence) - (optional)
- builds (Sequence) - (optional)
- critpath (Boolean) - (optional)
- cves (Sequence) - (optional)
- locked (Boolean) - (optional)
- modified_since (DateTime) - (optional)
- modified_before (DateTime) - (optional)
- packages (Sequence) - (optional)
- pushed (Boolean) - (optional)
- pushed_since (DateTime) - (optional)
- pushed_before (DateTime) - (optional)
- releases (Sequence) - (optional)
- release (String) - (optional)
- request (String) - (optional)
- severity (String) - (optional)
- status (String) - (optional)
- submitted_since (DateTime) - (optional)
- submitted_before (DateTime) - (optional)
- suggest (String) - (optional)
- type (String) - (optional)
- content_type (String) - (optional)
- user (String) - (optional)
- updateid (Sequence) - (optional)

Accepted content types:

- text/html

Search updates by given criteria.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with at least the following key mappings:
    updates: An iterable of the updates that match the query. page: The current page. pages: The total number of pages. rows_per_page: How many results on on the page. total: The total number of updates matching the query. package: The package corresponding to the first update found in the search.

Validate the location against the schema defined on the service.

The content of the location is deserialized, validated and stored in the `request.validated` attribute.

Note

If no schema is defined, this validator does nothing.

Param request: | Current request
Type request: | `Request`
Param schema: | The Colander schema
Param deserializer:
| Optional deserializer, defaults to `cornice.validators.extract_cstruct()`

Make sure the referenced release exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure referenced releases exist.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Convert from strings to our enumerated types.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure the referenced user exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that the list of bugs are all valid integers.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: updates.html

### GET

values in the querystring

- display_user (Boolean) - (default: true)
- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- alias (Sequence) - (optional)
- approved_since (DateTime) - (optional)
- approved_before (DateTime) - (optional)
- bugs (Sequence) - (optional)
- builds (Sequence) - (optional)
- critpath (Boolean) - (optional)
- cves (Sequence) - (optional)
- locked (Boolean) - (optional)
- modified_since (DateTime) - (optional)
- modified_before (DateTime) - (optional)
- packages (Sequence) - (optional)
- pushed (Boolean) - (optional)
- pushed_since (DateTime) - (optional)
- pushed_before (DateTime) - (optional)
- releases (Sequence) - (optional)
- release (String) - (optional)
- request (String) - (optional)
- severity (String) - (optional)
- status (String) - (optional)
- submitted_since (DateTime) - (optional)
- submitted_before (DateTime) - (optional)
- suggest (String) - (optional)
- type (String) - (optional)
- content_type (String) - (optional)
- user (String) - (optional)
- updateid (Sequence) - (optional)

Accepted content types:

- application/javascript

Search updates by given criteria.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with at least the following key mappings:
    updates: An iterable of the updates that match the query. page: The current page. pages: The total number of pages. rows_per_page: How many results on on the page. total: The total number of updates matching the query. package: The package corresponding to the first update found in the search.

Validate the location against the schema defined on the service.

The content of the location is deserialized, validated and stored in the `request.validated` attribute.

Note

If no schema is defined, this validator does nothing.

Param request: | Current request
Type request: | `Request`
Param schema: | The Colander schema
Param deserializer:
| Optional deserializer, defaults to `cornice.validators.extract_cstruct()`

Make sure the referenced release exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure referenced releases exist.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Convert from strings to our enumerated types.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure the referenced user exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that the list of bugs are all valid integers.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: jsonp

### GET

values in the querystring

- display_user (Boolean) - (default: true)
- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- alias (Sequence) - (optional)
- approved_since (DateTime) - (optional)
- approved_before (DateTime) - (optional)
- bugs (Sequence) - (optional)
- builds (Sequence) - (optional)
- critpath (Boolean) - (optional)
- cves (Sequence) - (optional)
- locked (Boolean) - (optional)
- modified_since (DateTime) - (optional)
- modified_before (DateTime) - (optional)
- packages (Sequence) - (optional)
- pushed (Boolean) - (optional)
- pushed_since (DateTime) - (optional)
- pushed_before (DateTime) - (optional)
- releases (Sequence) - (optional)
- release (String) - (optional)
- request (String) - (optional)
- severity (String) - (optional)
- status (String) - (optional)
- submitted_since (DateTime) - (optional)
- submitted_before (DateTime) - (optional)
- suggest (String) - (optional)
- type (String) - (optional)
- content_type (String) - (optional)
- user (String) - (optional)
- updateid (Sequence) - (optional)

Accepted content types:

- application/json
- text/json

Search updates by given criteria.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with at least the following key mappings:
    updates: An iterable of the updates that match the query. page: The current page. pages: The total number of pages. rows_per_page: How many results on on the page. total: The total number of updates matching the query. package: The package corresponding to the first update found in the search.

Validate the location against the schema defined on the service.

The content of the location is deserialized, validated and stored in the `request.validated` attribute.

Note

If no schema is defined, this validator does nothing.

Param request: | Current request
Type request: | `Request`
Param schema: | The Colander schema
Param deserializer:
| Optional deserializer, defaults to `cornice.validators.extract_cstruct()`

Make sure the referenced release exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure referenced releases exist.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Convert from strings to our enumerated types.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure the referenced user exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that the list of bugs are all valid integers.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: json

### GET

values in the querystring

- display_user (Boolean) - (default: true)
- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- alias (Sequence) - (optional)
- approved_since (DateTime) - (optional)
- approved_before (DateTime) - (optional)
- bugs (Sequence) - (optional)
- builds (Sequence) - (optional)
- critpath (Boolean) - (optional)
- cves (Sequence) - (optional)
- locked (Boolean) - (optional)
- modified_since (DateTime) - (optional)
- modified_before (DateTime) - (optional)
- packages (Sequence) - (optional)
- pushed (Boolean) - (optional)
- pushed_since (DateTime) - (optional)
- pushed_before (DateTime) - (optional)
- releases (Sequence) - (optional)
- release (String) - (optional)
- request (String) - (optional)
- severity (String) - (optional)
- status (String) - (optional)
- submitted_since (DateTime) - (optional)
- submitted_before (DateTime) - (optional)
- suggest (String) - (optional)
- type (String) - (optional)
- content_type (String) - (optional)
- user (String) - (optional)
- updateid (Sequence) - (optional)

Accepted content types:

- application/atom+xml

Search updates by given criteria.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with at least the following key mappings:
    updates: An iterable of the updates that match the query. page: The current page. pages: The total number of pages. rows_per_page: How many results on on the page. total: The total number of updates matching the query. package: The package corresponding to the first update found in the search.

Validate the location against the schema defined on the service.

The content of the location is deserialized, validated and stored in the `request.validated` attribute.

Note

If no schema is defined, this validator does nothing.

Param request: | Current request
Type request: | `Request`
Param schema: | The Colander schema
Param deserializer:
| Optional deserializer, defaults to `cornice.validators.extract_cstruct()`

Make sure the referenced release exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure referenced releases exist.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Convert from strings to our enumerated types.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure the referenced user exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that the list of bugs are all valid integers.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: rss

### POST

values in the body

- csrf_token (String)
- builds (Sequence)
- bugs (Sequence) - (optional)
- close_bugs (Boolean) - (default: true)
- type (String)
- request (String) - (default: “testing”)
- severity (String) - (default: “unspecified”)
- notes (String)
- autokarma (Boolean) - (default: true)
- stable_karma (Integer) - (default: 3)
- unstable_karma (Integer) - (default: -3)
- suggest (String) - (default: “unspecified”)
- edited (String) - (default: “”)
- requirements (String) - (optional)
- require_bugs (Boolean) - (default: true)
- require_testcases (Boolean) - (default: true)

Save an update.

This entails either creating a new update, or editing an existing one. To edit an existing update, the update’s original title must be specified in the `edited` parameter.

Args:
  request (pyramid.request): The current request.

Validate the body against the schema defined on the service.

The content of the body is deserialized, validated and stored in the `request.validated` attribute.

Note

If no schema is defined, this validator does nothing.

Param request: | Current request
Type request: | `Request`
Param schema: | The Colander schema
Param deserializer:
| Optional deserializer, defaults to `cornice.validators.extract_cstruct()`

Ensure the the given builds reference valid Build objects.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that the builds parameter is valid for the request.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Check for multiple builds from the same package and same release.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that all of the referenced builds are tagged as candidates.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure the user has commit privs to these builds or is an admin.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Convert from strings to our enumerated types.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Validate the requirements parameter for the stack.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that the list of bugs are all valid integers.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: json

## Updates_Rss service at /rss/updates/

Update submission service RSS feed

### GET

values in the querystring

- display_user (Boolean) - (default: true)
- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- alias (Sequence) - (optional)
- approved_since (DateTime) - (optional)
- approved_before (DateTime) - (optional)
- bugs (Sequence) - (optional)
- builds (Sequence) - (optional)
- critpath (Boolean) - (optional)
- cves (Sequence) - (optional)
- locked (Boolean) - (optional)
- modified_since (DateTime) - (optional)
- modified_before (DateTime) - (optional)
- packages (Sequence) - (optional)
- pushed (Boolean) - (optional)
- pushed_since (DateTime) - (optional)
- pushed_before (DateTime) - (optional)
- releases (Sequence) - (optional)
- release (String) - (optional)
- request (String) - (optional)
- severity (String) - (optional)
- status (String) - (optional)
- submitted_since (DateTime) - (optional)
- submitted_before (DateTime) - (optional)
- suggest (String) - (optional)
- type (String) - (optional)
- content_type (String) - (optional)
- user (String) - (optional)
- updateid (Sequence) - (optional)

Search updates by given criteria.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with at least the following key mappings:
    updates: An iterable of the updates that match the query. page: The current page. pages: The total number of pages. rows_per_page: How many results on on the page. total: The total number of updates matching the query. package: The package corresponding to the first update found in the search.

Validate the location against the schema defined on the service.

The content of the location is deserialized, validated and stored in the `request.validated` attribute.

Note

If no schema is defined, this validator does nothing.

Param request: | Current request
Type request: | `Request`
Param schema: | The Colander schema
Param deserializer:
| Optional deserializer, defaults to `cornice.validators.extract_cstruct()`

Make sure the referenced release exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure referenced releases exist.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Convert from strings to our enumerated types.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Make sure the referenced user exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that the list of bugs are all valid integers.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: rss

## Update_Request service at /updates/{id}/request

Update request service

### POST

values in the body

- csrf_token (String)
- request (String)

Set a specific `bodhi.server.models.UpdateRequest` on a given update.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary mapping the key “update” to the update that was modified.

Validate the body against the schema defined on the service.

The content of the body is deserialized, validated and stored in the `request.validated` attribute.

Note

If no schema is defined, this validator does nothing.

Param request: | Current request
Type request: | `Request`
Param schema: | The Colander schema
Param deserializer:
| Optional deserializer, defaults to `cornice.validators.extract_cstruct()`

Convert from strings to our enumerated types.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that a given update id exists.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that all of the referenced builds are tagged as candidates.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure the user has commit privs to these builds or is an admin.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Ensure that this update is newer than whatever is in the requested state.

Args:
  request (pyramid.util.Request): The current request. kwargs (dict): The kwargs of the related service definition. Unused.

Response: json

## Bodhi1_Update_Redirect service at /updates/{id}/{title}

Redirect to old updates/ALIAS/TITLE urls

### GET

Redirect users from the Bodhi 1 update URL to the new path.

Args:
  request (pyramid.request): The current web request.
Returns:
  pyramid.httpexceptions.HTTPFound: A redirect to the same update in Bodhi’s current URL
    heirarchy.

Response: json