Google API to track document view and edits - google sheets - api

I maintain ~450 unique Google Sheets for all of the teachers in our school district (updated nightly using a python script). For auditing and reporting purposes I would like to track opens and edits of these Sheets.
I've found the Changes resource that should be able to help me identify edits, but that's only getting me halfway there. Is there any Drive API Resource out there that will identify page views (count, most recent) by user?

Track Google Drive document changes using the Reports API from the Admin SDK.
What you are trying to do can be achieved using the Reports API.You can have a list of all the file IDs and use the activities.list method and set the userKey parameter to "all" so that you get the activities from any user, or set a specific email address or user ID to get the information from a specific user only.
The applicationName parameter needs to be set to "drive" so that it recognizes that it is the Google Drives report the one you are accessing, and then for the filters parameter you can use for example "doc_id==12345" (replace 12345 with the file ID) to get the activity report from a specific document.
An example:
Note: Be aware that this can only pull information from the last 6 months.

Related

How do I extract user details for Bloomberg Desktop API connection?

If you type IAM <GO> in the terminal you'll be shown the UserID, UUID, CLID etc.
Is it possible to extract this information through blpapi when using the Desktop API to connect via BBComm? I've seen references to Identity and populating that by sending an AuthorizationRequest but it appears that's only relevant for SAPI/B-PIPE.
To the best of my knowledge and after asking a couple of Bloomberg reps - this isn't possible. The best work around which I've found is: each user creates an EQS screen called their UUID. Add some filtering which causes this screening to return nothing. Then the application, upon start up, requests all possible UUIDs as EQS screens and stops when it doesn't get back an error - that's the UUID.
This is a dirty, dirty hack and, granted, this only works if you have few distinct users using your system. You don't want to ask may users to create such a screen and probably don't want to iterate over thousands of EQS screen names.
There is a "SID report" which is provide together with monthly invoices from Bloomberg which contains the UUIDs for users - this can be used to look up existing users but when setting up a brand new account you have to manually copy this information out of the terminal.

How to get public data from Google plus

I have a project that involves having public data downloaded from Google plus, can you give me a reference on how I can download like 1 GB of any type of public data from Google plus?
The data can be posts or circles information. I've tried to work with developer tools but the far I got is downloading my own profile information but what I need is public data.
Thanks !
There is no truly "public" data on Google+.
Every stream is unique to a user.
Try viewing the site without logging in, and you'll see what I mean.
Since users have the ability to block other users from viewing even their "public" posts, before Google shows you a post they check to see if you're on the blocked list. For them to be able to do that, you have to be logged in.
Your best bet would be to create a dummy account and only look at your nearby stream or What's Hot.
Otherwise you'd need to circle users, and that would create the stream. G+ is not like twitter. There's no firehose to speak of.
To programmatically cull data, you would have to use their API, but even then their HTTP API limits you to 20 results per search and you have to provide a query.
You could get up to 100 results per user if you picked individuals and got their userids, but again there's not a programmatic way to get a bulk dump.
You could randomly select users by using an activity search for a dictionary entry, and then seed that into the activity listing api... something like (in pure pseudocode)
for Random word in dictionary
group = userids from GET https://www.googleapis.com/plus/v1/activities?query=[word]
for userid in group
GET https://www.googleapis.com/plus/v1/people/[userid]/activities/collection/public
Actual code would of course depend on the language.

Can google analytics gave me stats for different url's on same domain

Scenario
I am working on a web application assume it www.abc.com which having a profile for all users
www.abc.com/username
and all users have a dashboard for controlling their profiles
Requirement
i have one analytics profile for www.abc.com but my requirement is
a to show stats to all users on their dashboard
can i get this by google analytics API
Visits
demographics
all traffic source
and keywords
i have integrated reporting by API on one of my project but that is for the domain . i am not sure for my requirement.
Resource-guru.com, what you can do is to pull all the data with page path dimension included, and then simply filter the results if the username string is found in the page path.
As for the second part of your question - you can get:
visits (metric)
traffic sources as well as keywords (dimensions, but remember (not provided) might make this useless report)
you can NOT get demographics data via API.
Hope this helps.
You can use the API to do this but remember your going to have an issue with the fact that you can only make 10k requests per day per view (profile).
The Demographics report displays age and gender. Those dimensions can be found under the Audience - Dimensions & Metrics Reference
ga:visitorAgeBracket
ga:visitorGender
ga:interestOtherCategory
ga:interestAffinityCategory
Traffic Source is just really just a mix up of ga:sourceMedium , ga:campaign maybe a few others depending on what information you want to display.
You may have issues with Keywords because due to ssl and trying to keep user info private Google has stopped recording this sometimes you get (not provided). But you can get that information from webmaster tools. Its just hard to merge it with your GA data then.
Keyword: The keywords that visitors searched are usually captured in
the case of search engine referrals. This is true for both organic and
paid search. Note, however, that when SSL search is employed, Keyword
will have the value (not provided).

Sharepoint site for external customers

I have an SP site where employees submit their reports. A report is submitted with Company information attached as metadata in a sharepoint library.
For a company there is a customer attached with a separate login in our AD and the customers all belongs to a separate user group.
I want to create a separate site where their customers can login and read their reports
My first problem is to share a library between sites so that the customers can access the reports submitted in our internal site.
Second problem is to create a connection between the company and the customer login so i can filter the reports so that the customer only sees their report.
How would you go about doing this?
From what I understand of this scenario, I would handle report sharing with customers as a content deployment exercise. Not sure whether you want one site for all customers from all companies to log in or if you'd want to create a site for each company. Custom development of either event receivers or workflow on the internal list would handle 'publication' (i.e. copying the document to the client-accessible list) of a report once uploaded (and potentially - approved).
If there is one common site, you would need to factor in item level permission setting based on the company metadata. If you have a site for each company, security should be a whole lot easier.
If your goal is only to share reports then going with separate site for customer login or with site per customer is IMHO huge overkill and almost useless.
Solution to your problem is quite easy: One site with separate Document Library for each customer. There is not much difference between 1 customer = 1 site and 1 customer = 1 library except for simple scenario I found that maintaining multiple libraries on single site is much more easier then maintaining multiple sites with basically one library on it. However if you plan to have more interaction and 'sharing' with customers (now or in future) then separate site for each customer is a option.
Steps:
Define custom Document Content Type on site level holding all metadata your report needs
Create Document Library for each customer with this new content type
Define permissions on Document Library level - each customer can access only one designated library (need to have read rights on site)
Your employees need to upload report to customer library so that customer can see it. If permissions are set correctly then customer can see only designated library and you can easily set administrators (can see all) and superusers (can see more then one library/customer).
Having all reports in single site will simplify developing process for additional business logic by using custom workflows and/or receivers. Also searching and aggregation for administrator or super user is much easier.

Bloomberg API: How to get the list of Pricing Sources?

It's possible to get current pricing source for a security (PRICING_SOURCE field). Is there any field that returns the list of all available pricing sources for defined security?
Thank you.
No - it's not currently possible.
Any fields (i.e. visible in FLDS in the terminal) are accessible via the API - such as the PRICING_SOURCE field in the question.
However, there is currently no functionality like the terminal commands PCS or ALLQ in the API at the moment. There is a request for this functionality with the Bloomberg programmers, and you can contact the Bbg helpdesk to have yourself added to the request to be informed when it becomes available.
Look up your pcs enablements, find the one you want to use /then lock down the eid # from the respective ctrb page. You can request eid specific prices via api.