🧰Using the SDK
A description of the files and methods of our JavaScript SDK.
The SDK implements our API and Objects and includes some useful functions to access data stored on our platform.
Constructor
This function expects the API Key and Security Key as input to initialize the SDK.
queryAll
Get all entries associated with an API key. Returns a JSON of all entries.
You can set optional success and error callback functions as input.
queryEntry
Get a specific entry associated with an API key. Returns a JSON of a specific entry.
This function expects an Entry ID as an input.
You can set optional success and error callback functions as input.
queryEntries
Get specific entries associated with an API key. Returns a JSON of specific entries.
This function expects an array of Entry IDs as an input.
You can set optional success and error callback functions as input.
queryTags
Get all entries associated with an API key and specific tags. Returns a JSON of matching entries.
This function expects an array of tags (strings) as an input.
You can set optional success and error callback functions as input.
queryFilename
Get entries associated with an API key that matches a given filename. Returns a JSON of all matching entries.
This function expects a filename as input.
You can set optional success and error callback functions as input.
queryData
Get entries associated with an API key that matches a given metadata key and value. Returns a JSON of all matching entries.
This function expects a key and a value as input.
You can set optional success and error callback functions as input.
queryType
Get entries associated with an API key that matches a given asset type. Returns a JSON of all matching entries.
This function expects a type as input. Options are MODEL_HOLOGRAM
, VIDEO_HOLOGRAM
, IMAGE_HOLOGRAM
, BRICK_TARGET
, GEOLOCATION_TARGET
, or IMAGE_TARGET
.
You can set optional success and error callback functions as input.
queryLocation
Get all entries associated with an API key around a specific location. Returns a JSON of matching entries.
This function expects a location Location expressed as <"lat", "long">
and a radius (default is 1
) as an input.
You can set optional success and error callback functions as input.
queryGlobalData
Get the value of a global database entry associated with an API key and a key. Returns a string.
This function expects a key as input.
You can set optional success and error callback functions as input.
postGlobalData
Set the value of a global database entry associated with an API key and a key. Returns a status message.
This function expects a key and value as input.
You can set optional success and error callback functions as input.
queryEntryData
Get the metadata value of a specific entry associated with an API key and a key. Returns a string.
This function expects an Entry ID and a key as input.
You can set optional success and error callback functions as input.
postEntryData
Set the metadata key and value of a specific entry associated with an API key. Returns a status message.
This function expects an Entry ID, key, and value as input.
You can set optional success and error callback functions as input.
downloadFileByFileStorageID
Downloads a file based on a given file Storage ID. Returns the file contents if the query is valid. Otherwise, return a text message.
This function expects a Storage ID as input.
You can set optional success and error callback functions as input.
downloadFileByEntryID
Downloads a file based on a given Entry ID. Returns the originally uploaded file contents if the query is valid. Otherwise, return a text message.
This function expects an Entry ID as input.
You can set optional success and error callback functions as input.
downloadFileByEntryIDAndFormat
Downloads a file in a specific format based on a given Entry ID. Returns the file contents if the query is valid. Otherwise, return a text message.
This function expects an Entry ID and format as input. Valid formats are FBX
, OBJ
, GLTF
, GLB
, or USDZ
.
You can set optional success and error callback functions as input.
Last updated