arcgis.gis.sharing module
UserInvitationManager
- classarcgis.gis.sharing.UserInvitationManager(user:User)
Bases:
object
Provides access to the user’s invitations
- propertylist:List[Invitation]
returns a list of all invitations
- Returns:
List of
Invitation
objects
Invitation
- classarcgis.gis.sharing._users.Invitation(url:str,gis:GIS)
Bases:
object
Represents a user’s invitation
- accept()→dict
When a group owner or an administrator invites a user to theirgroup, it results in a user invitation. The invited user canaccept the invitation using theaccept operation. Thisoperation adds the invited user to the group, and the invitation isdeleted. This operation also creates a notification for the userindicating that the user’s invitation was accepted.
- Returns:
Dict[str:str]
- decline()→dict
When a group administrator invites a user to their group, itresults in a group invitation. The invited user can decline theinvitation using thedecline operation. The operation deletes theinvitation and creates a notification for the user indicating thatthey declined the invitation. The invited user is not added to thegroup.
- Returns:
Dict[str:str]
DependencyManager
- classarcgis.gis.sharing.DependencyManager(gis:GIS)
Bases:
object
Provides the ability for the manager to rebuild
Item
dependenciesDeprecated since version 2.4.0:Removed in: 2.4.2. Deprecated REST API, no replacement provided.
- rebuild()→Dict[str,Any]
Deprecated since version 2.4.0:Removed in: 2.4.2. Deprecated REST API, no replacement provided.
Rebuilds all the Item Dependencies on the Enterprise
- Returns:
Dict[str, Any]
MarketPlaceManager
- classarcgis.gis.sharing.MarketPlaceManager(gis:GIS)
Bases:
object
Provides the ability for the manager to list and unlist marketplace items
- customer_list(itemid:str|None=None,orgname:str|None=None,status:str='all',type:str='PURCHASE',modified:str|None=None,sort_fields:str|None=None,sort_order:str='asc',include_listing:bool=True,num:int=10,start:int=1)→dict
The customers_list resource returns a list of purchases, trials, andinterests expressed by customers for items listed by this organizationin the marketplace. This operation allows filtering and sorting of provisions.
Parameter
Description
itemid
Optional String. The item id of the provision to be returned.
orgname
Optional String. Purchaser organization name of the provisions to be returned.
status
Optional String. Status of the listings to be returned. The default value is active.
- Accepted values are:
active: Only listings that are currently active will be returned
expired: Only listings that have already expired will be returned
all: Both active and expired listings will be returned
type
- Optional String. Access type of the provisions to be returned:
REQUEST: Only provisions that have been requested will be returned.
TRIAL: Only trial provisions will be returned.
PURCHASE: Only subscription provisions will be returned.
REQUESTANDTRIAL: Both provisions that have been requested and trial provisions will be returned.
REQUESTANDPURCHASE: Both provisions that have been requested and subscriptions will be returned.
TRIALANDPURCHASE: Both trial provisions and subscriptions will be returned.
Values: “REQUEST” | “TRIAL” | “PURCHASE” | “REQUESTANDTRIAL” | “REQUESTANDPURCHASE” | “TRIALANDPURCHASE”
modified
Optional String. The last modified date of the provisions to be returned. The datespecified should be in milliseconds from epoch.
sort_field
Optional String. The fields to sort provisions by. The allowed sort field names areorgname, created, endDate, and modified.
sort_order
Optional String. Describe whether the order returns in ascending (asc) ordescending (desc) order. The default is asc.
include_listing
Optional Boolean. If True, listing objects are included in the provision response.The default is True.
num
Optional Integer. The maximum number of provisions to be included in the resultset response. The default value is 10, and the maximum allowed value is 100.The start parameter, along with the num parameter, can be used to paginate thequery results. Note that the actual number of returned results may be less than num.This happens when the number of results remaining after start is less than num.
start
Optional Integer. The number of the first entry in the result set response. Theindex number is 1-based. The default value of start is 1. (i.e. the first search result).The start parameter, along with the num parameter, can be used to paginate thequery results.
- Returns:
A dictionary.
- delete_provision(itemid:str)→dict
This operation deletes all provisions to this item forthe specified purchaser.
This operation cannot be invoked if the item has not been provisionedto the specified purchaser.
Note
Only vendor org admins can invoke this operation.
Parameter
Description
itemid
Required String. The item id.
- Returns:
A dictionary with syntax:
{“success”: <true | false>,”itemId”: “<itemId>”,”purchaserOrgId”: “<purchaserOrgId>”}
- express_interest(itemid:str)→dict
A purchaser can express interest in a marketplace listing byinvoking this operation.
This operation cannot be invoked if the item has already beenpurchased or if the purchaser has previously expressed interest.
Only administrators and members with request purchase informationprivilege of purchasing orgs can invoke this operation.
Note that interests cannot be expressed for free listings, becausethey can be directly purchased by purchasing org admins or memberswith request purchase information privilege.
Parameter
Description
itemid
Required String. The item id.
- Returns:
A dictionary of the listed item with properties.
- list(itemid:str)→dict
This operation lists the item in the marketplace.
This operation is only available to organizations that have permissionsto list items in the marketplace. The permissions are returned with thePortal Self response.
The listing properties must be specified for the item beforecalling this operation. This operation will fail if listingproperties have not already been specified.
Listing an item will set its listed property to true.
This operation is available to the user and to the administratorof the organization to which the user belongs.
- Returns:
A dictionary indicating success or failure and the item id of the listed item.
- listing(itemid:str)→dict
A listing in the marketplace. The listing and its corresponding item share the same ID.
Parameter
Description
itemid
Required String. The item id.
- Returns:
A dictionary of the listed item with properties.
- listings(query:str='*',my_listings:bool=False,start:int=1,num:int=10,sort_field:str|None=None,sort_order:str='asc')→dict
This operation searches for marketplace listings. The searches are performedagainst a high performance index that indexes the most popular fields of a listing.
By default, this search spans all public listings in the marketplace. However,if you’re logged in as a vendor org admin and you specify the my_listings=true parameter,it then searches all public and private listings in your organization.
Parameter
Description
query
Optional string. The query string to use to search.
my_listings
Optional boolean. If True and you’re logged in asa vendor org admin, it searches all public and privatelistings in your organization. Note that if my_listings=True,the query parameter is optional. Default is False.
start
Optional integer. The number of the first entry in theresult set response. The index number is 1-based.
The default value of start is 1. (i.e., the first search result).
The start parameter, along with the num parameter,can be used to paginate the search results.
num
Optional integer. The maximum number of results to beincluded in the result set response.
The default value is 10, and the maximum allowed value is 100.
The start parameter, along with the num parameter,can be used to paginate the search results.
Note that the actual number of returned results may beless than num. This happens when the number of resultsremaining after start is less than num.
sort_field
Optional string. The field to sort by. You can also sortby multiple fields (comma separated) for listings, sortfield names are case-insensitive.
Supported sort field names are:“title”, “created”, “listingpublisheddate”, “type”, “owner”,“avgrating”, “numratings”, “numcomments”, and “numviews”
sort_order
Optional string. Describes whether the order returnsin ascending(asc) or descending(desc) order. Default is asc.
- Returns:
A dictionary with response syntax of:
{“query”: “<query string>”,”total”: <total number of results>,”start”: <results in first set>,”num”: <number of results per page>,”nextStart”: <result number of next page>,”listings”: [{<listing1>}, {<listing2>}]}
- provision_org_entitlements(itemid:str,purchaser_org_id:str,purchaser_subscription_id:str|None=None,org_entitlements:dict|None=None)→dict
For a license-by-user listing, selling organization administratoror members can use this operation to provision entitlements to apurchasing organization. It can only be made if the item has alreadybeen purchased, or is being tried by the purchasing org.
This operation is HTTPS only for Esri apps that require a signature,otherwise it can be either for provider apps.
It can only be invoked by org admins or members with requestpurchase information privilege.
Parameter
Description
itemid
Required String. The item id.
purchaser_org_id
Required String. The org ID of the purchasing organization
purchaser_subscription_id
Optional String. The subscription(SMS) ID of the purchasing organization.
org_entitlements
Required Dictionary. A JSON object representing the set of entitlements available to the purchasing org.
Example:
{“maxUsers”: 10,“entitlements”: {“standard”: {“num”: 8}, (‘standard’ is an entitlement string that uniquely identifies entitlement, listingID is used typically for provider apps)“advanced”: {“num”: 2},“spatialAnalyst”: {“num”: 2}}}- Returns:
A dictionary of the provision item.
- provision_user_entitlements(itemid:str,user_entitlements:dict)→bool
For a license-by-user listing, purchasing organization administratorcan use this operation to provision entitlements to orgmembers. It can only be made if the item has already been purchased,or is being tried by the purchasing org. A maximum of 25 users canbe provisioned in one request.
Parameter
Description
itemid
Required String. The item id.
user_entitlements
Required Dictionary. A JSON object representing the set of entitlementsassigned to the specified set of users.
Example:
{“users”: [“username1”, “username2”],“entitlements”: [“standard”, “networkAnalyst”] (“standard” is an entitlement string that uniquely identifies entitlement, listing itemId is used typically for provider apps)}Only members of the purchasing org can be specified in the request.
Specified entitlements are assigned to all specified users. If different sets ofentitlements are to be assigned to different users, multiple requestswith this operation are required.
When there is no entitlements specified, it will revoke access tothe item completely for the specified users.
The total number of currently provisioned users plus users specified in requestsshould be no larger than the maximum number of users allowed for the purchasing org.
- Returns:
A boolean indicating success (True) or failure (False).
- purchase(itemid:str,purchase_org_id:str|None=None,provisioned_itemid:str|None=None,end_date:str|None=None)→dict
Parameter
Description
itemid
Required String. The item id.
purchase_org_id
Required String. The org ID of the purchaser organization. This parameter isrequired only when the call is made by the vendor. It is ignored otherwise.
provisioned_itemid
Required String. The ID of the item to be provisioned if different from the onelisted.
Note that the listed item and the provisioned item must be related by theListed2Provisioned relationship otherwise it will result in an error.
This parameter is allowed only when the call is made by the vendor.It is ignored otherwise.
end_date
Required String. The end/expiry date of this purchase if any. If this parameter isnot specified, it implies an unexpiring purchase. The end date specifiedshould be in milliseconds from epoch.
- Returns:
A dictionary of the provision item.
- purchases(status:str='active')→dict
The purchases resource returns a list of purchases, trials, andinterests expressed by this organization for items in the marketplace.
Parameter
Description
status
Optional String. Status of the listings to be returned. The default value is active.
- Accepted values are:
active: Only listings that are currently active will be returned
expired: Only listings that have already expired will be returned
all: Both active and expired listings will be returned
- Returns:
A dictionary depicting the purchases, trials, and interests.
- trial(itemid)→dict
A purchaser can start a trial for a marketplace listing by invoking this operation.
This operation is only supported for listings that support trials(whose trialSupported property is true). Once started, the trial will be validfor the duration of the trial specified on the listing (the trialDuration property).
This operation cannot be invoked if the item has already been purchased orif the purchaser has started a trial previously.
Only admins or members with request purchase information privilege ofpurchasing orgs can invoke this operation.
Parameter
Description
itemid
Required String. The item id.
- Returns:
A dictionary of the provision item.
- unlist(itemid:str)→dict
This operation unlists a previously listed item from the marketplace.
Unlisting an item will reset its listed property to false.
This operation is available to the user and the administrator ofthe organization to which the user belongs.
- Returns:
A dictionary indicating success or failure and the item id of the listed item.
- user_entitlement(itemid:str,username:str)→dict
This resource allows user, purchasing organization administrator, andmembers with the manage licenses privilege to retrieve entitlements assigned to the user.
Parameter
Description
itemid
Required String.
username
Required String.
- user_entitlements(itemid:str)→dict
This operation allows purchasing organization administrators or auser with Manage Licenses privilege to retrieve all user entitlementsassigned to users in their organization.
Parameter
Description
itemid
Required String. The item id.
- Returns:
A JSON document representing the set of entitlements assigned to the specified set of users.