arcgis.gis.sharing module

UserInvitationManager

class arcgis.gis.sharing.UserInvitationManager(user)

Bases: object

Provides access to the user’s invitations

property list

returns a list of all invitations

Returns

List of Invitation objects

Invitation

class arcgis.gis.sharing._users.Invitation(url, gis)

Bases: object

Represents a user’s invitation

accept()

When a group owner or an administrator invites a user to their group, it results in a user invitation. The invited user can accept the invitation using the accept operation. This operation adds the invited user to the group, and the invitation is deleted. This operation also creates a notification for the user indicating that the user’s invitation was accepted.

Returns

Dict[str:str]

decline()

When a group administrator invites a user to their group, it results in a group invitation. The invited user can decline the invitation using the decline operation. The operation deletes the invitation and creates a notification for the user indicating that they declined the invitation. The invited user is not added to the group.

Returns

Dict[str:str]

property properties

returns the details of the invitation

DependencyManager

class arcgis.gis.sharing.DependencyManager(gis)

Bases: object

Provides the ability for the manager to rebuild Item dependencies

rebuild()

Rebuilds all the Item Dependencies on the Enterprise

Returns

Dict[str, Any]

status()

Checks to see if the dependency graph database is rebuilding

Returns

Dict[str,str]

terminate()

Ends the rebuild of the dependency database.

MarketPlaceManager

class arcgis.gis.sharing.MarketPlaceManager(gis)

Bases: object

Provides the ability for the manager to list and unlist marketplace items

comments(itemid)

Lists all comments for the item

customer_list(itemid=None, orgname=None, status='all', type='PURCHASE', modified=None, sort_fields=None, sort_order='asc', include_listing=True, num=10, start=1)

The customers_list resource returns a list of purchases, trials, and interests expressed by customers for items listed by this organization in 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 date specified should be in milliseconds from epoch.

sort_field

Optional String. The fields to sort provisions by. The allowed sort field names are orgname, created, endDate, and modified.

sort_order

Optional String. Describe whether the order returns in ascending (asc) or descending (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 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 query 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. 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 query results.

Returns

A dictionary.

delete_provision(itemid)

This operation deletes all provisions to this item for the specified purchaser.

This operation cannot be invoked if the item has not been provisioned to 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)

A purchaser can express interest in a marketplace listing by invoking this operation.

This operation cannot be invoked if the item has already been purchased or if the purchaser has previously expressed interest.

Only administrators and members with request purchase information privilege of purchasing orgs can invoke this operation.

Note that interests cannot be expressed for free listings, because they can be directly purchased by purchasing org admins or members with request purchase information privilege.

Parameter

Description

itemid

Required String. The item id.

Returns

A dictionary of the listed item with properties.

list(itemid)

This operation lists the item in the marketplace.

This operation is only available to organizations that have permissions to list items in the marketplace. The permissions are returned with the Portal Self response.

The listing properties must be specified for the item before calling this operation. This operation will fail if listing properties 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 administrator of the organization to which the user belongs.

Returns

A dictionary indicating success or failure and the item id of the listed item.

listing(itemid)

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='*', my_listings=False, start=1, num=10, sort_field=None, sort_order='asc')

This operation searches for marketplace listings. The searches are performed against 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 as a vendor org admin, it searches all public and private listings 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 the result 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 be included 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 be less than num. This happens when the number of results remaining after start is less than num.

sort_field

Optional string. The field to sort by. You can also sort by multiple fields (comma separated) for listings, sort field 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 returns in 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, purchaser_org_id, purchaser_subscription_id=None, org_entitlements=None)

For a license-by-user listing, selling organization administrator or members can use this operation to provision entitlements to a purchasing organization. It can only be made if the item has already been 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 request purchase 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, user_entitlements)

For a license-by-user listing, purchasing organization administrator can use this operation to provision entitlements to org members. 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 can be provisioned in one request.

Parameter

Description

itemid

Required String. The item id.

user_entitlements

Required Dictionary. A JSON object representing the set of entitlements assigned 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 of entitlements are to be assigned to different users, multiple requests with this operation are required.

When there is no entitlements specified, it will revoke access to the item completely for the specified users.

The total number of currently provisioned users plus users specified in requests should 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, purchase_org_id=None, provisioned_itemid=None, end_date=None)

Parameter

Description

itemid

Required String. The item id.

purchase_org_id

Required String. The org ID of the purchaser organization. This parameter is required 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 one listed.

Note that the listed item and the provisioned item must be related by the Listed2Provisioned 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 is not specified, it implies an unexpiring purchase. The end date specified should be in milliseconds from epoch.

Returns

A dictionary of the provision item.

purchases(status='active')

The purchases resource returns a list of purchases, trials, and interests 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)

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 valid for the duration of the trial specified on the listing (the trialDuration property).

This operation cannot be invoked if the item has already been purchased or if the purchaser has started a trial previously.

Only admins or members with request purchase information privilege of purchasing orgs can invoke this operation.

Parameter

Description

itemid

Required String. The item id.

Returns

A dictionary of the provision item.

unlist(itemid)

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 of the organization to which the user belongs.

Returns

A dictionary indicating success or failure and the item id of the listed item.

user_entitlement(itemid, username)

This resource allows user, purchasing organization administrator, and members with the manage licenses privilege to retrieve entitlements assigned to the user.

Parameter

Description

itemid

Required String.

username

Required String.

user_entitlements(itemid)

This operation allows purchasing organization administrators or a user with Manage Licenses privilege to retrieve all user entitlements assigned 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.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.