Chat now with support
Chat with Support

Metalogix StoragePoint 5.9 - PowerShell and API Reference Guide

PowerShell Guide
StoragePoint PowerShell Overview Getting Started Profile and Endpoint Management Cmdlets Timer Job Scheduling Cmdlets BLOB Information and Migration Cmdlets Miscellaneous SharePoint Utility Cmdlets PowerShell Script Examples StoragePoint API Reference

Blob Reference API

The Blob Reference API exposes the ability to determine the BLOB file corresponding to a given SharePoint document. This API exposes functionality similar to the Details screen in StoragePoint.

The BlobReferenceAPI object represents an external BLOB file on the blob store. There is a method for obtaining all of the blob references for a given SharePoint document (by url).  This API must be called on a server in the SharePoint farm and the user running the code must have administrative rights in SharePoint.

BlobReferenceAPI Object Reference

Method Reference

The following methods are provided by the BlobReferenceAPI object:

Method Name

Parameters

Description

static List<BlobReferenceAPI> GetBlobRefsForDoc(string DocUrl)

DocUrl – An absolute URL representing a document in SharePoint

Given an absolute URL representing a document, this method returns a list of BlobReferenceAPI objects representing all of the external BLOB files associated with this document. A list is returned because a given document can have multiple versions and multiple publishing states (published, checked out copy, etc.).

 

The DocUrl parameter is an absolute URL respresenting a document in SharePoint. An example is:

 

http://server/sites/web1/Pages/default.aspx

Property Reference

The BlobReferenceAPI object has many properties that provide information about the exposed BLOB file.

Property Name

Property Data Type

Description

FilePath

string

Returns the path to the BLOB file. If the file was externalized using the FileSystem adapter, this will be a complete path (ex. \\filer\filestore\folder\folder\filename). For other adapters, this will be only the relative folder + the filename of the file.

Folder

string

The folder on the file store containing the file. For the FileSystem adapter this will include the absolute path from the connection string of the profile.

BlobId

string

The filename of the BLOB file.

BlobSize

Int

The uncompressed size of the original file. This will differ from the actual file on the file store if compression is enabled on the profile.

ProfileId

String

The ID of the profile the file was externalized under.

Profile

ProfileAPI object

A ProfileAPI object representing the profile the file was externalized under.

DocUrl

string

The absolute URL of the doc that the BLOB file belongs to.

DocId

Guid

The internal SharePoint ID of the doc that the BLOB file belongs to.

DocType

RefDocType

Can be Doc if the BLOB file belongs to a document or Version if the BLOB file belongs to a version of the document.

DocLevel

RefDocLevel

Documents in SharePoint can have multiple publishing states. Values for this property include Published for a published doc, Draft for a draft copy and Checkout for a working version of a checked out document.

Version

string

The version of the doc or version that the BLOB file is attached to. For example, 1.5 would mean that the BLOB file belongs to version 1.5 of the document.

BlobReferenceAPI Code Example

The static GetBlobRefsForDoc method of the BlobReferenceAPI class will return all of the external BLOB files associated with a given document URL in SharePoint. Since SharePoint can have multiple publishing versions and regular versions associated with a single document URL, this method returns a list of all of the relevant BLOBs

The following is an example of using the BlobReferenceAPI object to retrieve all of the BLOB file references associated with an URL and iterating through the results :

List<BlobReferenceAPI> blobRefs = BlobReferenceAPI.GetBlobRefsForDoc(“http://site1/web1/lib/file.docx”);

    foreach (BlobReferenceAPI blobRef in blobRefs)

     {

        MessageBox.Show("Blob Found: " + blobRef.DocType.ToString() +

            ", Size=" + blobRef.BlobSize +

            ", Version: " + blobRef.Version +

            ", Publishing Level: " + blobRef.DocLevel.ToString() +

            ", File Path: " + blobRef.FilePath);

     }

Upload Large File API

The Large File Upload API exposes the ability to upload a large file, similar to the Large File Upload interface on the SharePoint document library ribbon. Only one file at a time can be uploaded with this method. Large File Support must be enabled on the SharePoint farm, on StoragePoint General Settings. An active Storage Profile must exist that covers the destination of the uploaded file.

This API must be called on a server in the SharePoint farm and the user running the code must have administrative rights in SharePoint.

 

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating