How to Use the Conversion API
5 min
In this guide you'll find information in case you want to use our conversion to a streamable model system as an API.
You can use the API by sending HTTPS requests to https://api.senseofspace.io/ConversionApi
Parameters can be sent either in query string or as a JSON string in the request body.
Authentication
Every request requires your user id and password as parameters as follows:
u: “youruserid”
p: “yourpassword”
Create a streamable asset
create_streamable_asset
Creates a streamable asset entry for conversion. Returns the id of the created streamable asset.
POST
https://api.senseofspace.io/ConversionApi
curl --request POST
--url https://api.senseofspace.io/ConversionApi
--header 'Accept: application/json'
--data-raw '{
"u":"my_user_name",
"p":"my_very_secret_pass",
"action":"create_streamable_asset",
"asset_name":"my_new_model",
"photogrammetry":false
}'
Get URL to upload the model file to be converted
After creating a streamable asset entry, you need to upload a model to start the conversion.
Only .GLB files are supported currently.
get_streamable_asset_upload_url
Returns a URL you can use to upload a .glb model file with a PUT request. Valid for 15 minutes.
POST
https://api.senseofspace.io/ConversionApi
curl --request POST
--url https://api.senseofspace.io/ConversionApi
--header 'Accept: application/json'
--data-raw '{
"u":"my_user_name",
"p":"my_very_secret_pass",
"action":"get_streamable_asset_upload_url",
"assest_id":"48e99d92300cd0911602999668f54f23a5d32ef8"
}'
Remove a streamable asset
remove_streamable_asset
Removes the hosted streamable asset files and marks the entry as hidden.
POST
https://api.senseofspace.io/ConversionApi
curl --request POST
--url https://api.senseofspace.io/ConversionApi
--header 'Accept: application/json'
--data-raw '{
"u":"my_user_name",
"p":"my_very_secret_pass",
"action":"remove_streamable_asset",
"assest_id":"48e99d92300cd0911602999668f54f23a5d32ef8"
}'
Get streamable asset list
get_streamable_assets
Returns a list of all your streamable assets and their details as an array of objects in JSON string format.
POST
https://api.senseofspace.io/ConversionApi
curl --request POST
--url https://api.senseofspace.io/ConversionApi
--header 'Accept: application/json'
--data-raw '{
"u":"my_user_name",
"p":"my_very_secret_pass",
"action":"get_streamable_assets"
}'