Forum Discussion
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
Hi Arnaud,
your request should look something like this
GET <URI for your Aras Installation>/server/odata/ItemType('<ID for the ItemType you want to query>')/RelationshipType
You will need to replace <URI for your Aras Installation> in the URI with the path for your Aras installation (like http://localhost/InnovatorServer) and the given <ID for the ItemType you want to query> with the ID of the ItemType you want to know the RelationshipTypes for.
Is this what you need?
- Former_Member7 years agoIdeator I
Hi cogres,
Probably, but it returns "value": [].
I have an url like this one :
Airbus_cabin_configuration('AB0358B1D3774D77AC507CA1F857F42E')/RelationshipType
It should return Cabin_seat, Cabin_Lavatory ... that are saved in "RelationshipTypes" in the ItemType, but it doesn't. I don't understand what is wrong.
Best regards.
- cogres7 years agoIdeator I
Hi Arnaud,
The "/RelationshipType" part of the URI means "give me all relationships of the Item specified before that are called 'RelationshipType'". Your custom ItemType "Airbus_cabin_configuration" does not have any Relationships with the name "RelationshipType". Its relationships are called "Cabin_seat, Cabin_Lavatory", etc.
I assumed you wanted to know the names of RelationshipTypes on a given ItemType, not the actual relationship instances on instances of a particular custom ItemType. If you send the request ending in
ItemType('ID of the ItemType Airbus_cabin_configuration')/RelationshipTypethis is exactly what you will get. A collection of "value"-nodes that include the names of your RelationshipTypes (Cabin_seat, Cabin_Lavatory, etc).
If you need the actual instances of these RelationshipTypes on a given Airbus_Cabin_configuration, you will have to combine the result of the above query to get the names of the relationships and then a request likeAirbus_cabin_configuration('AB0358B1D3774D77AC507CA1F857F42E')/Cabin_seat
to fetch the relationship instances.
Is this what you mean?Cheers,
C
- Former_Member7 years agoIdeator I
Indeed, I want to know the names of all the RelationshipTypes on a given ItemType.
I totally understood how to fetch the instances of the RelationshipTypes on a given configuration, I just can't get the list of names of those RelationshipTypes.
To be clear, I want to send a query to my Airbus configuration and get a reponse like this one :
"value" : [
Cabin_Seat;
Cabin_Lavatory;
Cabin_Overhead_locker;
...
]
I tried many urls but I wasn't able to get something like this.
The query ItemType('ID of the ItemType Airbus_cabin_configuration')/RelationshipType sends me "value":[]
Maybe there is something wrong in my database ?
Cheers,