custom REST API endpoints for WS 11.3.1

Dear all,

What are the steps to develop custom REST API endpoints for WS 11.3.1 ?

Many thanks for your help.

Best regards,

Laurent

Parents
  • Are you referring to use the REST endpoints that SDL has provided? Or, are you instead meaning to create your own app that has its own REST endpoints?
  • Dear Eric,

    SDL has provided some REST endpoints in v1 but our requirements are not fulfilled by those.

    We need to know if its possible to develop our own REST endpoints for WS 11.3. If yes, we would need sample java code, which SDL is unable to provide at this stage.

    Many thanks for your help.

    Best regards,

    Laurent
  • I understand. Our organization actually had a similar issue years ago with even the SOAP api. Our solution was to leverage the existing tomcat service to serve up our own WEBAPP on the server. This is what i think you would need to do to achieve what you are looking to do. You'd have to become familiar with creating you own webapp in tomcat though. You may want to consider using the SOAP client SDK if it has the functions you are looking for if possible as it would not require the webapp approach below. If you do pursue the webapp approach, i do not think it is something that SDL would officially support in any way. However, once your webapp is on the server, you can leverage the full server-side SDK to perform any functions you want and create your own REST call front-end to obfuscate them.

    As a tip if you go with this approach, use the %WS_HOME% environment variable and the general.properties file in that location to collect the needed properties for your WEBAPP. This makes it so that you don't have to duplicate configuration files. What we did was use that and then created an additional folder in %WS_HOME% for our webapp that then had it's webapp specific general.properties config file.

    Essentially, we mimicked what SDL did (in actuality, we had done this before they did) when they themselves started serving multiple webapps in 11.x (ws, ws-legacy, ws-api).

    Hope this helps.
Reply
  • I understand. Our organization actually had a similar issue years ago with even the SOAP api. Our solution was to leverage the existing tomcat service to serve up our own WEBAPP on the server. This is what i think you would need to do to achieve what you are looking to do. You'd have to become familiar with creating you own webapp in tomcat though. You may want to consider using the SOAP client SDK if it has the functions you are looking for if possible as it would not require the webapp approach below. If you do pursue the webapp approach, i do not think it is something that SDL would officially support in any way. However, once your webapp is on the server, you can leverage the full server-side SDK to perform any functions you want and create your own REST call front-end to obfuscate them.

    As a tip if you go with this approach, use the %WS_HOME% environment variable and the general.properties file in that location to collect the needed properties for your WEBAPP. This makes it so that you don't have to duplicate configuration files. What we did was use that and then created an additional folder in %WS_HOME% for our webapp that then had it's webapp specific general.properties config file.

    Essentially, we mimicked what SDL did (in actuality, we had done this before they did) when they themselves started serving multiple webapps in 11.x (ws, ws-legacy, ws-api).

    Hope this helps.
Children