POST
|
Hey Treg - I'm seeing the same problem you documented in certain cases. Can you try running the `overwrite` function with a zipped up gdb as the input rather than the gdb feature class? Let me know what results you get.
... View more
02-13-2018
09:11 AM
|
0
|
5
|
1416
|
POST
|
Glad that worked, René - Updating the access property for a Web Map would look the exact same. Retrieve the Web Map Item from your portal and use the share method: search_results = a_gis.content.search("*", item_type = "Web Map")
web_map_item = search_results[0] #use the appropriate index value for the Web Map you want to update
web_map_item.share(everyone=False, org=True, groups=['group name 1', 'group name 2'])
... View more
02-08-2018
10:47 AM
|
1
|
1
|
967
|
POST
|
Hi akshay An http 500 error is a general server error meaning something's wrong on the server end. I moved this post to the https://community.esri.com/community/gis/enterprise-gis/arcgis-enterprise?sr=search&searchId=c59b9da5-f6e8-4e5e-982b-320ef086ba22&searchIndex=1 community to get experienced sets of eyes on this.
... View more
02-08-2018
10:37 AM
|
0
|
1
|
540
|
POST
|
Hi René - Use the item.share, method to change the access property for the item. layer_item.share(everyone=False, org=True) The method returns a dictionary with itemId and notSharedWith keys: {'itemId': '<item ID value>', 'notSharedWith': [] } The `notSharedWith` key will list the entities on which the sharing was not successful. If the 'notSharedWith` list is empty that means the operation was a success. Next time you retrieve the item and return it's `access` property, you'll see the correct value.
... View more
02-08-2018
10:25 AM
|
1
|
2
|
967
|
POST
|
Hey Treg Let me run some testing on this function. I'll get back to you on what I find. John
... View more
02-05-2018
05:35 PM
|
0
|
7
|
1416
|
POST
|
Hey Joe - The API reference for the content here defines the max_items parameter that provides control to the number of results returned. By default, the max_items parameter returns 10 items. You can set that parameter to a desired number: search_results = a_gis.content.search(query="*", max_items=50) I don't believe there is a limit to the number you can enter for that parameter.
... View more
02-04-2018
02:26 PM
|
4
|
2
|
2051
|
POST
|
Hi Geoffrey Joseph - it is possible to install the ArcGIS API for Python in a disconnected environment. See the Install and Set Up Guide for instructions on getting the required software onto your system. Some additional configuration steps will most likely - please contact me directly through email and I'll be happy to walk you through some additional information. As Joshua mentions, the API for Python is designed to work with your web GIS powered by ArcGIS Online or Enterprise for ArcGIS. Will you have access to an ArcGIS Enterprise installation while disconnected?
... View more
01-29-2018
07:41 AM
|
1
|
1
|
2342
|
POST
|
Hi Peter Knoop Try it with the --no-pin flag: Type: conda upgrade -c esri --no-pin arcgis The --no-pin flag is necessary to override the arcgis 1.2.5 package.
... View more
01-25-2018
11:39 AM
|
0
|
1
|
1109
|
POST
|
The Install and Set Up Guide will be updated soon to contain these instructions.
... View more
01-25-2018
10:31 AM
|
1
|
1
|
1109
|
POST
|
Hi Peter Knoop You can upgrade to the version 1.3.0 of the ArcGIS API for Python using the Python Command Prompt (head to Start > All Programs > ArcGIS to find it): Once that's opened, type: conda upgrade -c esri --no-pin arcgis Let me know the outcome.
... View more
01-25-2018
10:17 AM
|
0
|
1
|
1109
|
POST
|
Hi Lakshmi - Ok. So Let's try a query from the API just to make sure that we're getting results. Try this: mmig_fl.query(where="1=1", return_count_only=True) Does that return the expected number of features? Can you also try to run the query from the where clause on the rest endpoint of the layer? What results do you get from that? Let me know what you find out.
... View more
01-03-2018
04:38 PM
|
0
|
0
|
3581
|
POST
|
Hi Mike Quetel - I haven't figured a way to make a list of users in a role directly from a gis.users.search(), but I generated one using role_id values in this way. The users list in the second block of code returned the correct users in the portal I tested. Will that work to get your list? g = GIS("portal url", "username", "password")
role_mgr = arcgis.gis.RoleManager(g)
roles = role_mgr.all()
for role in roles:
print("Role ID: {}".format(role.role_id))
users = [user for user in g.users.search() if user.role == '<role.role_id value>']
for user in users:
print("User: {:<20}\tRole: {}".format(user.username, user.role))
... View more
12-14-2017
03:01 PM
|
1
|
1
|
1458
|
POST
|
Katy Haddock As Seth Lewis points out, the Group item's add_users method requires a Python string that is the name of a list, not a string that represents the name of a user. For the instance you describe, it sounds like you can query the gis object representing your GIS, then create a list based on the role. For instance, you could create a list of publishers and add them to a group: my_gis = GIS("portal url", "user", "password")
portal_users = my_gis.search.users()
list_of_users = [a_user for a_user in portal_users if a_user.role == 'org_publisher']
my_group = my_gis.groups.search("title: <title of your group>")
my_group.add_users(list_of_users) When successful, the add_users method returns a dictionary with a notAdded key with a list of users that were not added - so an empty list is the ideal value...(Less is definitely more 😞 {notAdded: []}
... View more
12-13-2017
12:02 PM
|
1
|
1
|
1695
|
POST
|
This query would work to return a count of features with the cause_of_death attribute value of Mixed: mmig_fl.query(where="cause_of_death LIKE 'Mixed'", return_count_only=True) The 500 HTTP error code means the server couldn't process the request for some reason. Do your Server logs have any more detailed information from when the error occurred? How many features are returned when you run that where clause in the query dialog on the rest endpoint of the hosted feature layer?
... View more
11-08-2017
11:24 AM
|
2
|
2
|
3581
|
POST
|
Thanks, aitor.caleroesri-es-esridist - the add_users method returns a dictionary with one key, 'notAdded', and a list of users that did not successfully get added to the group. We'll take a look at what that method returns to investigate how to clear up any confusion.
... View more
10-23-2017
03:24 PM
|
2
|
1
|
719
|
Title | Kudos | Posted |
---|---|---|
1 | 06-14-2023 11:49 AM | |
1 | 06-26-2023 09:44 AM | |
1 | 07-18-2023 09:42 AM | |
4 | 01-30-2023 09:33 AM | |
2 | 01-11-2019 03:06 PM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|