Is there a way to get a list of all intents and entities in Microsoft CLU? Cannot find this in their documentation - rest

I need to get a list of the entities and intents in a CLU model, but I am unable to finda REST API that matches my query.
I need a way to get a list of all intents and entities in a model.

Related

How to get additional props by OData in 1C?

I published Odata service and tried to get additional props by OData in 1C.
For example, I create user-defined property to entities "Warehouses". Let's call this the space where users can move the warehouse area in square meters.
But when I get Entity by REST client, the array of additional props is empty - [].
How can I do this, and what could be the reason for the missing value?
When you publish the OData interface, you use a special data processor to specify what data will be available through the REST API.
Since additional attributes of objects in typical 1C programs are usually stored in the "AdditionalAttributesAndInfoSets" catalog, try to open access via the REST API for this catalog as well.
You can see an article on working with OData: https://1c-dn.com/blog/synchronization-between-a-mobile-app-and-a-database-server-on-the-1c-platform/

REST api desing. Retrieving and saving child records

I am designing a rest api and I have some doubts about exposing and consuming children from relation.
Assuming I have an entity A with a one to many relation to entity B (so A can have some Bs attached) and I design an endpoint to create entity A and DTO for entity A includes a list for entity B and user provides a valid one, should it be saved too?
Example:
Doing a post to some endpoint e.g. /api/v1/As
{
entityAfield1: someValue,
entityAfield2: someOtherValue
Bs: [
{
HERE a valid B payload
}
]
}
should I also save B and create a relation between A and B? What if B also have some children? Should it be saved too?
Or should I just save A and create an endpoint like
/api/v1/As/{Aid}/Bs/{Bid}
to create a relation?
And same question about getting data. Should get always retrieve all children? I couldn't find a clear answer to this on the web.
The issue might be solved by means of returning the IDs of Bs. This way, a user of service will decide whether or not to retrieve the actual data of related resources.
To interact with those an endpoint like this
/api/v1/Bs/{Bid}
can be used, as well as a more verbose one
/api/v1/As/{Aid}/Bs/{Bid}
however, the too nested endpoints, like
/api/v1/As/{Aid}/Bs/{Bid}/Cs/{Cid}/Ds/{Did}
should be avoided and most likely indicate a design flaw.
For a tree structure or many to many relations in general, an intermediate resource that represents a linkage should be exposed. There is a good example of a REST API implementation by Google, its "Children" section would be especially helpful for such case.

Google Could Datastore - parent entity or array property

I'm trying to get my head around NoSQL and Google Cloud Datastore, and I don't know how to chose between two different options for storing data.
I have a list of orders, and every order is for an unspecified number of products. What are the pros/cons of storing the product list as an array property for the order entity vs having product child entities for each order parent?
Firstly, be well aware of the distinction between the 2 possible approaches of implementing a relationship between entities:
one entity can contain a Key type property pointing to another entity (which might or might not exist!) - this is a functional relationship only, not one at the datastore level
having the 2 datastore entities in a parent-child (ancestry) relationship, inside the same datastore entity group.
Using the 2nd one has scalability implications, see also:
Ancestor relation in datastore
E-commerce Product Categories in Google App Engine (Python)
As for storing a list as an array property vs as separate entities, see Creating your own activity logging in GAE/P (where repeated properties is just how array properties are called in the ndb client library context).

Where do you create a custom model (DTO) in server code, such that Breeze can relate to EntityFramework entities?

I am developing a SPA using Angular-Breeze-WebAPI-EntityFramework.
Now Breeze uses the Entity Framework metadata information to create it's own Breeze models. We use this in our application for Breeze validation.
So far, it's all been nice and easy. Now we are having to create a search page (say for querying customers). The search can be by Customer.Name or by Product.Id (which would return a list of customers who have bought that product). The result is a ng-repeater, which displays Customer.Name, Order.LastPlaced etc.
if you are getting confused by the tables and columns, forget that. What I am only trying to get to is that, both the search object and the result object are not 1:1 with Entity tables (or objects). So obviously I feel the need to create a custom object (one for the search and one for the results). My question primarily is where and how do I create that object?
If I create it at the data layer, Breeze would have no idea of the metadata for each of the properties (since it uses EF for that).
I obviously can't create just a JavaScript object, since I will have to query the database (using EF) to search and populate the object.
So where does one create such a custom object (traversing multiple tables) such that Breeze still can figure out the metadata and perform validation and such when the need arises?
Thank you all.
You can create metadata on the client for types that the server either doesn't know about or doesn't have the schema for. See http://www.breezejs.com/documentation/metadata-by-hand.

Dynamics 2011 Intersect / Junction entity

I have 3 entities.
PortalRole, Person and PersonPortalRole
PersonPortalRole is a intersection entity to deal with my Many-Many relationship.
I am using JavaScript through a HTML web resource to allow the creation and removal of this entity. I can create new entities by using the REST service fairly easily but I can't find a way of deleting a intersect record (two lookup fields) using the PersonId and PortalRoleId.
Has anyone had any exposure to either deleting a record through REST using the two foreign keys values from a lookup? I was trying to get the object first using a filter but can't seemt o filter using the lookup primary keys.
Was trying something like below which returns 15 entries to then filter the results to get the primary key, and then delete using that key but not sure on the way to do this.
SERVER/INSTANCE/XRMServices/2011/OrganizationData.svc/personportalrolesSet?$expand=Person,PortalRole
Based on that URI, you are interacting with an OData service. OData uses Atom feeds for returning lists of stuff so you will likely find within each <entry> element a <id> element that contains the URL of the resource. If you issue a HTTP DELETE to that URL then your resource will be deleted.
See docs here http://www.odata.org/developers/protocols/operations#DeletingEntries
I don't use the REST endpoint, but there's no way I know of to end a many-to-many relationship except through sending a Disassociate request (or if you have access to the SQL box, direct insertion/deletion in that table). MS has some sample code available that shows how to do this using the REST Endpoint.