Get Slide Url

This API returns the URL to access the mentioned slideshow present in the workspace identified by the URI.

REQUEST URI

https://<ZohoAnalytics_Server_URI>/api/<OwnerEmail>/<WorkspaceName>

Get

oauthscope: ZohoAnalytics.embed.read

COMMON PARAMETERS

ParameterPossible ValuesDescription
ZOHO_ACTIONGETSLIDEURL

This parameter specifies the action to be performed by the API request.

Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document.

ZOHO_OUTPUT_FORMATJSONThis parameter specifies the output format for the response.
ZOHO_ERROR_FORMATXML/JSONSpecifies the output format for the response in case an error occurs when trying to process the request.
ZOHO_API_VERSION1.0The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0

AUTHORIZATION

To make authenticated API request, append the access token in Authorization request header.

Header NameValueDescription
AuthorizationZoho-oauthtoken<space><access_token>The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope.

ACTION SPECIFIC PARAMETERS

KeyTypeDescription
slideName*StringName of the slideshow for which the access url is needed.
autoplayBooleanIf set as true, views present in the slideshow scroll automatically.
slideIntervalIntegerTime interval(in seconds) at which the views present in the slideshow switch.
Note:value should be between 10 to 300.
includeTitleBooleanIf set as false, view name will be hidden.
includeDescBooleanIf set as false, view description will be hidden.
includeSocialWidgetsBooleanIf set as true, social widgets will be visible.
withCustomDomain
(Only For White Label Customers)
BoleanIf set as true analytics domain will be replace by your custom domain name.

Note: Fields with * are mandatory.

POSSIBLE ERROR CODES

7103 , 7138 , 8504 , 8506 , 8516 , 8533

Sample Request:

Copiedcurl 
-d 'ZOHO_ACTION=GETSLIDEURL&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON&ZOHO_API_VERSION=1.0' 

--data-urlencode 'CONFIG={"slideName":"","autoplay":"","slideInterval":"","includeTitle":"","includeDesc":"","includeSocialWidgets":"",}' 

-H 'Authorization:Zoho-oauthtoken <access_token>' 
https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName
Copiedusing ZReports;

namespace Test
{
    CLIENT_ID = "************";
    CLIENT_SECRET = "************";
    REFRESH_TOKEN = "************";
    EMAIL = "Email Address";
    DBNAME = "Workspace Name";

    class Program
    {
        public IReportClient getClient()
        {
            IReportClient RepClient = new ReportClient(CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN);
            return RepClient;
        }

        public void getSlideUrl(IReportClient rc)
        {
            string uri = rc.GetURI(EMAIL, DBNAME);
            Dictionary<string, object> config = new Dictionary<string, object>();
            config.Add("slideName", "");
            config.Add("autoplay", "");
            config.Add("slideInterval", "");
            config.Add("includeTitle", "");
            config.Add("includeDesc", "");
            config.Add("includeSocialWidgets", "");
            string result = rc.GetSlideUrl(uri, config);
            Console.WriteLine(result);
        }

        static void Main(string[] args)
        {
            Program obj = new Program();
            IReportClient rc = obj.getClient();
            obj.getSlideUrl(rc);
        }
    }
}
Copiedpackage main

import (
	"fmt"
	"zoho/pkg/reportclient"
	"encoding/json"
)

var (
	email        = "Email Address"
	dbname       = "Workspace Name"
	clientid     = "************"
	clientsecret = "************"
	refreshtoken = "************"
)

func getslideurl() {
	type slideconfig struct {
		SLIDENAME           string `json:"slideName"`
		AUTOPLAY            bool   `json:"autoplay"`
		SLIDEINTERVAL       int    `json:"slideInterval"`
		INCLUDETITLE        bool   `json:"includeTitle"`
		INCLUDEDESC         bool   `json:"includeDesc"`
		INCLUDESOCIALWIDGETS bool   `json:"includeSocialWidgets"`
		WITHCUSTOMDOMAIN    bool   `json:"withCustomDomain"`
	}

	config := slideconfig{
		SLIDENAME:           "",
		AUTOPLAY:            true,
		SLIDEINTERVAL:       25,
		INCLUDETITLE:        true,
		INCLUDEDESC:         true,
		INCLUDESOCIALWIDGETS: false,
		WITHCUSTOMDOMAIN:    false,
	}

	url := reportclient.GetDbUri(email, dbname)
	conf, _ := json.Marshal(config)
	result, err := reportclient.GetSlideUrl(url, string(conf))
	if err != nil {
		fmt.Println(err.ErrorMessage)
		fmt.Println(err.ErrorCode)
		fmt.Println(err.Action)
		fmt.Println(err.HttpStatusCode)
	} else {
		fmt.Println(result)
	}
}

func main() {
	reportclient.SetOAuthToken(clientid, clientsecret, refreshtoken)
	getslideurl()
}
Copiedimport com.adventnet.zoho.client.report.*;

public class Sample {
    String email = "Email Address";
    String dbname = "Workspace Name";
    String clientId = "************";
    String clientSecret = "************";
    String refreshToken = "************";
    Map config = new HashMap();
    private ReportClient rc = new ReportClient(clientId, clientSecret, refreshToken);

