# Get current targets as domain and value pairs Returns the current targets of a collection, configuration as an array of domain and value pairs. The response format matches the input expected by the [modifyTargets](https://www.manageengine.com/products/desktop-central/help/api/cloud/deployment-fw-modify-targets-legacy.html) endpoint — making it easy to fetch, modify, and resubmit targets without format conversion. This is the default format. No additional query parameters are needed. Omit `useResourceIdFormat` or set it to `false`. ## Endpoints `GET /dcapi/target/{collectionId}/getTargets` ## Request URL https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/target/{collectionId}/getTargets ## Scope `DesktopCentralCloud.Configurations.READ`, `DesktopCentralCloud.SWDeployment.READ`, `DesktopCentralCloud.PatchMgmt.READ`, `DesktopCentralCloud.VulnerabilityMgmt.READ` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Accept** `string` — Mandatory - `application/getTargets.v1+json` ### Path Parameters - **collectionId** `string` — Mandatory The unique numeric identifier of the collection whose targets are to be retrieved. Fetch from [Get Configurations View](https://www.manageengine.com/products/desktop-central/help/api/cloud/deployment-fw-get-configurations-view.html). ### Query Parameters - **useResourceIdFormat** `boolean` — Optional Omit or set to `false` to receive the domain/value pairs response format. ## Sample Request ```curl curl --request GET \ --url https://appdomains/dcapi/target/{collectionId}/getTargets \ --header 'Accept: application/getTargets.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' ``` ## Response Parameters ### HTTP Code 200 Response body: `application/json` `JSON Object` - **collectionId** `long` Unique collection ID whose targets are returned. - **targets** `JSON Array` Array containing a single filter entry. Each entry holds a filter object with the target type and an array of name/domain pairs identifying targeted resources. ### HTTP Code 400 Response body: `application/json` `JSON Object` - **error_code** `string` `CONFIG_INVALID_INPUT_DATA`: the specified collection is expired or no longer alive. - **error_description** `string` Message indicating the collection is not active or has expired. ### HTTP Code 401 Response body: `application/json` `JSON Object` - **errorCode** `long` Unauthorized error code: credentials missing, expired, or invalid. - **errorMsg** `string` Authentication failure reason. ## Possible Response Codes - **200** — HTTP code - **400** — HTTP code - **401** — HTTP code ## Sample Response: HTTP 200 ### Computer-type collection with two targeted computers (domain and value format) ```json { "collectionId": 12345, "targets": [ { "filter": { "values": [ { "domain": "CORP", "value": "PC-001" }, { "domain": "CORP", "value": "LAPTOP-DEF" } ], "type": "Computer" } } ] } ``` ### User-type collection with one targeted user (domain and value format) ```json { "collectionId": 67890, "targets": [ { "filter": { "values": [ { "domain": "CORP", "value": "jdoe" } ], "type": "User" } } ] } ``` ## Sample Response: HTTP 400 ### Collection is expired or no longer active ```json { "error_description": "Collection is not active or expired", "error_code": "CONFIG_INVALID_INPUT_DATA" } ``` ## Sample Response: HTTP 401 ### User lacks read role for this configuration type ```json { "error_description": "Access denied - You are not allowed to access the requested resource.", "error_code": "UAC_UNAUTHORIZED" } ``` ## Rate Limit ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **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.