Our team is leveraging the Sitefinity default REST API (i.e. /api/default/products) in order to perform data operations on an external job. We are able to distinguish products by site/provider and culture without issue. This is currently working for the most part but with a frustrating potential bug.
It seems that the API returns the Live version of the content as expected, but it also returns content of that type that has been Deleted and is sitting in the Recycle Bin. Documentation on this has been scarce and I have not seen it mentioned in other posts. I am looking for a parameter or filter that will remove Deleted/Recycle Bin items from the response in the Sitefinity default REST API?
I opened a support ticket with Telerik/Progress and they confirmed this is a bug. The rep stated that it will be resolved in Sitefinity 11. For now the only workarounds are to make sure items are unpublished before deleted or removed from the recycle bin. Alternatively, one could create their own endpoints that use the ModuleManagers that provide access to the lifecycle of content.
Related
We are considering changing our rails app (which relies heavily on Nested Attributes-style data creation) to use JSONAPI instead. However, it seems that JSONAPI may not support this style of document creation/updating?
I've read around and this is sometimes referred to as "compound documents" or "sideposting". My research has been inconclusive, so posting here in hopes that someone out there knows the deal.
For example if in our app we had a Person that has many PhoneNumber, I would like to be able to send a PATCH to /person/1 that had information relating to phone numbers. RoR Nested Attributes allows for sending new phone numbers (ones without an id), modifying existing ones, and deleting existing ones. Is there an equivalent for this in JSONAPI?
If not, how would a client go about submitting this data to the server? A separate request for every object? On some of our pages that could result in 100 plus requests... and each one would need to be managed for errors indivdually?
JSON:API specification v1.0 does not support to create, update or delete more than one resource with one request. So if your server only supports that version of the specification without any custom modification the client would need to submit separate requests for each resource that should be created, updated or deleted. That means the client needs to handle errors for each one individually. This may include rolling back partial changes if one requests fails in a series of related updates.
The missing support for atomic operations is known to be a problematic limitation for some use cases. It should be resolved with the upcoming v1.1. This version is planned to add extensions to the specification. An extension can extend the specification. An extension Atomic Opersions is proposed, which would add support for creating, updating and deleting multiple resources with one request. A client would be able to provide a list of mutations that must be processed in a linear and atomic manner by matter by a server implementing that extension. This means that the modifications are processed in order and will either completely succeed or fail together.
I'm trying to grab only properties "id" and "userPrincipalName" from the teacher when getting educationClasses with $expand=teacher as parameter. But whatever I do, I keep getting the full teacher/user object.
https://graph.microsoft.com/v1.0/education/classes?$expand=teachers($select=id,userPrincipalName)
But it gives the same result as this one:
https://graph.microsoft.com/v1.0/education/classes?$expand=teachers
What am I doing wrong?
Or is this one of the endpoints where the expand+select feature is not fully supported? I don't want the full teacher object because it contains assignedLicenses, assignedPlans, provisionedPlans and a whole lot of stuff I will never need in this request.
And...it's production, so I'd like to avoid using the BETA endpoint if possible.
Yep, looks like the underlying AAD storage doesn't support expand plus select.
You can see what is happening under the covers by appending the &$whatif to your query.
Not a lot we can do about this, as the AAD team aren't investing in adding richness here right now.
We recently updated the profile information in Azure active directory. when we use People API in graph explorer, it is not returning the latest information. How much time does it take normally to return the updated information?
The /me/people API is actually returning from a search index, not a real-time fetch from Azure Active Directory directly. The search index update depends on many characteristics of your AAD. It is safe to say you should see this reflected within 24 hours.
Obviously there is value in the people API with its underlying logic. If you wish to have the data updated instantly. You should use the /users/ to fetch the latest content.
I've been tasked with sending data from a Delphi 2010 desktop app to google analytics so we can track which parts of the program are being used more heavily (or used at all). I'm using Indy to post, and the post seems to be generating a valid response, but I'm not seeing anything on the Google Analytics side. I'm totally new to Google Analytics, so might be doing something wrong with what I'm posting or in how I am viewing it. I did create an app view in analytics, but don't know if I set it up correctly.
Parameters := TStringList.Create;
Parameters.Add('v=1'); //Version
Parameters.Add('&tid=UA-nnnnnnnn-n'); //Tracking ID
Parameters.Add('&cid=555'); //
Parameters.Add('&t=test2'); // Screenview hit type.
Parameters.Add('&an=AppName'); // App name
Parameters.Add('&av=' + sAppVersion); // App version
Parameters.Add('&aid=12345'); // App Id
Parameters.Add('&aiid=InstallerID'); // App Installer Id
IdHTTP.Post('https://www.google-analytics.com/collect',Parameters);
Result:= IdHTTP.ResponseText;
I've verified that the tracking ID (replaced with UA-nnnnnnnn-n above) is correct. Would like to know if what I'm submitting is complete and/or if there's something I need to do to see the hit on the GA side. Thanks.
You can use the /debug/collect/ endpoint instead of /collect/ to validate your hits and receive a response containing any possible errors for each request.
Solved this one. Turned out to be three things that needed help:
When manually constructing https parameters, one generally needs an & before each new parameter. When passing parameters in a TStringList with Indy's TIdHTTP.Post, an & before parameters doesn't generate any error that returns, but it also doesn't work. Taking the & out of the parameters.Add fixes this.
To figure out which parameters must be included together, the analytics hit builder provides a way to quickly determine whether a hit is valid or whether there's a missing parameter. (Some parameters are required only in combination.)
(https://ga-dev-tools.appspot.com/hit-builder/)
An incoming hit (even in valid format from the hit builder) can result in no visible results without building a dashboard/widgit or report specifically designed to show the type of hit you are generating. Thus, an existing site that has been configured to count web page views doesn't seem to show app hits or events or types of hits that are different than the existing views are configured for.
Fix them all, and things work.
In Google Analytics a web-property may hold more than a single profile, in which case one of them is suppose to be defined as the default one (in GA you browse inside it you can see a [DEFAULT] tag by its name).
Using the Legato gem, is there a way of querying whether the profile is the default one or not? is there a way to pass parameters to add this information to the request?
Unfortunately, this appears to be an API limitation.
Browsing the developer reference for the API v3, the profile representation contains no property indicating its status among siblings.