Select to view content in your preferred language

Create/Update JJ Association via Rest API

403
4
02-08-2025 12:30 AM
AmberY
by
Emerging Contributor

Hello,

I am not quite familiar with Rest API but would like to know if there is any way to update the Junction Junction Association via Rest API? We want to create JJ Association between customer meter in water device and sub customer meter in water junction object via Rest API.

We came across these article, but seem that it only support query and traverse >>https://developers.arcgis.com/rest/services-reference/enterprise/associations-utility-network-server...?

>>https://developers.arcgis.com/rest/services-reference/enterprise/utility-network-service/

AmberY_0-1739003271419.png

Is there any helpful documentation on association that you guys come across? Appreciate ur sharing on this.

Thanks in advance.

0 Kudos
4 Replies
gis_KIWI4
Frequent Contributor

@AmberY I believe you can do this via the rest api. You would use the ApplyEdits operation to add/modify associations.

The associations table is usually hidden from most views. This article guides on how you might access the associations table. https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/associations-table.htm

If there is no need to use REST API, using the python/geoprocessing tools are a lot easier.

hope this helps 🙂

 

0 Kudos
RichRuh
Esri Regular Contributor

@gis_KIWI4 is correct, you should use the applyEdits REST endpoint (on the feature service) to add associations.  If you're making the same kind of edits repeatedly, you might try making that edit in ArcGIS Pro while using fiddler to capture the REST call.  This could help give you a head start in figuring out how to insert the row.

Depending on the application, you might consider using the Pro SDK (in a CoreHost app), or an app using the Maps SDK for JavaScript. Both have routines to add and delete associations.

0 Kudos
RishabhRaj29
Occasional Contributor

Hi @RichRuh,

 

I am trying to pass the JSON in REST end and getting this error:

RishabhRaj29_0-1749797314580.png

 

Same error i am getting in my script as well. Can you help?

 

0 Kudos
RichRuh
Esri Regular Contributor

Not off-hand.

Have you tried the suggestion I made above? Create an association in Pro between the same two features and capture the applyEdits call with fiddler.  How does it compare to the call that you are making manually?

I hope this helps,

--Rich

0 Kudos