I'm trying to write a bash script that would publish a list of files already present in crafter.
Is there an API to do that? And I suppose you need to be logged in first.
Thank you
I'm trying to write a bash script that would publish a list of files already present in crafter.
Is there an API to do that? And I suppose you need to be logged in first.
Thank you
Try using the Bulk Publish API, like this:
POST /api/1/services/api/1/deployment/bulk-golive.json?site={siteName}&path={path}&environment={env}
You will need to be logged in, so login and save the cookie to use when calling this API.
Adding to sumerz response you could use this to log in
curl -i -b cookies.txt -H "Content-Type:application/x-www-form-urlencoded" -H "Accept:application/json, text/plain, */*" -c cookies.txt -X POST -d "username=admin&password=admin" http://localhost:8080/studio/api/1/services/api/1/user/login.json
then you could use -b and -c to make curl aware of a session.