I can’t seem to figure this out. Admittedly I am doing this via powershell and the Invoke-RestMethod but I’ve managed to successfully change the Asset Name with no issues the same way. This is the PowerShell script I’m using:
If I set the contents of my Json File as the below, it successfulyl changes the name:
{
"name": "MKC-02926"
}
If however I set the contents of the file as the below, it doesn’t change the asset_state.
{
"type_fields": {
"asset_state": "Retired"
}
}
I tried both asset_state and asset_state_25 since I noticed the documentations seems to switch between both. However, both return a “The remote server returned an error: (400) Bad Request” message.
Anyone able to point me in the direction of what exactly I’m doing wrong?
I don’t think it is possible to update asset_state using the Update Asset endpoint in the Freshservice REST API. From the API docs, it looks like only read operations are possible on the fields of an asset type.