{"name": "sample name", "keyvalues":{"key1": "value1","key2": "value2"}}
Parameters
Header
Body
Response
{
"data": {
"id": "string",
"file_record_id": "string",
"root_hash": "string",
"cid": "string",
"user_id": "string",
"date_pinned": "2023-01-01T11:11:11.111111Z",
"date_unpinned": "2023-11-11T11:11:11.111111Z",
"pinned": false,
"is_pin_by_hash": false,
"sub_hash_status": "string",
"is_dir": false,
"metadata": {
"name": "string",
"type": "string"
},
"status": "string"
},
"status": "success"
}
curl --location --request POST 'https://api-ipfs.attoaioz.cyou/api/pinning/' \
--header 'pinning_api_key: KEY' \
--header 'pinning_secret_key: SECRET' \
--form 'file=@"/test.png"'
var axios = require('axios');
var FormData = require('form-data');
var fs = require('fs');
var data = new FormData();
data.append('file', fs.createReadStream('/test.png'));
var config = {
method: 'post',
url: 'https://api-ipfs.attoaioz.cyou/api/pinning/',
headers: {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET',
...data.getHeaders()
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "https://api-ipfs.attoaioz.cyou/api/pinning/"
payload={}
files=[
('file',('test.png',open('/test.png','rb'),'image/png'))
]
headers = {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
package main
import (
"fmt"
"bytes"
"mime/multipart"
"os"
"path/filepath"
"io"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-ipfs.attoaioz.cyou/api/pinning/"
method := "POST"
payload := &bytes.Buffer{}
writer := multipart.NewWriter(payload)
file, errFile1 := os.Open("/test.png")
defer file.Close()
part1,
errFile1 := writer.CreateFormFile("file",filepath.Base("/test.png"))
_, errFile1 = io.Copy(part1, file)
if errFile1 != nil {
fmt.Println(errFile1)
return
}
err := writer.Close()
if err != nil {
fmt.Println(err)
return
}
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("pinning_api_key", "KEY")
req.Header.Add("pinning_secret_key", "SECRET")
req.Header.Set("Content-Type", writer.FormDataContentType())
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))
}
{
hash_to_pin: CID,
metadata: {
name: string,
keyvalues: {
key1: value1,
key2: value2
}
}
}
Parameters
Header
Body
Response
{
"data": {
"id": "string",
"file_record_id": "string",
"root_hash": "string",
"cid": "string",
"user_id": "string",
"date_pinned": "2023-01-01T11:11:11.111111Z",
"date_unpinned": "2023-11-11T11:11:11.111111Z",
"pinned": false,
"is_pin_by_hash": true,
"is_dir": false,
"metadata": {
"name": "string"
},
"status": "string"
},
"status": "success"
}
curl --location --request POST 'https://api-ipfs.attoaioz.cyou/api/pinning/pinByHash' \
--header 'pinning_api_key: KEY' \
--header 'pinning_secret_key: SECRET' \
--header 'Content-Type: application/json' \
--data-raw '{
"hash_to_pin": "Qmc1135ziMvmFG534i75E8HpJoLqzLzgKBxfjBV9cBsMAs",
"metadata": {
"name": "name-ipfs-hash"
}
}'
var axios = require('axios');
var data = JSON.stringify({
"hash_to_pin": "Qmc1135ziMvmFG534i75E8HpJoLqzLzgKBxfjBV9cBsMAs",
"metadata": {
"name": "name-ipfs-hash"
}
});
var config = {
method: 'post',
url: 'https://api-ipfs.attoaioz.cyou/api/pinning/pinByHash',
headers: {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api-ipfs.attoaioz.cyou/api/pinning/pinByHash"
payload = json.dumps({
"hash_to_pin": "Qmc1135ziMvmFG534i75E8HpJoLqzLzgKBxfjBV9cBsMAs",
"metadata": {
"name": "name-ipfs-hash"
}
})
headers = {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-ipfs.attoaioz.cyou/api/pinning/pinByHash"
method := "POST"
payload := strings.NewReader(`{
"hash_to_pin": "Qmc1135ziMvmFG534i75E8HpJoLqzLzgKBxfjBV9cBsMAs",
"metadata": {
"name": "name-ipfs-hash"
}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("pinning_api_key", "KEY")
req.Header.Add("pinning_secret_key", "SECRET")
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))
}
/pinning/{pinId}
endpoint, where {pinId}
is the ID of the pin you want to retrieve information for.Parameters
Path
Header
Response
{
"data": {
"id": "string",
"file_record_id": "string",
"root_hash": "string",
"cid": "string",
"size": number,
"user_id": "string",
"date_pinned": "2023-01-01T11:11:11.111111Z",
"date_unpinned": "2023-11-11T11:11:11.111111Z",
"pinned": true,
"is_pin_by_hash": false,
"sub_hash_status": "string",
"is_dir": false,
"metadata": {
"name": "string",
"type": "string"
},
"status": "string"
},
"status": "success"
}
curl --location --request GET 'https://api-ipfs.attoaioz.cyou/api/pinning/3c3fec2a-ca65-4b8e-bcf3-c8e2ceaa23d2' \
--header 'pinning_api_key: KEY' \
--header 'pinning_secret_key: SECRET'
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api-ipfs.attoaioz.cyou/api/pinning/3c3fec2a-ca65-4b8e-bcf3-c8e2ceaa23d2',
headers: {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "https://api-ipfs.attoaioz.cyou/api/pinning/3c3fec2a-ca65-4b8e-bcf3-c8e2ceaa23d2"
payload = ""
headers = {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-ipfs.attoaioz.cyou/api/pinning/3c3fec2a-ca65-4b8e-bcf3-c8e2ceaa23d2"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("pinning_api_key", "KEY")
req.Header.Add("pinning_secret_key", "SECRET")
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))
}
Parameters
Query
Header
Response
{
"data": {
"totals": {
"files": number,
"size": number
},
"pins": [
{
"id": "string",
"file_record_id": "string",
"root_hash": "string",
"cid": "string",
"size": number,
"user_id": "string",
"date_pinned": "2023-01-01T11:11:11.111111Z",
"date_unpinned": "2023-11-11T11:11:11.111111Z",
"pinned": true,
"is_pin_by_hash": true,
"sub_hash_status": "string",
"is_dir": false,
"metadata": {
"name": "string"
},
"status": "string"
}
]
},
"status": "success"
}
curl --location --request GET 'https://api-ipfs.attoaioz.cyou/api/pinning/pins/?offset=0&limit=10&pinned=true&sortBy=name&sortOrder=ASC' \
--header 'pinning_api_key: KEY' \
--header 'pinning_secret_key: SECRET'
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api-ipfs.attoaioz.cyou/api/pinning/pins/?offset=0&limit=10&pinned=true&sortBy=name&sortOrder=ASC',
headers: {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "https://api-ipfs.attoaioz.cyou/api/pinning/pins/?offset=0&limit=10&pinned=true&sortBy=name&sortOrder=ASC"
payload={}
headers = {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET'
}
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-ipfs.attoaioz.cyou/api/pinning/pins/?offset=0&limit=10&pinned=true&sortBy=name&sortOrder=ASC"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("pinning_api_key", "KEY")
req.Header.Add("pinning_secret_key", "SECRET")
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))
}
Parameters
Path
Header
Response
{
"data": {
"id": "string",
"file_record_id": "string",
"root_hash": "string",
"cid": "string",
"size": number,
"user_id": "string",
"date_pinned": "2023-01-01T11:11:11.111111Z",
"date_unpinned": "2023-11-11T11:11:11.111111Z",
"pinned": true,
"is_pin_by_hash": true,
"is_dir": false,
"metadata": {
"name": "string"
},
"status": "string"
},
"status": "success"
}
curl --location --request DELETE 'https://api-ipfs.attoaioz.cyou/api/pinning/unpin/:pinId
--header 'pinning_api_key: KEY' \
--header 'pinning_secret_key: SECRET'
var axios = require('axios');
var config = {
method: 'delete',
url: 'https://api-ipfs.attoaioz.cyou/api/pinning/unpin/e5c4456d-5e5c-465d-a02a-3a536fc6e718',
headers: {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "https://api-ipfs.attoaioz.cyou/api/pinning/unpin/e5c4456d-5e5c-465d-a02a-3a536fc6e718"
payload={}
headers = {
'pinning_api_key': 'KEY',
'pinning_secret_key': 'SECRET'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-ipfs.attoaioz.cyou/api/pinning/unpin/e5c4456d-5e5c-465d-a02a-3a536fc6e718"
method := "DELETE"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("pinning_api_key", "KEY")
req.Header.Add("pinning_secret_key", "SECRET")
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))
}
ON THIS PAGE