Determine if Google Analytics Account/Property is under GA360 account via API? - google-apps-script

Somewhat new to Google Analytics APIs. Ive pulled a list using the Analytics.Management.Accounts.list() method (AppScript/Sheets) and my 'admin' level user in bound to over a 100 accounts. I have 1000s of UA props returned as expected ie no GA4 properties, but I'm trying to delineate UA props that are under a 'standard' account VS a '360' account as it pertains to the UA properties returned.
I'm not sure there is an API 'hook' either # account level or property level that I can use to make this decision. Maybe this can be derived from multiple logic branches, but not sure how to approach this logic flow.
Any insight appreciated.
Have tried several properties at both Account and Property level.

To determine if UA property is under a Standard or 360 analytics account check the property's 'level' via the API. STANDARD || PREMIUM.

Related

Forge API: Get all changed items

I need to get a list of all changed items in my project in BIM 360. Can I do this using forge-api.
Ho, regarding with the latest question [If my service is not available and I will miss some webhook events, how can I get all the changes that were made after the last webhook event received] :
If your requirement is to know which items are changed in one folder of Docs, Search API with filter can be of use. e.g. the endpoint below will return all items which are updated since a certain time.
https://developer.api.autodesk.com/data/v1/projects/{{project_id_with_b}}/folders/{{one_folder_id}}/search?filter[attributes.lastModifiedTime]-ge=2019-10-15
More filters options are described at
https://forge.autodesk.com/en/docs/data/v2/developers_guide/filtering/
While if you wanted to know all updates in one call, I do not see currently the way is available. While, Activity API is on the way, it might be helpful to know all activities during a certain dates, then you could filter out what you are interested in and locate the corresponding module>>files/resources etc.. but Activities may probably be categorized with specific scopes e.g. admin activities, project actives, issue activities etc. so it is not one call knows all updates.. And these APIs may not be exposed in the same time.

Geoserver and Geofence - using custom rules

I've checked all the options of the rule creation in GeoFence Embedded (integrated with GeoServer) and GeoFence Standalone web application. The available options for building data access rules seem to be limited to: username, user's role, service name, request name, workspace and layer. The additional option is to limit the access with the geographical area.
Is there a way, using GeoServer and GeoFence, to make rules more specific, as in the following examples:
1) restricting access to a group of features from a layer, which belong to the selected bigger layer (show only cities from a selected state)
2) using CQL expressions in GeoFence rules with system variables (showing only features from a layer which have in one attribute the username of the logged-in, using GeoFence authenticator, user)
?
I have found partial answers and I will share :)
Cross-layer filtering:
http://docs.geoserver.org/stable/en/user/extensions/querylayer/index.html
Probably not possible without changes to original source code.

Issue with Google Drive API and group sharing

I'm facing an issue with an application I'm developing using Google Drive.
I have a Google group with some users inside, and I share a collection with this group.
When I try to find this collection using Google Drive API (files().list()), as one of the users of this group, the collection shows up properly.
However, if I add another user to the group (either using API or Google CPanel), and try to find the collection using Google Drive API as this user, the collection doesn't show up, as if the user is not able to see it even though he is in a group allowed to see the collection.
If I manually open once the collection through my browser, then the collection is showing through Drive API.
Is this a normal behaviour ? In my use case I cannot expect from the users to open in their browser each and every collection shared with them in order for the application to work.
Any insight?
I opened a Google Support case about this and apparently this behavior is "expected". Here are some excerpts from my exchange with "Angel" from
Google Enterprise Support (typos corrected and emphasis mine):
After reviewing the stackoverflow question, we need to clarify to you that the behavior shown is expected. When adding a user to a group, this group must be added again for any files that it has been shared with.
and
All information previously provided is from internal documentation for Drive UI; however the functionality is the same for SDK, therefore, group must be deleted and added back to the list of users that have access to files/folders after adding a new member.
So, there you have it. Not sure if #Burcu will ever come back and confirm.
<EDIT> It gets worse. According to this Google document, groups with more than 200 members will never see files shared with them, even if you delete and add the group back. </EDIT>
Useless post-answer rant follows:
This behavior, even if it is "expected" by Google, does not seem to be properly documented, and it is neither expected nor usable by clients of the service. How are we supposed to know when a user has been added to a group that has items shared with it? Are we supposed to constantly monitor group memberships as well as maintain a list of all things shared with the group and then *re*share them with the group when the membership changes, just to get consistent behavior? It makes me wonder why Google doesn't already do this on the back end; it can't be that expensive to register a list of callbacks with a group that are triggered upon membership changes. And the requirement that we actually unshare is even more bizarre, since it necessitates a short period of time during which nobody in the group can access the resource.

Determine whether an account type is business or enterprise?

I know how to determine if account type is personal or not personal by max_upload_size using v2 API:
https://api.box.com/2.0/users/me
or add extra fields can_see_managed_users or is_exempt_from_device_limits, then check the response.
But I assume the business account has the storage limitation, which means the response of is_exempt_from_device_limits should be false for business account. So I created a business account and tested on it. The result is true instead.
So is there any api or flags which can be used to determine the difference?
Thanks in advance.
You are correct that you can determine that an account is a business or enterprise account by the max_upload_size setting. You've also discovered an administrative feature, that the admins can set on their enterprise account. They can decide if their users are allowed to have multiple devices of the same kind that are allowed to login.
There isn't a specific API at the moment to determine what type of account the user has. We're contemplating it, but for now, the max_upload_size is probably the best way to gauge. Keep in mind that Box keeps changing that limit. We have been slowly raising that limit on various types of accounts.
Box user API now returns an enterprise object. I believe we can use this to determine if it is a business account or enterprise account like this:
"enterprise": {
"type": "enterprise",
"id": "17077211",
"name": "seanrose enterprise"
}

API V2 - Enterprise - Create Managed User

I am evaluating box for enterprise accounts. Within version 1 docs there are Enterprise Commands such as
create_managed_user
edit_managed_user
etc
Is there V2 commands which are the same ?
Will the existing V1 Commands for these methods be deprecated ?
Updating this, since someone recently referred to it, even though this answer is pretty ancient.
Fully updated:
There is about 20% more surface area available for "Administrative use" in the V2 API, than there was in the V1 Box.com API.
Where? /users
POST to create a new one
GET /users to see all the users in the enterprise
PUT /users/ to update a specific user
GET /users/?fields=a,b,c to get specific fields you want to see, including some non default fields like their enterprise-id, their role, some permissions, etc. See the docs for users, and look for the green fields.
Where else? /groups
POST to create a new one
GET to get a list of all groups
GET /groups//memberships to get a list of all the users in a group
What else? as-user headers can let you build applications that automate processes for your users.
Of course to do all these things, you have to be an admin, granted the permissions to do these various different things.
The V2 API has some admin-level APIs, mostly under the /users endpoint (http://developers.box.com/docs/). However, many methods are still being added to the V2 API, and much of the administrative functionality is only available in the V1 API at the moment. The V2 API does not yet have equivalent method's for create_managed_user or edit_managed_user from V1.
We generally recommend that apps use the V2 API as much as possible, and include V1 calls when needed. As we add more methods to the V2 API, it's best to change your v1 calls as soon as you can.