Last updated January 25, 2010 23:27, by Paul
Feedicon  

« Back to API Home     « Media Types - Overview    « Media Types - Wiki and Forum

Media Types - Project Related Types

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 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.


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 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 prev and/or next links.

For descriptions of the APIs that return this media type, see Project List and Search and Project List by User.

Note: As described in Project List and Search: Extended Information, you can use full=true in a project API call to get complete information on each project. The information returned for each project matches the content type application/vnd.com.kenai.project+json.

$ 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"
}

Field Description
projects An array of project description hashes.
projects[i][href] The URL to the resource for a specific project in the project description array.
projects[i][features_href] The URL to the features collection resource for the project.
projects[i][members_href] The URL to the members collection resource for the project.
projects[i][name] The name of the project.
projects[i][display_name] The title or "display name" of the project.
projects[i][image] The URL for the project image or logo.
projects[i][web_url] The URL for the project home page on kenai.com.
projects[i][tags] 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 Project Info and Project List and Search: Extended Information.

$ 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"
}

Field Description
href The URL you are currently fetching.
features_href   URL to the collection of features for this project.
name Name of the project.
display_name Title or readable display name of the project.
image URL of the project image or logo.
web_url URL of the project on kenai.com.
tags Space-separated list of project tags.
owner Username of the project owner (creator).
member_count Integer count of the number of members of the project.
description A short paragraph of descriptive text about the project.
licenses An array containing license hashes.
features An array containing feature 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.

{
  "project": {
    "name": "newproject",
    "display_name": "New Project",
    "description": "New Project description",
    "licenses": ["Apache-2.0"],
    "tags": "new fresh crisp"
  }
}

For a description of the API that uses this media type, see Project Create.

Field Description
project[name] Name of the new project. Must only contain letters, numbers or a dash ('-').
project[display_name] Title/display name of the new project.
project[description] Descriptive paragraph for the new project.
project[licenses] Array of strings corresponding to a name of a valid license from the licenses collection.
project[tags] 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 project entity-body, but can be navigated separately as well.

application/vnd.com.kenai.features+json

A paginated list of the features for a project.

$ 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"
}

Field Description
features   An array containing feature hashes.

application/vnd.com.kenai.feature+json

A single feature in a project. Also appears as a sub-structure in the project and features entity bodies.

$ 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"
}

Field Description
name The short name or identifier of the feature. Must be unique across all features in the project.
display_name   The title or display name of the feature. Shown in the sidebar project navigation.
type The type of the service provided by the feature. The type is a generic identifier that is independent of any implementation, like 'scm'.
service The service provided by the feature. Indicates the specific implementation choice for the type, where applicable, like 'subversion'.
url The URL of the feature. For source control repositories, this is the checkout URL. For issue trackers, the issue tracker URL.
web_url The location of the feature on the kenai.com website.
pages_href For wiki features only, the URL to the pages collection.
topics_href For forum features only, the URL to the topics collection.

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:

{
  "feature": {
    "name": "discussion",
    "service": "forum",
    "display_name": "Discussion forum",
    "description": "Place to discuss"
  }
}

For a description of the API that uses this media type, see Project Feature Create.

Field Description
feature[name] The short name or identifier of the feature. Must be unique across all features in the project.
feature[service] The name of the service to use for this feature. A list of available services can be fetched from the services collection.
feature[display_name] (Optional) The title or display name of the feature. Shown in the sidebar project navigation.
feature[url] Issue tracker URL for external issue tracker.
feature[repository_url] Repository URL for external source code repository.
feature[browse_url] 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 Member List.

{
"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"
}

Field Description
member_id The member id.
user_name The member's user name.
first_name   The member's first or given name.
last_name The member's last name or family name.
role The project role assigned to the member. Values can be:
admin: Administrator
developer: Software Developer
content: Content Developer
registered: Observer
tester: Tester

application/vnd.com.kenai.member+json

Individual member info.

For a description of the API call that uses this media type, see Member Info.

 {
   "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"
}

Field Description
member_id The member id.
user_name The member's user name.
first_name   The member's first or given name.
last_name The member's last name or family name.
role The project role assigned to the member. Values can be:
admin: Administrator
developer: Software Developer
content: Content Developer
registered: Observer
tester: Tester

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 Create Member.

{
   "member":
   {
      "username": "ell",
      "role": "admin"
   }
 }

Field Description
username The name of the user to be added as a member
role 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:
admin: Administrator
developer: Software Developer
content: Content Developer
registered: Observer
tester: Tester

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 Update Member.

{
   "member":
   {
      "user_name": "",
      "role": "developer"
   }
 }

Field Description
user_name Ignored
role The new role. Values can be:
admin: Administrator
developer: Software Developer
content: Content Developer
registered: Observer
tester: Tester

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 License Resource.

$ 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"
}

Field Description
licenses   An array of application/vnd.com.kenai.license+json hashes.

application/vnd.com.kenai.license+json

The structure of an individual license.

$ 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"
}

Field Description
name The short name or identifier for a license. Use this value in the Project Create API.
display_name The title or human-readable name of the license.
license_uri URL to the full text of the license.
preference_level   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 Service Resource.

$ 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"
}

Field Description
services Array of service hashes.
services[i][name] The name of the service. Use this value for the service field in the project create structure.
services[i][description] Human-readable description of the service, for UI display purposes.
services[i][type] Generic type of service. For example, all source code repositories have the same type: scm.
services[i][display_name] 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 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close