# Attach one or more deployment targets to a deployment task. Adds machines (by serial number, MAC address, IP, and subnet) as targets of the deployment task. ## Endpoints PUT `/emsapi/osdeployer/tasks/{taskId}/targets` ## Request ### Request URL `https://{server-hostname}:8383/emsapi/osdeployer/tasks/{taskId}/targets` ### Scope `OSDTask.UPDATE` ### Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** `string` **Mandatory**: `application/deploymentTaskTargetDetails.v1+json` - **Accept** `string` **Mandatory**: `application/deploymentTaskTargetAddedStatus.v1+json` #### Path Parameters - **taskId** `string` **Mandatory**: ID of the OS Deployment task #### Request Body `application/deploymentTaskTargetDetails.v1+json` `JSON Array` A single deployment target. `JSON Object` ### Sample Request ```curl 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 ```json [ { "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" } ] ``` ## Response ### Response Parameters #### HTTP Code 200 Response Body: `application/deploymentTaskTargetAddedStatus.v1+json` `JSON Object` - **isTargetAdded** `boolean`: True if targets were successfully added. - **addedTargetsCount** `integer`: Number of targets successfully added. - **failedTargetsCount** `integer`: Number of targets that could not be added. ### Possible Response Codes - **200** HTTP code ### Sample Response: HTTP 200 Three targets added successfully ```json { "failedTargetsCount": 0, "isTargetAdded": true, "addedTargetsCount": 3 } ``` ## Rate Limits ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **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.