Usage

Domain / Namespace

Authorisation will typically be provided at the Namespace level.

Creating a Metadata Type

POST example to create metadata-type.

Request body:

{
  "namespace": "79c1b912-4301-4b6a-8c21-c8a0d3f19e78",
  "name": "nft",
  "references": [],
  "referenceType": "LINK"
}

Response:

{
  "id": "1d9db353-afc2-404f-bc75-addd855a9276",
  "namespace": "79c1b912-4301-4b6a-8c21-c8a0d3f19e78",
  "name": "nft",
  "references": [],
  "referenceType": "LINK",
  "version": 1
}

id

UUID for the resource. Auto-generated, no need to pass when creating

version

Indicates how many times this resource has been updated. Auto-generated, no need to pass when creating.

namespace

UUID of the namespace that this metadata type belongs to

name

name for the metadata type

references

An array of metadata type id that will be used by the compiler to attach related references, if any. Can be left as an empty array by default.

referenceType

Indicates how this resource will be referenced when compiled by the compiler. Either EMBED or LINK. Can be left as LINK by default

Creating Metadata

POST example to create metadata

Request body:

{
    "metadataType": "1d9db353-afc2-404f-bc75-addd855a9276",
    "metadataId": "1000",
    "status": "PUBLISHED",
    "targetGroup": "",
    "metadata": {
        "name": "Metadata Example",
        "image": "<http://path-to-image-url>",
        "attributes":
        [
            {
                "trait_type": "Fur",
                "value": "Green"
            },
            {
                "trait_type": "Mouth",
                "value": ""
            }
        ]
    }
}

Response:

{
    "id": "02c66b2c-c4ee-4f7d-9be1-4fe32cc8cf8d",
    "metadataType": "1d9db353-afc2-404f-bc75-addd855a9276",
    "metadataId": "1000",
    "metadata":
    {
        "name": "Metadata Example",
        "image": "<http://path-to-image-url>",
        "attributes":
        [
            {
                "trait_type": "Fur",
                "value": "Green"
            },
            {
                "trait_type": "Mouth",
                "value": ""
            }
        ]
    },
    "targetGroup": "",
    "status": "PUBLISHED",
    "version": "1733137054"
}

id
UUID for the resource

version

A timestamp containing when this resource was updated. Auto generated by the system. No need to pass when creating/updating

latest

A boolean value, false means this is a version history otherwise true means this is the latest value. Auto-generated by the system. No need to pass when creating/updating

metadataType

A metadata type ID

metadataId

A unique identifier provided by the developer for this resource and will be part of the URL when this resource is compiled.

status

Indicates the status of the resource, which can be AVAILABLE, ALLOCATED or PUBLISHED. You MUST leave this asPUBLISHED by default otherwise, it would not generate compiled metadata.

targetGroup

Another category for this resource that is using for drawing. Can be left as an empty string.

metadata

Accepts an object with arbitrary properties, this can be any data you want to store for this resource and will be part of the compiled data by the compiler.

Last updated