post
https://{host}/v3/targetGroups/isValidName
Check the uniqueness of a milestone target name.
This API checks if the name provided for a target group, target, streak, streak level, and period is unique within an organisation.
Example request
curl --location 'https://eu.api.capillarytech.com/v3/targetGroups/isValidName' \
--header 'Authorization: Basic bWFka2YQ==' \
--header 'Content-Type: application/json' \
--header 'Cookie: _cfuvid=kYnuHywd2SuhkmuOi2_c7.Ie8_QvI8s1bFiaSPpP.8M-1759827226073-0.0.1.1-604800000' \
--data '{
"type": "targetGroupName",
"value": "uatTargetGroup62"
}'Prerequisites
- Authentication: Basic/OAuth authentication
- Access group: Default access group
Resource Information
| URI | v3/targetGroups/isValidName |
| HTTP Method | POST |
| Pagination | No |
| Batch support | NA |
| Rate limit information | NA |
Request body parameters
| Parameter (Parameters marked as * are required) | Data Type | Description |
|---|---|---|
| type* | String | Milestone / target to check the validity for. You can check for active, inactive and user-created challenge related milestones. \n \nSupported values are: targetGroupName, streakName, targetName, streakLevelName, periodName |
| value* | String | Name to be checked for uniqueness. The name is case-insensitive, meaning "Target" and "target" are considered the same. |
Example response
{
"data": true,
"errors": null,
"warnings": null
}{
"data": false,
"errors": null,
"warnings": null
}{
"data": null,
"errors": [
{
"code": 310145,
"message": "Invalid key is passed"
}
],
"warnings": null
}Response body parameters
| Parameter | Type | Description |
|---|---|---|
| data | Boolean | The value is true if the name is unique, else it is false. |
| errors | Object | Errors, if any. |
| warnings | Object | Warnings, if any. |
API specific errors
| Error Code | Description | Reason |
|---|---|---|
| 310145 | Invalid key is passed | The milestone / target type is invalid. |
