Hi team.
Do we support IFC upload via the REST API? Upload with REST – Cesium
My goal is to get users upload their models directly in my app instead of uploading models to Ion and fetch the Asset ID.
I’m trying but ran into some errors:
Server running at http://localhost:3000
Token received: eyJhbGciOi…
Name received: Cylinders
ion create status: 404
ion error response: {
“code”: “ResourceNotFound”,
“message”: “/v1/assets?assetRegion=ap-northeast-1”
}
Thank you in advance.
The most likely issue is that your token does not include the assets:write scope. By default this is not turned on in tokens. Please check that the token you are using includes the assets:write scope. You can view your list of tokens on Cesium ion.
Please let us know if that resolves your issue.
Hi Mark. Thank you for your reply.
I tried using a new token with all scopes enabled and still not be able to upload IFC.
- Token without
assets:write → Response: 404 ResourceNotFound
- Token with
assets:write → Response: 409 InvalidArgument “Invalid Parameter: ‘options.sourceType’ must be a valid source type.”
Is IFC a supported sourceType for the v1/assets REST API? If not, is there a documented programmatic upload path for IFC files, or is the My assets web dashboard the only supported method?
In addition with the same token I also tried and successfully uploading the glb model.
Hi,
IFC is supported by POST /v1/assets route by setting the options.sourceType to BIM_CAD
You will need to change the drop down under options.sourceType to BIM_CAD to see options specific to that source type
If you are still having trouble, please post the entire body of your request to POST /v1/assets so that we can assist futher.