Last updated May 03, 2011 22:20, by Edwin Goei
Project Downloads Resource
APIs for working with a project's downloads.
Contents
Downloads List Entries
Get a paginated list of the entries available in the project's downloads.
| Version | 1.0 |
| Authentication | unnecessary |
| URI | /api/projects/foo/features/downloads/entries.json |
| Request | GET /api/projects/foo/features/downloads/entries.json |
| Response | Success: 200 OK Content-Type: application/vnd.com.kenai.entries+json |
Downloads Get Entry Descriptor
Get the descriptor of a downloads entry.
| Version | 1.0 |
| Authentication | unnecessary |
| URI | /api/projects/foo/features/downloads/entries/{path} |
| Request | GET /api/projects/foo/features/downloads/entries/file1.txt GET /api/projects/foo/features/downloads/entries/some-dir GET /api/projects/foo/features/downloads/entries/some-dir/file1.txt GET /api/projects/foo/features/downloads/entries// A {path} value of / generates a synthetic descriptor corresponding to the top-level entry along with its children entries. |
| Response | Success: 200 OK Failure: 404 Not Found Content-Type: application/vnd.com.kenai.entry+json |
Downloads Create/Update Entry
Create a new downloads entry or update an existing one. An entry is identified by a path which must be unique for a particular project. The client must perform a multipart/form-data PUT request containing the request parameters specified below.
| Version | 1.0 |
| Authentication | required |
| URI | /api/projects/foo/features/downloads/entries/{path} /api/projects/foo/features/downloads/entries/file1.txt |
| Request | PUT /api/projects/foo/features/downloads/entries/file1.txt Content-Type: multipart/form-data The PUT body must be encoded as multipart/form-data with the following request parameters:
|
| Response | Success: 200 OK - for an update of an existing entry Success: 201 Created - for a new entry Failure: 422 Unprocessable Entity - Validation errors occurred. See response for details. Failure: 409 Conflict- Existing entry does not have the same entity_type as the submitted data. |
Downloads Delete Entry
Permanently delete a downloads entry and any child entries.
| Version | 1.0 |
| Authentication | required |
| URI | /api/projects/foo/features/downloads/entries/{path} |
| Request | DELETE /api/projects/foo/features/downloads/entries/file1.txt DELETE /api/projects/foo/features/downloads/entries/some-dir |
| Response | Success: 200 OK |





