Skip to main content

listfiles

Description:

List all the files with complete details under requested path

Request

https://api.moinet.io/moibit/v1/listfiles

Request type - POST

Headers#

Header KeyHeader ValueOptional
nonce<developer_nonce> No
signature<signature gotten after signing developer_nonce by developer> No
developerKeypublic id of the developerNo
networkIDID of the network the file exist No
appIDID of the app the file the file exist Yes
enduser_nonce<enduser nonce>No if enduser has moi_id
enduser_signature<signature gotten after signing enduser_nonce by enduser>No if enduser has moi_id
enduserIDId of the enduser if end-user doesn't have moi_id Yes

Content-Type: multipart/form-data

Parameters#

Param KeyParam TypeDescriptionOptional
pathStringpath under which you want to list filesNo

Response Array#

FieldDescription
versionversion of the file
hashContent identifier of the file
filesizeSize of the file uploaded
replication Number of replicas
encryptionType Encryption type of file
lastUpdatedDate of the file when uploaded
directory Parent directory of the file being uploaded
path Absolute path of the file in system
recoveryTime Time duration till when one can recover this file once deleted
nodeAddressID of the node that processed this file

Sample Response#

{
"meta": {
"code": 200,
"requestId": "24d43e04-1b28-4621-bb3c-db1049f6e31a",
"message": "got status successfully"
},
"data": [
{
"active": true,
"enable": true,
"version": 2,
"hash": "QmcKncEnSqnByKRnVPMnuQZQyhek41mygT81xoaRRnQiu6",
"filesize": 2396,
"replication": 4,
"filetype": "",
"encryptionType": 2,
"encryptionKey": "bc6f8aae9d628bc1b8eb8947f2fd1a87e5083886b2073cf700d7a9a5dc008bae",
"lastUpdated": "2021-05-21T05:32:25.44571099-05:00",
"directory": "/",
"isDir": false,
"path": "/file27.txt",
"recoveryTime": 0,
"permanentDelete": false,
"nodeAddress": "0xb9f61aaCCc328156D4a46e241Aad46B6D1e9ee1e",
"appDeleted": false,
"userDeleted": false
},
{
"active": true,
"enable": true,
"version": 7,
"hash": "QmQPMrMCRGkAQDbgbJK1CRmJWWQesQhydSDAgfudmT1qBT",
"filesize": 1055736,
"replication": 3,
"filetype": "",
"encryptionType": 1,
"encryptionKey": "bc6f8bae9d628bc1b8eb8947f2fd1a87e5083886b2073cf798d7a9a5dc778dab",
"lastUpdated": "2021-05-21T12:30:55.710184153+02:00",
"directory": "/",
"isDir": false,
"path": "/file20.mp4",
"recoveryTime": 0,
"permanentDelete": false,
"nodeAddress": "0xaA9417D5A75B8a81a27a3cA67A9d98a25a1b9C8c",
"appDeleted": false,
"userDeleted": false
},
{
"active": true,
"enable": true,
"version": 3,
"hash": "Qmb63vnawthsfNauWQ4sB4cU2Ln1zjZKgvPd4AhLZMDGpp",
"filesize": 67,
"replication": 2,
"filetype": "",
"encryptionType": 3,
"encryptionKey": "",
"lastUpdated": "2021-05-21T05:33:13.120631191-05:00",
"directory": "/",
"isDir": false,
"path": "/file40.txt",
"recoveryTime": 0,
"permanentDelete": false,
"nodeAddress": "0x6d543F7B5Cf7843A8f64861c2aEd3Ad5B05E44DF",
"appDeleted": false,
"userDeleted": false
}
]
}