V2.1 Delete File

Delete a file from an asset.


This API is available in EnOS 2.1.0 and above.

Operation Permissions


Ensure that the application has been granted with the invoking permissions. For more information, see Getting API Calling Permissions.

Request Format

POST https://{integration-address}/connect-service/v2.1/files?action=delete

Note

{integration-address}: The gateway address of message integration service. Log in to the EnOS Application Portal > Developer Console and find it in Help > Environment Information .

Request Parameters(URI)

Note

Use one of the following methods to specify the asset:

  • Include assetId in the request

  • Include productKey + deviceKey in the request

Name

Location (Path/Query)

Mandatory/Optional

Data Type

Description

orgId

Query

Mandatory

String

The organization ID which the asset belongs to. How to get orgId>>

fileUri

Query

Mandatory

String

The URI of the file. Format: enos-connect://xxxx

assetId

Query

Optional (See Note above)

String

The asset ID. How to get assetID>>

productKey

Query

Optional (See Note above)

String

The product key. To be used with deviceKey .

deviceKey

Query

Optional (See Note above)

String

The device key. To be used with productKey .

Request Parameters (Header)

Name

Mandatory/Optional

Data Type

Description

apim-accesstoken

Mandatory

String

The access token obtained via token authentication. For more information, see Get Access Token

Samples

Request Sample

url: https://{integration-address}/connect-service/v2.1/files?action=delete&orgId=yourOrgId&fileUri=yourFileUri&assetId=yourAssetId
method: POST
requestHeader:
{
  "apim-accesstoken": "yourAccessToken"
}

Response Sample

{
"code": 0,
"msg": "OK",
"requestId": "6a02a5a5-49f0-4df1-b364-496ad2079033",
"data": {}
}

SDK Samples


You can access the SDK samples for Connection Service on GitHub: