About Shares

About Shares

Contents

Introduction

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

Examples

share

Use this code sample to create shares.

Code Sample

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


### getShares

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

**Code Sample**

```javascript
thingspace.cloud.getShares({
		virtualfolder: "VZMOBILE",
		success: function(resp) {
			var shares = resp.body.shares.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.