Stacks¶
Stack service at /stacks/{name}¶
Bodhi Stacks
GET¶
Accepted content types:- application/javascript
Return a single Stack from its name.
- Args:
- request (pyramid.request): The current web request.
- Returns:
- dict: A dictionary with key “stack” that indexes the matched Stack.
Make sure this singular stack exists
Response: jsonp
GET¶
Accepted content types:- application/json
- text/json
Return a single Stack from its name.
- Args:
- request (pyramid.request): The current web request.
- Returns:
- dict: A dictionary with key “stack” that indexes the matched Stack.
Make sure this singular stack exists
Response: json
GET¶
Accepted content types:- text/html
Return a single Stack from its name.
- Args:
- request (pyramid.request): The current web request.
- Returns:
- dict: A dictionary with key “stack” that indexes the matched Stack.
Make sure this singular stack exists
Response: new_stack.html
DELETE¶
Delete a stack.
- Args:
- request (pyramid.request): The current web request.
- Returns:
- dict: The dictionary {‘status’: ‘success’}.
Make sure this singular stack exists
Response: json
Stacks service at /stacks/¶
Bodhi Stacks
GET¶
values in the querystring- like (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- name (String) - (optional)
- packages (Sequence) - (optional)
- application/json
- text/json
Return a paginated list of filtered stacks.
- Args:
- request (pyramid.request): The current web request.
- Returns:
- dict: A dictionary with the following keys: “stacks” indexing a list of Stacks that match
- the query, “page” indexing the current page, “pages” indexing the total number of pages, “rows_per_page” indexing how many rows are in a page, and “total” indexing the total number of matched Stacks.
Make sure those packages exist
Response: json
GET¶
values in the querystring- like (String) - (optional)
- chrome (Boolean) - (default: true)
- page (Integer) - (default: 1)
- rows_per_page (Integer) - (default: 20)
- name (String) - (optional)
- packages (Sequence) - (optional)
- text/html
Return a paginated list of filtered stacks.
- Args:
- request (pyramid.request): The current web request.
- Returns:
- dict: A dictionary with the following keys: “stacks” indexing a list of Stacks that match
- the query, “page” indexing the current page, “pages” indexing the total number of pages, “rows_per_page” indexing how many rows are in a page, and “total” indexing the total number of matched Stacks.
Make sure those packages exist
Response: stacks.html
POST¶
values in the body- csrf_token (String)
- name (String)
- packages (Sequence) - (optional)
- description (String) - (optional)
- requirements (String) - (optional)
Save a stack.
- Args:
- request (pyramid.request): The current web request.
- Returns:
- dict: A dictionary with key “stack” that indexes the newly created Stack.
Response: json