How to filter mobile devices by list of e-mail address - google-admin-sdk

I'm working with the Google Admin SDK Directory API, more specifically with Mobile Devices. I already used the tool provided by Google here and also created a program using the .Net client library to get all devices with success.
The problem is, I need now to get all the mobile devices filtered by a list of emails. I was able to filter using a single email address like:
https://www.googleapis.com/admin/directory/v1/customer/ZXXXXX/devices
/mobile?projection=BASIC&query=email:EMAIL_HERE&key={YOUR_API_KEY}
But I couldn't find a way to filter using multiple email values like:
query email: email1:#my-domain.com, email2#my-domain.com, email3#my-domain.com
The documentation provided here on the Search string format does not specify nor give examples for this case.
EDIT: The documentation on the Search String Format does say this:
To Search within a specific field: enter an operator followed by an
argument. For example, user:joesabia. You can use single words or
quoted lists of words as an argument when running an operator query.
So, I tried doing something like this in the query box:
email:"email1#my-domain,com""email2#my-domain,com"

There is no OR in the query format. You'll need to either use multiple API calls with one email query per call or just list all devices and filter by email locally.

You can combine multiple fields search in query string separated by space for example email=test#example.com name:Test. But in your case just give it a try doing this email:test#example.com email:test2#example.com.

Related

Django-dsl-drf Exclude phrase query

I am working on integrating Elastic Search in my existing Django REST application. I am using the django-dsl-drf module provided in the link below:
https://django-elasticsearch-dsl-drf.readthedocs.io/
In their documentation 'exclude' query param is provided. But the query only when we provide the full field value.
search-url?exclude=<field-value
For eg: If I have a value 'Stackoverflow' in field 'name'. I'll have to provide query param a
?name__exclude=Stackoverflow to exclude records having 'Stackoverflow' as name in the result. I would like to implement a search in such a way that when I provide 'over', I need to exclude these records, similar to ?name__exclude=over
I checked the above tutorial, but I couldn't find it. Is there any work around so that I can exclude records, fields containing terms instead of providing full field value, which is also case-insensitive.
Thanks a lot.
Using the contains functional filter, you can target documents that have their name field value containing the characters over anywhere in their terms:
?name__contains=over
However, as far as I know, there is no way to negate that filter in django-dsl-drf. You can create an issue requesting that feature, though, because odds are high that you're not the only who needs that, since it's a pretty common way of searching.

I need assistance for api-here geocoding

I would like to know how to obtain all London postal codes that start with "W2", for example, something like this. We are using the geocode api but in the postalCode parameter it asks for the exact postal code. We have also tried to use the autocomplete api but I also do not get a list of all the postal codes, it does a search in different parameters and it is not what we need.
This need arises because we are changing from MapServer to Nokia Here and with MapServer the api geocoding if it returns a list of all the postal codes
We are using something like this https://autocomplete.geocoder.api.here.com/6.2/suggest.json?app_id=xxxxxx&app_code=xxxxxxx&query=W2&country=GBR
We would need to be able to indicate in the query a complete or partial postal code
this example verifies what we need
By the way, we are using a payment license, how can I request this assistance?
You can constraint search result upto maximum 20 using geocoding autocomplete API with the below parameter
maxresults = { Valid range: 1 to 20 }
This constraint is as per API design. For detail information kindly go through the below link.
https://developer.here.com/documentation/geocoder-autocomplete/topics/resource-suggest.html

Use REGEX to generate multiple conversions per session in Google Analytics?

