Skip to main content

Collections

Please note: This is an introductory reference

For the most up-to-date information, refer to the API Reference.
🚧 The information provided in this section cannot be programmatically updated and may be subject to inconsistencies over time.

Core Endpoints
  • Testnet: http://platform.canary.enjin.io/graphql
  • Mainnet: http://platform.enjin.io/graphql

This is a detailed reference guide that explains the most commonly used operations.

Get Collection​

The GetCollection query allows you to retrieve detailed information about a specific collection by providing its collectionId. This information includes collection attributes, token details, and associated accounts.

Reading Third-Party Collections

Please note that the Enjin Platform Cloud is set up to show only the collections and tokens that were created via the auth-ed Enjin Platform Cloud account.
To get a collection that was created elsewhere (via a different Enjin Platform Cloud account / NFT.io / Enjin Console / etc.) the collection must be "Tracked" first, or the query response will return an error.
Learn more about tracking a collection in the Tracking Collections section.

query GetCollection {
GetCollection(collectionId: 7153) {
collectionId
maxTokenCount
maxTokenSupply
forceSingleMint
frozen
network
owner {
account {
publicKey
address
}
}
attributes {
key
value
}
tokens {
edges {
cursor
node {
tokenId
}
}
totalCount
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
accounts {
edges {
cursor
node {
accountCount
isFrozen
wallet {
account {
publicKey
address
}
}
approvals {
expiration
wallet {
account {
publicKey
address
}
}
}
}
}
totalCount
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}
}

GetCollections​

🚧 Using the Enjin Platform Cloud?

The Enjin Platform Cloud has collections and tokens scoping enabled, to ensure a better experience by only showing you collections and tokens you created using the cloud.
If you wish to fetch collections/tokens created outside of your cloud account, consider transitioning to the Enterprise On-Prem Enjin Platform.

The GetCollections query allows you to retrieve an array of collections. You can optionally filter the collections by providing a list of collection IDs that you are interested in.

query GetCollections {
GetCollections(collectionIds: [7153]) {
edges {
cursor
node {
collectionId
maxTokenCount
maxTokenSupply
forceSingleMint
frozen
network
owner {
account {
publicKey
address
}
}
attributes {
key
value
}
tokens {
edges {
cursor
node {
tokenId
}
}
totalCount
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
accounts {
edges {
cursor
node {
accountCount
isFrozen
wallet {
account {
publicKey
address
}
}
approvals {
expiration
wallet {
account {
publicKey
address
}
}
}
}
}
totalCount
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalCount
}
}