I have a little proble with Google Sheets API
I have a Google Sheet Document on my GDrive. And I can work with it using Google Sheets API and Google Drive API. So I can move it, update it or make copies.
My task is: 1. make a copy of this document (I can do this) 2. publish this copy as web app. So each copy has a doGet() functon inside so it can be published as a Web app. Manually it can be done like: Publish -> Deploy as web app.. But I can't find any API to do this.
- Get an URL of published service
UPDATE
I read documentation projects.deployments.create And I maanged to create a new deployment (before that I should create a version) But my new deployemnt has no web access, no url etc. IF I check via projects.deployments.list it shows:
{ "deploymentId": "AKfycbxVfuoeIQmumgy_Efhw12NCcqE7vqosYoxbDiKj5CT4mL_GbtybXsh1ppMIX22wQX20", "deploymentConfig": { "scriptId": "1zfjbALVe0jGbZCtqjFR0RP2-O___hR7MtAlx3biuJGXKsrKh3y1W0hMT", "versionNumber": 1, "manifestFileName": "appsscript", "description": "v1" }, "updateTime": "2019-05-13T22:33:23.760Z" } And if I will do this manually via web interface it will looks like
{ "deploymentId": "AKfycbyn3smPKxJcZwsm9SzSTtzNCAcWJzf1OVs4WTslvHo", "deploymentConfig": { "scriptId": "1zfjbALVe0jGbZCtqjFR0RP2-O___hR7MtAlx3biuJGXKsrKh3y1W0hMT", "manifestFileName": "appsscript" }, "updateTime": "1970-01-01T00:00:00Z", "entryPoints": [ { "entryPointType": "WEB_APP", "webApp": { "url": "https://script.google.com/macros/s/AKfycbyn3smPKxJcZwsm9SzSTtzNCAcWJzf1OVs4WTslvHo/exec", "entryPointConfig": { "access": "ANYONE_ANONYMOUS", "executeAs": "USER_DEPLOYING" } } } ] }