This is a working example that gets the Content in "My Content" on the online ArcGIS portal.
Access ArcGIS Online items using OAuthentication - 4.13
I am trying to change this example to get the Contents of a Group in "My Groups".
Is there a code example available, or can you give me a clear explanation how to achieve this?
I'm new to ArcGIS so not experienced at all.
Highly appreciated.
Solved! Go to Solution.
Hi Piet,
Try PortalGroup class, with method queryItems
PortalGroup | API Reference | ArcGIS API for JavaScript 3.31
Here is reference for query parameters, type should be 'map'.
Search reference—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers
Hi Piet,
Try PortalGroup class, with method queryItems
PortalGroup | API Reference | ArcGIS API for JavaScript 3.31
Here is reference for query parameters, type should be 'map'.
Search reference—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers
Thank you, it worked out.
Appreciated.
Hi Leo,
I am struggling with the query parameters.
This works:
var queryParams = new PortalQueryParams({
query: 'group:' + selectedID,
});
This works:
var queryParams = new PortalQueryParams({
query: 'type:Map,
});
This gives no result:
var queryParams = new PortalQueryParams({
query: 'group:' + selectedID + 'AND type:Map',
});
seems you can't add 2 items in the search query.
Any idea how I can have the 2 items in 1 query?
Hi Piet,
Is it because you need a space before AND operator in your query string?
var queryParams = new PortalQueryParams({
query: 'group:' + selectedID + ' AND type:Map',
});
Yes, simple mistake. I am not used working with ":" in queries and was focussing on that. Thank you very much for your help. I have the correct maps from the group.