Digital Assistant and Mobile

Get Involved. Join the Conversation.

Comments

  • Tom Ware

    The issue we found relates to new endpoints, so it sounds like it matches what you are seeing.

  • Tom Ware

    This is the official set of workarounds:

    1. Create new version of the API from MCS UI. Newly created version will have all the changes in RT.
    2. Export RAML and create new API from it. Newly created API will have all the changes in RT.
    3. Deploy API to staging/prod environment. In new environment the API will have all the changes in RT.

    The downside of each workaround is that it has to be performed every time between edit->test stages.

    For #1, in your UI under "APIs" select your API, click the "More" button and pick "Update Version Number."

    We expect to have a more permanent solution for this in the next few days.

  • Anand Raj

    Hi 3272021 ,

    For me also existing endpoints are working fine . Newly added not working , giving 404 error

  • Anand Raj

    Hi ,
    Thanks for your reply .

    1. Your reply is about how to update the js file with the new endoints , right ? We are following the same way as mentioned by you .

            The issue comes when adding a new endpoint to an already working api .
            Please find an example using your code .

            The given endpoint (test/foo) is added during the api creation , it works perfectly fine .

            module.exports = function(service) {

                service.get('/mobile/custom/test/foo', function(req,res) {

                var result = {};

                var statusCode = 200;

                res.status(statusCode).send(result);

                });

            };

              Issues comes when we add a new endpoint to the same api ( test/bar as the new endpoint ) In this case only test/foo will work and test/bar will           generate 404 Api not found error .

              <code>

                service.get('/mobile/custom/test/foo', function(req,res) {

                         var result = {};

                         var statusCode = 200;

                         res.status(statusCode).send(result);

                });

                service.get('/mobile/custom/test/bar', function(req,res) { // New end point

                         var result = {};

                         var statusCode = 200;

                         res.status(statusCode).send(result);

                });

              </code>

    2. Also tried using changing the version in package.json file . Its also not resolved my issue .

  • Tom Ware

    I have recreated the problem.  We are working on a solution.  IN the meantime, you can workaround by updating the version of the API.

  • Tom Ware

    This is currently not resolved.  'waiting on input from OTVian.

    I suggest either posting a separate thread about your issue in case it is different, or watching this one for a resolution.

  • Bhargavi Chodisetti

    Hi,

    I am facing same issue, don't see any code mistake. Can you tell how did you resolve the issue.

    Existing method is working fine, newly added are not recognized. Simple method without parameters also not working.

    Thanks

  • Tom Ware

    The scaffold is intended as a starting point.

    When you generate a scaffold, it will generate code that will service the API you created as it exists when you generate the scaffold.  If you add resources/endpoints to your api, you don't necessarily have to regenerate the scaffold, but if you don't you will have to add the code to service the endpoints manually.

    Imagine you start with an API called test with a GET resource called foo.  The scaffold would have code like this (unimportant parts deleted):

    <code>

    module.exports = function(service) {

      service.get('/mobile/custom/test/foo', function(req,res) {

      var result = {};

      var statusCode = 200;

      res.status(statusCode).send(result);

      });

    };

    </code>

    Now imagine you add 2 new resource, a POST to foo, and a GET to BAR.  You now how the option of regenerating the scaffold, or simply manually adding the necessary code to service the new endpoints.  You would need these two blocks:

    <code>

      service.post('/mobile/custom/test/foo', function(req,res) {

          var result = {};

          var statusCode = 201;

          res.status(statusCode).send(result);

      });

      service.get('/mobile/custom/test/bar', function(req,res) {

          var result = {};

          var statusCode = 200;

        res.status(statusCode).send(result);

      });

    </code>

    Notice how the way the endpoint is service is composed.  We see service.<httpVerb>(<endpointLocatoin>, function(req, res){ ........

    Given the information above, take a look at the zip file you uploaded that causes the problem.  Do you see the necessary code blocks in there? 

  • Anand Raj

    Thanks for your reply .
    Sorry to hear that my question is not clear to you .

    Your Question

    ------------------

    Are you saying that you have an API that worked prior to the upgrade and some part of it stopped working after the upgrade --- No

    or are you saying that you had an api that worked before the upgrade and the changes you have made after the upgrade are not working for you?--Yes (endpoints that i added yesterday means after the upgrade is not working)

    From my side

    ------------------

    1. Start with a working API -- Success
    2. Navigate to endpoints and add a new resource-- Success
    3. . Add the http method to the resource-- Success
    4. save and download the zip file-- Success
    5. uploaded the zip file after writing the api logic-- Success
    6. then i added some other endpoints -- Success
    7. uploaded the zipfile that downloaded previously with the logic for the newly added endpoints-- Success
    8. When i test the newly added api i am getting 404 Api not found error .

    My doubt is "whether i have to download the zip file from the custom api implemetation after each time when an endpoint is added ?" . Currently what i did is modified the previously downloaded zip file and uploaded to MCS

    NB:

    I have tried to download the scaffold rather than modify the alredy downloaded zip file each time when a new endpoint is added.

  • Tom Ware

    It is not clear to me exactly what issue you are seeing.

    Are you saying that you have an API that worked prior to the upgrade and some part of it stopped working after the upgrade or are you saying that you had an api that worked before the upgrade and the changes you have made after the upgrade are not working for you?

    I have tried the following on my local instance with success.  Please tell me what is different

    1. Start with a working API

    2. Navigate to endpoints and add a new resource

    3. Add the GET method to the resource

    4. Save

    5. Generate the scaffold

    6. Examine the scaffold and see the new resource in all the relevant files

    7. Upload the scaffold as my implementation

    8. Test the new GET resource

  • Jason Stortz

    Great, thanks for the clarification Chris!

  • Chris Muir

    MAX push notification support is on the radar (with usual safe habor disclaimers), but is currently not supported.

    CM.

  • Anand Raj

    Thanks for your quick reply ... We are planning to build CHATBOTS using MCS once it is out.

  • Grant Ronald

    Chatbots is a feature that we've been working on which we're planning on bringing under the mobile cloud umbrella of services.  Its not out just yet although we are working on training internally for this.  You can follow me @gwronald or @OracleMobile on twitter for more up and coming information about this.  You may also see us talking about it in up and coming events.  Some more details you may want are here

    https://www.linkedin.com/pulse/chatbots-rising-learning-from-oracles-suhuas-unliyar-kevin-benedict

    Generally speaking the chatbot will be able to leverage the APIs you develop in MCS, and will support language processing, connecting to channels such as Facebook Messenger etc.

    Hope this helps

    Grant Ronald

    Director of Mobile and Intelligent Bots Product Management

  • Chris Muir

    Understood but you need to answer my explicit question.  Are the roles mentioned actually in your selected roles?

    By the by I'm not able to give you further support on this on these forums, can you please lodge an SR with Oracle Support so they can work with you to resolve this.

    CM.