0

I'm using Java API for calling the AppScript function on the spreadsheet When I list deployments

List<Deployment> deployments = projects.deployments().list("XXX").execute().getDeployments();

I can see my deployments but the deployment.getFunctionSet() is NULL So when I call

Operation op = service.scripts().run(
            "XXX",
            new ExecutionRequest().setDevMode(true).setFunction("exportJson")
).execute();

I get

{
  "code" : 404,
  "errors" : [ {
    "domain" : "global",
    "message" : "Requested entity was not found.",
    "reason" : "notFound"
  } ],
  "message" : "Requested entity was not found.",
  "status" : "NOT_FOUND"
}

The question - how to call function from the google app script? )

TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • See if [these](https://stackoverflow.com/questions/tagged/google-apps-script-api+http-status-code-404) help – TheMaster Dec 25 '19 at 14:00
  • Have you tried to deploy first your script as API executable: On AppsScript -> your script -> publish -> Deploy as API executable. – Kessy Dec 25 '19 at 16:12
  • Yes, and I can see those deploys in the deployments() list –  Dec 25 '19 at 19:57
  • I have tested the api with your code, and without the `setDevMode(true)` it's working. Can you verify it? – Kessy Dec 27 '19 at 09:24

0 Answers0