Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it hides the Storage existence calls and lets you use GroupDocs Cloud features in a native way for your preferred language.
usingGroupDocs.Viewer.Cloud.Sdk.Api;usingGroupDocs.Viewer.Cloud.Sdk.Client;usingGroupDocs.Viewer.Cloud.Sdk.Model.Requests;usingSystem;namespaceGroupDocs.Viewer.Cloud.Examples.CSharp{// Is Storage ExistclassStorage_Exist{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newStorageApi(configuration);try{varrequest=newStorageExistsRequest(Common.MyStorage);varresponse=apiInstance.StorageExists(request);Console.WriteLine("Expected response type is StorageExist: "+response.Exists.Value.ToString());}catch(Exceptione){Console.WriteLine("Exception while calling StorageApi: "+e.Message);}}}}
packageexamples.Working_With_Storage;importcom.groupdocs.cloud.viewer.api.*;importcom.groupdocs.cloud.viewer.client.ApiException;importcom.groupdocs.cloud.viewer.model.*;importcom.groupdocs.cloud.viewer.model.requests.*;importexamples.Utils;publicclassViewer_Java_Storage_Exist{publicstaticvoidmain(String[]args){StorageApiapiInstance=newStorageApi(Utils.AppSID,Utils.AppKey);try{StorageExistsRequestrequest=newStorageExistsRequest(Utils.MYStorage);StorageExistresponse=apiInstance.storageExists(request);System.out.println("Expected response type is StorageExist: "+response.getExists());}catch(ApiExceptione){System.err.println("Exception while calling StorageApi:");e.printStackTrace();}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetStorageApiInstance();$request=newGroupDocs\Viewer\Model\Requests\StorageExistsRequest(CommonUtils::$MyStorage);$response=$apiInstance->storageExists($request);echo"Expected response type is StorageExist: ",$response;}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}?>
"use strict";classViewer_Node_Storage_Exist{staticRun(){// retrieve supported file-formats
varrequest=newgroupdocs_viewer_cloud_1.StorageExistsRequest(myStorage);storageApi.storageExists(request).then(function(response){console.log("Expected response type is StorageExist: "+response.exists);}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Viewer_Node_Storage_Exist;
# Import modulesimportgroupdocs_viewer_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassViewer_Python_Storage_Exist:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_StorageApi_Instance()try:request=groupdocs_viewer_cloud.StorageExistsRequest(Common_Utilities.myStorage)response=api.storage_exists(request)print("Expected response type is StorageExist: "+str(response))exceptgroupdocs_viewer_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
# Load the gemrequire'groupdocs_viewer_cloud'require'common_utilities/Utils.rb'classWorking_With_Storagedefself.Viewer_Ruby_Storage_Exist()# Getting instance of the API$api=Common_Utilities.Get_StorageApi_Instance()$request=GroupDocsViewerCloud::StorageExistsRequest.new($myStorage)$response=$api.storage_exists($request)puts("Expected response type is StorageExist: "+($response).to_s)endend
packageexamples.Working_With_Storage;importcom.groupdocs.cloud.viewer.api.*;importcom.groupdocs.cloud.viewer.client.ApiException;importcom.groupdocs.cloud.viewer.model.*;importcom.groupdocs.cloud.viewer.model.requests.*;importexamples.Utils;publicclassViewer_Android_Storage_Exist{publicstaticvoidmain(String[]args){StorageApiapiInstance=newStorageApi(Utils.AppSID,Utils.AppKey);try{StorageExistsRequestrequest=newStorageExistsRequest(Utils.MYStorage);StorageExistresponse=apiInstance.storageExists(request);System.out.println("Expected response type is StorageExist: "+response.getExists());}catch(ApiExceptione){System.err.println("Exception while calling StorageApi:");e.printStackTrace();}}}
packagebasicUsageimport("fmt""github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-go-samples/config"viewer"github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-go/models")funcCheckStorageExists(){storageName:="YourStorageName"storageExist,_,err:=config.Client.StorageApi.StorageExists(config.Ctx,storageName)iferr!=nil{fmt.Printf("StorageExists error: %v\n",err)return}ifstorageExist.Exists{fmt.Println("Storage exists")}else{fmt.Println("Storage does not exist")}}
Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it hides the Storage Object existence calls and lets you use GroupDocs Cloud features in a native way for your preferred language.
usingGroupDocs.Viewer.Cloud.Sdk.Api;usingGroupDocs.Viewer.Cloud.Sdk.Client;usingGroupDocs.Viewer.Cloud.Sdk.Model.Requests;usingSystem;namespaceGroupDocs.Viewer.Cloud.Examples.CSharp{// Is Object ExistsclassObject_Exists{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newStorageApi(configuration);try{varrequest=newObjectExistsRequest("viewerdocs/one-page.docx",Common.MyStorage);varresponse=apiInstance.ObjectExists(request);Console.WriteLine("Expected response type is ObjectExist: "+response.Exists.Value.ToString());}catch(Exceptione){Console.WriteLine("Exception while calling StorageApi: "+e.Message);}}}}
packageexamples.Working_With_Storage;importcom.groupdocs.cloud.viewer.api.*;importcom.groupdocs.cloud.viewer.client.ApiException;importcom.groupdocs.cloud.viewer.model.*;importcom.groupdocs.cloud.viewer.model.requests.*;importexamples.Utils;publicclassViewer_Java_Object_Exists{publicstaticvoidmain(String[]args){StorageApiapiInstance=newStorageApi(Utils.AppSID,Utils.AppKey);try{ObjectExistsRequestrequest=newObjectExistsRequest("viewers\\one-page.docx",Utils.MYStorage,null);ObjectExistresponse=apiInstance.objectExists(request);System.out.println("Expected response type is ObjectExist: "+response.getExists());}catch(ApiExceptione){System.err.println("Exception while calling StorageApi:");e.printStackTrace();}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetStorageApiInstance();$request=newGroupDocs\Viewer\Model\Requests\ObjectExistsRequest("viewerdocs\one-page.docx",CommonUtils::$MyStorage);$response=$apiInstance->objectExists($request);echo"Expected response type is ObjectExist: ",$response;}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}?>
"use strict";classViewer_Node_Object_Exists{staticRun(){// retrieve supported file-formats
varrequest=newgroupdocs_viewer_cloud_1.ObjectExistsRequest("viewerdocs/one-page.docx",myStorage);storageApi.objectExists(request).then(function(response){console.log("Expected response type is ObjectExist: "+response.exists);}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Viewer_Node_Object_Exists;
# Import modulesimportgroupdocs_viewer_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassViewer_Python_Object_Exists:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_StorageApi_Instance()try:request=groupdocs_viewer_cloud.ObjectExistsRequest("viewerdocs\\one-page.docx",Common_Utilities.myStorage)response=api.object_exists(request)print("Expected response type is ObjectExist: "+str(response))exceptgroupdocs_viewer_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
# Load the gemrequire'groupdocs_viewer_cloud'require'common_utilities/Utils.rb'classWorking_With_Storagedefself.Viewer_Ruby_Object_Exists()# Getting instance of the API$api=Common_Utilities.Get_StorageApi_Instance()$request=GroupDocsViewerCloud::ObjectExistsRequest.new("viewerdocs/one-page.docx",$myStorage)$response=$api.object_exists($request)puts("Expected response type is ObjectExist: "+($response).to_s)endend
packageexamples.Working_With_Storage;importcom.groupdocs.cloud.viewer.api.*;importcom.groupdocs.cloud.viewer.client.ApiException;importcom.groupdocs.cloud.viewer.model.*;importcom.groupdocs.cloud.viewer.model.requests.*;importexamples.Utils;publicclassViewer_Android_Object_Exists{publicstaticvoidmain(String[]args){StorageApiapiInstance=newStorageApi(Utils.AppSID,Utils.AppKey);try{ObjectExistsRequestrequest=newObjectExistsRequest("viewers\\one-page.docx",Utils.MYStorage,null);ObjectExistresponse=apiInstance.objectExists(request);System.out.println("Expected response type is ObjectExist: "+response.getExists());}catch(ApiExceptione){System.err.println("Exception while calling StorageApi:");e.printStackTrace();}}}
packagebasicUsageimport("fmt""github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-go-samples/config"viewer"github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-go/models")funcObjectExists(){objectPath:="SampleFiles/sample.docx"existsOpts:=viewer.StorageApiObjectExistsOpts{StorageName:optional.NewString("YourStorageName"),}objectExist,_,err:=config.Client.StorageApi.ObjectExists(config.Ctx,objectPath,&existsOpts)iferr!=nil{fmt.Printf("ObjectExists error: %v\n",err)return}ifobjectExist.Exists{fmt.Println("Object exists")}else{fmt.Println("Object does not exist")}}
Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it hides the storage space usage API calls and lets you use GroupDocs Cloud features in a native way for your preferred language.
usingGroupDocs.Viewer.Cloud.Sdk.Api;usingGroupDocs.Viewer.Cloud.Sdk.Client;usingGroupDocs.Viewer.Cloud.Sdk.Model.Requests;usingSystem;namespaceGroupDocs.Viewer.Cloud.Examples.CSharp{// Get Get Disc UsageclassGet_Disc_Usage{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newStorageApi(configuration);try{varrequest=newGetDiscUsageRequest(Common.MyStorage);varresponse=apiInstance.GetDiscUsage(request);Console.WriteLine("Expected response type is DiscUsage: "+response.UsedSize.ToString());}catch(Exceptione){Console.WriteLine("Exception while calling StorageApi: "+e.Message);}}}}
packageexamples.Working_With_Storage;importcom.groupdocs.cloud.viewer.api.*;importcom.groupdocs.cloud.viewer.client.ApiException;importcom.groupdocs.cloud.viewer.model.*;importcom.groupdocs.cloud.viewer.model.requests.*;importexamples.Utils;publicclassViewer_Java_Get_Disc_Usage{publicstaticvoidmain(String[]args){StorageApiapiInstance=newStorageApi(Utils.AppSID,Utils.AppKey);try{GetDiscUsageRequestrequest=newGetDiscUsageRequest(Utils.MYStorage);DiscUsageresponse=apiInstance.getDiscUsage(request);System.out.println("Expected response type is DiscUsage: "+response.getUsedSize());}catch(ApiExceptione){System.err.println("Exception while calling StorageApi:");e.printStackTrace();}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetStorageApiInstance();$request=newGroupDocs\Viewer\Model\Requests\GetDiscUsageRequest(CommonUtils::$MyStorage);$response=$apiInstance->getDiscUsage($request);echo"Expected response type is DiscUsage: ",$response;}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}?>
"use strict";classViewer_Node_Get_Disc_Usage{staticRun(){// retrieve supported file-formats
varrequest=newgroupdocs_viewer_cloud_1.GetDiscUsageRequest(myStorage);storageApi.getDiscUsage(request).then(function(response){console.log("Expected response type is DiscUsage: "+response.usedSize);}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Viewer_Node_Get_Disc_Usage;
# Import modulesimportgroupdocs_viewer_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassViewer_Python_Get_Disc_Usage:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_StorageApi_Instance()try:request=groupdocs_viewer_cloud.GetDiscUsageRequest(Common_Utilities.myStorage)response=api.get_disc_usage(request)print("Expected response type is DiscUsage: "+str(response))exceptgroupdocs_viewer_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
# Load the gemrequire'groupdocs_viewer_cloud'require'common_utilities/Utils.rb'classWorking_With_Storagedefself.Viewer_Ruby_Get_Disc_Usage()# Getting instance of the API$api=Common_Utilities.Get_StorageApi_Instance()$request=GroupDocsViewerCloud::GetDiscUsageRequest.new($myStorage)$response=$api.get_disc_usage($request)puts("Expected response type is DiscUsage: "+($response).to_s)endend
packageexamples.Working_With_Storage;importcom.groupdocs.cloud.viewer.api.*;importcom.groupdocs.cloud.viewer.client.ApiException;importcom.groupdocs.cloud.viewer.model.*;importcom.groupdocs.cloud.viewer.model.requests.*;importexamples.Utils;publicclassViewer_Android_Get_Disc_Usage{publicstaticvoidmain(String[]args){StorageApiapiInstance=newStorageApi(Utils.AppSID,Utils.AppKey);try{GetDiscUsageRequestrequest=newGetDiscUsageRequest(Utils.MYStorage);DiscUsageresponse=apiInstance.getDiscUsage(request);System.out.println("Expected response type is DiscUsage: "+response.getUsedSize());}catch(ApiExceptione){System.err.println("Exception while calling StorageApi:");e.printStackTrace();}}}
Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it hides the Storage File Versions API calls and lets you use GroupDocs Cloud features in a native way for your preferred language.
usingGroupDocs.Viewer.Cloud.Sdk.Api;usingGroupDocs.Viewer.Cloud.Sdk.Client;usingGroupDocs.Viewer.Cloud.Sdk.Model.Requests;usingSystem;namespaceGroupDocs.Viewer.Cloud.Examples.CSharp{// Get File VersionsclassGet_File_Versions{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newStorageApi(configuration);try{varrequest=newGetFileVersionsRequest("one-page.docx",Common.MyStorage);varresponse=apiInstance.GetFileVersions(request);Console.WriteLine("Expected response type is FileVersions: "+response.Value.Count.ToString());}catch(Exceptione){Console.WriteLine("Exception while calling StorageApi: "+e.Message);}}}}
packageexamples.Working_With_Storage;importcom.groupdocs.cloud.viewer.api.*;importcom.groupdocs.cloud.viewer.client.ApiException;importcom.groupdocs.cloud.viewer.model.*;importcom.groupdocs.cloud.viewer.model.requests.*;importexamples.Utils;publicclassViewer_Java_Get_File_Versions{publicstaticvoidmain(String[]args){StorageApiapiInstance=newStorageApi(Utils.AppSID,Utils.AppKey);try{GetFileVersionsRequestrequest=newGetFileVersionsRequest("viewers\\one-page.docx",Utils.MYStorage);FileVersionsresponse=apiInstance.getFileVersions(request);System.out.println("Expected response type is FileVersions: "+response.getValue().size());}catch(ApiExceptione){System.err.println("Exception while calling StorageApi:");e.printStackTrace();}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetStorageApiInstance();$request=newGroupDocs\Viewer\Model\Requests\GetFileVersionsRequest("viewerdocs\one-page.docx",CommonUtils::$MyStorage);$response=$apiInstance->getFileVersions($request);echo"Expected response type is FileVersions: ",$response;}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}?>
"use strict";classViewer_Node_Get_File_Versions{staticRun(){// retrieve supported file-formats
varrequest=newgroupdocs_viewer_cloud_1.GetFileVersionsRequest("viewerdocs/one-page.docx",myStorage);storageApi.getFileVersions(request).then(function(response){console.log("Expected response type is FileVersions: "+response.value.length);}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Viewer_Node_Get_File_Versions;
# Import modulesimportgroupdocs_viewer_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassViewer_Python_Get_File_Versions:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_StorageApi_Instance()try:request=groupdocs_viewer_cloud.GetFileVersionsRequest("viewerdocs\\one-page.docx",Common_Utilities.myStorage)response=api.get_file_versions(request)print("Expected response type is FileVersions: "+str(response))exceptgroupdocs_viewer_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
# Load the gemrequire'groupdocs_viewer_cloud'require'common_utilities/Utils.rb'classWorking_With_Storagedefself.Viewer_Ruby_Get_File_Versions()# Getting instance of the API$api=Common_Utilities.Get_StorageApi_Instance()$request=GroupDocsViewerCloud::GetFileVersionsRequest.new("viewerdocs/one-page.docx",$myStorage)$response=$api.get_file_versions($request)puts("Expected response type is FileVersions: "+($response).to_s)endend
packageexamples.Working_With_Storage;importcom.groupdocs.cloud.viewer.api.*;importcom.groupdocs.cloud.viewer.client.ApiException;importcom.groupdocs.cloud.viewer.model.*;importcom.groupdocs.cloud.viewer.model.requests.*;importexamples.Utils;publicclassViewer_Android_Get_File_Versions{publicstaticvoidmain(String[]args){StorageApiapiInstance=newStorageApi(Utils.AppSID,Utils.AppKey);try{GetFileVersionsRequestrequest=newGetFileVersionsRequest("viewers\\one-page.docx",Utils.MYStorage);FileVersionsresponse=apiInstance.getFileVersions(request);System.out.println("Expected response type is FileVersions: "+response.getValue().size());}catch(ApiExceptione){System.err.println("Exception while calling StorageApi:");e.printStackTrace();}}}