« Back to API Home « Media Types - Overview « Media Types - Project Related
Media Types - Downloads
This document covers the media types used with the downloads APIs. See the links at the top of this page for the other media types.As described in Media Types - Overview, media types are indicated on each response by the Content-Type header. It is recommended (though not required at this time) that when you include an entity body in a request to the API, you use the appropriate media type in the request Content-Type header as well.
All media types currently use JSON, as indicated by the +json at the end of each type name.
Entry
For a downloads feature, represents a download entry. The APIs for downloads are described at Project Downloads Resource.
application/vnd.com.kenai.entries+json
A paginated list of downloads entries.
For a description of the API that returns this media type, see Downloads List Entries.
$ curl -k -H 'accept: application/json' 'https://kenai.com/api/projects/my-project/features/downloads/entries?pretty=true'
{
"href": "https://kenai.com/api/projects/my-project/features/downloads/entries?pretty=true",
"prev": null,
"next": null,
"total": 2,
"entries": [
{
"href": "https://kenai.com/api/projects/my-project/features/downloads/entries/file1.txt",
"display_name": "file1.txt",
"description": " ",
"tags": "",
"created_at": "2011-05-02T23:51:52Z",
"updated_at": "2011-05-02T23:51:52Z",
"entry_type": "file",
"content_url": "https://kenai.com/projects/my-project/downloads/download/file1.txt",
"entry_content_type": "text/plain",
"size": 41
},
{
"href": "https://kenai.com/api/projects/my-project/features/downloads/entries/some-dir",
"display_name": "some-dir",
"description": " ",
"tags": "",
"created_at": "2011-05-02T23:56:16Z",
"updated_at": "2011-05-02T23:56:16Z",
"entry_type": "directory"
}
],
"content_type": "application/vnd.com.kenai.entries+json"
}
application/vnd.com.kenai.entry+json
Data for an individual downloads entry.
For a description of the API that returns this media type, see Downloads Get Entry Descriptor.
$ curl -k -H 'accept: application/json' https://kenai.com/api/projects/my-project/features/downloads/entries/file1.txt?pretty=true
{
"href": "https://kenai.com/api/projects/my-project/features/downloads/entries/file1.txt",
"display_name": "file1.txt",
"description": " ",
"tags": "",
"created_at": "2011-05-02T23:51:52Z",
"updated_at": "2011-05-02T23:51:52Z",
"entry_type": "file",
"content_url": "https://kenai.com/projects/my-project/downloads/download/file1.txt",
"entry_content_type": "text/plain",
"size": 41,
"content_type": "application/vnd.com.kenai.entry+json"
}
| Field | Description |
| href | URL to the individual entry. |
| display_name | Display name of the entry. |
| description | Description of the entry. |
| tags | Tags of the entry. |
| created_at | Time entry was created. |
| updated_at | Time entry was last updated. |
| entry_type | Type of the entry: file | directory | link_url |
| content_url | URL to the content of the entry. |
| entry_content_type | Content-type of the of the content_url. |
| size | Size of the content. |





