How to retrieve metadata from a feature layer on ArcGIS Server 10

3650
4
Jump to solution
06-27-2012 04:57 PM
FarhadNavaei
New Contributor III
Hi there,

I need to retrieve the metadata information from a feature layer. I have the web services available and I can run queries to retrieve the feature attributes, but I don't know any method to retrieve the metadata. Is there any sample or code snippet that I can use to understand the method?
Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Farhad,

   You can get a Map Services metadata by making request to the map rest end point like this:

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer?f=pjs... and parse the JSON for the
serviceDescription. Sometime you can get the description from an individual layer of a map service, but true metadata is not available form the REST endpoint. This is why you can not find any examples.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Farhad,

   You can get a Map Services metadata by making request to the map rest end point like this:

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer?f=pjs... and parse the JSON for the
serviceDescription. Sometime you can get the description from an individual layer of a map service, but true metadata is not available form the REST endpoint. This is why you can not find any examples.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
BjornSvensson
Esri Regular Contributor
I need to retrieve the metadata information from a feature layer. Is there any sample or code snippet that I can use to understand the method?
Thanks


Depends on what you mean with metadata, the feature layer have several metadata fields (which can also be seen at the service directory page) which are available in the LayerDetails:
http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/layers/supportClasses/LayerDetails....

Some samples look at the geometry types, or the field type, or time info based on the layer details:
http://resources.arcgis.com/en/help/flex-api/samples/index.html#/TemplatePicker/01nq00000033000000/
http://resources.arcgis.com/en/help/flex-api/samples/index.html#/TimeSlider_feature_layer/01nq000000...
0 Kudos
FarhadNavaei
New Contributor III
Farhad,

   You can get a Map Services metadata by making request to the map rest end point like this:

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer?f=pjs... and parse the JSON for the
serviceDescription. Sometime you can get the description from an individual layer of a map service, but true metadata is not available form the REST endpoint. This is why you can not find any examples.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:


Robert,
Thank you for clarification. I'm sorry, I rated your post -1 by mistake. I could change it back to 0, but I don't know how can I change it to 1. Could you help me please?
RobertScheitlin__GISP
MVP Emeritus
Farhad,

   The rating is no big deal The important part is click the check mark as indicated in the graphic of my last post.