cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic deletion of outdated Afaria devices

Former Member
0 Kudos

Hello

Does anybody know a way to automatically and periodically delete outdated devices from Afaria? With outdated I mean devices which haven't connected back to Afaria for say 90 days.

Regards

Ralph

Accepted Solutions (1)

Accepted Solutions (1)

jtaylor
Active Participant
0 Kudos

Hi Ralph,

The easiest way that I can think of, of doing this would be to use the custom view like mentioned, and a group based off of it... then you could write a program that consumes the Afaria APIs to check the members of the group and delete the devices. There are API guides which can help you if you choose this path, and we're always here to help. It's simpler to use a .NET language to consume the APIs, but it is possible to use non .NET languages as well.

How to delete devices using the API:

https://wiki.scn.sap.com/wiki/display/SAPMOB/DeleteDevice+-+Example+C%23+program+to+delete+all+data+...

How to get a list of devices that are in a group:

https://wiki.scn.sap.com/wiki/display/SAPMOB/Example+C%23+Afaria+API+program+to+list+all+members+of+...

Afaria APIs getting started guide (there are several in the series):

https://wiki.scn.sap.com/wiki/display/SAPMOB/Server+API+Training+and+How-To+Guides

How to use non .NET languages (primary barrier is the authentication type) is also at the above link in an article titled "SAP Afaria API 301 - Session-less Binding, Basic Authentication and Consuming the Afaria API through SOAP".

Thanks,

John

note: You could technically do this without creating a group, but it is simpler to consume the data returned by the API when getting group members than when running a view.

Former Member
0 Kudos

Hello John

Thanks for the API examples. I wish  I had them back in 2010 when I implemented my self service portal based on Afaria API...

The message is clear to me: there is no out of the box automation for such tasks. The tool of choice is the Afaria API.

Regards

Ralph

Answers (1)

Answers (1)

tracy_barkley
Employee
Employee
0 Kudos

Ralph,

It would be easy enough to make a custom dynamic view of anything older than 90 days and once populated you could select all and delete from the view.  Is that easy enough or are you looking for something more automated?

Tracy Barkley

Senior Technical Support Engineer

Former Member
0 Kudos

Hello Tracy

Actually we are looking for something more automatically. Reason: this is an environment with about 20 tenants. It would be a bit teadious to run through 20 tenants every month to remove the outdated clients.

When you ask "Is that easy enough or are you looking for something more automated" I'm sure you have another solution in mind?

Regards

Ralph

tracy_barkley
Employee
Employee
0 Kudos

Ralph,

That is a bit beyond what we generally do here in support, but let me check with one of my colleagues.  He is a bit more familiar with the APIs than I and may have some insight.

Tracy