Hi Tim, 

Thanks for your answer

It turned out easier than i thought. It was enough to copy one of 
controllers (i think i 
took 
dspace-server-webapp/src/main/java/org/dspace/app/rest/CommunityAdminGroupRestController.java
 
because it's small and it contains working authentication) into an own 
controller, modify classname and mappings and it became callable right 
away; after that it's indeed all spring REST

I'm still uncertain about the converter service and the way to put the 
results into ResponseEntity<RepresentationModel<?>> but it's the minor 
issue 

On Thursday 3 October 2024 at 17:28:06 UTC+1 DSpace Technical Support wrote:

Hi,

At this time, we do not have a detailed guide for REST API development.  
However, we do have endpoint & design documentation in our REST Contract at 
https://github.com/DSpace/RestContract/blob/main/README.md   A key section 
to be aware of is that the new REST API aligns & uses Spring Technologies: 
https://github.com/DSpace/RestContract/blob/main/README.md#spring-technology-alignment.
  
 This means that if you use guides for how to build REST APIs in Spring 
(using those technologies), those will help you better understand how the 
new DSpace REST API works.

Unfortunately, the reality is that the older DSpace 6 REST API had to be 
entirely rebuilt.  There is no easy way to migrate that old code into the 
new REST API, as the new REST API is a complete redesign in order to better 
align with REST best practices & Spring best practices.  The older v6 REST 
API provided basic functionality, but didn't align with those best 
practices... which is why move code from that older API to the newer one is 
not a simple task.

If you have more specific questions, you are welcome to ask them on this 
list or on the dspace-devel mailing list. 

Tim

On Thursday, September 26, 2024 at 6:52:39 AM UTC-5 [email protected] wrote:

Hi I'm migrating my 6.4 Dspace to 8 and i have a number of REST services 
implemented in dspace-rest in 6.4

Documentation of Dspace 8 mandates all REST services to migrate to the new 
REST API but it does not give any useful directions on how to; hence my 
question - 

is there any new REST API documentation for developers who need to develop 
new REST services? 

I tried so far to copy & compile some classes 
from /dspace-server-webapp/src/main/java/org/dspace/app/rest/model/ but for 
no effect so far. I can see services declared 
in dspace/config/spring/api/core-services.xml so maybe this is the way to 
go but again, maybe there's a better way to create own services other that 
modifying core; i can see classes implementing @GetMapping but so far i'm 
failing to properly call them

Thanks

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/ad12614a-7280-47f6-b350-7c4d3a034ae6n%40googlegroups.com.

Reply via email to