Asset API
The Asset API is a REST API to interact with 3dverse Assets. It allows you to recreate most of the functionalities exposed in the 3dverse Console such as:
- Uploading source files to 3dverse
- Tracking conversions into Assets
- CRUD operations on Assets
- CRUD operations on Folders
- Generating 3dverse Users and User Tokens
API Reference
NPM Library
We provide a TypeScript wrapper library to make typesafe API requests and get typed responses: https://www.npmjs.com/package/@3dverse/api.
Authentication
All API calls require authenticating with an API Key, or in some cases with a User Token. Authentication requirements for each route are defined in the Reference documentation.
To generate an API key, use the 3dverse Console and send an api_key
header with your API requests. Make sure you always keep your API key private (do not publish client side).
Alternatively, you can authenticate with a user_token
. You’ll have to register a user, generate a token for the user and make sure the user has access to the Folder where the assets are stored.
Generate a User Token
The user token can be used to make API calls client side, such as for Uploading Source Files.
To upload a source file to a folder, you’ll also have to grant access to the folder to the user.
- The folder ID can be found in the Console or using the Asset API. Or it can be created from the API (as shown in the code samples below).
Javascript Sample
Install the npm package:
Server code: