Sample code

Samples presented in this section demonstrate different ways to use the ArcGIS Urban API. The samples are categorized by the type of interaction in which you can access the Urban API: either read or write to the API.

Currently, the examples use Python as the programming language. Other languages ​​such as TypeScript will also be supported in the future.

All samples are independent pieces of code, which means they can be used independently from each other. You can copy and paste the appropriate code snippets from samples to a code editor of your choice and use them locally. The samples are also available in the form of ArcGIS Notebooks, which can be downloaded, and run interactively using the Jupyter Notebooks application.

To run the sample code locally, you need Python and sgqlc library installed on your computer. It is also required that you have the current Urban API Schema stored locally in the module. See the Python sgqlc client library section to get instructions on how to start with programming.

Prior to completing the samples, you should be familiar with the basic features of ArcGIS Urban. If you need more background information on Urban, check the documentation.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.