cancel
Showing results for 
Search instead for 
Did you mean: 

Afaria API for triggering Reports

Former Member
0 Kudos

Hi everyone,

We are trying to automate the reports available on Afaria console..

Currently the process is manual.

Are there any APIs specifically to trigger reports?

We had a look at the SP5_API guide, but are little confused on which one of the APIs to use for custom data reports.

Kindly help us    

Accepted Solutions (1)

Accepted Solutions (1)

jtaylor
Active Participant
0 Kudos

Hi Suraj,

In addition to what Tracy mentioned, you may find the SchemaQuery service easier to navigate and deal with. There is a guide on how to use the SchemaQuery service at the following link:

http://wiki.scn.sap.com/wiki/x/j4CuG - SAP Afaria API 401 - Using the SchemaQuery Service

General information/API guides can be found at the following link:

http://wiki.scn.sap.com/wiki/x/hwfOFw

If you wish to use the stored queries service, there is only one example available, but it is at the following location:

http://wiki.scn.sap.com/wiki/x/hwfOFw

If Tracy or I have answered your question, please mark it as answered so that others may find it more easily in the future. If you have any further questions, don't hesitate to ask.

Former Member
0 Kudos

Thanks John and Tracy.

We were able to trigger reports for devices, but we are facing a problem.

We have almost 300 tenants in our Afaria server.

If we are hard coding the tenant names(tenants which contain devices) in the code, this works flawlessly.

But if we write to check the tenants and the devices in each tenant, we have found that the Afaria server service stops.

This we feel is happening, because of the huge number of Tenants in the server causing the Afaria server service to crash.

Have you faced this kind of problem.

Regards,

Suraj Nair

jtaylor
Active Participant
0 Kudos

Hi Suraj,

That is a new one to me...I've seen the API service crash due to some faulty logic with these services, but never have seen the Afaria service crash due to API commands.

Do you see any error messages in the Afaria Admin's logs or in the Afaria Service's server's event log? Can you run a test, where you have nobody using the Admin, and preferably not the Self Service Portal, then enable the API logging and run your test program? One important option for the API log is to make sure that AS_LogContextId is set to true and the AS_LogLevel is set to max.

The instructions for enabling the API logging are available here:

http://service.sap.com/sap/support/notes/1851170

The only thing that I can think of off of the top of my head, which could potentially cause a problem like this is not re-using the context ID and generating lots of contexts, then failing to close them out. Doing that may leave a lot of open resources connecting to the Afaria Server service.

Answers (1)

Answers (1)

tracy_barkley
Employee
Employee
0 Kudos

The API I believe you want is the storedqueries.namespace and the table you will need to reference is the a_query table. This table contains all of the built in and user defined custom views.  Does this get you started on what you need? 

Tracy Barkley

Sr. TSE