The only "outside of the GUI" methods to alter the Device Lifecycle State is REST but the REST endpoint is a one-shot call. There are no in product methods to do any form of bulk within this REST call. To change 1000 devices you would essentially have to run 1000 REST calls. As for the call itself, you would use the below settings.
Note: There are multiple variables that you need to find and have, the idValue if you use the idName of deviceItemId would be the CAPC Item ID of the device in question.
URL: http://capcHostname:8181/pc/center/webservice/devices/{idName}/{idValue}/lifeCycleState/{newState}
where:
- {idName} is one of the property name values returned by the get id names method of this web service.
- {idValue} is a value for the property denoted by idName.
- {newState} is the new state.
HTTP method = PUT
An example is:
http://capcHostname:8181/pc/center/webservice/devices/deviceItemId/1234/lifeCycleState/RETIRED
Using Curl you could do:
curl -u admin:admin -X PUT http://capcHostname:8181/pc/center/webservice/devices/deviceItemId/1234/lifeCycleState/RETIRED