Pinata Docs
Search
⌃K

List Content In Submarined Folder

/content/:id/list
When uploading folders, it is possible to query one level deep into those folders with this endpoint. This endpoint accepts one URL argument—the file's ID, not the CID.
If a folder has sub folders, this endpoint will not allow you to list the contents of each individual sub folder. Instead, it will list the path of the content like this: folderName/fileName.

List Content in Submarined Folder

get
https://managed.mypinata.cloud/api/v1
/content/:id/list
Parameters
Path
id*
File ID (not CID)
Header
x-api-key*
SUBMARINE KEY
Responses
200: OK
cURL
Node.js
Python
Go
curl --location --request GET 'https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab/list' \
--header 'x-api-key: SUBMARINE KEY'
var axios = require('axios');
var config = {
method: 'get',
url: 'https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab/list',
headers: {
'x-api-key': 'SUBMARINE KEY'
}
};
const res = await axios(config);
console.log(res.data);
import requests
url = "https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab/list"
payload={}
headers = {
'x-api-key': 'SUBMARINE KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab/list"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("x-api-key", "SUBMARINE KEY")
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))
}