Product Documentation

Share API

Important: This topic describes deprecated functions and will be removed from the documentation. For more information about deprecated functions in Smart Tools, see What’s New in Citrix Smart Tools.

/share

Description

Shares a blueprint or a script to users or user roles

URL structure

https://smart.cloud.com/v0/share?access_token=VALID_ACCESS_TOKEN&objectId=ID_OF_SCRIPT_OR_BLUEPRINT&objectType=SCRIPT_OR_PROCESS&userIdString=USER_ID_IN_ARRAY&roleString=USER_ROLES_IN_ARRAY

URL example

https:// smart.cloud.com/v0/scripts/share?access_token=16C0UwkUWQQo6jmaJFLEqshpk&objectId=73417&objectType=SCRIPT&userIdString=18460&roleString=null

Method

POST

Parameters

Name Required or Optional Description
objectId Required ID of a script or blueprint that needs to be shared
objectType Required Shared object type that is a script or blueprint
userIdString Required, if rolestring is null Single or multiple user IDs separated by comma
roleString Required, if userIdString is null Single or multiple user roles separated by comma. For example: Admin; Architect

Response

JSON payload

Sample response:

{
   "companyId":0,
   "extraAttrs":{

},
   "shareId":201,
   "objectId":73417,
   "objectType":"script",
   "details":[
      {
         "companyId":0,
         "extraAttrs":{

},
         "shareId":201,
         "sharedToUser":"18460",
         "shareMode":"READWRITE",
         "shareStatus":"Active"
      },
      {
         "companyId":0,
         "extraAttrs":{

},
         "shareId":201,
         "sharedToRole":"null",
         "shareMode":"READWRITE",
         "shareStatus":"Active"
      }
   ],
   "createdByRole":"Admin",
   "createdByUser":"17892"
}

/unshare

Description

Unshare a blueprint or a script to users or user roles

URL structure

https://smart.cloud.com/v0/share?access_token=VALID_ACCESS_TOKEN&objectId=ID_OF_SCRIPT_OR_BLUEPRINT&objectType=SCRIPT_OR_PROCESS&userIdString=USER_ID_IN_ARRAY&roleString=USER_ROLES_IN_ARRAY&shareId=SHARING_TASK_ID

URL example

https:// smart.cloud.com/v0/scripts/share?access_token=2mfJYBNZLo9piEytdlsax2wOe&objectId=87937&objectType=SCRIPT&userIdString=null&roleString=null&shareId=224

Method

POST

Parameters

Name Required or Optional Description
objectID Required ID of a script or blueprint that needs to be shared.
objectType Required Shared object type that is a script or blueprint.
userIdString Required, if roleString is null Single or multiple user IDs separated by comma.
roleString Required, if userIdString is null Single or multiple user roles separated by comma. For example: Admin, Architect
shareId Required Sharing task ID.

Response

JSON payload

Sample response:

{
   "companyId":0,
   "extraAttrs":{

},
   "shareId":224,
   "objectId":87937,
   "objectType":"script",
   "details":[
      {
         "companyId":0,
         "extraAttrs":{

},
         "shareId":224,
         "sharedToUser":"null",
         "shareMode":"READWRITE",
         "shareStatus":"Active"
      },
      {
         "companyId":0,
         "extraAttrs":{

},
         "shareId":224,
         "sharedToRole":"null",
         "shareMode":"READWRITE",
         "shareStatus":"Active"
      }
   ],
   "createdByRole":"Admin",
   "createdByUser":"17892"
}

Share API

In this article