Skip to main content
Cadet | Tier 2
December 12, 2022
Solved

Cannot delete device, as it is part of an active bot deployment, how reset Device via API

  • December 12, 2022
  • 20 replies
  • 3984 views

Hello everyone,

I'm getting the error "Cannot delete device, as it is part of an active bot deployment" in Automation 360 Community Edition.

Activity Tab >  In Progress: is empty

 

I've already done the following steps and it doesn't allow device removal.

  1. Restart the Bot Agent Service. (The error persists)
  2. Uninstall the Bot Agent
  3. Remove file "C:\Windows\System32\config\systemprofile\AppData\Local\AutomationAnywhere\registration.properties"
  4. Restart the machine.
  5. Reinstall as Administrator Bot Agent  lastest version. (The error persists)
  6. Restart the machine. (The error persists)
  7. Uninstall the Bot Agent
  8. Remove residual files and folders
    • "C:\Windows\System32\config\systemprofile\AppData\Local\AutomationAnywhere"
    • C:\ProgramData\AutomationAnywhere
    • C:\Program Files\Automation Anywhere
    • %USERPROFILE%\AppData\Local\Temp
  9. Restart the machine.
  10. Reinstall as Administrator Bot Agent lastest version. (The error persists)

 

When I try to run a bot the error is "System allows only a single device to be registered. If you need to replace your existing device you should delete it first."

 

When trying to reset the device through API does not work. Please help what is the correct use of the API v2/devices/reset endpoint found in the following article: https://apeople.automationanywhere.com/s/article/BOT-struck-in-In-Progress -Stage-and-not-able-to-move-it-to-history-or-BOT-struck-in-Pending-execution-Stage-and-not-able-to-move-it-to-history-on -A2019-CLOUD-environments

 

After successfully authenticating through the API Auth endpoint v1/authentication , I went through the procedure to reset a device based on its ID, but I get error 400 Bad Request "Reset type not set."

v2/devices/list

v2/devices/reset

 

I have tried if it is due to syntax or data type in the following ways but it does not work

Is there a parameter missing from the POST request?

Option 1: With brackets and quotes

{ "deviceIds": { "ids": ["406"] }}

Option 2: With brackets and without quotes

{ "deviceIds": { "ids": [406] }}

Option 3: Without brackets and without quotes

{ "deviceIds": { "ids": 406 }}

 

Note: I have carried out the process in Automation 360 Community Edition, which is where it does not allow deleting the device due to the error "Cannot delete device, as it is part of an active bot deployment", but the progress table is empty, I also ran the procedure in Automation 360 On-Premise getting the same result: "Reset type not set." Thanks for the help, I was looking in the documentation, but I can't find anything else related to the use of v2/devices/reset

 

Thank you very much for the help, I stay tuned

Best answer by Aaron.Gleason

Use this page that I created:

https://rpademo.automationanywhere.com/deletedevice.php

20 replies

Navigator | Tier 3
July 26, 2024

We are not getting the token number when the below request is posted in postman for community edition.

 

https://community.cloud.automationanywhere.digital/v1/authentication 


“username”: “xxx@gmail.com”, 
“password”: “xxxx” 
}

 



Did you figure this out?

Cadet | Tier 2
August 2, 2024

I am getting not found response, someone please help me.

 

BOT.DEVAuthor
Cadet | Tier 2
August 2, 2024

We are not getting the token number when the below request is posted in postman for community edition.

 

https://community.cloud.automationanywhere.digital/v1/authentication 


“username”: “xxx@gmail.com”, 
“password”: “xxxx” 
}

 



Did you figure this out?


Hi @Chris 621,
 

To authenticate to the Control Room Automation 360 v.33 through the API, you must use the new version. v2/authentication

 

Depending on your Control Room, use one of the following:

https://community.cloud.automationanywhere.digital/v2/authentication
https://community2.cloud-2.automationanywhere.digital/v2/authentication

 

 

More information here: Control Room APIs (automationanywhere.com)

 

Best regards,

Antony Castelblanco
BOT.DEVAuthor
Cadet | Tier 2
August 2, 2024

Hi @rajeev_kilari_9,

Make sure you are authenticating correctly in the Control Room Automation 360 v.33 through the API, you must use the new v2/authentication version.

In your case: https://community.cloud.automationanywhere.digital/v2/authentication

I just tested and it works correctly in community2.

 

 

Please try to add the following JSON in the body of the request replacing your device ID.

{
"deviceIds": {
"ids": [12345]
}
}


Best regards,

Antony Castelblanco
Cadet | Tier 2
August 2, 2024

Hi @rajeev_kilari_9,

Make sure you are authenticating correctly in the Control Room Automation 360 v.33 through the API, you must use the new v2/authentication version.

In your case: https://community.cloud.automationanywhere.digital/v2/authentication

I just tested and it works correctly in community2.

 

 

Please try to add the following JSON in the body of the request replacing your device ID.

{
"deviceIds": {
"ids": [12345]
}
}


Best regards,

Sure, I have changed the version to V2 and it is working now. Thankyou so much.

October 9, 2024

 

Even after resetting the device, restarting bot services, reinstalling bot agent 
getting same error

Dipti Ranjan
Cadet | Tier 2
October 15, 2024

When I am trying to Authenticate I am getting following :-

{
    "code": "access.is.denied",
    "details": null,
    "message": "Access is denied"
}

 

Cadet | Tier 2
October 15, 2024

When I am trying to Authenticate I am getting following :-

{
    "code": "access.is.denied",
    "details": null,
    "message": "Access is denied"
}

 

Use v2 instead of v1

Cadet | Tier 2
October 15, 2024

Thank you @raymart1024 ,

It works after changing v1 to v2.

Aaron.Gleason
Automation Anywhere Team
Automation Anywhere Team
October 18, 2024