Forum

Is there a way to g...
 
Notifications
Retirer tout

Is there a way to get linked objects using the REST API ?

3 Posts
2 Utilisateurs
0 Reactions
1,835 Vu
(@nicolasnasdron-be)
Posts: 4
Active Member
Début du sujet
 
[#7681]

For example, we have a ticket (id # 16) that is linked to an Equipment (id # 1).
If we make a GET request to obtain the ticket ( http://myserver/projeqtor/api/Ticket/16 ), we obtain a JSON record containing all the Ticket's fields, but not the linked objects...

By the way, the Projeqtor API is a great tool!

Thanks for your help,
Nicolas.


 
Posté : 11 Août AM 02:088
(@nicolasnasdron-be)
Posts: 4
Active Member
Début du sujet
 

OK, the answer was easy: we just have to use the class object "Link".

Exemple: to get all the objects linked to the ticket # 16:

http://myserver/projeqtor/api/Link/search/ref2Type ='Ticket'/ref2Id=16

Then we should extract the ref1Id's from the result...


 
Posté : 11 Août AM 03:088
(@babynus)
Posts: 14952
Membre Admin
 

In addition, pay attention that you can also have links with ref1Type='Ticket'/ref1Id=16 , then linked element is on ref2Type/ref2id
Rule is that Ref1 is the "smallest" for Class#Id


 
Posté : 12 Août PM 19:088
Share:
Retour en haut