Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When using this method all the filter inputs (of type GetFileInfoArgs) are optional. The are used to filter the list in the response.

Filter inputs

NameTypeDescriptionMandatoryAvailable from version
BrickIdsGuid[]An array of file Guids (unique identifier of file in BFS)  
ContentTypesstring[]An array of content types  
CreatedByGuid[]An array of person Guids who created the file in BFS  
CreatedDateFromDateTime?The date time that the desired files where created from  
CreatedDateToDateTime?The date time that the desired files where created to  
FileContextGuid[]The owner of the file  
NamestringThe name of a file  
PermissionFilePermission?[]Permission on file; FilePermission.AdminOnly / FilePermission.AdminPartner / FilePermission.All  

Response rows (Array of type GetFileInfoResponseRow) 

NameTypeDescriptionAvailable from version
FilePermissionintPermission on file; FilePermission.AdminOnly / FilePermission.AdminPartner / FilePermission.All 
BrickIdGuidThe identifier of the file 
CreatedDateDateTimeCreated date 
FileContentTypestringThe content type 
NamestringThe name of the file 
FileContextGuidThe owner of the file 
FileSizeint?The size of the file 

Code examples

Code Block
languagec#
themeRDark
titleC# - Get File list of a BFS instance
linenumberstrue
collapsetrue
 //example of how to retrieve a filelist from an instance of BFS
var client = new BFSServiceReference.bfsapiSoapClient();
  
var credentials = new BFSServiceReference.Credentials()
{
    UserName = bfsusername, //Username of administrative user in your instance of BFS
    Password = bfspassword, //Password of the administrative user in your instance of BFS
};
 
GetFileListResponse oResp = client.GetFileList(new GetFileListRequest
{
    Credentials = credentials,
    identify = bfsidentifier, //Identifier is a unique token for your instance of BFS
    Args = new GetFileInfoArgs
    {
        CreatedDateFrom = new DateTime(2015, 1, 1)
    },
    Fields = new GetFileInfoFields
    {
        BrickId = true,
        CreatedDate = true,
        Name = true
    }
});
 
 foreach (GetFileInfoResponseRow oResponseRow in oResp.Result)
{
    Console.WriteLine(oResponseRow.Name);
}