siemens.iotandstorage.iotfileservice
Module siemens.iotandstorage.iotfileservice
API
Definitions
ballerinax/siemens.iotandstorage.iotfileservice Ballerina library
Overview
The Siemens IoT File Service API v3.2.4 connector(https://developer.mindsphere.io/apis/core-identitymanagement/api-identitymanagement-overview.html) OpenAPI Specification.
The IoT File API enables storing and retrieving files for asset (entity) instances.
Key Features
- Programmatic access to create and manage resources via REST API
- Manage user accounts and profiles
- Secure authentication with API key or OAuth support
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a Siemens MindSphere account.
- Obtain tokens by following this guide.
Clients
siemens.iotandstorage.iotfileservice: Client
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
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
function getFile(string entityId, string filepath, int? ifNoneMatch, string? range) returns string|errorread 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
delete a file
Parameters
- entityId string - unique identifier of the asset (entity)
- filepath string - unique identifier of the file
searchFiles
function searchFiles(string entityId, int? offset, int? 'limit, boolean? count, string? 'order, string? filter) returns File[]|errorsearch 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
list multi part uploads
getDeleteJobs
function getDeleteJobs() returns DeleteJobsResponse|errorget 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
function submitDeleteJob(BulkDeleteRequest payload) returns BulkDeleteResponse|errorinitiate 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
function getDeleteJobStatus(string id) returns BulkDeleteJobResponse|errorget 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
siemens.iotandstorage.iotfileservice: AssetStatus
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
Fields
- id? string -
- message? string -
siemens.iotandstorage.iotfileservice: BulkDeleteAsset
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
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
Fields
- assets? BulkDeleteAssetsArray -
siemens.iotandstorage.iotfileservice: BulkDeleteResponse
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
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
Fields
- id? string -
- message? string -
siemens.iotandstorage.iotfileservice: ConnectionConfig
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-forwardedheader
- 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
Fields
- deleteJobs? BulkDeleteResponseArray -
siemens.iotandstorage.iotfileservice: Error
Fields
- id? string -
- message? string -
siemens.iotandstorage.iotfileservice: ErrorBody
Fields
- code? string -
- logref? string -
- message? string -
siemens.iotandstorage.iotfileservice: File
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
Fields
- objectKey? string -
- partNo? int -
- created? string -
siemens.iotandstorage.iotfileservice: IotFileError
Fields
- errors? ErrorBody[] -
siemens.iotandstorage.iotfileservice: Notfound
Fields
- id? string -
- message? string -
siemens.iotandstorage.iotfileservice: Notmodified
Fields
- id? string -
- message? string -
siemens.iotandstorage.iotfileservice: OAuth2RefreshTokenGrantConfig
OAuth2 Refresh Token Grant Configs
Fields
- Fields Included from *OAuth2RefreshTokenGrantConfig
- refreshUrl string(default "https://oauth.simple.api/token") - Refresh URL
siemens.iotandstorage.iotfileservice: ProxyConfig
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
Fields
- id? string -
- message? string -
siemens.iotandstorage.iotfileservice: Unauthorized
Fields
- id? string -
- message? string -
Array types
siemens.iotandstorage.iotfileservice: FileArr
FileArr
siemens.iotandstorage.iotfileservice: FileslistArr
FileslistArr
siemens.iotandstorage.iotfileservice: BulkDeleteAssetsArray
BulkDeleteAssetsArray
siemens.iotandstorage.iotfileservice: BulkDeleteResponseArray
BulkDeleteResponseArray
Import
import ballerinax/siemens.iotandstorage.iotfileservice;Metadata
Released date: 2 days ago
Version: 1.5.2
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.8.0
GraalVM compatible: Yes
Pull count
Total: 34
Current verison: 0
Weekly downloads
Keywords
Type/Connector
Vendor/Siemens
Area/Cloud & Infrastructure
Internet of Things/Device Management
Cost/Paid
Contributors