Ticket #513 (closed Feature Request: worksforme)

Opened 11 years ago

Last modified 10 years ago

Accessing a child-topic of a related composite in 1 GET request

Reported by: Malte Owned by: jri
Priority: Major Milestone:
Component: DeepaMehta Standard Distribution Version: 4.1.2
Keywords: Cc:
Complexity: 3 Area: Application Framework / API
Module: deepamehta-core

Description

I want to express a simple query on the graph and I am wondering if it is possible to do so in 1 GET-Request instead of needing 2. It's just about accessing a ChildTopic? of a related Composite, when having a Topic-ID at hand.

Having just the ID 12345 of a topic, I currently have to ask for the ID of related Composite-Topic to be able to ask for the full composite topic (just to access the value of a specific related ChildTopic?), resulting in 2 requests for such a simple query (there is no fetch_composite-Parameter in get_topic_related_topic (rest_client.js).

Thanks for your help.

Change History

comment:1 Changed 11 years ago by jri

Yes, you're right. The REST API for

GET /core/topic/{id}/related_topics
GET /core/association/{id}/related_topics

provides no fetch_composite parameter. This is because retrieving a whole bunch of related topics including all their childs seemed not be a requirement to me so far.

Is the related topic(s) you want modeled as one or many?

  • if one you could use the topic's getRelatedTopic() call. This provides a fetchComposite parameter (besides performing a singularity consistency check). However, for the moment there is indeed no REST API for it. I could extend the web service by getRelatedTopic() quickly.
  • if many related topics including all their childs is actually required by your plugin I could equip both requests mentioned above with a fetch_composite parameter quickly.

I'm interested to know what your plugin actually needs.

Thanks for the hint!

comment:2 Changed 11 years ago by Malte

It's *one* specific ChildTopic? I want to access, while I would be happy to not send out (to the client) the other ChildTopics/? the whole Composite (Background is a proprietary Author-Relation to a Note, see http://redmine.eduzen.tu-berlin.de/issues/531). So I guess I go with your answer from #514 and will think about how to implement it so it fits my ideas.

About your suggestion: I dont know.

comment:3 follow-up: ↓ 4 Changed 11 years ago by Malte

I think I would prefer to have some sort of "cherry-picker" first. Please also have a look where my requests actually originates from as I now described in #515

comment:4 in reply to: ↑ 3 Changed 11 years ago by jri

Replying to Malte:

I think I would prefer to have some sort of "cherry-picker" first. Please also have a look where my requests actually originates from as I now described in #515

Meanwhile a lot of enhancements have been developed around the View Customization Framework (#505). Does something there fit your need?

How do you regard the status of this ticket?

comment:5 Changed 10 years ago by jri

  • Status changed from new to closed
  • Resolution set to worksforme

Meanwhile in DM 4.4 child topic loading is redesigned.

Note: See TracTickets for help on using tickets.