Pinata Docs
Search…
Data Usage
/data/userPinnedDataTotal
This endpoint returns the total combined size for all content that you've pinned through Pinata.

Getting Usage Data

get
https://api.pinata.cloud
/data/userPinnedDataTotal
cURL
Node.js
Python
Go
curl --location --request GET 'https://api.pinata.cloud/data/userPinnedDataTotal' \
--header 'Authorization: Bearer PINATA JWT'
var axios = require('axios');
​
var config = {
method: 'get',
url: 'https://api.pinata.cloud/data/userPinnedDataTotal',
headers: {
'Authorization': 'Bearer PINATA JWT'
}
};
​
const res = await axios(config);
​
console.log(res.data);
import requests
​
url = "https://api.pinata.cloud/data/userPinnedDataTotal"
​
payload={}
headers = {
'Authorization': 'Bearer PINATA JWT'
}
​
response = requests.request("GET", url, headers=headers, data=payload)
​
print(response.text)
​
package main
​
import (
"fmt"
"net/http"
"io/ioutil"
)
​
func main() {
​
url := "https://api.pinata.cloud/data/userPinnedDataTotal"
method := "GET"
​
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
​
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer PINATA JWT")
​
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))
}
Last modified 2mo ago
Copy link