Last updated January 25, 2010 23:27, by Paul
Feedicon  
[[Home|&laquo; Back to API Home]] &nbsp; &nbsp; [[MediaTypes|&laquo; Media Types - Overview]]&nbsp; &nbsp; [[MediaTypesWikiForum|&laquo; Media Types - Wiki and Forum]] <h1>Media Types - Project Related Types</h1> This document covers the project related media types. See the links at the top of this page for the other media types. As described in [[MediaTypes|Media Types - Overview]], media types are indicated on each response by the <tt>Content-Type</tt> 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. __TOC__ == Project== The Project resource is the entry point into most of the useful data on the site. The project wiki and forum resources are accessible from here. For a description of the APIs you can use at the Project level, see [[ProjectsAPI|Project Resource]]. === application/vnd.com.kenai.projects+json=== When retrieving a list of projects, the ''projects'' media type will be returned. The project list is paginated by default. To navigate through the complete list of projects, follow the <tt>prev</tt> and/or <tt>next</tt> links. For descriptions of the APIs that return this media type, see [[ProjectsAPI#Project_List_and_Search|Project List and Search]] and [[ProjectsAPI#Project_List_by_User|Project List by User]]. '''Note:''' As described in <a href="ProjectsAPI#Project_List_and_Search:_Extended_Information">Project List and Search: Extended Information</a>, you can use <tt>full=true</tt> in a project API call to get complete information on each project. The information returned for each project matches the content type <a href="#application/vnd.com.kenai.project+json">application/vnd.com.kenai.project+json</a>. <pre> $ curl -s https://kenai.com/api/projects.json?size=1&pretty=true { "href": "https:\/\/kenai.com\/api\/projects.json?pretty=true&size=1", "prev": null, "next": "https:\/\/kenai.com\/api\/projects.json?page=2&pretty=true&size=1", "total": 9, "projects": [ { "href": "https:\/\/kenai.com\/api\/projects\/glassfish.json", "features_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features.json", "members_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/members.json", "name": "glassfish", "display_name": "Glassfish Community", "image": "https:\/\/kenai.com\/images\/defaultProjectImage.jpg", "web_url": "https:\/\/kenai.com\/projects\/glassfish", "tags": "glassfish rails server jruby java" } ], "content_type": "application\/vnd.com.kenai.projects+json" } </pre> {|- border=1 | '''Field''' | '''Description''' |- valign="top" | <tt>projects</tt> | An array of project description hashes. |- valign="top" | <tt>projects[i][href]</tt> | The URL to the resource for a specific project in the project description array. |- valign="top" | <tt>projects[i][features_href]</tt> | The URL to the features collection resource for the project. |- valign="top" | <tt>projects[i][members_href]</tt> | The URL to the members collection resource for the project. |- valign="top" | <tt>projects[i][name]</tt> | The name of the project. |- valign="top" | <tt>projects[i][display_name]</tt> | The title or "display name" of the project. |- valign="top" | <tt>projects[i][image]</tt> | The URL for the project image or logo. |- valign="top" | <tt>projects[i][web_url]</tt> | The URL for the project home page on kenai.com. |- valign="top" | <tt>projects[i][tags]</tt> | A space-separated list of tags for the project. |} === application/vnd.com.kenai.project+json === The resource for an individual project gives more information than is available in the project list. For descriptions of the APIs that return this media type, see [[ProjectsAPI#Project_Info|Project Info]] and <a href="ProjectsAPI#Project_List_and_Search:_Extended_Information">Project List and Search: Extended Information</a>. <pre> $ curl -s https://kenai.com/api/projects/glassfish.json?pretty=true { "href": "https:\/\/kenai.com\/api\/projects\/glassfish.json", "features_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features.json", "name": "glassfish", "display_name": "Glassfish Community", "image": "https:\/\/kenai.com\/images\/defaultProjectImage.jpg", "web_url": "https:\/\/kenai.com\/projects\/glassfish", "tags": "glassfish rails server jruby java", "owner": "craigmcc", "member_count": 2, "description": "The GlassFish community is building free, open source, production-quality, enterprise software.", "created_at": "2009-07-15T01:52:52Z", "updated_at": "2009-07-15T01:52:58Z", "licenses": [ { "href": "https:\/\/kenai.com\/api\/licenses\/1.json", "name": "Apache-2.0", "display_name": "Apache License 2.0", "license_uri": "https:\/\/www.opensource.org\/licenses\/apache2.0.php", "preference_level": "recommended" }, { "href": "https:\/\/kenai.com\/api\/licenses\/8.json", "name": "GPL-2.0", "display_name": "GNU General Public License 2.0", "license_uri": "https:\/\/www.opensource.org\/licenses\/gpl-2.0.php", "preference_level": "recommended" } ], "features": [ { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/downloads.json", "name": "downloads", "display_name": "Downloads", "type": "downloads", "service": "downloads", "url": "https:\/\/kenai.com\/projects\/glassfish\/downloads", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/downloads", "created_at": "2009-07-15T01:52:53Z", "updated_at": "2009-07-15T01:52:53Z" }, { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/forum.json", "name": "forum", "topics_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/forum\/topics.json", "display_name": "General Discussion", "type": "forum", "service": "forum", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/forums\/forum", "created_at": "2009-07-15T01:52:53Z", "updated_at": "2009-07-15T01:52:53Z" }, { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/wiki.json", "name": "wiki", "pages_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/wiki\/pages.json", "display_name": "Wiki", "type": "wiki", "service": "wiki", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/pages\/Home", "created_at": "2009-07-15T01:52:53Z", "updated_at": "2009-07-15T01:52:53Z" }, { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/user.json", "name": "user", "topics_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/user\/topics.json", "display_name": "User Forum", "type": "forum", "service": "forum", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/forums\/user", "created_at": "2009-07-15T01:52:57Z", "updated_at": "2009-07-15T01:52:57Z" }, { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/developer.json", "name": "developer", "topics_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/developer\/topics.json", "display_name": "Developer Forum", "type": "forum", "service": "forum", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/forums\/developer", "created_at": "2009-07-15T01:52:58Z", "updated_at": "2009-07-15T01:52:58Z" } ], "content_type": "application\/vnd.com.kenai.project+json" } </pre> {|- border=1 | '''Field''' | '''Description''' |- | <tt>href</tt> | The URL you are currently fetching. |- | <tt>features_href &nbsp; </tt> | URL to the collection of features for this project. |- | <tt>name</tt> | Name of the project. |- | <tt>display_name</tt> | Title or readable display name of the project. |- | <tt>image</tt> | URL of the project image or logo. |- | <tt>web_url</tt> | URL of the project on kenai.com. |- | <tt>tags</tt> | Space-separated list of project tags. |- | <tt>owner</tt> | Username of the project owner (creator). |- | <tt>member_count</tt> | Integer count of the number of members of the project. |- | <tt>description</tt> | A short paragraph of descriptive text about the project. |- | <tt>licenses</tt> | An array containing <a href="#application/vnd.com.kenai.license+json">license</a> hashes. |- | <tt>features</tt> | An array containing <a href="#application/vnd.com.kenai.feature+json">feature</a> hashes. |} === application/vnd.com.kenai.project.create+json === To create a project, send project data in this structure in a POST request to the project resource. <pre> { "project": { "name": "newproject", "display_name": "New Project", "description": "New Project description", "licenses": ["Apache-2.0"], "tags": "new fresh crisp" } } </pre> For a description of the API that uses this media type, see [[ProjectsAPI#Project_Create|Project Create]]. {|- border=1 | '''Field''' | '''Description''' |- | <tt>project[name]</tt> | Name of the new project. Must only contain letters, numbers or a dash ('-'). |- | <tt>project[display_name]</tt> | Title/display name of the new project. |- | <tt>project[description]</tt> | Descriptive paragraph for the new project. |- | <tt>project[licenses]</tt> | Array of strings corresponding to a name of a valid license from the <a href="#application/vnd.com.kenai.licenses+json">licenses collection</a>. |- | <tt>project[tags]</tt> | Optional space-separated list of tags for the project. |} == Feature == A project is composed of features. Each feature represents a single slice of functionality, like a source control repository, wiki, or issue tracking instance. The feature information is also available through the <a href="#application/vnd.com.kenai.project+json">project</a> entity-body, but can be navigated separately as well. === application/vnd.com.kenai.features+json=== A paginated list of the features for a project. <pre> $ curl -s https://kenai.com/api/projects/glassfish/features.json?pretty=true { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features.json?pretty=true", "prev": null, "next": null, "total": 5, "features": [ { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/downloads.json", "name": "downloads", "display_name": "Downloads", "type": "downloads", "service": "downloads", "url": "https:\/\/kenai.com\/projects\/glassfish\/downloads", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/downloads", "created_at": "2009-07-15T01:52:53Z", "updated_at": "2009-07-15T01:52:53Z" }, { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/forum.json", "name": "forum", "topics_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/forum\/topics.json", "display_name": "General Discussion", "type": "forum", "service": "forum", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/forums\/forum", "created_at": "2009-07-15T01:52:53Z", "updated_at": "2009-07-15T01:52:53Z" }, { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/wiki.json", "name": "wiki", "pages_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/wiki\/pages.json", "display_name": "Wiki", "type": "wiki", "service": "wiki", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/pages\/Home", "created_at": "2009-07-15T01:52:53Z", "updated_at": "2009-07-15T01:52:53Z" }, { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/user.json", "name": "user", "topics_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/user\/topics.json", "display_name": "User Forum", "type": "forum", "service": "forum", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/forums\/user", "created_at": "2009-07-15T01:52:57Z", "updated_at": "2009-07-15T01:52:57Z" }, { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/developer.json", "name": "developer", "topics_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/developer\/topics.json", "display_name": "Developer Forum", "type": "forum", "service": "forum", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/forums\/developer", "created_at": "2009-07-15T01:52:58Z", "updated_at": "2009-07-15T01:52:58Z" } ], "content_type": "application\/vnd.com.kenai.features+json" } </pre> {|- border=1 | '''Field''' | '''Description''' |- | <tt>features &nbsp; </tt> | An array containing <a href="#application/vnd.com.kenai.feature+json">feature</a> hashes. |} === application/vnd.com.kenai.feature+json=== A single feature in a project. Also appears as a sub-structure in the <a href="#application/vnd.com.kenai.project+json">project</a> and <a href="#application/vnd.com.kenai.features+json">features</a> entity bodies. <pre> $ curl -s https://kenai.com/api/projects/glassfish/features/wiki.json?pretty=true { "href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/wiki.json", "name": "wiki", "pages_href": "https:\/\/kenai.com\/api\/projects\/glassfish\/features\/wiki\/pages.json", "display_name": "Wiki", "type": "wiki", "service": "wiki", "web_url": "https:\/\/kenai.com\/projects\/glassfish\/pages\/Home", "created_at": "2009-07-15T01:52:53Z", "updated_at": "2009-07-15T01:52:53Z", "content_type": "application\/vnd.com.kenai.feature+json" } </pre> {|- border=1 | '''Field''' | '''Description''' |- valign="top" | <tt>name</tt> | The short name or identifier of the feature. Must be unique across all features in the project. |- valign="top" | <tt>display_name &nbsp; </tt> | The title or display name of the feature. Shown in the sidebar project navigation. |- valign="top" | <tt>type</tt> | The type of the service provided by the feature. The type is a generic identifier that is independent of any implementation, like 'scm'. |- valign="top" | <tt>service</tt> | The service provided by the feature. Indicates the specific implementation choice for the type, where applicable, like 'subversion'. |- valign="top" | <tt>url</tt> | The URL of the feature. For source control repositories, this is the checkout URL. For issue trackers, the issue tracker URL. |- valign="top" | <tt>web_url</tt> | The location of the feature on the kenai.com website. |- valign="top" | <tt>pages_href</tt> | For wiki features only, the URL to the <a href="#application/vnd.com.kenai.pages+json">pages collection.</a> |- valign="top" | <tt>topics_href</tt> | For forum features only, the URL to the <a href="#application/vnd.com.kenai.topics+json">topics collection.</a> |} === application/vnd.com.kenai.feature.create+json=== When creating a new feature for a project, POST this JSON to the project's features collection URL: <pre> { "feature": { "name": "discussion", "service": "forum", "display_name": "Discussion forum", "description": "Place to discuss" } } </pre> For a description of the API that uses this media type, see [[ProjectsAPI#Project_Feature_Create|Project Feature Create]]. {|- border=1 | '''Field''' | '''Description''' |- valign="top" | <tt>feature[name]</tt> | The short name or identifier of the feature. Must be unique across all features in the project. |- valign="top" | <tt>feature[service]</tt> | The name of the service to use for this feature. A list of available services can be fetched from the <a href="#application/vnd.com.kenai.services+json">services collection.</a> |- valign="top" | <tt>feature[display_name]</tt> | (Optional) The title or display name of the feature. Shown in the sidebar project navigation. |- valign="top" | <tt>feature[url]</tt> | Issue tracker URL for external issue tracker. |- valign="top" | <tt>feature[repository_url]</tt> | Repository URL for external source code repository. |- valign="top" | <tt>feature[browse_url]</tt> | Repository browse URL for browsing an external source code repository. |} == Member == A project has a list of members. Each entry in the list is a single member with a specific role. === application/vnd.com.kenai.members+json=== A paginated list of the members of a project. For a description of the API call that uses this media type, see [[MembersAPI#Member_List|Member List]]. <pre> { "href": "https://kenai.com/api/projects/glassfish/members", "prev": null, "next": null, "total": 2, "members": [ { "href": "https://kenai.com/api/projects/glassfish/members/7", "member_id": "7" "user_name": "ell", "first_name": "pat", "last_name": "ell", "role": "admin", "created_at": "2009-04-16T00:42:33Z", "updated_at": "2009-08-10T04:12:40Z" }, { "href": "https://kenai.com/api/projects/glassfish/members/25", "member_id": "25" "user_name": "mxzzz", "first_name": "Liqun", "last_name": "Smith", "role": "admin", "created_at": "2009-04-16T00:42:38Z", "updated_at": "2009-04-16T00:42:39Z" } ], "content_type": "application/vnd.com.kenai.members+json" } </pre> {|- border=1 | '''Field''' | '''Description''' |- valign="top" | <tt>member_id</tt> | The member id. |- valign="top" | <tt>user_name</tt> | The member's user name. |- valign="top" | <tt>first_name &nbsp; </tt> | The member's first or given name. |- valign="top" | <tt>last_name</tt> | The member's last name or family name. |- valign="top" | <tt>role</tt> | The project role assigned to the member. Values can be:<br/> <tt>admin</tt>: Administrator<br/> <tt>developer</tt>: Software Developer<br/> <tt>content</tt>: Content Developer<br/> <tt>registered</tt>: Observer<br/> <tt>tester</tt>: Tester<br/> |} === application/vnd.com.kenai.member+json=== Individual member info. For a description of the API call that uses this media type, see [[MembersAPI#Member_Info|Member Info]]. <pre> { "href": "https://kenai.com/api/projects/glassfish/members/7", "member_id": "7" "user_name": "ell", "first_name": "pat", "last_name": "ell", "role": "admin", "created_at": "2009-04-16T00:42:33Z", "updated_at": "2009-08-10T04:12:40Z" "content_type": "application/vnd.com.kenai.member+json" } </pre> {|- border=1 | '''Field''' | '''Description''' |- valign="top" | <tt>member_id</tt> | The member id. |- valign="top" | <tt>user_name</tt> | The member's user name. |- valign="top" | <tt>first_name &nbsp; </tt> | The member's first or given name. |- valign="top" | <tt>last_name</tt> | The member's last name or family name. |- valign="top" | <tt>role</tt> | The project role assigned to the member. Values can be:<br/> <tt>admin</tt>: Administrator<br/> <tt>developer</tt>: Software Developer<br/> <tt>content</tt>: Content Developer<br/> <tt>registered</tt>: Observer<br/> <tt>tester</tt>: Tester<br/> |} === application/vnd.com.kenai.member.create+json=== Media type used for creating a member. For a description of the API call that uses this media type, see [[MembersAPI#Create_Member|Create Member]]. <pre> { "member": { "username": "ell", "role": "admin" } } </pre> {|- border=1 | '''Field''' | '''Description''' |- valign="top" | <tt>username</tt> | The name of the user to be added as a member |- valign="top" | <tt>role</tt> | The project role assigned to the member. Note that this field will be ignored and implicitly set to "registered" if the caller is not a project administrator. Values can be:<br/> <tt>admin</tt>: Administrator<br/> <tt>developer</tt>: Software Developer<br/> <tt>content</tt>: Content Developer<br/> <tt>registered</tt>: Observer<br/> <tt>tester</tt>: Tester<br/> |} === application/vnd.com.kenai.member.update+json=== Media type used for updating a member. For a description of the API call that uses this media type, see [[MembersAPI#Update_Member|Update Member]]. <pre> { "member": { "user_name": "", "role": "developer" } } </pre> {|- border=1 | '''Field''' | '''Description''' |- valign="top" | <tt>user_name</tt> | Ignored |- valign="top" | <tt>role</tt> | The new role. Values can be:<br/> <tt>admin</tt>: Administrator<br/> <tt>developer</tt>: Software Developer<br/> <tt>content</tt>: Content Developer<br/> <tt>registered</tt>: Observer<br/> <tt>tester</tt>: Tester<br/> |} == License== Get a list of available open-source licenses in the system. Used to determine the names of licenses for specifying the license at project creation time. === application/vnd.com.kenai.licenses+json=== The list of licenses. '''Note:''' Only OSI-recommended licenses are shown with the License List API. For a description of the API that uses this media type, see [[LicensesAPI|License Resource]]. <pre> $ curl -s https://kenai.com/api/licenses.json?pretty=true&size=2 { "href": "https:\/\/kenai.com\/api\/licenses.json?pretty=true&size=2", "prev": null, "next": "https:\/\/kenai.com\/api\/licenses.json?page=2&pretty=true&size=2", "total": 9, "licenses": [ { "href": "https:\/\/kenai.com\/api\/licenses\/1.json", "name": "Apache-2.0", "display_name": "Apache License 2.0", "license_uri": "https:\/\/www.opensource.org\/licenses\/apache2.0.php", "preference_level": "recommended" }, { "href": "https:\/\/kenai.com\/api\/licenses\/3.json", "name": "BSD", "display_name": "BSD License", "license_uri": "https:\/\/www.opensource.org\/licenses\/bsd-license.php", "preference_level": "recommended" } ], "content_type": "application\/vnd.com.kenai.licenses+json" } </pre> {|- border=1 | '''Field''' | '''Description''' |- | <tt>licenses &nbsp; </tt> | An array of <a href="#application/vnd.com.kenai.license+json">application/vnd.com.kenai.license+json</a> hashes. |} === application/vnd.com.kenai.license+json=== The structure of an individual license. <pre> $ curl -s https://kenai.com/api/licenses/3.json?pretty=true { "href": "https:\/\/kenai.com\/api\/licenses\/3.json", "name": "BSD", "display_name": "BSD License", "license_uri": "https:\/\/www.opensource.org\/licenses\/bsd-license.php", "preference_level": "recommended", "content_type": "application\/vnd.com.kenai.license+json" } </pre> {|- border=1 | '''Field''' | '''Description''' |- valign="top" | <tt>name</tt> | The short name or identifier for a license. Use this value in the Project Create API. |- valign="top" | <tt>display_name</tt> | The title or human-readable name of the license. |- valign="top" | <tt>license_uri</tt> | URL to the full text of the license. |- valign="top" | <tt>preference_level &nbsp;</tt> | Level of OSI recommendation. |} == Service== List of all available services on Kenai.com. Use this resource to look up names of services that can be added as features to a project using the Project Feature Create API. === application/vnd.com.kenai.services+json=== List of all the available services. For a description of the API that uses this media type, see [[ServicesAPI|Service Resource]]. <pre> $ curl -s https://kenai.com/api/services.json?pretty=true { "href": "https:\/\/kenai.com\/api\/services.json?pretty=true", "prev": null, "next": null, "total": 13, "services": [ { "name": "bugzilla", "description": "Bugzilla issue tracking system", "type": "issues", "display_name": "Bugzilla" }, { "name": "lists", "description": "Mailing lists", "type": "lists", "display_name": "Mailing List" }, { "name": "subversion", "description": "Subversion source code repository", "type": "scm", "display_name": "Subversion" }, { "name": "wiki", "description": "Wiki", "type": "wiki", "display_name": "Wiki" }, { "name": "mercurial", "description": "Mercurial source code repository", "type": "scm", "display_name": "Mercurial" }, { "name": "forum", "description": "Web-based forum", "type": "forum", "display_name": "Message Forum" }, { "name": "downloads", "description": "File Downloads", "type": "downloads", "display_name": "Downloads" }, { "name": "external_repository", "description": "External source code repository", "type": "scm", "display_name": "External" }, { "name": "external_issues", "description": "External issue tracking system", "type": "issues", "display_name": "External" }, { "name": "jira", "description": "JIRA issue tracking system", "type": "issues", "display_name": "JIRA" }, { "name": "git", "description": "Git source code repository", "type": "scm", "display_name": "Git" }, { "name": "instant_messenger", "description": "Chat room for project collaboration", "type": "instant_messenger", "display_name": "Project chat room" }, { "name": "wikihome", "description": "Use the Wiki default page as project home page.", "type": "wikihome", "display_name": "WikiHomePage" } ], "content_type": "application\/vnd.com.kenai.services+json" } </pre> {|- border=1 | '''Field''' | '''Description''' |- valign="top" | <tt>services</tt> | Array of service hashes. |- valign="top" | <tt>services[i][name]</tt> | The name of the service. Use this value for the <tt>service</tt> field in the project create structure. |- valign="top" | <tt>services[i][description]</tt> | Human-readable description of the service, for UI display purposes. |- valign="top" | <tt>services[i][type]</tt> | Generic type of service. For example, all source code repositories have the same type: <tt>scm</tt>. |- valign="top" | <tt>services[i][display_name]</tt> | Human-readable name of the service, for UI display purposes. |}
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close