Creating an extensionJanuary 2016
Added by wiki wiki on October 27, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Create and register a new extension in Connections Cloud.
A successful request returns a unique ID for the extension (extid) as well as the data belonging to the new extension ("extid", "name", "type", "description", "urls" and "payload").
Input
Method URI Description
POST /appregistry/api/v1/extensions Creates a new extension using the information contained in the request body, registers the extension, and returns an ID for the new extension.
Content Type: application/json
Sample Request:
{"name":"test name","type":"test type","description":"test description","payload":{"description":"","type":"community_widget", "payload":{"uniqueInstance":"true","primaryWidget":"false","url":"{webresourcesSvcRef}/web/lconn.comm/communityMembers/communityMembers.xml?etag={version}", "modes":"view fullpage","helpLink":"{helpSvcRef}/topic/com.ibm.lotus.connections.communities.help/t_com_membership_view.html", "itemSet":[{"name":"membersPerPageFullPage","value":"16"},{"name":"membersPerPage","value":"12"}], "showInPalette":"false","defId":"Members"},"name":"Members"},"urls":{"url":"testURL","icon_url":"testIconURL"}} 
Use the table below that represents the expected fields:
Name Type Optional Description
name
string No The name of the extension that is being created.
Example:
"name":"URL Widget"
type
enumerated No String. The type of extension that is being created.
Example:
"type":"community_widget"
Authorized values:
  • community_widget
description
string No A summary of the extension's purpose.
Example:
"description":"Launch an external app in an iFrame within Connections Cloud"
urls
string No One or more URLs that link to the server where the application that corresponds to the extension is hosted.
Example:
"urls":"https://sampleconnectionswidget.mybluemix.net/"
payload
string No The JSON object that describes and controls your extension's behavior. See the payload sample for more information.
Example:
"payload":{<body_of_URL_Widget_JSON>}
Output
Code Description
201
The extension was successfully created.
400
The body of the request was invalid and the extension could not be created.
Examples
Creating an extension requires the POST method. The response includes the ID for the new extension as well as the extension's data.
POST https://apps.collabservnext.com/appregistry/api/v1/extensions/
{"name":"test name","type":"test type","description":"test description","payload":{"description":"","type":"community_widget", "payload":{"uniqueInstance":"true","primaryWidget":"false","url":"{webresourcesSvcRef}/web/lconn.comm/communityMembers/communityMembers.xml?etag={version}", "modes":"view fullpage","helpLink":"{helpSvcRef}/topic/com.ibm.lotus.connections.communities.help/t_com_membership_view.html", "itemSet":[{"name":"membersPerPageFullPage","value":"16"},{"name":"membersPerPage","value":"12"}], "showInPalette":"false","defId":"Members"},"name":"Members"},"urls":{"url":"testURL","icon_url":"testIconURL"}}

Response returned by the server
{"urls":{"icon_url":"testIconURL","url":"testURL"},"type":"test type","name":"jmet test","description":"test description","extid":"2b7e1014-6f2d-4cd0-8b5f-7748c2d4f1b8","payload":{"type":"community_widget","name":"Members","description":"","payload":{"defId":"Members","modes":"view fullpage","primaryWidget":"false","uniqueInstance":"true","showInPalette":"false","helpLink":"{helpSvcRef}\/topic\/com.ibm.lotus.connections.communities.help\/t_com_membership_view.html","itemSet":[{"value":"16","name":"membersPerPageFullPage"},{"value":"12","name":"membersPerPage"}],"url":"{webresourcesSvcRef}\/web\/lconn.comm\/communityMembers\/communityMembers.xml?etag={version}"}}}