Attach one or more deployment targets to a deployment task.

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

Adds machines (by serial number, MAC address, IP, and subnet) as targets of the deployment task.

Request URL

https://{server-hostname}:8383/emsapi/osdeployer/tasks/{taskId}/targets

Scope

OSDTask.UPDATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/deploymentTaskTargetDetails.v1+jsonapplication/deploymentTaskTargetDetails.v1+jsonCopied!
AcceptstringMandatory
application/deploymentTaskTargetAddedStatus.v1+jsonapplication/deploymentTaskTargetAddedStatus.v1+jsonCopied!

- Path Parameters

taskIdstringMandatory

ID of the OS Deployment task

- Request Body

application/deploymentTaskTargetDetails.v1+json
JSON Array

A single deployment target.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
serialOrMACstringMandatory

Machine identifier — serial number or MAC address. Required; omitting returns SERIAL_OR_MAC_INVALID.

ipAddressstringOptional

IPv4 address of the target machine, dotted-quad format. If provided, subnetMask is also required.

subnetMaskstringOptional

IPv4 subnet mask, dotted-quad format. Required when ipAddress is provided.

targetDescriptionstringOptional

Free-form description of the target (e.g., physical location).

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request PUT \
  --url https://appdomain/emsapi/osdeployer/tasks/{taskId}/targets \
  --header 'Accept: application/deploymentTaskTargetAddedStatus.v1+json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/deploymentTaskTargetDetails.v1+json' \
  --data '[{"targetDescription":"Sales floor row 1","serialOrMAC":"AA:BB:CC:11:22:33","ipAddress":"10.0.10.21","subnetMask":"255.255.255.0"},{"targetDescription":"Sales floor row 2","serialOrMAC":"AA:BB:CC:11:22:34","ipAddress":"10.0.10.22","subnetMask":"255.255.255.0"}]'

Sample Request Body

Attach two targets to a task

Copied!
  [
    {
      "targetDescription": "Sales floor row 1",
      "serialOrMAC": "AA:BB:CC:11:22:33",
      "ipAddress": "10.0.10.21",
      "subnetMask": "255.255.255.0"
    },
    {
      "targetDescription": "Sales floor row 2",
      "serialOrMAC": "AA:BB:CC:11:22:34",
      "ipAddress": "10.0.10.22",
      "subnetMask": "255.255.255.0"
    }
  ]
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/deploymentTaskTargetAddedStatus.v1+json
JSON Object
Hide Sub-Attributes
isTargetAddedboolean

True if targets were successfully added.

addedTargetsCountinteger

Number of targets successfully added.

failedTargetsCountinteger

Number of targets that could not be added.

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

Three targets added successfully

Copied!
  {
    "failedTargetsCount": 0,
    "isTargetAdded": true,
    "addedTargetsCount": 3
  }
                
Show full

Duration: 1 minute | Threshold: 50 | 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.