Google Analytics Reporting API filters/segements - filter

I'm trying to use the Google Analytics Core Reporting API and have the following troubles. I know how to fetch that I want the problem I have is:
I want to use a filter only for specific metrics and not for all of them.
Is this even possible?
Here is an example how my Reporting "Code" looks like:
Metrics "ga:sessions
ga:goal6Completions
ga:goal7Completions
ga:goal10Completions
ga:totalEvents
ga:uniqueEvents"
Dimensions "ga:date"
Filters "ga:eventCategory==customerType"
I have the same problems with segments as with the filters that all metrics all segmented/filtered and only specific metrics should.

There really isn't another way other to get the data you want without creating a new request where the filter isn't applied unfortunately.
Just remember that you are only allowed five requests total. To give context, this may only apply to how I use the Reporting API, but I use Google App Script to push data to Google Sheets.
This may or may not be helpful to you, but the reporting code I use I have made available in a repo on GitHub: https://github.com/jessfeliciano/aggregateGoogleAnalyticsReporting/blob/master/objectQueryWithFilter.js
I've included a guide that gives additional information regarding creating requests in general, so it may spark other ways to go about creating your data trees. I hope this helps.

Related

Is there a NiFi API to read the Processor History?

I am using NiFi API to build a custom application. I am unable to find an API that captures the processor history in a format as shown below. Does anyone know if this API exists?
I have tried many of the API's here, but it's not obvious any of these can do the trick.
NiFi REST Api documentation
You can use the GET/processors/{id} to get back this information in the form of a ProcessorEntity. This contains all fields as shown in your screenshot: name, type, status, counters of last 5 minutes...
Inside the ProcessorEntity object, you can find the ProcessorStatus object which contains the name, type, status, 5min snapshot information per node and aggregated etc...
I included some links as examples to these objects from the NiFi python client, but you can also find some examples on the NiFi REST API docs you linked yourself.

Youtube Analytics API - Get Thumbnail-Impression Click-Through-Rate

One of the most important KPIs doesn't seem to be available via Youtube-Analytics-API. I can't get the total of thumbnail-impressions that have been shown to users. With that I could aggregate the impression-CTR using the views from certain traffic-sources (YT_SEARCH etc.). The docs don't seem to offer anything that would help me though.
Youtube-Reporting-API seems to have the same metrics as Youtube-Analytics-API. So I guess trying to use the Reporting-API would not help me either.
Is there any way to retrieve the number of thumbnail-impressions or the Impression-CTR programmatically? Any workaround? Am I missing something obvious? Or is there any intention of making that metric available via Analytics-API soon?
There is some very old, unanswered posts that may relate to my problem:
How to access new YouTube Analytics Metrics (Impressions, Impressions CTR) from API
Are Thumbnail Impressions/Views available through YouTube Analytics API?
There is a thread in google's issue-tracker that clearly states that (for now) it is NOT possible and in fact it is intended behavior (won't fix)!
I'll keep checking the API's Revision-History and try to keep this answer up to date.

Is this issue due to bots?

In our MVC website log I can see lot of errors with message "A public action method was not found". Requests are coming with junk action method name.
For example if I have action name "GetProducts" then requests are coming with actiona name as "GetProducts AND 1=1" , "GetProducts;id'" , "GetProductswhscheck".
is this because of internet bots are trying to access my website with junk values?
It may be bots, it may be script kiddies, or it may be crackers. Either way - somebody is trying to find vulnerabilities on your site.
Let's look at the first one:
GetProducts AND 1=1"
This looks like an attempt at SQL Injection. There was probably a longer query after the "1=1", trying to get information out of your database - like usernames, e-mail addresses, and so on.
To defend yourself, make sure your queries are parameterized. You may also want to add some form of rate-limiting on your system; if possible, see if you can add captchas.
You may also want to look at this answer on Information Security Stack Exchange, and the OWASP top 10 security vulnerabilities.
Do this as soon as possible, because somebody's trying to break in to your system.

Does the JIRA REST API support querying a list of labels?

I see the is the ability to get all components of a project by doing
/project/[projectkey]/components
but I don't see any capability or documentation on how to get the list of labels that are available for a project (something like:
/project/[projectkey]/labels
Does the JIRA REST API support querying the list of labels available on a project?
Just to clarify, labels (at least the built-in JIRA ones) are global entities so they can be attached to any Issue in any Project.
As to your question - no, there's no public REST endpoint to get/change/add labels to JIRA.
Jira Cloud has /rest/api/3/label.
Jira Server provides /rest/api/2/jql/autocompletedata/suggestions?fieldName=labels which is however not paginated and only returns the first few labels (label values can be queried using &fieldValue=X).
However, as hacky workaround you can misuse the API endpoints some Atlassian Jira Gadgets are communicating with. Though this has the following disadvantages:
Are internal APIs
Atlassian apparently plans to replace Gadgets with Dashboard Items eventually
Might change behavior, see e.g. JRASERVER-67446
No pagination (?), responses can be huge
Responses are designed for Gadgets, therefore contain irrelevant data
Labels Gadget
/rest/gadget/1.0/labels/gadget/project-<PROJECT_ID>/labels
Where <PROJECT_ID> is the numeric ID of the project.
Heat Map Gadget
/rest/gadget/1.0/heatmap/generate?projectOrFilterId=<PROJECT_OR_FILTER>&statType=labels
Where <PROJECT_OR_FILTER> can be either:
project-<PROJECT_ID>
filter-<FILTER_ID>

How can I index sub-community discussions and events?

I have written a custom crawler to index all the data from the connections seedlists
https:///forums/seedlist/myserver
When we started utilizing subcommunities, I double checked to make sure subcommunities behave practically the same as communities. They seem to, they have all the same properties in the Connections DB, just subs have a parent uuid. Got it.
I expected my crawler to find the sub communities discussions (basically just iterating through the atom feed with a Java XML parser) and pulling out the relevant information. Are subcommunities not published to this seedlist? If not, there does not seem to be a subcommunity specific seedlist.
We are currently on Connections 4.5
Thank you.
I have found the answer here.
http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Connections+4.5+API+Documentation#action=openDocument&res_title=Community_entry_content_ic45&content=pdcontent
There seems to be an additional element that links to the sub-community feed from within the community. A crawler will need to send a GET request to that link.

Resources