#g4msod_getShareableLink

*//////////////////////////////////////////////////////////////*

* g4msod_getShareableLink - Get Sharable Link *

* *

* Output: *

* out_link - The sharable link to use to share the item. *

* out_shareID - The ID for the sharing link. This needs to *

* be used if you ever want to programatically remove the *

* share. *

* out_errMsg - The error message (if error exists). *

* *

* Returns: *

* -1 for error, 0 for success *

* *

* Settable Variables ([r]=required) *

* id - MS ID [r] *

* item_id - The ID of the item to share. Either this or *

* path is required. [r] *

* path - The fully qualified name of the file or folder to *

* share. Either this or item_id is requred. [r] *

* link_type - Link type: view, edit, or embed. Default is *

* view. *

* link_scope - Link scope: organization or anonymous. *

* Default is organization. *

* group_id - Specify the group ID to get a link from. *

* group_name - Specify the group Name to get a link from. *

* ccsid - The CCSID to use (1252) *

* debug - Turn on Debug (*NO, *YES) *

* debug_file - The debug file name. *

* (/tmp/g4ms_[id]_getShareableLink.txt) *

* *

*//////////////////////////////////////////////////////////////*

D g4msod_getShareableLink...

D PR 10i 0

D out_link 65535 Varying

D out_shareID 65535 Varying

D out_errMsg 256 Options(*NOPASS)


g4msod_getSharableLink will create and return a sharable link to an item. The permissions granted with this function can be revoked using the g4msod_removePermissions function.

Returns: -1 for error, 0 for success.

Required Parameters:

  • out_link - The link that is created will be returned in this paramter.

  • out_shareID - The ID for the sharable link will be returned in this parameter. This ID is important to use if you want to remove permissions to the item at a later time.

Optional Parameters:

  • Error Message (output) - Error message

Settable Variables (use #g4msod_setValue):

  • id (required) - Your Microsoft ID

  • item_id - The id of the item. Either the item_id or path must be used. Using the item_id will result in faster execution.
    OR

  • path - The fully qualified path to the item you wish to return a sharable link for.
    ie: /my Documents/Files/test.pdf

This parameter IS case sensitive.

  • link_type - Specify the link type. Use the values "view", "edit", or "embed" (without quotes, case sensitive). If not specified the default value of "view" will be used.

  • link_scope - Specify the link scope. Use the values "organization" or "anonymous" (without quotes, case sensitive). If not specified the default value of "organization" will be used.

  • group_id - Specify the group ID to get a link from.

  • group_name - Specify the group name to get a link from. This will be ignored if the group_id is specified.

  • ccsid - The CCSID to use. The default is 1252.

  • debug - Specify *YES to turn on debug, or *NO to turn off debug. The default is *NO.

  • debug_file - Specify the fully qualified file name for the main debug file. The default is /tmp/g4ms_[id]_getShareableLink.txt.[n] where [id] is the Microsoft ID and [n] is the request index.