The main VPP API wrapper class
commandment.vpp.vpp.
VPP
(stoken: str, vpp_service_config_url: str = 'https://vpp.itunes.apple.com/WebObjects/MZFinance.woa/wa/VPPServiceConfigSrv', service_config: dict = None)[source]¶VPP Object. The main VPP API wrapper class.
AssociationProperties
¶Mapping of the LicenseAssociationType enum to the expected JSON keys in the request.
Type: | dict |
---|
DisassociationProperties
¶Mapping of the LicenseDisassociationType enum to the expected JSON keys in the request.
Type: | dict |
---|
assets
(include_license_counts: bool = True, facilitator_member_id: str = None) → List[dict][source]¶Get assets for which the organization has licenses.
Parameters: |
|
---|---|
Returns: | List of VPP assets for which this organization has licenses. |
Return type: | List[dict] |
bulk_update_licenses
(adam_id: int, association_type: Optional[commandment.vpp.enum.LicenseAssociationType] = None, associate: Optional[List[str]] = None, disassociation_type: Optional[commandment.vpp.enum.LicenseDisassociationType] = None, disassociate: Optional[List[str]] = None, pricing_param: str = 'STDQ', notify: bool = False) → dict[source]¶Perform a batch operation of license associations and disassociations.
Parameters: |
|
---|
See also
edit_user
(client_user_id: str = None, facilitator_member_id: str = None, email: str = None, managed_apple_id: str = None, user_id: str = None)[source]¶Edit a user’s VPP record.
Parameters: |
|
---|---|
Returns: | Containing the reply from the service. |
Return type: | dict |
get_user
(client_user_id: str = None, its_id_hash: str = None, facilitator_member_id: str = None, user_id: int = None)[source]¶Get the status of a user by their unique ID.
Parameters: |
|
---|---|
Returns: | Containing the reply from the service. |
Return type: | dict |
licenses
(adam_id: int = None, pricing_param: Optional[commandment.vpp.enum.VPPPricingParam] = None, assigned_only: bool = False, facilitator_member_id: str = None, batch_token: str = None, since_modified_token: str = None) → commandment.vpp.vpp.VPPLicenseCursor[source]¶Retrieve a list of licenses matching the supplied criteria.
Parameters: |
|
---|---|
Returns: |
|
Return type: | VPPLicenseCursor |
manage
(adam_id: int, pricing_param: str = 'STDQ') → commandment.vpp.vpp.VPPLicenseOperation[source]¶Manage VPP licenses for the given Adam ID.
Parameters: |
|
---|---|
Returns: | an instance of a VPP license operation which can be modified to add or remove devices, and then submitted. |
Return type: |
manage_device_licenses
(adam_id: int, pricing_param: str = 'STDQ') → commandment.vpp.vpp.VPPDeviceLicenseOperation[source]¶Manage VPP Device License Assignment.
Parameters: |
|
---|---|
Returns: |
|
Return type: |
manage_user_licenses
(adam_id: int, pricing_param: str = 'STDQ') → commandment.vpp.vpp.VPPUserLicenseOperation[source]¶Manage VPP User License Assignment.
Parameters: |
|
---|---|
Returns: |
|
Return type: |
register_user
(client_user_id: str, email: str = None, facilitator_member_id: str = None, managed_apple_id: str = None)[source]¶Register an MDM user with VPP.
Parameters: |
|
---|---|
Returns: | Containing the decoded body of the reply from the VPP service, eg: { "status": 0,
"user": {
"userId": 2878111686099947,
"email": "vpp-test@localhost",
"status": "Registered",
"inviteUrl": "http://localhost:8080/D1971F9DD5F8E67BDD",
"inviteCode": "D1971F9DD5F8E67BDD",
"clientUserIdStr": "F33D9E0F-CDE3-427E-A444-B137BEF9EFA2"
}
}
|
Return type: | dict |
retire_user
(client_user_id: str = None, facilitator_member_id: str = None, user_id: str = None)[source]¶Unregister a user from VPP.
Parameters: |
|
---|---|
Returns: | Containing the reply from the service. |
Return type: | dict |
save
(operation: commandment.vpp.vpp.VPPLicenseOperation, notify: bool = False) → dict[source]¶Execute a license management operation, represented by a VPPLicenseOperation or subclass.
This provides a more convenient interface than bulk_update_licenses.
Parameters: |
|
---|---|
Returns: | Reply from the license endpoint. |
Return type: | dict |
users
(include_retired: int = 1, facilitator_member_id: str = None, batch_token: str = None, since_modified_token: str = None) → commandment.vpp.vpp.VPPUserCursor[source]¶Parameters: |
|
---|
Returns: