Select to view content in your preferred language

Pulling the list of Values from each domain

1101
9
Jump to solution
04-29-2022 06:11 AM
GregKent1170
Emerging Contributor

Hello all, 

I was wondering if anyone would be able to help me with this issue. I am trying to create a flow to reach out to ESRI's REST API and grab the list of values for certain domain's in our feature layer.

I am not sure if it is possible, I am able to get the details of the feature layer through this but not the list of values for each domain. 

 

I have attached a screen shot of the data I am trying to pull just in case. 

 

Thank you to everyone in advance. 

0 Kudos
1 Solution

Accepted Solutions
SeanKMcGinnis
Esri Contributor

Good Day Greg,

There is a way to do get those domain values by using the HTTP action to make a REST request against the hosted feature layer. The response will return the values from the domain in the feature layer and then you can use them as needed in your flow.

Here is documentation on using the HTTP Action and here is the documentation on making a REST request to get the domain values you are looking for.

-sean
Sean McGinnis - ArcGIS for Microsoft 365 Product Manager

View solution in original post

0 Kudos
9 Replies
SeanKMcGinnis
Esri Contributor

Good Day Greg,

There is a way to do get those domain values by using the HTTP action to make a REST request against the hosted feature layer. The response will return the values from the domain in the feature layer and then you can use them as needed in your flow.

Here is documentation on using the HTTP Action and here is the documentation on making a REST request to get the domain values you are looking for.

-sean
Sean McGinnis - ArcGIS for Microsoft 365 Product Manager
0 Kudos
GregKent1170
Emerging Contributor

Hello Sean, 

 

Thank you for the response! I am going to take a look at this documentation today and get this going. Thank you again, I will update again after I attempt this! 

0 Kudos
SeanKMcGinnis
Esri Contributor

Please keep me posted.

-sean
Sean McGinnis - ArcGIS for Microsoft 365 Product Manager
0 Kudos
GregKent1170
Emerging Contributor

When I try to post this query I get the following message. 

Error: Feature (ID: queryDomains) not found

Unable to retrieve feature.
 
 
I am sending the get request to this full URL here:
 
services9.arcgis.com/KTBF4553OvjgRYTW/arcgis/rest/services/PlantCenter2021/FeatureServer/0/queryDomains
 
Again thank you for taking time to read this and give me a point in the right directions. 

 

0 Kudos
SeanKMcGinnis
Esri Contributor

It looks like the layer you are accessing is secured, so I am not able to build a query against that layer. It looks like you need to make a slight modification to the REST request to get it to return the domains.

You currently have: https://services9.arcgis.com/KTBF4553OvjgRYTW/arcgis/rest/services/PlantCenter2021/FeatureServer/0/q...

That query should return all the domains for the feature service. If you wanted a specific layer, you could append the request with '&layers[layer index]'

I constructed a REST call against a publicly available hosted feature layer to help see the URL and variables and the associated response.

You can test it here: https://services.arcgis.com/hRUr1F8lE8Jq2uJo/ArcGIS/rest/services/bearsightings/FeatureServer/layers...

Please let me know how it goes.

-sean
Sean McGinnis - ArcGIS for Microsoft 365 Product Manager
0 Kudos
GregKent1170
Emerging Contributor

Sean, 

Thank you so so much! That worked for me! The last question I have is can I filter the request to just pull data from a single field from within that layer? 

 

For instance within that layer I have a field that is called "Genus" and there is 81 entries within that. 

Here is a peak at the view page for that layer and some of the fields. If I am able to just pull the entries for a single field I will be able to pull off what I need!

You have been really awesome and  helpful I really appreciate this!

 

GregKent1170_0-1651605339975.png

 

 

SeanKMcGinnis
Esri Contributor

I am glad this is helping.

Unfortunately the queryDomains operation does not have a parameter to query a single field for domains. Looks like you are going to have to parse through the JSON looking for the 'Genus' domain and get the values when you get to it.

-sean
Sean McGinnis - ArcGIS for Microsoft 365 Product Manager
0 Kudos
GregKent1170
Emerging Contributor

Then that is perfect, I should be able to parse it from there. This has really helped get me in the right direction. 

haha I owe you one! Thank you again! 

SeanKMcGinnis
Esri Contributor

Glad it helped and please let us know if you have any other questions or ideas.

-sean
Sean McGinnis - ArcGIS for Microsoft 365 Product Manager
0 Kudos