On Mon, Jun 24, 2013 at 12:18 PM, Hakala Oiva (MTT) <[email protected]>wrote:
>
> ------------------------------
> *Lähettäjä:* [email protected] [[email protected]] käyttäjän
> Andrea Aime [[email protected]] puolesta
> *Lähetetty:* 24. kesäkuuta 2013 12:47
> *Vastaanottaja:* Hakala Oiva (MTT)
> *Kopio:* geoserver-users
> *Aihe:* Re: [Geoserver-users] Querying layer attributes with REST
>
> On Mon, Jun 24, 2013 at 11:35 AM, Hakala Oiva (MTT)
> <[email protected]>wrote:
>
>> Has anyone succeeded in querying layer's attributes using REST?
>>
>> http://localhost:8080/geoserver/rest/layers/mylayer.json
>>
>> returns information on mylayer in json format, but that is not what I
>> want. I want to query selected (or all) layers attribute values using REST.
>> If this is possible somehow, *please give an http-example*. I have read
>> all the Geoserver REST documentation, and searched the net, but I have not
>> seen any example.
>>
>
> You are definitely getting all of the layer attributes that way. What
> might not be clear is that not all the attributes you can
> edit in the user interface are stored in the Layer object, several are
> stored in the associated resource (featuretype/coverage/...) instead.
> Check the output of the layer json response, it should contain a link to
> the associated resource that you can open
>
> Cheers
> Andrea
>
> Thank you Andrea, one step forward; I got all the *attribute names* too,
> but is there a way to get* attribute values *as well?
>
You are getting everything, names and values, provided the values are
specified.
If they are not, it means GeoServer does not have any value in its
configuration, and it's probably using some default
value internally. There is no way to make it emit the defaults.
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users