file.info

The file.info command is used to get information about an uploaded file. For more information on the way files are used in the IoT Portal, see, see Understanding files.

TR50 Request

{
  "cmd": {
    "command": "file.info",
    "params": {
      "thingKey": "myname.txt",
      "fileName": "mything"
    }
  }
}

Request Parameters

Name Type Required Description
thingKey String The Thing associated with the file. Defaults to the current session's Thing.
global Boolean If set to true, the file is a global file and the thingKey parameter will be ignored.
fileName String Yes The name of the file.

TR50 Response

If the command is sent successfully a success message and params list is returned. Otherwise, an error and error message will be returned.

{
  "cmd": {
    "success": true
	"params": {
	  "id": "6286bb84908d3f000178227f",
	  "uploadDate": "2022-05-19T21:49:56.825Z",
	  "length": 341256,
	  "public": true,
	  "tags": [
	 	"version_1x",
		"jpg"
	  ],
	  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
	  "crc32": 4169660685
	  }
      }
  }
				

Response Parameters

Name Type Description
id String The unique identifier of the file.
uploadDate String The timestamp associated with the creation of this file.
fileName String The name of the file.
public Boolean Whether the file is publicly accessible.
length Integer The size of the file in bytes.
userName String The username associated with the file is basic authentication is required for file access.
tags Array The tags associated with the file.
sha256 String The SHA256 hash of the file to detect data corruption.
crc32 Integer The checksum value to detect data corruption.
private Boolean Whether the file requires an authentication token to access.
orgKey String The org key of the organization that owns the file.
thingKey String If the file is associated with a thing, the thing key will be returned.