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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Publishing the experience programmatically

3studio
3-Newcomer

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?

ACCEPTED SOLUTION

Accepted Solutions
katte
12-Amethyst
(To:3studio)

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.

View solution in original post

7 REPLIES 7
ankigupta
12-Amethyst
(To:3studio)

Hi 3D Studio​,

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

katte
12-Amethyst
(To:3studio)

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/

3studio
3-Newcomer
(To:katte)

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?

katte
12-Amethyst
(To:3studio)

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.

katte
12-Amethyst
(To:katte)

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

3studio
3-Newcomer
(To:katte)

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

katte
12-Amethyst
(To:3studio)

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

Announcements

Top Tags