ArcGIS REST Execute Notebook and ownership

519
2
Jump to solution
11-16-2022 08:10 AM
Gert-JanBoos2
New Contributor
I am trying to build a custom widget to embed in a WebApp that executes a Notebook when the user clicks on a button. By calling the ArcGIS 'Execute Notebook' REST operation.
 
Unfortunately after some testing (in Enterprise Portal 10.8.1) the Execute Notebook operation only seems to be able to start notebooks that are owned by the user that makes the request. I assigned the Create and Edit ArcGIS Notebooks privileges to both users (the owner and the executor). Preferably we don't want the end user(s) to own the Notebook nor to use built in user and credentials.
 
Has someone else tried this? Found a way to let an end user trigger a Notebook job on demand?
0 Kudos
1 Solution

Accepted Solutions
NicholasGiner1
Esri Contributor

Hi @Gert-JanBoos2 - thanks for the question.  Your example workflow sounds like the ideal candidate for publishing a notebook as a web tool.  This is functionality that we added at Enterprise 10.9.1.  You can read a blog article showing an example here.

The executor of a notebook web tool requires the "Create and Edit Notebooks" privilege, however it is helpful to hear a use case of allowing an end user to execute a notebook (via web tool) without this privilege.

I will share this information with the team.

thanks!

-Nick Giner, Product Manager ArcGIS Notebooks

View solution in original post

2 Replies
NicholasGiner1
Esri Contributor

Hi @Gert-JanBoos2 - thanks for the question.  Your example workflow sounds like the ideal candidate for publishing a notebook as a web tool.  This is functionality that we added at Enterprise 10.9.1.  You can read a blog article showing an example here.

The executor of a notebook web tool requires the "Create and Edit Notebooks" privilege, however it is helpful to hear a use case of allowing an end user to execute a notebook (via web tool) without this privilege.

I will share this information with the team.

thanks!

-Nick Giner, Product Manager ArcGIS Notebooks

Gert-JanBoos2
New Contributor

Hi @NicholasGiner1 , Thanks for the response. The 'Publish notebook as a webtool' indeed seems to be what I am looking for. I guess one of the main advantages is that it can be integrated into the WebApp using the standard Geoprocessing widget.

Regarding the 'Create and Edit Notebooks' privilege. I already assigned it to the end users. But then still a user with that privilege can only use Execute Notebook operation for items that they own. While the user is able to run Notebooks owned by other users via the web interface. That was a bit surprising because it isn't mentioned in the ArcGIS Rest documentation.

The use case itself is simple. We want to offer an end user the possibility to review data quality in a staging WebApp. And then trigger an action to copy the entire data set to production. This will be a reoccurring task. So we created two feature layers with the same schema, and a notebook to truncate / copy to production.

@FreekKluiters 

0 Kudos