2 Replies Latest reply on May 22, 2015 4:04 PM by jwalker

    Anyone seen the v3 rest api return invalid message ids for a discussion thread?

    jwalker

      When obtaining most recent discussions for a place, I sometimes get message ids that are completely invalid. 

       

      Has anyone seen this before?

       

      Take this example for instance:

       

      curl  --insecure --user FredJones:password  "http://server.localhost.com/api/core/v3/contents?filter=place(http://server.localhost.com/api/core/v3/places/110082)&sort=latestActivityDesc&count=1"
      

       

      throw 'allowIllegalResourceCall is false.';
      {
        "itemsPerPage" : 1,
        "links" : {
          "next" : "http://server.localhost.com/api/core/v3/contents?sort=latestActivityDesc&fields=%40all&filter=place%28http%3A//server.localhost.com/api/core/v3/places/110082%29&abridged=false&count=1&startIndex=1"
        },
        "list" : [ {
          "id" : "44636",
          "resources" : {
            "outcomeTypes" : {
              "allowed" : [ "GET" ],
              "ref" : "http://server.localhost.com/api/core/v3/contents/170720/outcomeTypes"
            },
            "extprops" : {
              "allowed" : [ "GET" ],
              "ref" : "http://server.localhost.com/api/core/v3/contents/170720/extprops"
            },
            "outcomes" : {
              "allowed" : [ "GET", "POST" ],
              "ref" : "http://server.localhost.com/api/core/v3/contents/170720/outcomes"
            },
            "followers" : {
              "allowed" : [ "GET" ],
              "ref" : "http://server.localhost.com/api/core/v3/contents/170720/followers"
            },
            "likes" : {
              "allowed" : [ "GET", "POST" ],
              "ref" : "http://server.localhost.com/api/core/v3/contents/170720/likes"
            },
            "read" : {
              "allowed" : [ "POST", "DELETE" ],
              "ref" : "http://server.localhost.com/api/core/v3/contents/170720/read"
            },
            "self" : {
              "allowed" : [ "GET" ],
              "ref" : "http://server.localhost.com/api/core/v3/contents/170720"
            },
            "html" : {
              "allowed" : [ "GET" ],
              "ref" : "http://server.localhost.com/thread/44636"
            },
            "childOutcomeTypes" : {
              "allowed" : [ "GET" ],
              "ref" : "http://server.localhost.com/api/core/v3/contents/170720/childOutcomeTypes"
            },
            "attachments" : {
              "allowed" : [ "GET" ],
              "ref" : "http://server.localhost.com/api/core/v3/attachments/contents/170720"
            },
            "followingIn" : {
              "allowed" : [ "GET", "POST" ],
              "ref" : "http://server.localhost.com/api/core/v3/contents/170720/followingIn"
            },
            "messages" : {
              "allowed" : [ "GET", "POST" ],
              "ref" : "http://server.localhost.com/api/core/v3/messages/contents/170720"
            }
          },
          "question" : true,
          "type" : "discussion"
        } ],
        "startIndex" : 0
      

       

      Grabbing the 'self' from the above json, I tried a rest call against the self and here is the results:

       

      curl --insecure --user FredJones:password  "http://server.localhost.com/api/core/v3/contents/170720"
      

       

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
      <html><head>                                                                                              
      <title>404 Not Found</title>                                                                              
      </head><body>                                                                                             
      <h1>Not Found</h1>                                                                                        
      <p>The requested URL /api/core/v3/contents/170720 was not found on this server.</p>                       
      </body></html>