Add a new Custom Policy 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

Create Windows Custom Policy payload

Request URL

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

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
syncml_commandsJSON ArrayOptional

Syncml Commands

Show Sub-Attributes
JSON Object
Show Sub-Attributes
loc_uristringOptional

Loc URI for the Custom Configuration

action_typeintegerOptional

Action type 0 - Add, 1 - Replace, 2 - Delete

data_typeintegerOptional

Data type of the Loc URI 0 - INT, 1 - FLOAT, 2 - BOOLEAN, 3 - STRING, 4 - XML, 5 - Base64

datastringOptional

Base64 Encoded Data String

positionintegerOptional

Position of the Payload Item

namestringOptional

Name of the Custom Configuration Item

data_file_idlongOptional

File Id of the Custom Config Data from the API

custom_profile_data_idlongOptional

Unique identifier of the custom profile data record to associate with the payload

is_modifiedbooleanOptional

Read only Field, To indicate whether Item is modified

is_blobbooleanOptional

Indicates whether the custom profile data is stored as a binary blob. true if blob, false if plain text/XML

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/windowscustompolicy \
  --header 'Accept: application/json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{"syncml_commands":[{"data":"MA==","action_type":"1","loc_uri":"./Device/Vendor/MSFT/Policy/Config/Camera/AllowCamera","data_type":"0","name":"Configuration 1","position":1}]}'

Sample Request Body

Add Custom Policy payload to the profile

Copied!
  {
    "syncml_commands": [
      {
        "data": "MA==",
        "action_type": "1",
        "loc_uri": "./Device/Vendor/MSFT/Policy/Config/Camera/AllowCamera",
        "data_type": "0",
        "name": "Configuration 1",
        "position": 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

syncml_commandsJSON Array

Syncml Commands

Show Sub-Attributes
JSON Object
Show Sub-Attributes
loc_uristring

Loc URI for the Custom Configuration

action_typeinteger

Action type 0 - Add, 1 - Replace, 2 - Delete

data_typeinteger

Data type of the Loc URI 0 - INT, 1 - FLOAT, 2 - BOOLEAN, 3 - STRING, 4 - XML, 5 - Base64

datastring

Base64 Decoded Data String

positioninteger

Position of the Payload Item

namestring

Name of the Custom Configuration Item

data_file_idlong

File Id of the Custom Config Data from the API

custom_profile_data_idlong

Unique identifier of the custom profile data record to associate with the payload

is_modifiedboolean

Read only Field, To indicate whether Item is modified

is_blobboolean

Indicates whether the custom profile data is stored as a binary blob. true if blob, false if plain text/XML

custom_profile_idlong

Custom Profile Id

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

Custom Policy payload successfully added

Copied!
  {
    "payload_id": "9007199254741295",
    "syncml_commands": [
      {
        "data": "0",
        "action_type": "1",
        "loc_uri": "./Device/Vendor/MSFT/Policy/Config/Camera/AllowCamera",
        "custom_profile_data_id": "9007199254741070",
        "data_type": "0",
        "name": "Configuration 1",
        "position": "1"
      }
    ],
    "custom_profile_id": "9007199254741071"
  }
                
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.