[GeoNetwork-users] How to query associated resources?

Hi.

I would like to query associated resources dor dataset metadata.
e. g. Ass. resources for Dataset-UUID(XXXX) yields: UUID-YYYY, UUID-ZZZZ,
....
oder none if there aren't any.

For service-metadata one can look for SV_CoupledResource in the
metadata-xml.
But where are associations stored for dataset metadata?

I cannot find anything in my geonetwork-DB (postgres)

Thanks
Andy

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoNetwork-users-f3860293.html

Hi,

you can use the API
https://vanilla.geocat.net/geonetwork/doc/api/index.html#/records/getAssociated
Relations are indexed but not stored in specific tables in the DB.

HTH
Francois

Le mer. 5 févr. 2020 à 11:19, sulu <andreas.siegel@anonymised.com> a écrit :

Hi.

I would like to query associated resources dor dataset metadata.
e. g. Ass. resources for Dataset-UUID(XXXX) yields: UUID-YYYY, UUID-ZZZZ,
....
oder none if there aren't any.

For service-metadata one can look for SV_CoupledResource in the
metadata-xml.
But where are associations stored for dataset metadata?

I cannot find anything in my geonetwork-DB (postgres)

Thanks
Andy

--
Sent from:
http://osgeo-org.1560.x6.nabble.com/GeoNetwork-users-f3860293.html

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Hi Francois.

Thanks. So i'll try to use the API.

Unfortunately i seem incapable to obtain a result.

Thats what i tried:
Get me a token:
rm -f /tmp/cookie; curl -c /tmp/cookie
http://localhost:8900/geonetwork/srv/eng/info?type=me -X POST ; cat
/tmp/cookie

Query the API:
curl -v -X GET
"http://localhost:8900/geonetwork/api/0.1/records/8f68ae99-cfc6-4239-88b7-ace57af6e3cc/related&quot;
-H "X-XSRF-TOKEN: XXXXXXXXXX" --user YYYYY:ZZZZ -b /tmp/cookie

The API then refuses me an answer:
...
< HTTP/1.1 302
* Added cookie JSESSIONID="DB5AE289D342D34C838EA6C4810A1885" for domain
cnvbrwgdi8.net.vlr.gv.at, path /geonetwork, expire 0
< Set-Cookie: JSESSIONID=DB5AE289D342D34C838EA6C4810A1885; Path=/geonetwork;
HttpOnly
< Location:
/geonetwork/accessDenied.jsp/eng/service-not-allowed?referer=/geonetwork/api/0.1/records/8f68ae99-cfc6-4239-88b7-ace57af6e3cc/related

I most likely did something wrong. But what?

Merci
Andy

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoNetwork-users-f3860293.html

Hi,
http://localhost:8900/geonetwork/api/0.1/records/8f68ae99-cfc6-4239-88b7-ace57af6e3cc/related

should be
http://localhost:8900/geonetwork/srv/api/0.1/records/8f68ae99-cfc6-4239-88b7-ace57af6e3cc/related

Cheers.

Le lun. 10 févr. 2020 à 09:17, sulu <andreas.siegel@anonymised.com> a écrit :

Hi Francois.

Thanks. So i'll try to use the API.

Unfortunately i seem incapable to obtain a result.

Thats what i tried:
Get me a token:
rm -f /tmp/cookie; curl -c /tmp/cookie
http://localhost:8900/geonetwork/srv/eng/info?type=me -X POST ; cat
/tmp/cookie

Query the API:
curl -v -X GET
"
http://localhost:8900/geonetwork/api/0.1/records/8f68ae99-cfc6-4239-88b7-ace57af6e3cc/related
"
-H "X-XSRF-TOKEN: XXXXXXXXXX" --user YYYYY:ZZZZ -b /tmp/cookie

The API then refuses me an answer:
...
< HTTP/1.1 302
* Added cookie JSESSIONID="DB5AE289D342D34C838EA6C4810A1885" for domain
cnvbrwgdi8.net.vlr.gv.at, path /geonetwork, expire 0
< Set-Cookie: JSESSIONID=DB5AE289D342D34C838EA6C4810A1885;
Path=/geonetwork;
HttpOnly
< Location:

/geonetwork/accessDenied.jsp/eng/service-not-allowed?referer=/geonetwork/api/0.1/records/8f68ae99-cfc6-4239-88b7-ace57af6e3cc/related

I most likely did something wrong. But what?

Merci
Andy

--
Sent from:
http://osgeo-org.1560.x6.nabble.com/GeoNetwork-users-f3860293.html

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Hi Francois.

Please don't bother.

My URL was incomplete.

This query tells me something:

curl -X GET
"http://localhost:8900/geonetwork/srv/api/0.1/records/81be102a-f5bb-4e36-95e7-84afa238df71/related?start=1&rows=100&quot;
-H "accept: application/xml" -H "X-XSRF-TOKEN: ${XSRFTOKEN}"

Thanks again
Andy

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoNetwork-users-f3860293.html