我正在尝试编写一个 bash 脚本,该脚本将发布 Crafter 中已经存在的文件列表。
有没有 API 可以做到这一点?我想你需要先登录。
谢谢
我正在尝试编写一个 bash 脚本,该脚本将发布 Crafter 中已经存在的文件列表。
有没有 API 可以做到这一点?我想你需要先登录。
谢谢
尝试使用批量发布 API,如下所示:
POST /api/1/services/api/1/deployment/bulk-golive.json?site={siteName}&path={path}&environment={env}
您需要登录,因此登录并保存 cookie 以在调用此 API 时使用。
添加到 sumerz 响应中,您可以使用它来登录
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
然后你可以使用-b和-c让 curl 知道会话。