Input from JSON from a remote server or from client

I am creating some geometry based on user inputs and I’m creating a JSON object from all information which the geometry generation needs. This works ok in a local env in GH but I am not sure how to implement it to Shapediver?

The JSON object is already created by an algorithm which will come from a front-end app, a ReactJS app. I could also save this object or file in a cloud storage, with an URI. The file will be frequently updated by user interaction and I would also like to update the Shapediver model.

What would be the best way to achieve this?

PS.: I would be also fine if I could call the Shapediver back-end API and feed my object there.

To send data to other online applications use the ShapeDiverDataOutput component. More in tutorials below.

Thanks @pavol , actually I want to feed in a JSON into Shapediver model. Not the output part (that I also need but it is already working fine)

Then use the Text Input or Text File components and feed in the JSON.

ok, getting there. I am using this component and you may see in my screenshot above that it works also from a remote URI. …I also uploaded this definition to SD and looks like this:

So then the question goes down to, is it possible to query a parameter change on this JSON file with the API? Or even, may I pass in a JSON object as value to a parameter?

api.parameters.updateAsync([{name: "JSON_Input", value: "path_to_some_uri }, {name: "Width", value: 50}]);

Yes, you can update ShapeDiver models via API, simply have a look at our Documentation.

Ok, cool, got it, …so I have to use the FILE type as parameter. That’s fine. Thanks again :wink: