Releases — bodhi 4.0.0 documentation

# Releases

## Release service at /releases/{name}

Fedora Releases

### GET

Accepted content types:

- text/html

Render a release given by id as HTML.

Args:
  request (pyramid.Request): The current request.
Returns:
  basestring: An HTML representation of the requested Release.

Response: release.html

### GET

Accepted content types:

- application/javascript

Return JSON for a release given by name.

Args:
  request (pyramid.json): The current request.
Returns:
  bodhi.server.models.Release: The matched Release.

Response: jsonp

### GET

Accepted content types:

- application/json
- text/json

Return JSON for a release given by name.

Args:
  request (pyramid.json): The current request.
Returns:
  bodhi.server.models.Release: The matched Release.

Response: json

## Releases service at /releases/

Fedora Releases

### GET

values in the querystring

- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- ids (Sequence) - (optional)
- name (String) - (optional)
- updates (Sequence) - (optional)
- packages (Sequence) - (optional)
- exclude_archived (Boolean) - (optional)

values in the body

- state (String) - (optional)

Accepted content types:

- text/html

Return all releases, collated by state, rendered as HTML.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with a single key, releases, mapping another dictionary that maps release
    states to a list of Release objects that are in that state.

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 updates exist.

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

Make sure referenced packages exist.

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

Response: releases.html

### GET

values in the querystring

- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- ids (Sequence) - (optional)
- name (String) - (optional)
- updates (Sequence) - (optional)
- packages (Sequence) - (optional)
- exclude_archived (Boolean) - (optional)

values in the body

- state (String) - (optional)

Accepted content types:

- application/json
- text/json

Search releases by given criteria, returning the results as JSON.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with the following keys:
    releases: An iterable of the Releases that match the query. page: The current page. pages: The total number of pages. rows_per_page: The number of rows on a page. total: The number of matching results.

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 updates exist.

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

Make sure referenced packages exist.

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

Response: json

### POST

values in the body

- csrf_token (String)
- name (String)
- long_name (String)
- version (String) - (optional)
- branch (String)
- id_prefix (String)
- dist_tag (String)
- stable_tag (String)
- testing_tag (String)
- candidate_tag (String)
- pending_signing_tag (String) - (default: “”)
- pending_testing_tag (String) - (default: “”)
- pending_stable_tag (String) - (default: “”)
- override_tag (String)
- state (String) - (default: “disabled”)
- edited (String) - (optional)
- mail_template (String) - (default: “fedora_errata_template”)
- composed_by_bodhi (Boolean) - (default: true)

Save a release.

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

Args:
  request (pyramid.request): The current request.
Returns:
  bodhi.server.models.Request: The created or edited Request.

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()`

Ensure that the referenced tags are valid Koji tags.

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.

Response: json