Page 1 of 1

TWCloud REST API batch mode

PostPosted: Thu Apr 20, 2023 6:50 pm
I have a question regarding the TWCloud API. The documentation on this page: says that elements can be created in batch mode.

The example given shows the following:
cat file.txt | curl -v -H "Content-Type: application/ld+json" -X POST -s --cookie cookie.txt --insecure -d @-https://server:8111/osmc/resources/${projectId}/elements/${elementId}?batch=true

However, the documentation does not show the contents of file.txt and simply adding "batch=true" to a request with multiple elements in the request body does not work. Could you provide an example request of using batch mode to create multiple elements in a single request or give an example of what is expected to exist within “file.txt”?