-
1. Re: NTA Contribution - A REST API to query NTA data
paul.robinson Apr 11, 2014 3:48 AM (in response to amila17)Amila,
Thanks again for agreeing to do this work. it really is much appreciated!
It looks like Apiary has a comment feature, it wasn't clear to me if that was a place to discuss the proposed API or a way of documenting it. I added one comment anyway, let me know if that was the wrong thing to do.
I've also attached a copy of the DB schema, as that should help review the REST API.
Unfortunatly, you have caught me at a busy time, with Red Hat Summit and DevNation coming up next week. however, I do hope to spend some time reviewing this API whilst travelling tomorrow.
Paul.
-
2. Re: NTA Contribution - A REST API to query NTA data
paul.robinson Apr 11, 2014 3:49 AM (in response to amila17)Amila,
Maybe you could attach the diagram, Amos produced, to the introduction at the start of this thread. That should make it easier for people to review.
Thanks.
-
3. Re: NTA Contribution - A REST API to query NTA data
tomjenkinson Apr 11, 2014 5:25 AM (in response to paul.robinson)Also, when we met face-to-face it appeared as though the intention was to replicate the features provided by the current implementation of NTA. Are we agreed that this is the correct path or should we be more ambitious and look to a next-gen version with the features we would like to have?
-
4. Re: NTA Contribution - A REST API to query NTA data
amila17 Apr 11, 2014 5:29 AM (in response to paul.robinson)Hi Paul,
I have attached the DB image as requested. Apiary is the right place to put the comments as its easier to cross check and clarify. I have updated the post to specify that.
However, I did not see the comment you have put in.
I am glad to contribute to this project as its very interesting.
Thanks.
-
5. Re: NTA Contribution - A REST API to query NTA data
paul.robinson Apr 11, 2014 5:29 AM (in response to tomjenkinson)Tom,
I think we just aim for the current feature-set. We can iteratively enhance the UI afterwards.
Paul.
-
6. Re: NTA Contribution - A REST API to query NTA data
tomjenkinson Apr 11, 2014 5:32 AM (in response to amila17)Amila Palahepitiya Gamage wrote:
However, I did not see the comment you have put in.
Same here, I can't see the comment either, do I have to go some different "view"?
-
7. Re: NTA Contribution - A REST API to query NTA data
zhfeng Apr 11, 2014 6:04 AM (in response to tomjenkinson)Tom,
I can see your comment.
-
8. Re: NTA Contribution - A REST API to query NTA data
paul.robinson Apr 27, 2014 1:44 PM (in response to amila17)Amila,
I've commented on the API. Thanks again, it looks good and with my suggested changes I think it would be fine.
However, it would probably be better to simplify it for this version to just offering '/nta/rest/api/v1/transaction' and '/nta/rest/api/v1/transaction/{id}' . The list all transactions API (with pagination, an option for brief results, and a query-by-outcome option) would nicely map onto what is required to make the NTA console's homepage work. The '/nta/rest/api/v1/transaction/{id}' API would then be used on the Transaction detail page to return the details of a particular transaction. If you embed the resource manager and participant record data into the transaction data structure, then you can do this with a single request, thus not having to make multiple calls for each reference.
Paul.
-
9. Re: NTA Contribution - A REST API to query NTA data
paul.robinson Apr 27, 2014 1:46 PM (in response to amila17)Amila,
Apologies for the delay in reviewing this. It's been a busy time with the conference and then I took some Holiday when I returned. I should be a lot more responsive now.
Paul.
-
10. Re: NTA Contribution - A REST API to query NTA data
amila17 Apr 29, 2014 5:56 PM (in response to paul.robinson)Hi Paul,
Thank you for reviewing the API docs and hope u had a great conference.
I have gone through the comments and the feedback. I will do the necessary changes required and in the mean time I have replied to some of the comments. If I come across any doubts will let you know.
I also met with Alex recently and discussed about some ideas that I proposed to him on a Generic DAO layer implementation as the current DAO object handles DB operations to all entities.
Thank You,
Amila
-
11. Re: NTA Contribution - A REST API to query NTA data
mmusgrov Apr 30, 2014 4:56 AM (in response to amila17)The is no documentation of the media types for response bodies.
Also, Paul talked about embedding the resource manager and participant record data into the transaction data structure. This in not the RESTful way of doing things, you should instead embed links to those resources.
-
12. Re: NTA Contribution - A REST API to query NTA data
paul.robinson May 1, 2014 10:35 AM (in response to mmusgrov)Mike,
Ah yes, I agree. I was thinking about limiting requests, but I don't think that is important. It would be more important to follow a cleaner pattern. Does the API as it stands follow good RESTful practices?
Paul.
-
13. Re: NTA Contribution - A REST API to query NTA data
paul.robinson May 1, 2014 10:36 AM (in response to paul.robinson)Amila,
Feel free to refactor the DAO layer if you need to decouple it from the DB logic.
Paul.
-
14. Re: NTA Contribution - A REST API to query NTA data
amila17 May 10, 2014 7:23 AM (in response to paul.robinson)Paul,
Sorry for the late reply, was having some trouble getting RESTEasy 3.0.6 to integrate with CDI. There is a bug which is reported by several users, as a result had to use a lower version of RESTEasy to kickoff the work on the project.
Regarding the transaction data that is returned, I was going to return the data for participant record and resource manager as values. However, this could mean that the exchange of payload is big. Therefore, as Mike has suggested above, I will return the REST links for entities within another.
Coming onto the DAO layer, I would like to have a look into it, but prior to that I will complete the REST API first.
Thank You.