Standalone API to upload data into an ESRI Enterprise GeoDatabase

836
5
10-19-2023 01:49 AM
Jonathan_UM
New Contributor II

Assuming we have an ESRI Enterprise GeoDatabase that's connected to an ArcGIS Server (itself federated with portal), what API do we use to upload data into it?

Note that I'm *not* talking about putting things into the Portal Data Store. Or into a regular RDBMS, but instead the ESRI ArcSDE flavoured GeoDatabase that sits atop the RDBMS.

As far as I can see, the only options are either ArcPy (which requires ArcGIS Pro on the same box), or FME (same requirements) - https://docs.safe.com/fme/2022.2/html/DataInterop_Documentation/FME_ReadersWriters/geodatabase/GEODA... - for various reasons I want a standalone API, not something reliant on a ArcGIS Pro install.

Is there a standalone API?

I've come across these two:
https://developers.arcgis.com/rest/services-reference/enterprise/upload.htm
and
https://developers.arcgis.com/rest/enterprise-administration/server/uploaditem.htm

It's not clear what's different between them, but a colleage informed me they're both for uploading to the portal rather than the server.

There's also "ArcGIS API for Python" - https://developers.arcgis.com/python/guide/accessing-and-creating-content/ - but I can't see anything about how to upload to a Enterprise Geodatabase there.

What's the API for uploading to an ESRI Enterprise Geodatabase?

 

0 Kudos
5 Replies
George_Thompson
Esri Frequent Contributor

Not a developer, but the first 2 links above look like they create the items in Enterprise portal that could reference the layer in your Enterprise Geodatabase.

If you have the data published as a service you could use the REST API for that service to update data: https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm

It looks like you may be able to update the data in this part of the Python API: https://developers.arcgis.com/python/guide/features-module/

If you are wanting to upload data into the geodatabase directly and not via a service, you could use SQL to do this?

What is the RDBMS that you are using?

 

--- George T.
0 Kudos
Jonathan_UM
New Contributor II

Hi George. Thanks for the reply. Unfortunately all of the things you've mentioned are predicated on the data being in the database in the first place.

My problem is: How do I put the data into the database? I can easily put it the DB if we're treating it as a plain database (PostGreSQL), but how do I put it in there if the database is an ESRI Enterprise Geodatabase? I was led to believe that required some special sauce so the ArcSDE wrappings could do their thing.

0 Kudos
George_Thompson
Esri Frequent Contributor

Ah ok. In order to load data into the Enterprise Geodatabase (EGDB), you would need to create the feature classes via an ArcGIS client. Usually, people would do this via ArcGIS Pro or ArcPy. Once you have the feature class in the EGDB you could use the PythonAPI to update the data.

There may be some limitations based on the licensing level of your client, but if you have Standard / Advanced you can do most things.

Just an item to note: you can load data into the PostgreSQL database (using PG_Geometry / PostGIS) and ArcGIS clients can read that data. The ArcGIS clients would not be able to edit the data (https://pro.arcgis.com/en/pro-app/latest/help/data/databases/databases-and-arcgis.htm). This data would not be able to take advantage of the advanced functionality of the EGDB (domains / topology / relationship classes / etc. - https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/fundamentals-of-the-geodata... 

Hope this helps!

--- George T.
0 Kudos
Jonathan_UM
New Contributor II

Thanks for the clarification, that helps.

> In order to load data into the Enterprise Geodatabase (EGDB), you would need to create the feature classes via an ArcGIS client. Usually, people would do this via ArcGIS Pro or ArcPy.

Can you please confirm that the only way to create these classes is with a client? We can't do it with a standalone script via an API? Not even ArcGIS API for Python?


> Once you have the feature class in the EGDB you could use the PythonAPI to update the data.

So what's the actual workflow here for the entire process of putting data into the EGDB? It seems rather convoluted. Also, is there a link to some documentation on this please.

Which one is the "PythonAPI" you're referring to? Is that ArcPy or "ArcGIS API for Python" or something else? I'd prefer to use a RESTful API rather than the ArcGIS API for Python if there is one.

 

> Just an item to note: you can load data into the PostgreSQL database (using PG_Geometry / PostGIS) and ArcGIS clients can read that data.

That would be much easier, and my personal preference, but it looks like the project wants to go the EGDB route.

0 Kudos
George_Thompson
Esri Frequent Contributor

Q1: Can you please confirm that the only way to create these classes is with a client? We can't do it with a standalone script via an API? Not even ArcGIS API for Python?

  • Again not a developer or have extensive knowledge of all our API's (I am a Geodatabase person 🙂), but there may be a way with API for Python. Using ArcPy / Pro client is the easiest for setting up the layers

 

Q2: So what's the actual workflow here for the entire process of putting data into the EGDB? It seems rather convoluted. Also, is there a link to some documentation on this please.

Which one is the "PythonAPI" you're referring to? Is that ArcPy or "ArcGIS API for Python" or something else? I'd prefer to use a RESTful API rather than the ArcGIS API for Python if there is one.

 

Q3: That would be much easier, and my personal preference, but it looks like the project wants to go the EGDB route.

  • If you project team wants to use the EGDB, then they should be able to create the feature classes or give you access to ArcPy and license to create what is needed.
--- George T.
0 Kudos