Add a new Passcode payload configuration to an existing profile

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

To create Mac Passcode policy

Request URL

https://{server-hostname}:8383/api/v1/mdm/profiles/{profile_id}/payloads/macpasscodepolicy

Scope

MDMDeviceMgmt.CREATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Path Parameters

profile_idstringMandatory

Unique identifier of the profile. Obtain from the Create Profile or Get Profiles response

- Request Body

application/json
JSON Object
Hide Sub-Attributes
allow_simple_valuebooleanOptional

Allow Simple Value. Default: true

require_alphanumericbooleanOptional

Require Alphanumeric. Default: false

min_passcode_lengthintegerOptional

Minimum passcode length. Allowed values: 0-16. Default: 0

min_complex_charsintegerOptional

Minimum number of complex (non-alphanumeric) characters. Allowed values: 0-4. Default: 0

max_passcode_ageintegerOptional

Maximum number of days a passcode can remain unchanged. Allowed values: 0-730. Default: 0

auto_lock_idle_forintegerOptional

Auto-lock idle time in minutes. Allowed values: 0-15. Default: 0

no_of_passcode_maintainedintegerOptional

Number of unique passcodes before reuse is allowed. Allowed values: 0-50. Default: 0

max_grace_periodintegerOptional

Maximum grace period in minutes before passcode is required.

max_failed_attemptsintegerOptional

Maximum number of failed passcode attempts before device wipe. Allowed values: 2-11. Default: 11

restrict_passcodebooleanOptional

Restrict Passcode. Default: false

force_passcodebooleanOptional

Force Passcode. Default: true

change_at_next_authbooleanOptional

Change At Next Auth. Default: false

mins_failed_login_resetintegerOptional

Minutes after which failed login count resets. 0 means no reset. Default: 0

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/macpasscodepolicy \
  --header 'Accept: application/json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{"min_passcode_length":-1,"max_passcode_age":0,"require_alphanumeric":false,"min_complex_chars":-1,"restrict_passcode":false,"no_of_passcode_maintained":0,"allow_simple_value":true,"auto_lock_idle_for":-1,"max_grace_period":-1,"max_failed_attempts":-1}'

Sample Request Body

Add Passcode payload to the profile

Copied!
  {
    "min_passcode_length": -1,
    "max_passcode_age": 0,
    "require_alphanumeric": false,
    "min_complex_chars": -1,
    "restrict_passcode": false,
    "no_of_passcode_maintained": 0,
    "allow_simple_value": true,
    "auto_lock_idle_for": -1,
    "max_grace_period": -1,
    "max_failed_attempts": -1
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
payload_idlong

Unique identifier for the created payload item

allow_simple_valueboolean

Allow Simple Value. Default: true

require_alphanumericboolean

Require Alphanumeric. Default: false

min_passcode_lengthstring

Minimum passcode length. Allowed values: 0-16. Default: 0

min_complex_charsstring

Minimum number of complex (non-alphanumeric) characters. Allowed values: 0-4. Default: 0

max_passcode_agestring

Maximum number of days a passcode can remain unchanged. Allowed values: 0-730. Default: 0

auto_lock_idle_forstring

Auto-lock idle time in minutes. Allowed values: 0-15. Default: 0

no_of_passcode_maintainedstring

Number of unique passcodes before reuse is allowed. Allowed values: 0-50. Default: 0

max_grace_periodstring

Maximum grace period in minutes before passcode is required.

max_failed_attemptsstring

Maximum number of failed passcode attempts before device wipe. Allowed values: 2-11. Default: 11

restrict_passcodeboolean

Restrict Passcode. Default: false

force_passcodeboolean

Force Passcode. Default: true

change_at_next_authboolean

Change At Next Auth. Default: false

mins_failed_login_resetstring

Minutes after which failed login count resets. 0 means no reset. Default: 0

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

Passcode payload successfully added

Copied!
  {
    "min_passcode_length": -1,
    "max_passcode_age": 0,
    "payload_id": 9007199254741000,
    "require_alphanumeric": false,
    "min_complex_chars": -1,
    "restrict_passcode": false,
    "no_of_passcode_maintained": 0,
    "allow_simple_value": true,
    "auto_lock_idle_for": -1,
    "max_grace_period": -1,
    "max_failed_attempts": -1
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.