Create Space from URL API
Changed onOverview
The Substance 3D API provides a way to upload and temporary store files. You can upload one or more files from one or more URLs. For each URL, there is an optional filepath parameter that allows you to specify the file name and its path. By combining multiple URLs with different filepath paths, you can compose a complete file tree structure.
Example for this files tree:
├── textures
│ ├── diffuse.png
│ └── normal.png
└── lighthouse.fbx
Curl request:
curl --request POST \
--url https://s3d.adobe.io/v2/spacesURL \
--header 'Accept: application/json' \
--header 'Authorization: Bearer 123' \
--header 'Content-Type: application/json' \
--data '[
{
"filepath": "lighthouse.fbx",
"url": "https://url/to/lighthouse.fbx"
},
{
"filepath": "textures/diffuse.png",
"url": "https://url/to/diffuse.png"
},
{
"filepath": "textures/normal.png",
"url": "https://url/to/normal.png"
}
]'
The result of the post is a JSON which contained the id of the space created. Space id can be used into a space source to use space content as a source for API operations.
Example of a space source:
{
"space": {
"id": "<space_id>"
}
}
post/v2/spacesURL
Request
- Base URL: https://s3d.adobe.io
- URL: https://s3d.adobe.io/v2/spacesURL
- Auth: HTTP bearer and API key in header x-api-key
Request body
Example request
[
{
"url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/WaterBottle/glTF-Binary/WaterBottle.glb"
}
]Response
Created
Example response
{
"$schema": "https://s3d.adobe.io/schemas/rest_base.Space.json"
}Changes
- info
endpoint added
- info