Getting the Author name for reports through web services
Answered
I'm currently trying to get a list of favorite reports for a user using web services, but looking at the returned AdministrationReport objects from the GETFAVORITES call, I don't see anything in this object that references the author / created by name.
Ideally, I'd like to fetch this information for each report output from this web services call. Using the documentation here http://wiki.yellowfin.com.au/display/USER73/Administration+Service I see that there is information for LastModifierName and PublishDate, but nothing on the author. Is there any other way to retrieve this information using web services?
Hi Stephen,
I have looked through the code for that function and yes, I can confirm there is no information retrieved about the report author.
However, I notice in the ReportHeader table there is a column called IpCreator which has the IpId from the IpClass table so you can identify the author from that.
So, as a workaround for your current requirement I think it would work if you used a function called METADATASQLQUERY which allows you to directly query the Yellowfin configuration database.
In other words, you could firstly retrieve all favourite reports for a user using the GETFAVOURITES call, then make the METADATASQLQUERY call for each report to retrieve the authors.
I have attached an example of how to use the METADATASQLQUERY function (I've had to add a .TXT file extension to avoid the mail server filter). Please observe the commented out notes at the top of the file about how to avoid supplying the admin user/password.
If you run into any issues or have any questions please let me know.
regards,
Dave
Hi Stephen,
I have looked through the code for that function and yes, I can confirm there is no information retrieved about the report author.
However, I notice in the ReportHeader table there is a column called IpCreator which has the IpId from the IpClass table so you can identify the author from that.
So, as a workaround for your current requirement I think it would work if you used a function called METADATASQLQUERY which allows you to directly query the Yellowfin configuration database.
In other words, you could firstly retrieve all favourite reports for a user using the GETFAVOURITES call, then make the METADATASQLQUERY call for each report to retrieve the authors.
I have attached an example of how to use the METADATASQLQUERY function (I've had to add a .TXT file extension to avoid the mail server filter). Please observe the commented out notes at the top of the file about how to avoid supplying the admin user/password.
If you run into any issues or have any questions please let me know.
regards,
Dave
Hi Dave,
Cool, yeah it looks like I can use that to get the information, but for now we've decided to not enable the Query webservice just yet for the purposes of retrieving this field (we won't need to retrieve this field during this call in the longer run). But thanks for letting me know about that functionality, definitely good to know and playing around with it, it's definitely a powerful tool.
You can go ahead and close this question as answered, and thanks again for the quick and informative response!
- Stephen
Hi Dave,
Cool, yeah it looks like I can use that to get the information, but for now we've decided to not enable the Query webservice just yet for the purposes of retrieving this field (we won't need to retrieve this field during this call in the longer run). But thanks for letting me know about that functionality, definitely good to know and playing around with it, it's definitely a powerful tool.
You can go ahead and close this question as answered, and thanks again for the quick and informative response!
- Stephen
Hi Stephen,
yes it is a powerful tool indeed! OK, I'll mark this question as answered.
By the way, in the course of answering this, I realised that there are a group of new-ish web services that haven't been documented as yet, so I made a Knowledge Base article about them:
http://community.yellowfin.bi/knowledge-base/article/new-web-services-that-are-not-documented-as-of-yet
and am letting you know about them in case any of them might interest you in the future.
regards,
Dave
Hi Stephen,
yes it is a powerful tool indeed! OK, I'll mark this question as answered.
By the way, in the course of answering this, I realised that there are a group of new-ish web services that haven't been documented as yet, so I made a Knowledge Base article about them:
http://community.yellowfin.bi/knowledge-base/article/new-web-services-that-are-not-documented-as-of-yet
and am letting you know about them in case any of them might interest you in the future.
regards,
Dave
Hi Stephen,
silly me, it was set as a private article....so I've moved it now:
http://community.yellowfin.bi/agent/object/2542
Hopefully you'll be able to see it now, if not then please let me know.
regards,
Dave
Hi Stephen,
silly me, it was set as a private article....so I've moved it now:
http://community.yellowfin.bi/agent/object/2542
Hopefully you'll be able to see it now, if not then please let me know.
regards,
Dave
great, and don't forget, if you've ever got any questions about how to use those web services just ask!
great, and don't forget, if you've ever got any questions about how to use those web services just ask!
Replies have been locked on this page!