About Tags

About Tags

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

deleteTags

deleteTags deletes the tags for the file or folder under the specified path.

Code Sample

begin

    uri = params[:uri] || ""

    entry = client.deleteTags(uri)

  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

getTags

getTags retrieves tags for the file or folder under the specified path.

Code Sample

begin

    path = params[:path] || ""

    entry = client.getTags(path)

  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

{
    "Tags": "string"
}

setTags

setTags allows you to update tags for a file or folder under the specified path.

Code Sample

begin
    uri = params[:uri] || ""

    tags = params[:tags] || ""
    
    entry = client.setTags(uri,tags)

  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

{
    "Tags": "string"
}

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