Is it possible to change the ItemID of a Portal Item (e.g. a webmap) to a specific value, or to set a specific ItemID when creating a new item? I don't see any API supporting that so I assume it isn't possible...is my assumption correct?
@SimonSchütte_ct Referenced/Registered services.
And what do you do with the lingering Portal Item that gets created when originally publishing the service? It seems like it's tied to the service, ie, deleting the original Portal Item deletes the service as well.
You can create a service without a Portal Item on standalone (not federated), but once the ArcGIS Server Site is federated, the option seems to disappear.
Hosted or referenced feature Service? For hosted Services, you can upload the SD file, if I remember correctly. If it is a referenced Feature Service, my workflow is to publish it using the SD file, create an "empty" portal Item with intended ID, then copy the properties from the auto-generated item from the publishing step into the new item. Maybe there is a better way to do it, but it works for me./addItem: Add Item | ArcGIS REST APIs | ArcGIS DevelopersItems and item types | ArcGIS REST APIs | ArcGIS DevelopersTry this:- go to the /addItem Endpoint- URL: set a placeholder URL- Title: some unique Title- Type: Map Service- ItemId to Create: set something like 113a4502954a46ec6f06f6a7ac8f6cb9When clicking on Add Item, now the "empty" item with the intended ID is created. More information/data can be added.You can then use the items/113a4502954a46ec6f06f6a7ac8f6cb9 endpoints to update the item or delete it.
This doesnt seem to be working for me in Enterprise 11+. I'm trying to add a new feature service and it just blatantly ignores my itemIdToCreate, which I know for a fact is valid, because the itemId came from my dev portal.
Ok I see now that if you specify dataUrl then it doesnt work.
Here is an update/addItem: Add Item—ArcGIS REST APIs | ArcGIS Developers
New at 10.8.1. The item ID of the item. The item ID must not exist and must be 32 alphanumeric values.
itemIdToCreate applies only to ArcGIS Enterprise.
Example
itemIdToCreate=832157e321df46f721f9ededbe34ac58
Allows to specify the ItemID to Create:
/portal/sharing/rest/content/users/siteadmin/addItem
Hello Tobias!
You are correct, it is not possible to specify an itemID or modify an existing one, although I do see some potential value in doing so for certain use cases.
If it does not already exist, I would recommend posting an idea for this here on GeoNet.
-Danny
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.