Gateways


Get list public & dedicated gateways

The IPFS API provides a list of public and dedicated gateways that you can use to access content on the IPFS network. Here is how you can retrieve the list of gateways using the provided API endpoint:
GEThttps://api-ipfs.attoaioz.cyou/api/gateways/

Parameters

Query

offset
(default 0)
limit
(default 10)
type
Filter by type (options: Public, Dedicated, all) (default all)

Header

pinning_api_key*
PINNING-API-KEY
pinning_secret_key*
PINNING-SECRET-KEY

Response

200: OK
{
    "data": {
        "totals": number,
        "gateways": [
            {
                "name": "string",
                "host": "string",
                "type": "string",
                "bandwidth": number,
                "operation": "string",
                "active": true
            }
        ]
    },
    "status": "success"
}
curl --location --request GET 'https://api-ipfs.attoaioz.cyou/api/gateways/?offset=0&limit=10&type=all' \
--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/gateways/?offset=0&limit=10&type=all',
  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/gateways/?offset=0&limit=10&type=all"

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/gateways/?offset=0&limit=10&type=all"
  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))
}
Please replace YOUR_API_KEY and YOUR_SECRET_KEY with your actual pinning API key and secret key.