nonces¶
The following methods allow for interaction with the ZMS Nonces (Provisioning Keys) API endpoints.
Methods are accessible via zms.nonces
Copyright (c) 2023, Zscaler Inc.
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- class NoncesAPI¶
Bases:
APIClientA Client object for the ZMS Nonces (Provisioning Keys) domain.
Provides access to nonce operations including: - List nonces with pagination, search, and sorting - Get a single nonce by eyez ID
- get_nonce(customer_id, eyez_id)¶
Get a nonce by its eyez ID.
- Parameters:
customer_id – The customer ID.
eyez_id – The nonce eyez ID.
- Returns:
(nonce_response dict, response, error)
- Return type:
Examples
Get a nonce:
>>> result, _, err = client.zms.nonces.get_nonce( ... customer_id="123456789", ... eyez_id="nonce-abc-123" ... ) >>> if err: ... print(err) >>> print(result.get("nonce", {}).get("name"))
- list_nonces(customer_id, page=1, page_size=20, search=None, sort=None, sort_dir=None)¶
Get a paginated list of nonces (provisioning keys) for a customer.
- Parameters:
customer_id – The customer ID.
page – Page number (default 1).
page_size – Number of items per page (default 20).
search – Search filter string.
sort – Sort field.
sort_dir – Sort direction (ASC or DESC).
- Returns:
(nonces_connection dict, response, error)
- Return type:
Examples
List nonces:
>>> result, _, err = client.zms.nonces.list_nonces( ... customer_id="123456789" ... ) >>> if err: ... print(err) >>> for nonce in result.get("nodes", []): ... print(nonce.get("name"))