Skip to main content

versions

Description:

Fetch all the versions of a file

Request

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

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> where enduser has moi_idNo if enduser has moi_id
enduser_signature<signature gotten after signing enduser_nonce by enduser> where enduser has moi_idNo if enduser has moi_id
enduserIDId of the enduser if end-user doesn't have moi_id Yes

Parameters#

Param KeyParam TypeDescriptionOptional
pathStringFile name or path No

Response Array#

FieldDescription
versionversion of the file
hashContent identifier of the file
filesizeSize of the file uploaded
replication Number of replicas the file have
lastUpdatedDate of the file when uploaded

Sample Response#

{
"meta": {
"code": 200,
"requestId": "c1665362-97b5-4666-a03d-fcc742853d26",
"message": "got status successfully"
},
"data": [
{
"active": true,
"version": 3,
"hash": "QmddEo2Quaip5Bo6UEx68AGL28i9pMsZpLZ5W7C7y3vNS6",
"filesize": 3028,
"replication": 3,
"filetype": "",
"lastUpdated": "2021-05-24T14:08:44.977920408+02:00"
},
{
"active": true,
"version": 2,
"hash": "Qme8tYpxN3KGnscaUfDPxWtbQz5TzvwRebzkSFmZPkrZ3x",
"filesize": 3028,
"replication": 3,
"filetype": "",
"lastUpdated": "2021-05-24T14:08:37.995887562+02:00"
},
{
"active": true,
"version": 1,
"hash": "QmbiUKEgKuYv7jQTPnMjEcY8Bi1iHvp8bqXePDDsH5vWkE",
"filesize": 3028,
"replication": 3,
"filetype": "",
"lastUpdated": "2021-05-24T14:07:49.571556185+02:00"
}
]
}