Question

API FRESHSERVICE - DELETE AN ASSET

  • 13 January 2023
  • 10 replies
  • 72 views

Badge +1

Hello

I try to delete an asset

But I have this message :

{
    "description""Validation failed",
    "errors": [
        {
            "field""deleted",
            "message""awrns_service_delete_not_allowed",
            "code""invalid_value"
        }
    ]
}

 

An idea ?

 


10 replies

Userlevel 5
Badge +8

How was you trying to delete it, via an API?

 

Badge +1

I try by CURL, by POSTMAN, by ASP, by VB.net

same error !!

Badge +1

curl -v -u my_address_mail:password -X DELETE "https://parthena.freshservice.com/api/v2/assets/5268"

Badge +1

yes via an API
I tried in CURL, with POSTMAN, in VB.Net or in ASP Classic, I have the same error

Userlevel 5
Badge +8

Have you checked your permissions on the account you are using? 

Also have you tried to delete this asset manually just to confirm that you can delete it? 

Badge +1

from the Freshservice web interface and with the same account used in the APIs, I can delete an asset

Userlevel 5
Badge +8

have you tried via the workflow Automator? Get web request? 

To me, that message is saying it cannot validate it due to the code having an invalid value so the code could be wrong, 

I use the workflow Automator for most of my work not using Curl/postman, maybe if you can get is to work from the web request then it will confirm the code you are using needs tweaking. if you cannot get to work with workflow Automator then it indicates that the asset itself needs amending?

Badge +1

I can't use WORKFLOW AUTOMATOR because I have set up an EDI (computer data exchange) between our CRM and Freshservice. Deleting a contact or a company works perfectly

another point, restoring an asset works very well

Userlevel 5
Badge +8

I would say contact FreshService direct then? sorry...

Badge +1

I’m in contact with Freshservice but it has been over a week and I still have no solution. So I try other channels

Reply