About Virtual Folders

About Virtual Folders

Contents

Introduction

For all the API calls, you must first obtain an access token. The access token is used to create an instance of the SDK which allows you to access the SDk methods.

Code Sample

 SdkClient.new(session[:access_token])
    

Examples

createVirtualFolder

createVirtualFolder creates a virtual folder.

Code Sample

 begin
        name = params[:vfoldername] || ""
        name = CGI.escape(name)
        entry = client.createVirtualFolder(name)
      rescue SdkAuthError => e
        session.delete(:access_token)  # An auth error means the access token is probably bad
        return html_page "Sdk auth error"
      rescue SdkError => e
        if e.http_response.code == '404'
          return html_page "Path not found: #{e}"
        else
          return html_page "Sdk API error  #{e}"
        end
      end
    
    

Example Return Response

 {
        "name": "string",
        "parentPath": "string",
        "size": 0,
        "immutable": false,
        "versionCreated": "string"
    }
    

deleteVirtualFolder

deleteVirtualFolder deletes a virtual folder. Code Sample

 begin
        name = params[:vfoldername] || ""
        force = params[:force] || ""
        entry = client.deleteVirtualFolder(name,force)
      rescue SdkAuthError => e
        session.delete(:access_token)  # An auth error means the access token is probably bad
        return html_page "Sdk auth error"
      rescue SdkError => e
        if e.http_response.code == '404'
          return html_page "Path not found: #{e}"
        else
          return html_page "Sdk API error  #{e}"
        end
      end
    
    

renameVirtualFolder

renameVirtualFolder renames a virtual folder.

Code Sample

 begin
        source = params[:vsource] || ""
        target = params[:vtarget] || ""
    
        entry = client.renameVirtualFolder(source,target)
      rescue SdkAuthError => e
        session.delete(:access_token)  # An auth error means the access token is probably bad
        return html_page "Sdk auth error"
      rescue SdkError => e
        if e.http_response.code == '404'
          return html_page "Path not found: #{e}"
        else
          return html_page "Sdk API error  #{e}"
        end
      end
    
    

Example Return Response

 {
        "name": "string",
        "parentPath": "string",
        "size": 0,
        "immutable": false,
        "versionCreated": "string"
    }
    

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