This API serves as a powerful tool for retrieving comprehensive information about files stored on the IPFS, a decentralized and distributed file storage protocol.The weightage for this API is 10
Gets the file details from the storage under the given instance.
200: OK Uploaded Files details fetched successfully
Copy {
"Data": {
"data": [
{
"_id": "650d4add128b1b6f75e72b99",
"apiHits": 0,
"createdAt": "2023-09-22T08:05:49.876Z",
"credits": 0,
"currentFlag": false,
"fileName": "download.png",
"fileSize": "5212",
"fileURL": "https://ipfs-gateway.node.krypcore.io/api/v0/ipfs/b0c27263-efba-4cfa-83e6-xxxxxxxxxxxx/ipfs/QmW6Vavg8DMvobsvA2wjYNktaCEYp7bxdmxxxxxxxxxxxxx",
"instanceID": "INS_ST_19_2023919",
"instanceKey": "",
"ipfsHash": "QmbVnEgY9K1Qypb6Rqf81U8SfmoUfYNgTdsJm3JtvSTYKZ",
"ipfsStorageId": "SM_IPFS_2023922549876127864",
"pinStatus": true,
"status": "ACTIVE",
"storageProtocol": "IPFS",
"updatedAt": "2023-09-22T08:05:49.876Z",
"uploadedByUserId": "",
"version": 0
},
],
"totalCount": 1
},
"Message": "Records fetched successfully",
"Status": "SUCCESS"
}
Take a look at how you might call this method using our official libraries, or via curl
:
curl Node.js (Fetch) Python Golang
Copy curl --location --request POST 'https://api.krypcore.com/api/v0/storagemanageripfs/getFileDetails' \
--header 'Authorization: xxxxxx-xxxx-xxxx-xxxx-xxxxxxx' \
--header 'DappId: xxx_xx_xx_xxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"page": 0,
"pageSize": 10
}'
Copy var axios = require('axios');
var data = JSON.stringify({
"page": 0,
"pageSize": 10
});
var config = {
method: 'post',
url: 'https://api.krypcore.com/api/v0/storagemanageripfs/getFileDetails',
headers: {
'Authorization': 'xxxxxx-xxxx-xxxx-xxxx-xxxxxxx',
'DappId': 'xxx_xx_xx_xxxxxxxx',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Copy import requests
import json
url = "https://api.krypcore.com/api/v0/storagemanageripfs/getFileDetails"
payload = json.dumps({
"page": 0,
"pageSize": 10
})
headers = {
'Authorization': 'xxxxxx-xxxx-xxxx-xxxx-xxxxxxx',
'DappId': 'xxx_xx_xx_xxxxxxxx',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Copy package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://web3-proxy-dev.krypcore.com/api/v0/storagemanageripfs/getFileDetails"
method := "POST"
payload := strings.NewReader(`{
"page": 0,
"pageSize": 10
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxx")
req.Header.Add("DappId", "xxxxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}