Updating 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

Update an existing extension in Connections Cloud.
A successful request returns all of the updated data for the specified extension. The payload for the update request must include all fields, not just the field to be modified.
Input
Method URI Description
PUT /appregistry/api/v1/extensions/{extid} Updates the specified extension using the information in the request body.
Content Type: application/json
Sample Request:
{"name":"name update","type":"type update","description":"description update","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":"testURLupd","icon_url":"testIconURLupd"}}
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":"Modified 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":"Updated widget to modify size of iFrame."
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>}
Name Type Optional Description
extID
string No The ID of the extension to be updated.
Output
Code Description
200
The extension was successfully updated.
400
Bad Request. The body of the request was invalid and the extension could not be updated.
404
The extension specified by the extId parameter could not be found.
Examples
Updating an extension requires the PUT method with a URL that includes the ID of the extension to be modified. The request must include all fields (not just the field being modified).
PUT https://apps.collabservnext.com/appregistry/api/v1/extensions/2b7e1014-6f2d-4cd0-8b5f-7748c2d4f1b8
{"name":"name update","type":"type update","description":"description update","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":"testURLupd","icon_url":"testIconURLupd"}}

Response returned by the server
{"urls":{"icon_url":"testIconURLupd","url":"testURLupd"},"type":"type update","name":"jmet update","extid":"2b7e1014-6f2d-4cd0-8b5f-7748c2d4f1b8","description":"description update","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}"}}}