Skip to main content
1-Visitor
May 17, 2017
Solved

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?

katteAnswer
5-Regular Member
May 18, 2017

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

5-Regular Member
May 17, 2017

Hi 3D Studio​,

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

Translate
5-Regular Member
May 17, 2017

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

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

Translate
3studio1-VisitorAuthor
1-Visitor
May 18, 2017

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?

Translate
katte5-Regular MemberAnswer
5-Regular Member
May 18, 2017

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.

Translate