Startrail APIs
  • 🛫Startrail PORT: All in one document for API/SDK
    • 🔀URL per environment
  • Issue transfer api
    • 📬Issue & Transfer SRR (NFT)
      • Request Signed URL for Upload/Download Files
      • File Information Metadata
      • Issue & Transfer
      • Webhook Setup
    • 📂Collection
      • Create Collection
      • Get Collection of LUW
    • 📢Change Logs
      • v1.2.0
      • v1.1.0
      • v1.0.1
  • Metadata Schema
    • 🪅Startrail Registry (SRR)
      • Version 2.2
      • Version 2.1
      • Version 2.0
    • 📤Transfer
      • Version 1.2
      • Version 1.1
      • Version 1.0
    • ☸️Custom History
      • Custom History of Exhibition
        • Version 1.2
      • Custom History of Auction
        • Version 1.3
      • Custom History of Appraisal
        • Version 1.1
      • Custom History of Restoration
        • Version 1.0
      • Custom History of Offchain
        • Version 1.1
  • Get SRR API
    • Get Owned SRRs
    • Get SRR by Collection contract address and Token Id
      • 🚫Get SRR by Token Id
    • Description Of SRR Data
  • Ethereum Signature Validator API
    • 🔏Ethereum Signature Validator API
      • Change Logs
  • Startrail SDK Js
    • 🔰Introduction
    • 🏃Getting Started
      • RPC endpoint and chainId
    • 💳Wallet Methods
    • 🔮Startrail API Methods
      • Add Custom Histories To SRRs
      • Approve SRR By Commitment
      • Bulk
      • Check ERC2981 Royalty
      • Create Collection
      • Convert Metadata
      • Create SRR
      • Transfer Collection Ownership
      • Transfer SRR To Ethereum Address
      • Transfer From With Provenance
      • Update Metadata
    • 📱Login Providers
      • Interface
      • Whitelabeling/Customizing
        • Email Password
      • Hints
      • Multi Factor Account Management
    • 🦊MetaMask
    • 🎎Authentication Integration
    • 👾Errors
    • 📢Change logs
      • v1.35.0
      • v1.34.0
      • v1.33.2
      • v1.33.1
      • v1.32.0
      • v1.31.1
      • v1.30.6
      • v1.30.5
      • v1.30.4
      • v1.30.3
      • v1.30.2
      • v1.30.1
      • v1.30.0
      • v1.29.1
      • v1.29.0
      • v1.28.2
      • v1.28.1
      • v1.28.0
      • v1.27.1
      • v1.27.0
      • v1.26.0
      • v1.25.2(Security Patch)
  • Startrail API
    • 💱Transfer SRR Ownership By RevealHash
    • Get Transaction Data
    • Get Metadata By tokenid
  • Subgraph
    • 📊A introduction of subgraph
    • How to retrieve SRR metadata
Powered by GitBook

©2023 Startbahn, Inc.

On this page
  • Open the subgraph
  • Query
  • Important note

Was this helpful?

  1. Subgraph

How to retrieve SRR metadata

PreviousA introduction of subgraph

Last updated 1 year ago

Was this helpful?

The following is the method to retrieve the SRR metadata using the Subgraph.

For querying to subgraph, please check .

Open the subgraph

Open the following page in your browser.

Query

Paste the following query into the left pane of the screen and press the execute button.

{
  srrs(where: { tokenId: "469529826613"}) {
    tokenId
    metadataDigest
  }
}

The result of execution is here.

For example. Using Cloudflare's gateway

# https://cloudflare-ipfs.com/ipfs/{IPFS CID}
# https://nftstorage.link/ipfs/{IPFS CID}

Important note

For SRRs issued before 2023, the metadataDigest may contain a string starting with 0x. This can be verified with a tokenId like the one below:

{
  srrs(where: { tokenId: "38726816"}) {
    tokenId
    metadataDigest
  }
}
{
  "data": {
    "srrs": [
      {
        "tokenId": "38726816",
        "metadataDigest": "0x88466c2441cbe0751039298affb14257baea05f15f6c17ed98682de9ab643b06"
      }
    ]
  }
}

This metadataDigest is an IPFS CID. Please refer to . You can request the IPFS CID using an IPFS gateway as follows.

For example. 's gateway

You can find more IPFS gateways in .

In this case, the metadata is not be uploaded to IPFS. To retrieve the metadata, use the Startrail API endpoint via .

this page for an explanation of IPFS
NFT.Storage
here
Metadata in IPFS
Get Metadata by Token ID
this doc
Subgraph startrail-polygon
Alt text