siemens.iotandstorage.iotfileservice
Module siemens.iotandstorage.iotfileservice
API
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_siemens.iotandstorage.iotfileservice_1.5.0.png)
ballerinax/siemens.iotandstorage.iotfileservice Ballerina library
Overview
This is a generated connector from Siemens IoT File Service API v3.2.4 OpenAPI Specification.
The IoT File API enables storing and retrieving files for asset (entity) instances.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a Siemens MindSphere account.
- Obtain tokens by following this guide.
Clients![](/images/permalink.svg)
siemens.iotandstorage.iotfileservice: Client![](/images/permalink.svg)
This is a generated connector from Siemens IoT File Service API OpenAPI Specification. The IoT File API enables storing and retrieving files for asset (entity) instances.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create a Siemens MindSphere account and obtain tokens by following this guide
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string - URL of the target service
getFile![](/images/permalink.svg)
function getFile(string entityId, string filepath, int? ifNoneMatch, string? range) returns string|error
read a file
Parameters
- entityId string - Id to instance of asset (entity)
- filepath string - path of the file along with filename
- ifNoneMatch int? (default ()) - etag of the latest version (not supported in this release)
- range string? (default ()) - Part of a file to return in Bytes, eg bytes=200-600
deleteFile![](/images/permalink.svg)
delete a file
Parameters
- entityId string - unique identifier of the asset (entity)
- filepath string - unique identifier of the file
searchFiles![](/images/permalink.svg)
function searchFiles(string entityId, int? offset, int? 'limit, boolean? count, string? 'order, string? filter) returns File[]|error
search files
Parameters
- entityId string - asset (entity) instance id
- offset int? (default ()) - number of files to skip
- 'limit int? (default ()) - maximum number of files to return (max 200)
- count boolean? (default ()) - return total number of matching files
- 'order string? (default ()) - sort based on supported fields - see order syntax for more details (name, path, type, size, timestamp, created, updated)
- filter string? (default ()) - filter based on supported fields - see filter syntax for more details (name, path, type, size, timestamp, created, updated)
getFileList![](/images/permalink.svg)
list multi part uploads
getDeleteJobs![](/images/permalink.svg)
function getDeleteJobs() returns DeleteJobsResponse|error
get all bulk delete jobs
Return Type
- DeleteJobsResponse|error - return all bulk delete jobs submitted by the tenant 1. <b>id</b>: Job Id created when bulk delete job is accepted 2. <b>timestamp</b>: Timestamp when the job was created 3. <b>status</b>: current status of the job. Possible values can be <br><b>[IN_PROGRESS, COMPLETED_WITH_ERRORS, COMPLETED, FAILED]</b>
submitDeleteJob![](/images/permalink.svg)
function submitDeleteJob(BulkDeleteRequest payload) returns BulkDeleteResponse|error
initiate job to delete all files for the given asset identifier
Parameters
- payload BulkDeleteRequest - bulk delete request
Return Type
- BulkDeleteResponse|error - bulk delete request has been accepted for processing
getDeleteJobStatus![](/images/permalink.svg)
function getDeleteJobStatus(string id) returns BulkDeleteJobResponse|error
get the job status of bulk delete operation
Parameters
- id string - Job Id of bulk delete operation
Return Type
- BulkDeleteJobResponse|error - return bulk delete job by job id submitted by the tenant 1. <b>id</B>: Job Id created when bulk delete job is accepted 2. <b>timestamp</b>: Timestamp when the job was created 3. <b>status</b>: current status of the job. Possible values can be<br><b>[IN_PROGRESS, COMPLETED_WITH_ERRORS, COMPLETED, FAILED]</b>
Records![](/images/permalink.svg)
siemens.iotandstorage.iotfileservice: AssetStatus![](/images/permalink.svg)
Fields
- id string - asset id
- path string - path from which the files are getting deleted. Default value is '/' considered as root path.
- timeFrom string? - files created after this time are considered for deletion
- timeTo string? - files created before this time are considered for deletion
- status string - status of file deletion for this asset id
- filesToBeDeleted int - total number of files to be deleted
- filesDeleted int - total files delete
- filesRemaining int - total files remaining for deletion due to either the job is still in progress or job failed due to some error
- 'error string? - error due to which file deletion failed for this asset id. if files deletion is successful then this field will be null.
siemens.iotandstorage.iotfileservice: Badrequest![](/images/permalink.svg)
Fields
- id string? -
- message string? -
siemens.iotandstorage.iotfileservice: BulkDeleteAsset![](/images/permalink.svg)
Fields
- id string - Unique identifier for asset instance
- timeFrom string? - files created after this time are considered for deletion, If not provided, all the files created before submittion of job get deleted. UTC aligned date-time with ISO date format is supported. "2020-03-01Z" "2020-03-01T09Z" "2020-03-01T09:12Z" "2020-03-01T09:12:28Z" "2020-03-01T09:12:28.110Z"
- timeTo string? - files created before this time are considered for deletion, If not provided, all the files created before submittion of job get deleted. UTC aligned date-time with ISO date format is supported. UTC aligned date-time with ISO date format is supported. "2020-06-01Z" "2020-06-01T09Z" "2020-06-01T09:12Z" "2020-06-01T09:12:28Z" "2020-06-01T09:12:28.110Z"
siemens.iotandstorage.iotfileservice: BulkDeleteJobResponse![](/images/permalink.svg)
Fields
- id string - unique Identifier for delete job
- timestamp string - time when the delete job submitted
- status string - overall status of the job
- assets AssetStatus[] -
siemens.iotandstorage.iotfileservice: BulkDeleteRequest![](/images/permalink.svg)
Fields
- assets BulkDeleteAssetsArray? -
siemens.iotandstorage.iotfileservice: BulkDeleteResponse![](/images/permalink.svg)
Fields
- id string - unique Identifier for the delete job
- timestamp string - time when the delete job submitted
- status string - overall status of delete job
siemens.iotandstorage.iotfileservice: ClientHttp1Settings![](/images/permalink.svg)
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
siemens.iotandstorage.iotfileservice: Conflict![](/images/permalink.svg)
Fields
- id string? -
- message string? -
siemens.iotandstorage.iotfileservice: ConnectionConfig![](/images/permalink.svg)
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
siemens.iotandstorage.iotfileservice: DeleteJobsResponse![](/images/permalink.svg)
Fields
- deleteJobs BulkDeleteResponseArray? -
siemens.iotandstorage.iotfileservice: Error![](/images/permalink.svg)
Fields
- id string? -
- message string? -
siemens.iotandstorage.iotfileservice: ErrorBody![](/images/permalink.svg)
Fields
- code string? -
- logref string? -
- message string? -
siemens.iotandstorage.iotfileservice: File![](/images/permalink.svg)
Fields
- name string? -
- path string? -
- 'type string? -
- size int? -
- timestamp string? -
- created string? -
- updated string? -
- createdBy string? -
- updatedBy string? -
- description string? -
- etag int? -
siemens.iotandstorage.iotfileservice: Fileslist![](/images/permalink.svg)
Fields
- objectKey string? -
- partNo int? -
- created string? -
siemens.iotandstorage.iotfileservice: IotFileError![](/images/permalink.svg)
Fields
- errors ErrorBody[]? -
siemens.iotandstorage.iotfileservice: Notfound![](/images/permalink.svg)
Fields
- id string? -
- message string? -
siemens.iotandstorage.iotfileservice: Notmodified![](/images/permalink.svg)
Fields
- id string? -
- message string? -
siemens.iotandstorage.iotfileservice: OAuth2RefreshTokenGrantConfig![](/images/permalink.svg)
OAuth2 Refresh Token Grant Configs
Fields
- Fields Included from *OAuth2RefreshTokenGrantConfig
- refreshUrl string(default "https://oauth.simple.api/token") - Refresh URL
siemens.iotandstorage.iotfileservice: ProxyConfig![](/images/permalink.svg)
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
siemens.iotandstorage.iotfileservice: Rangenotsatisfiable![](/images/permalink.svg)
Fields
- id string? -
- message string? -
siemens.iotandstorage.iotfileservice: Unauthorized![](/images/permalink.svg)
Fields
- id string? -
- message string? -
Import
import ballerinax/siemens.iotandstorage.iotfileservice;
Metadata
Released date: over 1 year ago
Version: 1.5.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Internet of Things/Device Management
Cost/Paid
Contributors