Hi Team, trying to use ModifyTarget API, but it’s not working as expected. PUT responding with ANOTHER changed target object (200 OK)
@APIKey = <APIKey>
@AccountID = <AccountID>
###
PUT https://app.harness.io/gateway/cf/admin/targets/TargetA?orgIdentifier=default&projectIdentifier=default_project&environmentIdentifier=Production
x-api-key: {{APIKey}}
Content-Type: application/json
{
"account": "{{AccountID}}",
"anonymous": true,
"environment": "Sandbox",
"identifier": "TargetA",
"attributes": {
"licenseType": "Full User",
"emailDomain": "",
"isApp": false,
"isSuper": true,
"profileID": "SHIPPING AND RECEIVING"
},
"name": "Anonymous User",
"org": "default",
"project": "default_project"
}
Response:
{
"account": "",
"anonymous": true,
"attributes": {
"emailDomain": "",
"isApp": false,
"isSuper": true,
"licenseType": "Full User",
"profileID": "SHIPPING AND RECEIVING"
},
"createdAt": 1683587726877,
"environment": "",
"identifier": "TargetB",
"name": "Anonymous User",
"org": "",
"project": "",
"segments": []
}
Please help.