I've got a client with a real estate Website. Based on comparing goal completions to unique page views, it's pretty clear that some visitors inquire about multiple properties during a single session (more unique pages matching the REGEX string than completed goals). As goal tracking is set-up now, only one conversion per session is being completed (which I know is standard for GA).
I am using the destination as the confirmation of goal completion.
"Thank you" pages for conversions look like this:
/Enquiry/Thank-You/?subject=B30794&market=sale
/Enquiry/Thank-You/?subject=B36930&market=rental
My goal tracking REGEX is \Q/Enquiry/Thank-You/\E
I'm pretty sure that I can get Google Analytics to count more than one "thank you" as a completed goal during a session if I can account for the variable in the middle (B30794, B36930, etc.) plus the sale or rental on the end of the URL
I've asked around, including Google's GA community but can't get an string that works to handle the variable in the middle. These are two tags recommended to me that have not worked:
This string returns zero results:
^/Enquiry/Thank-You/\?subject=.*&market=(sale|rental)$
This string returns more than simply the thank you URLs:
^/Enquiry/Thank-You/\?subject=.*&market=sale|rental$
Try this one, the issue for the empty one was that the characters were not escaped:
^\/Enquiry\/Thank\-You\/\?subject=.*&market=(sale|rental)$

OTRS search via deep link possible?

I want to link to our OTRS (version 5) -- is it possible to create a URL in such a way that a special parametrized search is performed within OTRS?
I'd like to link from a webpage to something like:
https://otrs.charite.de?Ralf.Hildebrandt#charite.de
and that should display all tickets in the queue XYZ and customeruser == Ralf.Hildebrandt#charite.de
Unfortunately that's not possible out of the box - at least in the way you probably intend to use it. All real search functions in OTRS (that I'm aware of) use HTTP-POST. Parameterized POST request using an URL is in principle possible, but strongly discouraged and wouldn't really work if you intend to store those searches as bookmarks or something like that.
The good news - you can create a saved search and trigger that via a URL like this:
https://url.to.otrs.de/otrs/index.pl?Action=AgentTicketSearch;Subaction=Search;TakeLastSearch=1;SaveProfile=1;Profile=current%20Changes
In this case the Profile=current%20Changes would be replaced by the name of the search profile (Special Characters must be encoded).

Google Analytics Filter Set of Pages

I need to create a filter on Google Analytics to include only a set of pages, for example, the view will have a filter to collect data only from
www.example.com/page1.html
www.example.com/page2.html
www.example.com/page3.html
I am trying to achieve this by using a Custom Filter to Include - > Request URI and using a Regex on the Filter Pattern.
My problem is that the Regex exceeds the 255 character limitation, even after I tried to optimice the regex to be a small as possible.
Creating more than one Include Filter does not work because this way no data would be collected, so I am wondering how could I achieve this? Thank you
This is the original regex
/es/investigacion/lace\.html|/en/research/lace\.html|/es/investigacion/lace/programa-maestrias\.html|/es/investigacion/lace/alumni/latin-american-forum-entrepreneurs\.html|/es/investigacion/lace/alumni/fondo-angel-investment\.html|/es/investigacion/lace/alumni\.html|/es/investigacion/lace/fondo-inversion\.html|/es/investigacion/lace/investigacion\.html|/es/investigacion/lace/acerca-del-centro\.html|/es/investigacion/lace/alumni/estudiantes-del-pais\.html|/en/research/investigation\.html|/en/research/about-the-center\.html|/es/investigacion/lace/alumni/mentoring\.html|/es/investigacion/lace/alumni/reatu-entrepreneur-award\.html|/en/research/lace/master-program\.html|/en/research/lace/alumni\.html|/en/research/investment-fund\.html
Edit: first try to compress the regex
/es/investigacion/lace/(programa-maestrias|alumni|investigacion|programa-maestrias|alumni/latin-american-forum-entrepreneurs|alumni/fondo-angel-investment|fondo-inversion|investigacion|acerca-del-centro|alumni/estudiantes-del-pais|alumni/mentoring|alumni/incae-entrepreneur-award)\.html|
Edit: the reason for this is because I need to create a new user profile on GA, and this new profile will have access to the information of a set of URLs only; so what occurred to me is create a new View that only captures the information of this set of URLs, and then assign the profile to this view with "Read/Analyze" permissons.
There are definitely more ways to optimise the regex. For example, since all string options end with .html, you could do something like this:
/(es/investigacion/lace|en/research/lace)\.html
by taking the .html out.
You could also take out
/es/investigacion/lace
and weave in the variable part of that using |'s, eg.
/es/investigacion/lace/(programa-maestrias|alumni|investigacion)\.html
But try a few of those optimisation techniques and you should be able to fit more in.