|
51 | 51 | },
|
52 | 52 | {
|
53 | 53 | "cell_type": "code",
|
54 |
| - "execution_count": 3, |
| 54 | + "execution_count": 1, |
55 | 55 | "id": "3b5328c1",
|
56 | 56 | "metadata": {},
|
57 | 57 | "outputs": [],
|
58 | 58 | "source": [
|
59 | 59 | "from arcgis import GIS\n",
|
60 |
| - "from arcgis.features import _version" |
| 60 | + "from arcgis.features import FeatureLayerCollection" |
61 | 61 | ]
|
62 | 62 | },
|
63 | 63 | {
|
64 | 64 | "cell_type": "code",
|
65 |
| - "execution_count": 5, |
| 65 | + "execution_count": 7, |
66 | 66 | "id": "abdf9cc2",
|
67 | 67 | "metadata": {},
|
68 |
| - "outputs": [ |
69 |
| - { |
70 |
| - "name": "stderr", |
71 |
| - "output_type": "stream", |
72 |
| - "text": [ |
73 |
| - "Setting `verify_cert` to False is a security risk, use at your own risk.\n" |
74 |
| - ] |
75 |
| - } |
76 |
| - ], |
| 68 | + "outputs": [], |
77 | 69 | "source": [
|
78 | 70 | "base_server_url = (\n",
|
79 |
| - " \"https://rextapilnx02eb.mysite.com/server/rest/services/WashingtonCounty/\"\n", |
| 71 | + " \"https://example.server.com/server/rest/services/WashingtonCountyLSA/\"\n", |
80 | 72 | ")\n",
|
81 | 73 | "gis = GIS(\n",
|
82 |
| - " \"https://myenterprisesite.com/portal/\",\n", |
83 |
| - " \"my_user_name\",\n", |
84 |
| - " \"my_secure_password\",\n", |
85 |
| - " verify_cert=False,\n", |
| 74 | + " \"https://example.server.com/portal/\",\n", |
| 75 | + " \"admin\",\n", |
| 76 | + " \"esri.agp\",\n", |
86 | 77 | ")"
|
87 | 78 | ]
|
88 | 79 | },
|
89 | 80 | {
|
90 | 81 | "cell_type": "markdown",
|
91 |
| - "id": "522387ea", |
| 82 | + "id": "903d406b-e96b-4f8f-92f9-064930d5cd70", |
92 | 83 | "metadata": {},
|
93 | 84 | "source": [
|
94 |
| - "### Access branch versions via Version Management Server" |
| 85 | + "### Access the Version Management Server through the Parcel Fabric `FeatureLayerCollection` object\n", |
| 86 | + "\n", |
| 87 | + "The `versions` property in a parcel fabric `FeatureLayerCollection` (FLC) creates a `VersionManager` object to create, update and use versions. \n", |
| 88 | + "\n", |
| 89 | + "The `FeatureServer` endpoint is used to create a `FeatureLayerCollection`." |
95 | 90 | ]
|
96 | 91 | },
|
97 | 92 | {
|
98 | 93 | "cell_type": "code",
|
99 |
| - "execution_count": 11, |
100 |
| - "id": "bf7b899c", |
| 94 | + "execution_count": 10, |
| 95 | + "id": "db6cc7e3-76de-4fdf-bbb2-006159e7df1c", |
101 | 96 | "metadata": {},
|
102 | 97 | "outputs": [
|
103 | 98 | {
|
104 | 99 | "data": {
|
105 | 100 | "text/plain": [
|
106 |
| - "{\n", |
107 |
| - " \"name\": \"Version Management Server\",\n", |
108 |
| - " \"type\": \"Map Server Extension\",\n", |
109 |
| - " \"defaultVersionName\": \"sde.DEFAULT\",\n", |
110 |
| - " \"defaultVersionGuid\": \"{BD3F4817-9A00-41AC-B0CC-58F78DBAE0A1}\",\n", |
111 |
| - " \"capabilities\": {\n", |
112 |
| - " \"supportsConflictDetectionByAttribute\": true,\n", |
113 |
| - " \"supportsPartialPost\": true,\n", |
114 |
| - " \"supportsDifferencesFromMoment\": true,\n", |
115 |
| - " \"supportsDifferencesWithLayers\": true,\n", |
116 |
| - " \"supportsAsyncReconcile\": true,\n", |
117 |
| - " \"supportsAsyncPost\": true,\n", |
118 |
| - " \"supportsAsyncDifferences\": true,\n", |
119 |
| - " \"supportsOutSR\": true\n", |
120 |
| - " }\n", |
121 |
| - "}" |
| 101 | + "< VersionManager @ https://example.server.com/server/rest/services/WashingtonCountyLSA/VersionManagementServer >" |
122 | 102 | ]
|
123 | 103 | },
|
124 |
| - "execution_count": 11, |
| 104 | + "execution_count": 10, |
125 | 105 | "metadata": {},
|
126 | 106 | "output_type": "execute_result"
|
127 | 107 | }
|
128 | 108 | ],
|
129 | 109 | "source": [
|
130 |
| - "from arcgis.features._version import VersionManager\n", |
| 110 | + "from arcgis.features.layer import FeatureLayerCollection\n", |
| 111 | + "\n", |
| 112 | + "parcel_fabric_feature_server_url = f\"{base_server_url}/FeatureServer\"\n", |
| 113 | + "parcel_fabric_flc = FeatureLayerCollection(parcel_fabric_feature_server_url, gis)\n", |
131 | 114 | "\n",
|
132 |
| - "version_management_server_url = f\"{base_server_url}/VersionManagementServer\"\n", |
133 |
| - "vms = VersionManager(version_management_server_url, gis)\n", |
134 |
| - "vms.properties" |
| 115 | + "vms = parcel_fabric_flc.versions\n", |
| 116 | + "vms" |
135 | 117 | ]
|
136 | 118 | },
|
137 | 119 | {
|
|
144 | 126 | },
|
145 | 127 | {
|
146 | 128 | "cell_type": "code",
|
147 |
| - "execution_count": 12, |
| 129 | + "execution_count": 11, |
148 | 130 | "id": "31fcaff3",
|
149 | 131 | "metadata": {},
|
150 | 132 | "outputs": [
|
151 | 133 | {
|
152 | 134 | "data": {
|
153 | 135 | "text/plain": [
|
154 | 136 | "[<Version sde.DEFAULT @ {BD3F4817-9A00-41AC-B0CC-58F78DBAE0A1}>,\n",
|
155 |
| - " <Version mycreator.merge_version_1 @ {D1FDA18B-7B15-4773-9D7D-814092D88171}>]" |
| 137 | + " <Version user.Editor1 @ {7FC9DF13-6E04-46D2-A1A4-19410463B696}>,\n", |
| 138 | + " <Version user.QA_Editor @ {3860EB29-81C8-4B50-BBE3-9C8DA823B307}>]" |
156 | 139 | ]
|
157 | 140 | },
|
158 |
| - "execution_count": 12, |
| 141 | + "execution_count": 11, |
159 | 142 | "metadata": {},
|
160 | 143 | "output_type": "execute_result"
|
161 | 144 | }
|
|
219 | 202 | "version # view the version's properties"
|
220 | 203 | ]
|
221 | 204 | },
|
222 |
| - { |
223 |
| - "cell_type": "markdown", |
224 |
| - "id": "325394fc", |
225 |
| - "metadata": {}, |
226 |
| - "source": [ |
227 |
| - "### Access the Version Management Server through the Parcel Fabric `FeatureLayerCollection` object\n", |
228 |
| - "\n", |
229 |
| - "The `versions` property in a parcel fabric `FeatureLayerCollection` (FLC) creates a `VersionManager` object to create, update and use versions. \n", |
230 |
| - "\n", |
231 |
| - "The `FeatureServer` endpoint is used to create a `FeatureLayerCollection`." |
232 |
| - ] |
233 |
| - }, |
234 |
| - { |
235 |
| - "cell_type": "code", |
236 |
| - "execution_count": 14, |
237 |
| - "id": "e77b0221", |
238 |
| - "metadata": {}, |
239 |
| - "outputs": [ |
240 |
| - { |
241 |
| - "data": { |
242 |
| - "text/plain": [ |
243 |
| - "['sde.DEFAULT', 'my_user_name.fabric_editor_1', 'mycreator.merge_version_1']" |
244 |
| - ] |
245 |
| - }, |
246 |
| - "execution_count": 14, |
247 |
| - "metadata": {}, |
248 |
| - "output_type": "execute_result" |
249 |
| - } |
250 |
| - ], |
251 |
| - "source": [ |
252 |
| - "from arcgis.features.layer import FeatureLayerCollection\n", |
253 |
| - "\n", |
254 |
| - "parcel_fabric_feature_server_url = f\"{base_server_url}/FeatureServer\"\n", |
255 |
| - "parcel_fabric_flc = FeatureLayerCollection(parcel_fabric_feature_server_url, gis)\n", |
256 |
| - "\n", |
257 |
| - "# print the version names from the FLC's versions property:\n", |
258 |
| - "vms_from_flc = parcel_fabric_flc.versions\n", |
259 |
| - "[v.properties.versionName for v in vms_from_flc.all]" |
260 |
| - ] |
261 |
| - }, |
262 | 205 | {
|
263 | 206 | "cell_type": "markdown",
|
264 | 207 | "id": "fb52f011",
|
|
377 | 320 | "name": "python",
|
378 | 321 | "nbconvert_exporter": "python",
|
379 | 322 | "pygments_lexer": "ipython3",
|
380 |
| - "version": "3.11.0" |
| 323 | + "version": "3.13.5" |
381 | 324 | },
|
382 | 325 | "toc": {
|
383 | 326 | "base_numbering": 1,
|
|
0 commit comments