Hi community,
I'm trying to get the list of all the relationshipTypes of an ItemType thanks to the REST API.
Is this possible ?
Thanks for any help !
Arnaud
Hi community,
I'm trying to get the list of all the relationshipTypes of an ItemType thanks to the REST API.
Is this possible ?
Thanks for any help !
Arnaud
Hi Arnaud,
You should be able to do this by querying the "ItemType" ItemType, and returning the "relationshipType" relationship. More in depth information about how to create queries like this can be found in this blog post.
AJ
Hi Sebastian,
Thank you for the answer, I'm already using this blog but I didn't find the answer... What is the url used to perform this task ? I already tried plenty of things.
I should start with : localhost/.../
But then how can I add "relationshipType" to get the list I need ?
I often get the error message "notImplemented".
Best regards
I tried what you told me to, but it still doesn't work. I can only retrieve an empty array. Everything works except this command. I don't understand why.
Hi there,
Could you check the ItemType in the client and confirm that you can see the relationships you're expecting under the RelationshipType tab? Typically, an empty array would only be returned if no items were found or if you did not have permission to see the item.
If you can see the relationships in the client, could you try querying the REST API for the relationships of a standard Aras ItemType like User to make sure that you have permissions to see Relationships with the user you're using for the REST call? You can do that with the URL below.
/server/odata/ItemType('45E899CD2859442982EB22BB2DF683E5')/RelationshipType?$select=name
You should expect to see three items returned form the query above: Alias, Old Password, and ReadPriority.
Chris
Hi Christopher,
I tried your url with User, it returns again an empty array. I'm working with the admin session.
Something is wrong wuth the permissions I guess ?
Cheers
Hello,
My guess would be that this is related to the permissions, but I can't say I've seen this issue before. Could you check the Permissions on the RelationshipType ItemType to see if it has been changed in your system? The Permissions in a default environment look like below where World should have Get access.
Chris
I have the same configuration as yours for the RelationshipType...
I also tried to query the RelationshipTypes of the default itemType "Part" but I also get an empty array.
Just to confirm, you can see the relationships on the ItemType when you view them directly through the client, correct?
And here is the request :
Everything looks right to me...
Hi Arnaud,
I see the confusion now. You're querying the "airbus_cabin" ItemType. What you actually want to do is query the "ItemType" ItemType. The airbus_cabin itemtype has no relationship titled relationshipType, and therefore you're getting this empty array. It's also important to note that the ID you need to pass in is the ID of the airbus_cabin itemtype.
Also appending ?$select=name to the end of that query will make it easier to parse.
AJ
Oh I see how it works now. Thank you very much.
Actually, I hoped I could retrieve directly the RelationshipType of a particular ItemType.
I have to query :
localhost/.../RelationshipType
And then get the relationshipTypes I need...
Oh I see how it works now. Thank you very much.
Actually, I hoped I could retrieve directly the RelationshipType of a particular ItemType.
I have to query :
localhost/.../RelationshipType
And then get the relationshipTypes I need...