Datasources
Manages ownership of virtual objects in a user's collection
Last updated
Manages ownership of virtual objects in a user's collection
Last updated
Provides information about the service status.
Provides information about the service status.
Returns a list of unique properties for a user's collection. Only the root level properties of each object are returned.
e.g. If a user's collection contains the following objects: [ { "data": { "name": "Alice", "properties": { "age": 30 } } }, { "data": { "name": "Bob", "properties": { "age": 25 "address": { "city": "New York", "state": "NY" } } } } ]
The response will be: ["address", "age"]. "city" and "state" are not included in the response because they are nested properties below the root level.
The response of the GET collections properties endpoint
Property name
Fetches a list of all organization datasources for the specified organization. Accepts an optional type query parameter to filter by datasource type.
The response for GET /datasources
A list of organization datasources. 'permissionVerb' indicates the permission level of the user on the datasource - Read (r), Write (w) or All (*)
Triggers a NFT balance refresh for the calling user. The user's collection will be updated with the latest (supported) NFTs after a few seconds.
Request to refresh user balance
Success
Retrieves a CSV file with the list of users who own the specified object definition in the datasource.
The ID of a datasource
The ID of an object definition
The response schema for the amount of a given object users have
Deletes an object definition from an organization datasource.
The ID of a datasource
The ID of an object definition
Success
Deletes a datasource based on whether the X-M2-Organization-ID
header is set:
The ID of a datasource
Success
Empties the specified organization datasource, deleting all object definitions stored in it. This will only work for non-default organization datasources.
The ID of a datasource
Success
Sets a user's balance for the specified object definition in the organization datasource to 0. This means the user will no longer see that object in their collection.
This will not work for an object in a public organization datasource.
The ID of a datasource
The ID of an object definition
Success
Allows updating specific fields for an organization datasource.
The ID of a datasource
The datasource's human readable name
The type of the datasource - can either be 'undefined' or 'default'. WARNING: If set to 'default', objects created by users can be stored in this datasource. Not recommended unless this is the first datasource of the organization.
Whether the datasource is public. If true, all objects in this datasource will be available to all users of the organization.
Success
Creates a new organization datasource in the provided organization. Returns the id of the created datasource.
NOTE: Adding support for a new NFT contract in the platform requires work from the platform team and must be sent as a support request.
The datasource's human readable name
The type of the datasource - can either be 'undefined' or 'default'. WARNING: If set to 'default', objects created by users can be stored in this datasource. Not recommended unless this is the first datasource of the organization.
Whether the datasource is public. If true, all objects in this datasource will be available to all users of the organization.
The response returned after creating an organization datasource
Enable or disable an NFT Datasource for the organization. If an NFT Datasource is enabled, users in the organization will see the NFT ObjectDefinitions in their collection. If disabled, users will not see NFT ObjectDefinitions from the NFT Datasource in their collection.
If operation is ADD
, the organization will support the NFT Datasource.
If operation is REMOVE
, the organization will no longer support the NFT Datasource, if already supported.
List of datasourceId and operation pairs
The ID of a datasource
The operation to perform on the external datasource, either 'ADD' or 'REMOVE'
Success
Create or update an MML Avatar ObjectDefinition with the provided assets
ObjectDefinitions. Returns the Datasource ID and ObjectDefinition ID of the created/updated avatar.
If avatar
is provided, the specified ObjectDefinition will be validated and if it is an MML Avatar, the specified assets will overwrite the existing assets.
The location of an avatar ObjectDefinition
The assets that make up the avatar. Must contain at least 1 asset and at most 24 assets
The name of the created/updated MML Avatar. Must be between 1 and 64 characters
The location of a created/updated avatar
The ID of a datasource
The ID of an object definition
Retrieves the object definition if it exists for a given objectDefinitionId
in a datasource. This can be used to query for an object definition across organization or NFT datasources.
The ID of a datasource
The ID of an object definition
The shape of an ObjectDefinition
The origin field is present for NFT ObjectDefinitions. It contains the NFT Contract Address, Token ID, and Chain ID the contract belongs to.
Updates an object definition in an organization datasource. Any existing object definition URLs will be overwritten with the new data provided in the request body.
The ID of a datasource
The ID of an object definition
The origin field is present for NFT ObjectDefinitions. It contains the NFT Contract Address, Token ID, and Chain ID the contract belongs to.
Success
Get a user's collection. A collection is made up of multiple ObjectDefinitions that are aggregated from:
A collection request can be filtered by properties, which will return only the ObjectDefinitions that match the root level of the specified properties.
The response of the GET collections endpoint
The origin field is present for NFT ObjectDefinitions. It contains the NFT Contract Address, Token ID, and Chain ID the contract belongs to.
The unique ID of the ObjectDefinition. This is of the format datasourceId.objectDefinitionId
Number of ObjectDefinitions the user has in their collection
Whether the object is from a public datasource
Allows creation of multiple object definitions for an organization datasource in a single request. You cannot upload any files in this request, hence valid URLs must be provided in the data
field of each object definition in the request body.
The origin
field is not applicable for this endpoint.
The ID of a datasource
The origin field is present for NFT ObjectDefinitions. It contains the NFT Contract Address, Token ID, and Chain ID the contract belongs to.
Success
Returns a list of all object definitions for the specified organization datasource.
The ID of a datasource
An array containing the object definitions for the given organization datasource
The origin field is present for NFT ObjectDefinitions. It contains the NFT Contract Address, Token ID, and Chain ID the contract belongs to.
The ID of an object definition
Add a new Object Definition to the specified organization datasource. The request body should contain the object definition data and optionally a list of files to be uploaded. The request should be a multipart/form-data
request.
The ID of a datasource
A raw MML string. Refer to https://mml.io/docs for how to create an MML string
A file buffer or list of file buffers that represent a supported ObjectDefinition file type
The stringified properties of an ObjectDefinition
The response body of POST organization datasource objectDefinition endpoint
The ID of an object definition