iotfileservices.clients package

Submodules

iotfileservices.clients.file_service_client module

IoT File API

The IoT File API enables storing and retrieving files for entity instances. # noqa: E501

class FileServiceClient(rest_client_config=None, mindsphere_credentials=None)[source]

Bases: object

_handle_multi_part_upload(request_object)[source]
abort_multi_part_upload(request_object)[source]

abort a multi part file upload. Used to abort both new and existing multi part file uploads.

Abort a multi part file upload for the specified entity and path, with the provided content. :param PutFileRequest request_object: It contains the below parameters –>

( entityId* - unique identifier of the entity )
,( filepath* - url path of the file along with filename ) ,( If-Match - ETag of the latest version for optimistic locking ) ,( timestamp - file timestamp ) ,( description - description of the file ) ,( type - type of the file )
Returns:None
complete_multi_part_upload(request_object)[source]

complete a multi part file upload

Complete a multi part file upload for the specified entity and path, with the provided content. :param PutFileRequest request_object: It contains the below parameters –>

( file - the file attached content )
,( entityId* - unique identifier of the entity ) ,( filepath* - url path of the file along with filename ) ,( If-Match - ETag of the latest version for optimistic locking ) ,( timestamp - file timestamp ) ,( description - description of the file ) ,( type - type of the file )
Returns:None
create_multi_part_file(request_object)[source]

write a multi part file

Create a multi part file for the specified entity and path, with the provided content. :param PutFileRequest request_object: It contains the below parameters –>

( file* - the file attached content )
,( entityId* - unique identifier of the entity ) ,( filepath* - url path of the file along with filename ) ,( part* - Part number to upload ) ,( timestamp - file timestamp ) ,( description - description of the file ) ,( type - type of the file )
Returns:None
delete_file(request_object)[source]

delete a file

Delete a file for the specified entity and path.

Parameters:request_object (DeleteFileRequest) – It contains the below parameters –>
( entityId* - unique identifier of the entity ),
( filepath* - unique identifier of the file )
Returns:None
get_file(request_object)[source]

read a file

Read a file for the specified entity and path

Parameters:request_object (GetFileRequest) – It contains the below parameters –>
( entityId* - Id to instance of entity ),
( filepath* - path of the file along with filename ),
( If-None-Match - ETag of the latest version (not supported in this release) ),
( range - Part of a file to return in Bytes, eg bytes=200-600 )
Returns:str
get_file_list(request_object)[source]

list multi part uploads

List multi part uploads

Parameters:request_object (GetFileListRequest) – It contains the below parameters –>
( entityId* - Id to instance of entity ),
( filepath* - path of the file )
Returns:list[Fileslist]
initiate_multi_part_upload(request_object)[source]

initiate a multi part file upload

Initiate a multi part upload for a file for the specified entity and path, with the provided content. :param PutFileRequest request_object: It contains the below parameters –>

( entityId* - unique identifier of the entity )
,( filepath* - url path of the file along with filename ) ,( If-Match - ETag of the latest version for optimistic locking ) ,( timestamp - file timestamp ) ,( description - description of the file ) ,( type - type of the file )
Returns:None
put_file(request_object)[source]

write a file

Create or update a file for the specified entity and path, with the provided content.

Parameters:request_object (PutFileRequest) – It contains the below parameters –>
( file* - the file attached content ),
( entityId* - unique identifier of the entity ),
( filepath* - url path of the file along with filename ),
( part - Part number to upload ),
( upload - Upload status to start, complete, and abort multi-part uploads ),
( If-Match - ETag of the latest version for optimistic locking ),
( timestamp - file timestamp ),
( description - description of the file ),
( type - type of the file )
Returns:None
search_files(request_object)[source]

search files

Search files for the specified entity.

Parameters:request_object (SearchFilesRequest) – It contains the below parameters –>
( entityId* - entity instance id ),
( offset - number of files to skip ),
( limit - maximum number of files to return (max 200) ),
( count - return total number of matching files ),
( order - sort based on supported fields - see order syntax for more details (name, path, type, size, timestamp, created, updated) ),
( filter - filter based on supported fields - see filter syntax for more details (name, path, type, size, timestamp, created, updated) )
Returns:list[FileResponse]
update_multi_part_file(request_object)[source]

update a multi part file

Update a multi part file for the specified entity and path, with the provided content. :param PutFileRequest request_object: It contains the below parameters –>

( file* - the file attached content )
,( entityId* - unique identifier of the entity ) ,( filepath* - url path of the file along with filename ) ,( part* - Part number to upload ) ,( If-Match* - ETag of the latest version for optimistic locking ) ,( timestamp - file timestamp ) ,( description - description of the file ) ,( type - type of the file )
Returns:None

Module contents