Search code examples
javacontent-management-systemcrafter-cms

How can I authenticate user to Crafter Studio programmatically?


I'm trying write a script to upload templates and assets directly without going through Studio's UI since I have multiple folders and files. Is there any way to import a folder structure in Crafter Studio 2.5.x like in 2.4.x? Also, what service can I use to get a ticket using username/password in order to use /services/api/1/content/write-content.json?


Solution

  • Crafter Studio has a REST API for sign in.

    You want to call this API over SSL and make sure you pass back all of the cookies that come to you on subsequent API requests.

    After a successful call to login API, other REST APIs will succeed