I am trying to query the VSTS OData endpoint from Power BI to get the comments from [Discussion] section inside a Work Item.
It seems that this [Discussion] child entity is not exposed in the data model
(as described here: https://learn.microsoft.com/en-us/vsts/report/extend-analytics/data-model-analytics-service?view=vsts)
Does anyone know if it can be accessed from OData query or in any other way?
P.S.
Another way to do it may potentially be adding a custom text field inside a Work Item and moving all comments there, however, I am not sure if these fields are exposed in OData endpoint as well and can be accessed by means of querying.
I would be really grateful if anyone could share any information on that topic as well.
Related
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.
Am facing an issue with OData Expand. Have basic two entities, one is Parent and the other is Children entity. Relationship between Parent to Child is 1-N.
Also have same mapper for its corresponding dtos. .NetCore APi application has EFcore, automapper. All are of the latest version. Sample is available here at https://github.com/shoguns6/ODataIssue
The issue:
APi works fine if it gets the Parent dto. But the moment i specify the $expand=children in the Api, it gives the ever famous 'Arguments do not match' error.
The expectation: Parent and its children to be retrieved and displayed to user/browser.
Have seen many post related to the same issue and they claim to have given the solution. But with the latest version of all (EFCore, Autommaper, .Netcore) the issue still exist.
Could you please let me what mistake am making here.
Please refer this link. This is a known issue and there is nugget available for the same.
Trick is to effectively define the mapper and use this library https://github.com/AutoMapper/AutoMapper.Extensions.ExpressionMapping/issues/60
We have an OData v4 API that we are putting behind an Azure API Management (AAM) service, but have run into a problem configuring the routes/oerations. In a nutshell, the issue is that AAM will reject a query for a route/operation unless it is explicitly configured (you get a 404 error), but with OData there can be a route for every attribute (property) of every operation (endpoint). The problem quickly becomes unmanageable.
OData allows you to query an individual attribute/property (eg GET ~/api/Person(1234)/FirstName. If we put this behind AAM, we need to define it as an operation. That's OK as long as there are only a few of these, but it potentially means you quickly have to define hundreds/thousands of operations (unless I've missed something). We have an API with about 35 top level operations. Each resource has 20 attributes on average. That's 700 operations we would need to define. Apart from the work involved, that would be a shocking experience for users of the AAM developer portal.
I'm hoping someone can tell me an easy way to get around this problem. I know I can script the creation of these. You an also get around this problem to some degree if you use an OData $select query parameter (which is what I've suggested in the meantime). I can't get over the feeling I've missed something here. Is there a way of defining some sort of wildcard portion to the operation (eg /Person/*)? I can't find anything like that in the AAM documentation.
Try using URL templates instead of writing them explicitly, i.e. define operations for /{entity}/{property} this way it'll match every entity and every property of every entity. And you could use wildcards as well if you want to capture multiple segments at the end of URL.
I am using odata to query Dynamics CRM Online 2013. I am trying to track changes against particular entities. For example, I want to be able to see Old Values and New Values for Opportunities, as you would see in the Summary View. Auditing is enabled for the entities but the most I can see via odata is whether a field of an entity was changed or not, and when it was changed.
Q. If "Change Tracking" is enabled will that expose another odata entity that will give me those changed values?
I am pretty sure Audit entity data is not exposed via OData.
Please find the url for the actual usage of Change Tracking feature.
http://www.powerobjects.com/2015/10/26/change-tracking-in-dynamics-crm-2015/
Audit table is not consumable through Sdk calls.. neither odata nor soap.
On premise will allow to query using sql queries but still data is "," "~" separated.
On the other hand Change tracking is accessible through sdk call using RetrieveEntityChangesRequest message. Pls refer the link below.
But this is for primary usage of integration services to identify the modified records for upstream/downstream systems from last cycle.
https://msdn.microsoft.com/en-us/library/dn932130.aspx
Update: Reg Audit, we have some limited options though - https://yanivrdt.wordpress.com/2016/01/08/retrieving-audit-history-records-via-api/
what would be the best practice for allowing a WebAPI OData based webservice update an entire collection?
For example, we have an admin page that allows users to maintain a list of payment terms. We have created a controller that is based on the PaymentTerm entity, which allows the standard Get, Get by key, Put, Post, and Delete, for working with single instances of the PaymentTerm Entity. However, our UI team would like to retrieve a collection of payment terms (easily done with the standard Get collection), manipulate it locally, and then Put or Post the entire collection back to the server, rather than having to make a series of Put, Post, and Delete calls to the server.
I have tried creating an action method for this, and while I have managed to get it to work, it seems somewhat kludgy, as it requires an ID, as well as odata parameters (which contain the collection), and the ID is meaningless because at this point you are not working with an instance of a Payment Term, but an entire collection of them.
I could create a new controller solely for working with a collection of payment terms, but I'm not sure that would be much better, as it would end up having to have a base class declaration of
EntitySetController<PaymentTermCollection, int>
or the like, which would not make much sense as the collection would not have a key that had any meaning.
You should consider support $batch ( Standard part of OData ) in your web api using EntitySetApiControllers
Then you can submit a bag of changes including post-put-delete of multiple entities to your sever easily, within support of JayData , breeze , ...
Good luck