Comments — bodhi 4.0.0 documentation

# Comments

## Comment service at /comments/{id}

Comment submission service

### GET

Accepted content types:

- text/html

Return a single comment from an id.

Args:
  request (pyramid.request): The current request.
Return:
  dict: A dictionary with key “comment” indexing the requested comment.

Ensure that a given comment id exists.

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

Response: comment.html

### GET

Accepted content types:

- application/atom+xml

Return a single comment from an id.

Args:
  request (pyramid.request): The current request.
Return:
  dict: A dictionary with key “comment” indexing the requested comment.

Ensure that a given comment id exists.

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

Response: rss

### GET

Accepted content types:

- application/javascript

Return a single comment from an id.

Args:
  request (pyramid.request): The current request.
Return:
  dict: A dictionary with key “comment” indexing the requested comment.

Ensure that a given comment 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 comment from an id.

Args:
  request (pyramid.request): The current request.
Return:
  dict: A dictionary with key “comment” indexing the requested comment.

Ensure that a given comment id exists.

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

Response: json

## Comments service at /comments/

Comment submission service

### GET

values in the querystring

- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- updates (Sequence) - (optional)
- packages (Sequence) - (optional)
- user (Sequence) - (optional)
- update_owner (Sequence) - (optional)
- ignore_user (Sequence) - (optional)
- since (DateTime) - (optional)

Accepted content types:

- text/html

Search for comments matching given search parameters.

Args:
  request (pyramid.request): The current request.
Return:
  dict: A dictionary with the following key-value pairs:
    comments: An iterable with the current page of matched comments. page: The current page number. pages: The total number of pages. rows_per_page: The number of rows per page. total: The number of items matching the search terms. chrome: A boolean indicating whether to paginate or not.

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 user exists.

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

Make sure the referenced update owner is an existing user.

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

Make sure the ignore_user parameter references an existing user.

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: comments.html

### GET

values in the querystring

- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- updates (Sequence) - (optional)
- packages (Sequence) - (optional)
- user (Sequence) - (optional)
- update_owner (Sequence) - (optional)
- ignore_user (Sequence) - (optional)
- since (DateTime) - (optional)

Accepted content types:

- application/javascript

Search for comments matching given search parameters.

Args:
  request (pyramid.request): The current request.
Return:
  dict: A dictionary with the following key-value pairs:
    comments: An iterable with the current page of matched comments. page: The current page number. pages: The total number of pages. rows_per_page: The number of rows per page. total: The number of items matching the search terms. chrome: A boolean indicating whether to paginate or not.

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 user exists.

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

Make sure the referenced update owner is an existing user.

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

Make sure the ignore_user parameter references an existing user.

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: jsonp

### GET

values in the querystring

- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- updates (Sequence) - (optional)
- packages (Sequence) - (optional)
- user (Sequence) - (optional)
- update_owner (Sequence) - (optional)
- ignore_user (Sequence) - (optional)
- since (DateTime) - (optional)

Accepted content types:

- application/json
- text/json

Search for comments matching given search parameters.

Args:
  request (pyramid.request): The current request.
Return:
  dict: A dictionary with the following key-value pairs:
    comments: An iterable with the current page of matched comments. page: The current page number. pages: The total number of pages. rows_per_page: The number of rows per page. total: The number of items matching the search terms. chrome: A boolean indicating whether to paginate or not.

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 user exists.

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

Make sure the referenced update owner is an existing user.

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

Make sure the ignore_user parameter references an existing user.

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

### GET

values in the querystring

- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- updates (Sequence) - (optional)
- packages (Sequence) - (optional)
- user (Sequence) - (optional)
- update_owner (Sequence) - (optional)
- ignore_user (Sequence) - (optional)
- since (DateTime) - (optional)

Accepted content types:

- application/atom+xml

Search for comments matching given search parameters.

Args:
  request (pyramid.request): The current request.
Return:
  dict: A dictionary with the following key-value pairs:
    comments: An iterable with the current page of matched comments. page: The current page number. pages: The total number of pages. rows_per_page: The number of rows per page. total: The number of items matching the search terms. chrome: A boolean indicating whether to paginate or not.

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 user exists.

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

Make sure the referenced update owner is an existing user.

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

Make sure the ignore_user parameter references an existing user.

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: rss

### POST

values in the body

- csrf_token (String)
- update (String)
- text (String) - (default: “”)
- karma (Integer) - (default: 0)
- karma_critpath (Integer) - (default: 0)
- bug_feedback (Sequence) - (default: [])
- testcase_feedback (Sequence) - (default: [])

Add a new comment to an update.

Args:
  request (pyramid.request): The current request.
Returns:
  dict: A dictionary with two keys. “comment” indexes the new comment, and “caveats” indexes
    an iterable of messages to display to the user.

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 requested update exists.

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

Ensure that bug feedback references bugs associated with the given update.

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

Ensure that the referenced test case exists and is associated with the referenced package.

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

Response: json

## Comments_Rss service at /rss/comments/

Comments RSS feed

### GET

values in the querystring

- like (String) - (optional)
- search (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- updates (Sequence) - (optional)
- packages (Sequence) - (optional)
- user (Sequence) - (optional)
- update_owner (Sequence) - (optional)
- ignore_user (Sequence) - (optional)
- since (DateTime) - (optional)

Search for comments matching given search parameters.

Args:
  request (pyramid.request): The current request.
Return:
  dict: A dictionary with the following key-value pairs:
    comments: An iterable with the current page of matched comments. page: The current page number. pages: The total number of pages. rows_per_page: The number of rows per page. total: The number of items matching the search terms. chrome: A boolean indicating whether to paginate or not.

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 user exists.

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

Make sure the referenced update owner is an existing user.

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

Make sure the ignore_user parameter references an existing user.

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: rss