Metatope Asset API Doc API Reference
Metatope Asset API Doc.
API Endpoints
Production:
https://a3.mtgames.io/graphql
Staging:
https://a3-staging.mtgames.io/graphql
Development:
https://a3-dev.mtgames.io/graphql
Collection
Collection API description
getCollections
Get all the available NFT collections supported in the platform.
This operation can be carried out by user who has the
mtgames.get_collectionpermission
These are the various filters that can be applied while fetching collections
This is used for pagination to check results in need sizes to improve performance
Example
Request Content-Types:
application/json
Query
query getCollections($searchParams: CollectionSearchInputDto!, $paginate: PaginateDto!){
getCollections(searchParams: $searchParams, paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
smartcontractAddress
blockchain
requiresBlockchainOwnership
availableForAll
createdAt
updatedAt
deletedAt
}
}
Variables
{
"searchParams": {
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
},
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Try it now
query getCollections($searchParams: CollectionSearchInputDto!, $paginate: PaginateDto!){
getCollections(searchParams: $searchParams, paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
smartcontractAddress
blockchain
requiresBlockchainOwnership
availableForAll
createdAt
updatedAt
deletedAt
}
}
{
"searchParams": {
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
},
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"getCollections": [
{
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
]
}
}
getCollection
Get a collection by the collection id. This is the internal collection id which can be gotten from the getCollections query
This operation can be carried out by user who has the
mtgames.get_collectionpermission
The id of the collection to get
Example
Request Content-Types:
application/json
Query
query getCollection($id: String!){
getCollection(id: $id){
id
name
displayName
previewImageUrl
fullimageUrl
smartcontractAddress
blockchain
requiresBlockchainOwnership
availableForAll
createdAt
updatedAt
deletedAt
}
}
Variables
{
"id": "string"
}
Try it now
query getCollection($id: String!){
getCollection(id: $id){
id
name
displayName
previewImageUrl
fullimageUrl
smartcontractAddress
blockchain
requiresBlockchainOwnership
availableForAll
createdAt
updatedAt
deletedAt
}
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"getCollection": {
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
}
}
updateCollection
Update an existing collection. You can provide only the fields you want to update.
This operation can be carried out by user who has the
mtgames.update_collectionpermission
The id of the collection to update
These is the data of the fields to be updated. All the fields are optional, you can supply just the fields you want to update
Example
Request Content-Types:
application/json
Query
mutation updateCollection($id: String!, $data: CollectionUpdateInputDto!){
updateCollection(id: $id, data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
smartcontractAddress
blockchain
requiresBlockchainOwnership
availableForAll
createdAt
updatedAt
deletedAt
}
}
Variables
{
"id": "string",
"data": {
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
}
Try it now
mutation updateCollection($id: String!, $data: CollectionUpdateInputDto!){
updateCollection(id: $id, data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
smartcontractAddress
blockchain
requiresBlockchainOwnership
availableForAll
createdAt
updatedAt
deletedAt
}
}
{
"id": "string",
"data": {
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateCollection": {
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
}
}
createCollection
Create a new nft collection in the platform.
This operation can be carried out by user who has the
mtgames.create_collectionpermission
The data field of the collection to create. You can check the dto details to see all fields details
Example
Request Content-Types:
application/json
Query
mutation createCollection($data: CollectionInputDto!){
createCollection(data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
smartcontractAddress
blockchain
requiresBlockchainOwnership
availableForAll
createdAt
updatedAt
deletedAt
}
}
Variables
{
"data": {
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
}
Try it now
mutation createCollection($data: CollectionInputDto!){
createCollection(data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
smartcontractAddress
blockchain
requiresBlockchainOwnership
availableForAll
createdAt
updatedAt
deletedAt
}
}
{
"data": {
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createCollection": {
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
}
}
deleteCollection
Delete a collection
This operation can be carried out by user who has the
mtgames.delete_collectionpermission
The id of the collection to delete
Example
Request Content-Types:
application/json
Query
mutation deleteCollection($id: String!){
deleteCollection(id: $id){
ok
}
}
Variables
{
"id": "string"
}
Try it now
mutation deleteCollection($id: String!){
deleteCollection(id: $id){
ok
}
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteCollection": {
"ok": "boolean"
}
}
}
Character
Character API description
getOwnCharacters
Get the characters for the current user(known from the auth token).
- You can also specify to fetch the
collectionfrom which the character belongs to. - You can also fetch the
assetsthat belong to the character. - The characters are based on the wallet addresses verified and attached to the user.
This operation can be carried out by user who has the
assets.get_own_characterspermission
This is used for pagination to check results in need sizes to improve performance
Example
Request Content-Types:
application/json
Query
query getOwnCharacters($paginate: PaginateDto!){
getOwnCharacters(paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
Variables
{
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Try it now
query getOwnCharacters($paginate: PaginateDto!){
getOwnCharacters(paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
{
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"getOwnCharacters": [
{
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"tokenNumber": "number",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"availableForAll": "boolean",
"isDefault": "boolean",
"collectionId": "string"
}
]
}
}
createDefaultCharacter
Create default characters available to all users To create a default character, you need to:
- Create a collection using
createCollectionand get the id - Use the
collectionIdin the payload ofcreateCharacter. Make sure to pass theisDefault: truein the request body - To create/upload the character assets, use the characterId from above, pass it in the
uploadCharacterAssetThis operation can be carried out by user who has the
mtgames.create_characterpermission
The data of the new character to create
Example
Request Content-Types:
application/json
Query
mutation createCharacter($data: CharacterInputDto!){
createCharacter(data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
Variables
{
"data": {
"collectionId": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"lastOwnershipProofedAt": "string",
"tokenNumber": "number",
"availableForAll": "boolean",
"isDefault": "boolean"
}
}
Try it now
mutation createCharacter($data: CharacterInputDto!){
createCharacter(data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
{
"data": {
"collectionId": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"lastOwnershipProofedAt": "string",
"tokenNumber": "number",
"availableForAll": "boolean",
"isDefault": "boolean"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createCharacter": {
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"tokenNumber": "number",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"availableForAll": "boolean",
"isDefault": "boolean",
"collectionId": "string"
}
}
}
getDefaultCharacters
Get default characters available to all users(auth or no auth). These are the characters marked with the isDefault = true
- You can also specify to fetch the
collectionfrom which the character belongs to. - You can also fetch the
assetsthat belong to the character.
This is used for pagination to check results in need sizes to improve performance
Example
Request Content-Types:
application/json
Query
query getDefaultCharacters($paginate: PaginateDto!){
getDefaultCharacters(paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
Variables
{
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Try it now
query getDefaultCharacters($paginate: PaginateDto!){
getDefaultCharacters(paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
{
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"getDefaultCharacters": [
{
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"tokenNumber": "number",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"availableForAll": "boolean",
"isDefault": "boolean",
"collectionId": "string"
}
]
}
}
getOwnCharactersCount
Get the count of the number of characters owned by the current user. - You can also specify to fetch the collection from which the character belongs to.
- You can also fetch the
assetsthat belong to the character.This operation can be carried out by user who has the
assets.get_own_characterspermission
Example
Request Content-Types:
application/json
Query
query getOwnCharactersCount{
getOwnCharactersCount{
count
}
}
Try it now
query getOwnCharactersCount{
getOwnCharactersCount{
count
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"getOwnCharactersCount": {
"count": "number"
}
}
}
getUserCharacter
Get characters of a user by providing the user id
This operation can be carried out by user who has the
assets.get_other_characterspermission
The id of the user to get the characters
This is used for pagination to check results in need sizes to improve performance
Example
Request Content-Types:
application/json
Query
query getUserCharacter($userId: String!, $paginate: PaginateDto!){
getUserCharacter(userId: $userId, paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
Variables
{
"userId": "string",
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Try it now
query getUserCharacter($userId: String!, $paginate: PaginateDto!){
getUserCharacter(userId: $userId, paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
{
"userId": "string",
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"getUserCharacter": [
{
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"tokenNumber": "number",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"availableForAll": "boolean",
"isDefault": "boolean",
"collectionId": "string"
}
]
}
}
getCharactersByWalletAddress
Get characters by providing the wallet addresses
This operation does not require any auth or permission
The walletAddresses to get the characters
The filters to be applied on the characters
This is used for pagination to check results in need sizes to improve performance
Example
Request Content-Types:
application/json
Query
query getCharactersByWalletAddress($walletAddresses: [String!]!, $filter: CharacterFilterInputDto, $paginate: PaginateDto!){
getCharactersByWalletAddress(walletAddresses: $walletAddresses, filter: $filter, paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
Variables
{
"walletAddresses": [
"string"
],
"filter": {
"blockchain": "string",
"collection": "string"
},
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Try it now
query getCharactersByWalletAddress($walletAddresses: [String!]!, $filter: CharacterFilterInputDto, $paginate: PaginateDto!){
getCharactersByWalletAddress(walletAddresses: $walletAddresses, filter: $filter, paginate: $paginate){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
{
"walletAddresses": [
"string"
],
"filter": {
"blockchain": "string",
"collection": "string"
},
"paginate": {
"pageNumber": "number",
"itemsPerPage": "number"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"getCharactersByWalletAddress": [
{
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"tokenNumber": "number",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"availableForAll": "boolean",
"isDefault": "boolean",
"collectionId": "string"
}
]
}
}
updateCharacter
Update the data of a character. Not all the character fields are update-able. You can check the CharacterUpdateInputDto model to see all the allowed fields for character update.
This operation can be carried out by user who has the
mtgames.update_characterpermission
The id of the user to update
The character data to update. All allowed fields are nullable. Pass only the fields you want to update.
Example
Request Content-Types:
application/json
Query
mutation updateCharacter($id: String!, $data: CharacterUpdateInputDto!){
updateCharacter(id: $id, data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
Variables
{
"id": "string",
"data": {
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"lastOwnershipProofedAt": "string",
"availableForAll": "boolean"
}
}
Try it now
mutation updateCharacter($id: String!, $data: CharacterUpdateInputDto!){
updateCharacter(id: $id, data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
{
"id": "string",
"data": {
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"lastOwnershipProofedAt": "string",
"availableForAll": "boolean"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateCharacter": {
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"tokenNumber": "number",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"availableForAll": "boolean",
"isDefault": "boolean",
"collectionId": "string"
}
}
}
createCharacter
Create a new character. A character is created under a collection(by providing the collectionId). A character is created for nft(tokenNumber) which the user owns in the nft collection. After creating a character, you can then create assets for the character.
This operation can be carried out by user who has the
mtgames.create_characterpermission
The data of the new character to create
Example
Request Content-Types:
application/json
Query
mutation createCharacter($data: CharacterInputDto!){
createCharacter(data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
Variables
{
"data": {
"collectionId": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"lastOwnershipProofedAt": "string",
"tokenNumber": "number",
"availableForAll": "boolean",
"isDefault": "boolean"
}
}
Try it now
mutation createCharacter($data: CharacterInputDto!){
createCharacter(data: $data){
id
name
displayName
previewImageUrl
fullimageUrl
tokenNumber
assetBundleKey
lastKnownOwnerAddress
lastKnownUserId
availableForAll
isDefault
lastOwnershipProofedAt
collectionId
createdAt
updatedAt
deletedAt
}
}
{
"data": {
"collectionId": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"lastOwnershipProofedAt": "string",
"tokenNumber": "number",
"availableForAll": "boolean",
"isDefault": "boolean"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createCharacter": {
"id": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"tokenNumber": "number",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"availableForAll": "boolean",
"isDefault": "boolean",
"collectionId": "string"
}
}
}
refreshOwnCharacters
Refresh own characters information from chain. This operation:
- gets the user wallet addresses attached to their account
- fetches all the nfts(allowed by the platform) of those wallet address
- updates the internal platform with that data for characters
- if a particular character already exist, it is skipped
- if a character does not already exist, it is created
- if an nft does not belong to the user anymore, the character is deleted from the platform
This operation can be carried out by user who has the
mtgames.create_characterpermission
Example
Request Content-Types:
application/json
Query
mutation refreshOwnCharacters{
refreshOwnCharacters{
ok
}
}
Try it now
mutation refreshOwnCharacters{
refreshOwnCharacters{
ok
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"refreshOwnCharacters": {
"ok": "boolean"
}
}
}
deleteCharacter
Delete a character
This operation can be carried out by user who has the
mtgames.delete_characterpermission
The id of the character to delete
Example
Request Content-Types:
application/json
Query
mutation deleteCharacter($id: String!){
deleteCharacter(id: $id){
ok
}
}
Variables
{
"id": "string"
}
Try it now
mutation deleteCharacter($id: String!){
deleteCharacter(id: $id){
ok
}
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteCharacter": {
"ok": "boolean"
}
}
}
CharacterAsset
CharacterAsset API description
updateCharacterAsset
Update a character asset. Not all asset fields are update-able. Check the CharacterAssetUpdateInputDto to see the allowed fields
This operation can be carried out by user who has the
mtgames.update_character_assetpermission
The id of the asset you want to update. This id can be gotten from the assets in the response of getOwnCharacters or getOwnCharacters queries
The asset data to update. You can pass only the fields you want to update.
Example
Request Content-Types:
application/json
Query
mutation updateCharacterAsset($id: String!, $data: CharacterAssetUpdateInputDto!){
updateCharacterAsset(id: $id, data: $data){
id
platform
resolution
variantType
url
checksum
characterId
createdAt
updatedAt
deletedAt
key
}
}
Variables
{
"id": "string",
"data": {
"platform": "string",
"resolution": "string",
"variantType": "string",
"fileS3Key": "string"
}
}
Try it now
mutation updateCharacterAsset($id: String!, $data: CharacterAssetUpdateInputDto!){
updateCharacterAsset(id: $id, data: $data){
id
platform
resolution
variantType
url
checksum
characterId
createdAt
updatedAt
deletedAt
key
}
}
{
"id": "string",
"data": {
"platform": "string",
"resolution": "string",
"variantType": "string",
"fileS3Key": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateCharacterAsset": {
"id": "string",
"platform": "string",
"resolution": "string",
"variantType": "string",
"url": "string",
"checksum": "string",
"characterId": "string",
"key": "string"
}
}
}
uploadCharacterAsset
This is used for creating assets for characters. Can test this using postman if you want to use the upload file option
When want to include file for upload
Use this option if you want to pass the file to be uploaded directly to the api
Below is the example query
{"query": "mutation ($bundle: Upload, $characterId: String!, $platform: String, $resolution: String, $variantType: String, $checksum: String!) { uploadCharacterAsset(data: { bundle: $bundle, characterId: $characterId, platform: $platform, resolution: $resolution, variantType: $variantType, checksum: $checksum }) { id url } }","variables": {"bundle": null,"characterId": "07587bbf-970b-49d6-93ae-a455ccb3df77","platform": "ios","resolution": "1024","variantType": "face1","checksum": "123"}}
When want to pass file s3 key
Use this option if you want to provide the s3 file key of the file you already uploaded to s3. The s3 file key is the directory of the file in the s3 bucket. e.g character_asset_bundle/07587bbf-970b-49d6-93ae-a455ccb3df77/android/512/feet5/mt2.png
Below is the example query
{"query": "mutation ($fileS3Key: String, $characterId: String!, $platform: String, $resolution: String, $variantType: String, $checksum: String!) { uploadCharacterAsset(data: { fileS3Key: $fileS3Key, characterId: $characterId, platform: $platform, resolution: $resolution, variantType: $variantType, checksum: $checksum }) { id url } }","variables": {"fileS3Key": "character_asset_bundle/07587bbf-970b-49d6-93ae-a455ccb3df77/android/512/feet5/mt2.png","characterId": "07587bbf-970b-49d6-93ae-a455ccb3df77","platform": "ios","resolution": "1024","variantType": "face1","checksum": "123"}}
This operation can be carried out by user who has the
mtgames.upload_character_assetpermission
The data of the character asset to upload. Check the CharacterAssetInputDto to see the available fields
Example
Request Content-Types:
application/json
Query
mutation uploadCharacterAsset($data: CharacterAssetInputDto!){
uploadCharacterAsset(data: $data){
id
platform
resolution
variantType
url
checksum
characterId
createdAt
updatedAt
deletedAt
key
}
}
Variables
{
"data": {
"characterId": "string",
"platform": "string",
"resolution": "string",
"variantType": "string",
"checksum": "string",
"bundle": "object",
"fileS3Key": "string"
}
}
Try it now
mutation uploadCharacterAsset($data: CharacterAssetInputDto!){
uploadCharacterAsset(data: $data){
id
platform
resolution
variantType
url
checksum
characterId
createdAt
updatedAt
deletedAt
key
}
}
{
"data": {
"characterId": "string",
"platform": "string",
"resolution": "string",
"variantType": "string",
"checksum": "string",
"bundle": "object",
"fileS3Key": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"uploadCharacterAsset": {
"id": "string",
"platform": "string",
"resolution": "string",
"variantType": "string",
"url": "string",
"checksum": "string",
"characterId": "string",
"key": "string"
}
}
}
deleteCharacterAsset
Delete a character asset
The id of the asset to delete.
Example
Request Content-Types:
application/json
Query
mutation deleteCharacterAsset($id: String!){
deleteCharacterAsset(id: $id){
ok
}
}
Variables
{
"id": "string"
}
Try it now
mutation deleteCharacterAsset($id: String!){
deleteCharacterAsset(id: $id){
ok
}
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteCharacterAsset": {
"ok": "boolean"
}
}
}
Schema Definitions
Character: object
Character
-
id:
object
-
The
idof the character -
- return:
-
arguments:
object
-
-
name:
object
-
The name of the Character
-
- return:
-
arguments:
object
-
-
displayName:
object
-
The display name of the Character. This is the name that will be displayed in most cases where the character name needs to be shown
-
- return:
-
arguments:
object
-
-
previewImageUrl:
object
-
The preview image url of the character
-
- return:
-
arguments:
object
-
-
fullimageUrl:
object
-
The full image url of the character
-
- return:
-
arguments:
object
-
-
tokenNumber:
object
-
This is the unique id of the particular nft in the entire nft collection. This is the actual token number from the nft collection developers, not the internal id
-
- return:
-
arguments:
object
-
-
assetBundleKey:
object
-
The asset bundle key
-
- return:
-
arguments:
object
-
-
lastKnownOwnerAddress:
object
-
This is the
wallet addressof the user who currently holds this character known to our system -
- return:
-
arguments:
object
-
-
lastKnownUserId:
object
-
This is the
idof the user who currently holds this character known to our system -
- return:
-
arguments:
object
-
-
availableForAll:
object
-
Is the collection available for all users?
-
- return:
-
arguments:
object
-
-
isDefault:
object
-
Is the Character a default character that is available to all users(auth or no auth)?
-
- return:
-
arguments:
object
-
-
lastOwnershipProofedAt:
object
-
This is the last date that the ownership of the token(nft)(that this character is based on) was proofed. The proof is to make that a character belongs to the actual user who owns the token(nft)
-
- return:
-
arguments:
object
-
-
collectionId:
object
-
The collection id that the character belongs to. The id id the internal id gotten from getCollections query
-
- return:
-
arguments:
object
-
-
collection:
object
-
This is the actualcollection that the character belongs to.
-
- return:
-
arguments:
object
-
-
assets:
object
-
This are the assets that are created under this character
-
- return:
-
arguments:
object
-
-
createdAt:
object
-
The date that the character was created
-
- return:
-
arguments:
object
-
-
updatedAt:
object
-
The date that the character was last updated
-
- return:
-
arguments:
object
-
-
deletedAt:
object
-
The date that the character was deleted
-
- return:
-
arguments:
object
-
Example
{
"id": {
"return": "object",
"arguments": {}
},
"name": {
"return": "string",
"arguments": {}
},
"displayName": {
"return": "string",
"arguments": {}
},
"previewImageUrl": {
"return": "string",
"arguments": {}
},
"fullimageUrl": {
"return": "string",
"arguments": {}
},
"tokenNumber": {
"return": "number",
"arguments": {}
},
"assetBundleKey": {
"return": "string",
"arguments": {}
},
"lastKnownOwnerAddress": {
"return": "string",
"arguments": {}
},
"lastKnownUserId": {
"return": "string",
"arguments": {}
},
"availableForAll": {
"return": "boolean",
"arguments": {}
},
"isDefault": {
"return": "boolean",
"arguments": {}
},
"lastOwnershipProofedAt": {
"return": "object",
"arguments": {}
},
"collectionId": {
"return": "string",
"arguments": {}
},
"collection": {
"return": {
"id": {
"return": "object",
"arguments": {}
},
"name": {
"return": "string",
"arguments": {}
},
"displayName": {
"return": "string",
"arguments": {}
},
"previewImageUrl": {
"return": "string",
"arguments": {}
},
"fullimageUrl": {
"return": "string",
"arguments": {}
},
"smartcontractAddress": {
"return": "string",
"arguments": {}
},
"blockchain": {
"return": "string",
"arguments": {}
},
"requiresBlockchainOwnership": {
"return": "boolean",
"arguments": {}
},
"availableForAll": {
"return": "boolean",
"arguments": {}
},
"createdAt": {
"return": "object",
"arguments": {}
},
"updatedAt": {
"return": "object",
"arguments": {}
}
}
}
}
CharacterAsset: object
CharacterAsset
-
id:
object
-
The
idof the character asset. -
- return:
-
arguments:
object
-
-
platform:
object
-
The platform of the asset. This could be
ios,android,windows,webgl,... -
- return:
-
arguments:
object
-
-
resolution:
object
-
The resolution of the asset. This could be something like
512,1024,... -
- return:
-
arguments:
object
-
-
variantType:
object
-
The variant type of the asset. These are the different parts of the character, for example,
head,face,body,... -
- return:
-
arguments:
object
-
-
url:
object
-
This is the signed url of the asset on s3. You can access the asset bundle from this url.
-
- return:
-
arguments:
object
-
-
checksum:
object
-
The checksum of the asset. This is the checksum of the asset gotten after you export the asset from the design studio app
-
- return:
-
arguments:
object
-
-
characterId:
object
-
The character id that contains the asset. The id the internal id gotten from getCharacters queryThe character id that contains the asset. The id the internal id gotten from getCharacters query
-
- return:
-
arguments:
object
-
-
createdAt:
object
-
The date that the character asset was created
-
- return:
-
arguments:
object
-
-
updatedAt:
object
-
The date that the character asset was last updated
-
- return:
-
arguments:
object
-
-
deletedAt:
object
-
The date that the character asset was deleted
-
- return:
-
arguments:
object
-
-
key:
object
-
This field maps to the
urlfield, just the unsigned s3 file path key -
- return:
-
arguments:
object
-
-
character:
object
-
- return:
-
arguments:
object
-
Example
{
"id": {
"return": "object",
"arguments": {}
},
"platform": {
"return": "string",
"arguments": {}
},
"resolution": {
"return": "string",
"arguments": {}
},
"variantType": {
"return": "string",
"arguments": {}
},
"url": {
"return": "string",
"arguments": {}
},
"checksum": {
"return": "string",
"arguments": {}
},
"characterId": {
"return": "string",
"arguments": {}
},
"createdAt": {
"return": "object",
"arguments": {}
},
"updatedAt": {
"return": "object",
"arguments": {}
},
"deletedAt": {
"return": "object",
"arguments": {}
},
"key": {
"return": "string",
"arguments": {}
},
"character": {
"return": {
"id": {
"return": "object",
"arguments": {}
},
"name": {
"return": "string",
"arguments": {}
},
"displayName": {
"return": "string",
"arguments": {}
},
"previewImageUrl": {
"return": "string",
"arguments": {}
},
"fullimageUrl": {
"return": "string",
"arguments": {}
},
"tokenNumber": {
"return": "number",
"arguments": {}
},
"assetBundleKey": {
"return": "string",
"arguments": {}
},
"lastKnownOwnerAddress": {
"return": "string",
"arguments": {}
},
"lastKnownUserId": {
"return": "string",
"arguments": {}
},
"availableForAll": {
"return": "boolean",
"arguments": {}
},
"isDefault": {
"return": "boolean",
"arguments": {}
},
"lastOwnershipProofedAt": {
"return": "object",
"arguments": {}
},
"collectionId": {
"return": "string",
"arguments": {}
}
}
}
}
CharacterAssetInputDto: object
CharacterAssetInputDto
- characterId:
-
The character id that contains the asset. The id the internal id gotten from getCharacters queryThe character id that contains the asset. The id the internal id gotten from getCharacters query
- platform:
-
The platform of the asset. This could be
ios,android,windows,webgl,... - resolution:
-
The resolution of the asset. This could be something like
512,1024,... - variantType:
-
The variant type of the asset. These are the different parts of the character, for example,
head,face,body,... - checksum:
-
The checksum of the asset. This is the checksum of the asset gotten after you export the asset from the design studio app
- bundle:
-
This is the raw asset file to upload. This field is used when you want to you want to directly use the api to upload the file to s3.
- fileS3Key:
-
This is s3 file key. It is the directory of the file in the s3 bucket. e.g character_asset_bundle/07587bbf-970b-49d6-93ae-a455ccb3df77/android/512/feet5/mt2.png
Example
{
"characterId": "string",
"platform": "string",
"resolution": "string",
"variantType": "string",
"checksum": "string",
"bundle": "object",
"fileS3Key": "string"
}
CharacterAssetUpdateInputDto: object
CharacterAssetUpdateInputDto
- platform:
-
The platform of the asset. This could be
ios,android,windows,webgl,... - resolution:
-
The resolution of the asset. This could be something like
512,1024,... - variantType:
-
The variant type of the asset. These are the different parts of the character, for example,
head,face,body,... - fileS3Key:
-
This is s3 file key. It is the directory of the file in the s3 bucket. e.g character_asset_bundle/07587bbf-970b-49d6-93ae-a455ccb3df77/android/512/feet5/mt2.png
Example
{
"platform": "string",
"resolution": "string",
"variantType": "string",
"fileS3Key": "string"
}
CharacterFilterInputDto: object
These are the available fields for filtering characters
- blockchain:
-
This is the name of the blockchain you want to filter the characters with
- collection:
-
This is the name or the smart contract address(both ethereum and solana bases) of the nft collection that the character belongs to
Example
{
"blockchain": "string",
"collection": "string"
}
CharacterInputDto: object
These are the fields allowed when creating a new character
- collectionId:
-
The collection id that the character belongs to. The id id the internal id gotten from getCollections query
- name:
-
The name of the Character
- displayName:
-
The display name of the Character. This is the name that will be displayed in most cases where the character name needs to be shown
- previewImageUrl:
-
The preview image url of the character
- fullimageUrl:
-
The full image url of the character
- assetBundleKey:
-
The asset bundle key
- lastKnownOwnerAddress:
-
This is the
wallet addressof the user who currently holds this character known to our system - lastKnownUserId:
-
This is the
idof the user who currently holds this character known to our system - lastOwnershipProofedAt:
-
This is the last date that the ownership of the token(nft)(that this character is based on) was proofed. The proof is to make that a character belongs to the actual user who owns the token(nft)
- tokenNumber:
-
This is the unique id of the particular nft in the entire nft collection. This is the actual token number from the nft collection developers, not the internal id
- availableForAll:
-
Is the collection available for all users?
- isDefault:
-
Is the Character a default character that is available to all users(auth or no auth)?
Example
{
"collectionId": "string",
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"lastOwnershipProofedAt": "string",
"tokenNumber": "number",
"availableForAll": "boolean",
"isDefault": "boolean"
}
CharacterUpdateInputDto: object
These are the available fields for updating a character
- name:
-
The name of the Character
- displayName:
-
The display name of the Character. This is the name that will be displayed in most cases where the character name needs to be shown
- previewImageUrl:
-
The preview image url of the character
- fullimageUrl:
-
The full image url of the character
- assetBundleKey:
-
The asset bundle key
- lastKnownOwnerAddress:
-
This is the
wallet addressof the user who currently holds this character known to our system - lastKnownUserId:
-
This is the
idof the user who currently holds this character known to our system - lastOwnershipProofedAt:
-
This is the last date that the ownership of the token(nft)(that this character is based on) was proofed. The proof is to make that a character belongs to the actual user who owns the token(nft)
- availableForAll:
-
Is the collection available for all users?
Example
{
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"assetBundleKey": "string",
"lastKnownOwnerAddress": "string",
"lastKnownUserId": "string",
"lastOwnershipProofedAt": "string",
"availableForAll": "boolean"
}
CharactersCountOutputDto: object
CharactersCountOutputDto
-
count:
object
-
The number of characters the user has.
-
- return:
-
arguments:
object
-
Example
{
"count": {
"return": "number",
"arguments": {}
}
}
Collection: object
Collection
-
id:
object
-
The internal collection id in the platform
-
- return:
-
arguments:
object
-
-
name:
object
-
The name of the collection. This is the technical name of the nft collection from the collection developers, e,g
y00t -
- return:
-
arguments:
object
-
-
displayName:
object
-
The display name of the collection. This is the name that will be displayed in most cases where the nft collection name needs to be shown, e.g
Y00ts -
- return:
-
arguments:
object
-
-
previewImageUrl:
object
-
The preview image url
-
- return:
-
arguments:
object
-
-
fullimageUrl:
object
-
The full image url
-
- return:
-
arguments:
object
-
-
smartcontractAddress:
object
-
The smart contract address. Ethereum based addresses start with
0x...and is42characters, while solana addresses are strings with length between32-44characters -
- return:
-
arguments:
object
-
-
blockchain:
object
-
The blockchain that the collection is in. For now, we support just
ethereum,baseandsolana -
- return:
-
arguments:
object
-
-
requiresBlockchainOwnership:
object
-
Does the collection require the user to be the owner of the nft?
-
- return:
-
arguments:
object
-
-
availableForAll:
object
-
Is the collection available for all users?
-
- return:
-
arguments:
object
-
-
createdAt:
object
-
Date that the collection was created in the platform
-
- return:
-
arguments:
object
-
-
updatedAt:
object
-
Date that the collectionw as last updated in the platform
-
- return:
-
arguments:
object
-
-
deletedAt:
object
-
Date that the collection was deleted from the platform
-
- return:
-
arguments:
object
-
Example
{
"id": {
"return": "object",
"arguments": {}
},
"name": {
"return": "string",
"arguments": {}
},
"displayName": {
"return": "string",
"arguments": {}
},
"previewImageUrl": {
"return": "string",
"arguments": {}
},
"fullimageUrl": {
"return": "string",
"arguments": {}
},
"smartcontractAddress": {
"return": "string",
"arguments": {}
},
"blockchain": {
"return": "string",
"arguments": {}
},
"requiresBlockchainOwnership": {
"return": "boolean",
"arguments": {}
},
"availableForAll": {
"return": "boolean",
"arguments": {}
},
"createdAt": {
"return": "object",
"arguments": {}
},
"updatedAt": {
"return": "object",
"arguments": {}
},
"deletedAt": {
"return": "object",
"arguments": {}
}
}
CollectionInputDto: object
These are the allowed fields that can be sent when creating a new collection
- name:
-
The name of the collection. This is the technical name of the nft collection from the collection developers, e,g
y00t - displayName:
-
The display name of the collection. This is the name that will be displayed in most cases where the nft collection name needs to be shown, e.g
Y00ts - previewImageUrl:
-
The preview image url
- fullimageUrl:
-
The full image url
- smartcontractAddress:
-
The smart contract address. Ethereum based addresses start with
0x...and is42characters, while solana addresses are strings with length between32-44characters - blockchain:
-
The blockchain that the collection is in. For now, we support just
ethereum,baseandsolana - requiresBlockchainOwnership:
-
Does the collection require the user to be the owner of the nft?
- availableForAll:
-
Is the collection available for all users?
Example
{
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
CollectionSearchInputDto: object
These are the available fields for searching for collections
- name:
-
The name of the collection. This is the technical name of the nft collection from the collection developers, e,g
y00t - displayName:
-
The display name of the collection. This is the name that will be displayed in most cases where the nft collection name needs to be shown, e.g
Y00ts - previewImageUrl:
-
The preview image url
- fullimageUrl:
-
The full image url
- smartcontractAddress:
-
The smart contract address. Ethereum based addresses start with
0x...and is42characters, while solana addresses are strings with length between32-44characters - blockchain:
-
The blockchain that the collection is in. For now, we support just
ethereum,baseandsolana - requiresBlockchainOwnership:
-
Does the collection require the user to be the owner of the nft?
- availableForAll:
-
Is the collection available for all users?
Example
{
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
CollectionUpdateInputDto: object
These are the available fields for updating a collection
- name:
-
The name of the collection. This is the technical name of the nft collection from the collection developers, e,g
y00t - displayName:
-
The display name of the collection. This is the name that will be displayed in most cases where the nft collection name needs to be shown, e.g
Y00ts - previewImageUrl:
-
The preview image url
- fullimageUrl:
-
The full image url
- smartcontractAddress:
-
The smart contract address. Ethereum based addresses start with
0x...and is42characters, while solana addresses are strings with length between32-44characters - blockchain:
-
The blockchain that the collection is in. For now, we support just
ethereum,baseandsolana - requiresBlockchainOwnership:
-
Does the collection require the user to be the owner of the nft?
- availableForAll:
-
Is the collection available for all users?
Example
{
"name": "string",
"displayName": "string",
"previewImageUrl": "string",
"fullimageUrl": "string",
"smartcontractAddress": "string",
"blockchain": "string",
"requiresBlockchainOwnership": "boolean",
"availableForAll": "boolean"
}
Float: number
The Float scalar type represents signed double-precision fractional values as specified by
IEEE 754.
Example
number
ID: object
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
Example
object
OkResponseDto: object
This type is a general return type when a request is successful without specific return data
-
ok:
object
-
trueif the request is successful,falseif failed -
- return:
-
arguments:
object
-
Example
{
"ok": {
"return": "boolean",
"arguments": {}
}
}
PaginateDto: object
This is the structure to be used to paginate api responses
- pageNumber: 1
-
This is the page number we want to get. We start from page 1.
- itemsPerPage: 10
-
This is the total number of items to be included. If it is the last page, the exact number of items may not be returned.
Example
{
"pageNumber": "number",
"itemsPerPage": "number"
}