Skip to content

Latest commit

 

History

History
335 lines (231 loc) · 12.9 KB

File metadata and controls

335 lines (231 loc) · 12.9 KB

kandji.DeviceSecretsApi

All URIs are relative to https://<sub_domain>.api.kandji.io

Method HTTP request Description
get_activation_lock_bypass_code GET /api/v1/devices/{device_id}/secrets/bypasscode Get Activation Lock Bypass Code
get_filevault_recovery_key GET /api/v1/devices/{device_id}/secrets/filevaultkey Get FileVault Recovery Key
get_recovery_lock_password GET /api/v1/devices/{device_id}/secrets/recoverypassword Get Recovery Lock Password
get_unlock_pin GET /api/v1/devices/{device_id}/secrets/unlockpin Get Unlock Pin

get_activation_lock_bypass_code

DeviceSecretsGetActivationLockBypassCode200Response get_activation_lock_bypass_code(device_id)

Get Activation Lock Bypass Code

This request allows you to retrieve the Activation Lock Bypass code for Apple devices.

user_based_albc is the user-based Activation Lock bypass code for when Activation Lock is enabled using an personal Apple ID and Find My.

device_based_albc is the device-based Activation Lock bypass code for when Activation Lock is enabled by the MDM server.

Request Parameters

device_id (path parameter): The unique identifier of the device.

Example

  • Bearer (API Token) Authentication (bearer):
import kandji
from kandji.models.device_secrets_get_activation_lock_bypass_code200_response import DeviceSecretsGetActivationLockBypassCode200Response
from kandji.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
    host = "https://<sub_domain>.api.kandji.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kandji.DeviceSecretsApi(api_client)
    device_id = 'device_id_example' # str | 

    try:
        # Get Activation Lock Bypass Code
        api_response = api_instance.get_activation_lock_bypass_code(device_id)
        print("The response of DeviceSecretsApi->get_activation_lock_bypass_code:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DeviceSecretsApi->get_activation_lock_bypass_code: %s\n" % e)

Parameters

Name Type Description Notes
device_id str

Return type

DeviceSecretsGetActivationLockBypassCode200Response

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK * Allow -
* Connection -
* Content-Length -
* Content-Security-Policy -
* Content-Type -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Strict-Transport-Security -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
* X-XSS-Protection -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_filevault_recovery_key

DeviceSecretsGetFilevaultRecoveryKey200Response get_filevault_recovery_key(device_id)

Get FileVault Recovery Key

This request allows you to retrieve the FileVault Recovery key for a Mac.

Request Parameters

device_id (path parameter): The unique identifier of the device.

Example

  • Bearer (API Token) Authentication (bearer):
import kandji
from kandji.models.device_secrets_get_filevault_recovery_key200_response import DeviceSecretsGetFilevaultRecoveryKey200Response
from kandji.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
    host = "https://<sub_domain>.api.kandji.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kandji.DeviceSecretsApi(api_client)
    device_id = 'device_id_example' # str | 

    try:
        # Get FileVault Recovery Key
        api_response = api_instance.get_filevault_recovery_key(device_id)
        print("The response of DeviceSecretsApi->get_filevault_recovery_key:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DeviceSecretsApi->get_filevault_recovery_key: %s\n" % e)

Parameters

Name Type Description Notes
device_id str

Return type

DeviceSecretsGetFilevaultRecoveryKey200Response

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK * Allow -
* Connection -
* Content-Length -
* Content-Security-Policy -
* Content-Type -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Strict-Transport-Security -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
* X-XSS-Protection -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_recovery_lock_password

DeviceSecretsGetRecoveryLockPassword200Response get_recovery_lock_password(device_id)

Get Recovery Lock Password

This request returns the Recovery Lock password for a Mac with an Apple Silicon processor and the legacy EFI firmware password for a Mac with an Intel processor.

For more details on setting and managing Recovery passwords, see this Kandji support article.

Request Parameters

device_id (path parameter): The unique identifier of the device.

Example

  • Bearer (API Token) Authentication (bearer):
import kandji
from kandji.models.device_secrets_get_recovery_lock_password200_response import DeviceSecretsGetRecoveryLockPassword200Response
from kandji.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
    host = "https://<sub_domain>.api.kandji.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kandji.DeviceSecretsApi(api_client)
    device_id = 'device_id_example' # str | 

    try:
        # Get Recovery Lock Password
        api_response = api_instance.get_recovery_lock_password(device_id)
        print("The response of DeviceSecretsApi->get_recovery_lock_password:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DeviceSecretsApi->get_recovery_lock_password: %s\n" % e)

Parameters

Name Type Description Notes
device_id str

Return type

DeviceSecretsGetRecoveryLockPassword200Response

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK * Allow -
* Connection -
* Content-Length -
* Content-Security-Policy -
* Content-Type -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Strict-Transport-Security -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
* X-XSS-Protection -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_unlock_pin

DeviceSecretsGetUnlockPin200Response get_unlock_pin(device_id)

Get Unlock Pin

This request allows you to retrieve the device unlock pin for a Mac.

Request Parameters

device_id (path parameter): The unique identifier of the device.

Example

  • Bearer (API Token) Authentication (bearer):
import kandji
from kandji.models.device_secrets_get_unlock_pin200_response import DeviceSecretsGetUnlockPin200Response
from kandji.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
    host = "https://<sub_domain>.api.kandji.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kandji.DeviceSecretsApi(api_client)
    device_id = 'device_id_example' # str | 

    try:
        # Get Unlock Pin
        api_response = api_instance.get_unlock_pin(device_id)
        print("The response of DeviceSecretsApi->get_unlock_pin:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DeviceSecretsApi->get_unlock_pin: %s\n" % e)

Parameters

Name Type Description Notes
device_id str

Return type

DeviceSecretsGetUnlockPin200Response

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK * Allow -
* Connection -
* Content-Length -
* Content-Security-Policy -
* Content-Type -
* Date -
* Feature-Policy -
* Referrer-Policy -
* Server -
* Strict-Transport-Security -
* Vary -
* X-Content-Type-Options -
* X-Frame-Options -
* X-XSS-Protection -

[Back to top] [Back to API list] [Back to Model list] [Back to README]