About Shares

About Shares

Contents

Introduction

The Node.js SDK allows you to retrieve, create, and delete shares. The following cde samples can help you get started with tags.

Examples

getShares

This code sample results in the listing of all shares for a file or folder.

Code Sample

thingspace.cloud.getShares({
		virtualfolder: "VZMOBILE",
		success: function(resp) {
			var shares = resp.body.shares.share;
		},
	});`

share

Use this code sample to create shares.

Code Sample

cloud.share({
			name: "my new share",
			resources: [{
				"name" : "share file one",
				"location" : uri	
			}],
			success: function(resp) {
				var share = resp.body.share; 
			},
	});
```	
	
### unshare

Use this code sample to remove shares. 

**Code Sample**

```javascript
thingspace.cloud.unshare({
			shareUid: shareUid,
			success: function(resp) {
				//file has been unshared
			},
	});	

Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.