    public void getSlideUrl() throws Exception {
        String uri = rc.getURI(email, dbname);
        JSONObject slideInfo = new JSONObject();
        slideInfo.put("slideName", "");
        slideInfo.put("autoplay", "");
        slideInfo.put("slideInterval", "");
        slideInfo.put("includeTitle", "");
        slideInfo.put("includeDesc", "");
        slideInfo.put("includeSocialWidgets", "");
        String result = rc.getSlideUrl(uri, slideInfo);
        System.out.println(result);
    }

    public static void main(String[] args) throws Exception {
        Sample obj = new Sample();
        obj.getSlideUrl();
    }
}
Copied<?php
require 'ReportClient.php';

$EMAIL_ID = "Email Address";
$WORKSPACE_NAME = "Workspace Name";
$CLIENT_ID = "************";
$CLIENT_SECRET = "************";
$REFRESH_TOKEN = "************";

$report_client_request = new ReportClient($CLIENT_ID, $CLIENT_SECRET, $REFRESH_TOKEN);
$uri = $report_client_request->getDbURI($EMAIL_ID, $WORKSPACE_NAME);
$slideInfo = new stdClass();
$slideInfo->slideName = "";
$slideInfo->autoplay = true;
$slideInfo->slideInterval = 25;
$slideInfo->includeTitle = true;
$slideInfo->includeDesc = true;
$slideInfo->includeSocialWidgets = false;
$slideInfo->withCustomDomain = false;
$report_client_request->getSlideUrl($uri, $slideInfo);
?>
Copiedfrom __future__ import with_statement
from ReportClient import ReportClient
import sys

class Sample:
    LOGINEMAILID = "Email Address"
    WORKSPACENAME = "Workspace Name"
    CLIENTID = "************"
    CLIENTSECRET = "************"
    REFRESHTOKEN = "************"
    rc = None

    def getslideurl(self, rc):
        uri = rc.getDBURI(self.LOGINEMAILID, self.WORKSPACENAME)
        try:
            slideInfo = {}
            slideInfo['slideName'] = ''
            slideInfo['autoplay'] = ''
            slideInfo['slideInterval'] = ''
            slideInfo['includeTitle'] = ''
            slideInfo['includeDesc'] = ''
            slideInfo['includeSocialWidgets'] = ''
            result = rc.getSlideUrl(uri, slideInfo)
            print(result)
        except Exception, e:
            print(str(e))

    obj = Sample()
    obj.getslideurl(obj.rc)
}
Copiedvar nodelib = require('./ZAnalyticsClient');
var clientId = '************';
var clientSecret = '************';
var refreshtoken = '************';
var emailId = 'EmailAddress';
var workspaceName = 'WorkspaceName';

nodelib.initialize(clientId, clientSecret, refreshtoken).then(() => {
    var uripath = nodelib.getUri(emailId, workspaceName);
    var config = {};
    config.slideName = "";
    config.autoplay = "";
    config.slideInterval = "";
    config.includeTitle = "";
    config.includeDesc = "";
    config.includeSocialWidgets = "";
    nodelib.getSlideUrl(uripath, config).then((response) => {
        console.log(response);
    }).catch((error) => {
        console.log("Error : " + error.message);
    });
}).catch((error) => {
    console.log("Authentication Issue : " + error);
});
Copiedemail = zoho.encryption.urlEncode("");
workspaceName = zoho.encryption.urlEncode("");
paramsMap = Map();
oauthParams = Map();
headers = Map();

// AUTHENTICATION PARAMS
oauthParams.put("client_id", "********");
oauthParams.put("client_secret", "********");
oauthParams.put("refresh_token", "********");
oauthParams.put("grant_type", "refresh_token");

tokenInfo = invokeurl[url: "https://accounts.zoho.com/oauth/v2/token" type: POST parameters: oauthParams];

if (tokenInfo.containKey("access_token")) {
    accessToken = tokenInfo.get("access_token");
    headers.put("Authorization", "Zoho-oauthtoken ".concat(accessToken));
} else {
    info tokenInfo;
    return;
}

// COMMON PARAMS
paramsMap.put("ZOHO_ACTION", "GETSLIDEURL");
paramsMap.put("ZOHO_OUTPUT_FORMAT", "JSON");
paramsMap.put("ZOHO_ERROR_FORMAT", "JSON");
paramsMap.put("ZOHO_API_VERSION", "1.0");
// ACTION SPECIFIC PARAMS
config = Map();
config.put("slideName", "");
config.put("autoplay", "");
config.put("slideInterval", "");
config.put("includeTitle", "");
config.put("includeDesc", "");
config.put("includeSocialWidgets", "");
paramsMap.put("CONFIG", config.toString());

response = invokeurl[url: "https://analyticsapi.zoho.com/api/" + email + "/" + workspaceName type: POST parameters: paramsMap headers: headers];
info response;

Download SDK : C# | GO | JAVA | PHP | PYTHON | NodeJS

Sample Response:

Copied{"response": {"uri": "/api/EmailAddress/WorkspaceName",
    "action": "GETSLIDEURL",
    "result": {"slideUrl": "https://analytics.zoho.com/ZDBSlideshow.cc?SLIDEID=100002000000008001&SLIDEKEY=87e8b28353d06066337bf7e42b54ddf7&AUTOPLAY=true&INTERVAL=25&INCLUDETITLE=true&INCLUDEDESC=true&SOCIALWIDGETS=false"}}}