cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Publishing the experience programmatically

SOLVED
Highlighted
Visitor

Publishing the experience programmatically

I have an experience in Studio and I would like to publish this experience programmatically without opening up thingworx studio, how this is done? is it possible?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Publishing the experience programmatically

For the existing projects, you can append "?replace=true" to the end of the url - which is again updating the projects. And for delete, you can use curl options ie.,  -X "DELETE" option for deleting the project.


Just an FYI, the commands are similar to curl options.

7 REPLIES 7

Re: Publishing the experience programmatically

Hi 3D Studio​,

Is there any particular Business Usecase for this requirement. I will check internally if it is possible.

Re: Publishing the experience programmatically

Based on your usecase, you can try CURL commands to publish/delete/update projects. For example, to publish a project

curl -u userSmiley Tongueassword -H "X-Requested-With: ^HXn4_uG3g@7u1Q-" -F "ThingXperience=@project.zip" https://<ES-domain>/ExperienceService/content/projects/

Re: Publishing the experience programmatically

Thank you for the help,
The curl command in the previous comment is used for publishing the experience for first time. We tried to upload a zip file to Experience Server and it gives the error below

*** Error: A project with name already exists: <File name>

how can we update and delete an experience in and from the Experience Server?

Re: Publishing the experience programmatically

For the existing projects, you can append "?replace=true" to the end of the url - which is again updating the projects. And for delete, you can use curl options ie.,  -X "DELETE" option for deleting the project.


Just an FYI, the commands are similar to curl options.

Re: Publishing the experience programmatically

Just curious, can I know the reason (or the usecase) for preferring curl/programmatic approach to update projects?

Re: Publishing the experience programmatically

Hi Giri,

Sorry for replying late,

We are experimenting with updating experiences directly to the server with updated versions of 3D models and we want to avoid having to update them manually from within ThingWorx Studio.


Could you please explain the Delete command more? I could not manage to delete an experience using curl.


Thank you very much

Re: Publishing the experience programmatically

Did you try the command  curl -u userSmiley Tongueassword -H "Content-Type: Application/JSON" -X "DELETE" https://domain/ExperienceService/content/projects/projectname