Project Wiki Resource
APIs for working with a project's wiki and wiki pages.
Wiki List Pages
Get a paginated list of the pages available in the project's wiki.
| Version | 1.0 |
| Authentication | unnecessary |
| URI | /api/projects/foo/features/wiki/pages.json |
| Request | GET /api/projects/foo/features/wiki/pages.json GET /api/projects/foo/features/wiki/pages.json?q={page-name} |
| Response | Success: 200 OK Content-Type: application/vnd.com.kenai.pages+json |
Wiki Page Preview
Use the preview API to post page text and receive rendered HTML back without saving the page.
| Version | 1.0 |
| Authentication | unnecessary |
| URI | /api/projects/foo/features/wiki/pages/preview.json |
| Request | GET /api/projects/foo/features/wiki/pages/preview.json?text={page-text} POST /api/projects/foo/features/wiki/pages/preview.json For the POST body use one of the following:
|
| Response | Success: 200 OK |
| JSON Request Payload |
{
"text": "Provided markup text of the page",
}
|
| JSON Response Payload |
{
"text": "Provided markup text of the page",
"html": "Rendered HTML of the page",
}
If there were errors converting the markup, the errors will be
returned as follows:
{
"errors":{
"text":"Error messages"
}
}
|
Wiki Get Page
Get the contents of a page in the wiki.
| Version | 1.0 |
| Authentication | unnecessary |
| URI | /api/projects/foo/features/wiki/pages/{page-name}.json - JSON payload /api/projects/foo/features/wiki/pages/{page-name}.txt - Raw text of the page /api/projects/foo/features/wiki/pages/{page-name}/bare.html - Bare HTML version of the page with no documentation or layout |
| Request | GET /api/projects/foo/features/wiki/pages/Home.json |
| Response | Success: 200 OK Failure: 404 Not Found Content-Type: application/vnd.com.kenai.page+json Content-Type: text/plain Content-Type: text/html |
Wiki Get Page Revisions
Get a paginated list of revisions of the page.
| Version | 1.0 |
| Authentication | unnecessary |
| URI | /api/projects/foo/features/wiki/pages/Home/revisions.json |
| Request | GET /api/projects/foo/features/wiki/pages/Home/revisions.json |
| Response | Success: 200 OK Content-Type: application/vnd.com.kenai.page.revisions+json |
Wiki Create/Update Page
Create a new page in the wiki or update an existing one.
| Version | 1.0 |
| Authentication | required |
| URI | /api/projects/foo/features/wiki/pages/{page-name}.json |
| Request | PUT /api/projects/foo/features/wiki/pages/Home.json Content-Type: application/vnd.com.kenai.page.create+json |
| Response | Success: 200 OK - for an update of an existing page Success: 201 Created - for a new page Failure: 422 Unprocessable Entity - Validation errors occurred. See response for details. Failure: 409 Conflict- Version number submitted doesn't match the current page version. |
Wiki Delete Page
Permanently delete a page in the wiki.
| Version | 1.0 |
| Authentication | required |
| URI | /api/projects/foo/features/wiki/pages/Home.json |
| Request | DELETE /api/projects/foo/features/wiki/pages/Home.json |
| Response | Success: 200 OK |
Wiki List Images
Get a paginated list of the images available in the project's wiki. Images are identified by a file name which must be unique for a particular wiki instance.
| Version | 1.0 |
| Authentication | unnecessary |
| URI | /api/projects/foo/features/wiki/images.json |
| Request | GET /api/projects/foo/features/wiki/images.json |
| Response | Success: 200 OK Content-Type: application/vnd.com.kenai.images+json |
| JSON Response Payload | Consists of an "images" array of hashes of describing each image. The "image_url" entry points to the download URL for the image.
{
...
"images": [
{
"href": "https://kenai.com/api/projects/help/features/wiki/images/aracari.png",
"filename": "aracari.png",
"image_url": "http://kenai.com/attachments/wiki_images/help/aracari.png",
"comments": "",
"image_content_type": "image/png",
"person": "pfussell",
"size": 359299,
"width": null,
"height": null,
"created_at": "2008-06-27T02:23:45Z",
"updated_at": "2008-06-27T02:23:45Z"
},
...
],
"content_type": "application/vnd.com.kenai.images+json"
}
|
Wiki Get Image Descriptor
Get information of an image in the wiki.
| Version | 1.0 |
| Authentication | unnecessary |
| URI | /api/projects/foo/features/wiki/images/{image-file-name} /api/projects/foo/features/wiki/images/my-image.png |
| Request | GET /api/projects/foo/features/wiki/images/{image-file-name} |
| Response | Success: 200 OK Failure: 404 Not Found Content-Type: application/vnd.com.kenai.image+json Content-Type: text/html |
Wiki Create/Update Image
Create a new wiki image or update an existing one. Images are identified by a file name which must be unique for a particular wiki instance. 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/wiki/images/{image-file-name} /api/projects/foo/features/wiki/images/my-image.png |
| Request | PUT /api/projects/foo/features/wiki/images/my-image.png 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 image Success: 201 Created - for a new image Failure: 422 Unprocessable Entity - Validation errors occurred. See response for details. |
Wiki Delete Page
Permanently delete an image in the wiki.
| Version | 1.0 |
| Authentication | required |
| URI | /api/projects/foo/features/wiki/images/{image-file-name} /api/projects/foo/features/wiki/images/my-image.png |
| Request | DELETE /api/projects/foo/features/wiki/images/my-image.png |
| Response | Success: 200 OK |





