Pin Status & Pin List

Checking the pin status of a specific CID or obtaining a list of all your pinned CIDs from the Sagittarius A* IPFS Cluster.

Pin Status Request

Overview

The Pin Status Request, a GET request to the /ipfs/pin/status endpoint, is an IPFS Pin Orchestration request used to check the pin status for the provided CID on the Sagittarius A* IPFS Cluster and return information about the pin status of the CID requested.

Request Spec
  /ipfs/pin/status/{cid}:
    get:
      summary: Obtain the pin status of an IPFS CID.
      parameters:
        - in: path
          name: cid
          required: true
          description: An IPFS Content Identifier (CID).
          schema:
            type: string

Sending the Request

Sending a request to the /ipfs/pin/status endpoint requires a valid API Key to be provided in the x-api-key header, and that an IPFS CID be provided.

Pin Status Request
curl -X GET -H "x-api-key: Your-API-Key" https://api.sgr-a.xyz/ipfs/pin/status/QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u 

When a Pin Status Request completes successfully, the returned output will contain a success message for confirmation, along with information about the pin status, most importantly a pinned or unpinned status.

Pin Status Output
{
    "message": "Pin status retrieved successfully",
    "result": {
        "cid": "QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u",
        "peer_map": [
            {
                "peername": "PEER_HOSTNAME",
                "status": "pinned" OR "unpinned",
                "timestamp": "TIMESTAMP"
            }
        ]
    }
}

Pin List

Overview

The Pin List Request, a GET request to the /ipfs/pin/ls endpoint, is an IPFS Pin Orchestration request used to retrieve a list of all pinned CIDs for the provided apiKey.

Request Spec
  /ipfs/pin/ls:
    get:
      summary: List all CIDs pinned by the requestor.

Sending the Request

Sending a request to the /ipfs/pin/ls endpoint requires a valid API key to be provided in the x-api-key header.

Pin List Request
curl -X GET -H "x-api-key: Your-API-Key" https://api.sgr-a.xyz/ipfs/pin/ls

When a Pin List Request completes successfully, the returned output will contain a list of the pinned CIDs associated with the apiKey from the x-api-key header.

Pin List Output
[
    {
        "mode": "recursive",
        "cid": "QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u",
        "type": "pin",
        "timestamp": "TIMESTAMP"
    }
]

Last updated