Skip to Content
0

WebI RESTful SDK : 500 server error when updating an element

Oct 27, 2016 at 06:51 PM

148

avatar image

I am attempting to update an element via the RESTful SDK (or actually, just simply PUT back the definition of an element I've just successfully created), and I have an internal server error with the API:

PUT /biprws/raylight/v1/documents/173703/reports/537/elements/781

1) I haven't been able to get any more details from the server logs, despite clicking "Show error stack" in the WACS server properties in the CMC. So I'm at a loss...

2) The error is undoubtedly hidden somewhere in the following JSON. Alas, I haven't been able to narrow down where, precisely, but I was hoping someone might be able to see more clearly than I can. It should be noted that very similar JSON was used to successfully create the element; I then use a GET to retrieve the full definition after creation and without changing anything (except what was inadvertently changed during the POJO/JSON back and forth) send the same thing back as a PUT.

{
  "element" : {
    "id" : 781,
    "parentId" : 521,
    "name" : "TAB_REEL",
    "reference" : "8P.CD",
    "content" : {
      "axes" : {
        "axis" : [ {
          "expressions" : {
            "formula" : [ {
              "@dataType" : "String",
              "$" : "=[Libellé Dimension 1]"
            } ]
          },
          "@role" : "Row"
        }, {
          "expressions" : {
            "formula" : [ {
              "@dataType" : "Date",
              "$" : "=[Mois + année période de calcul]"
            } ]
          },
          "@role" : "Column"
        }, {
          "expressions" : {
            "formula" : [ {
              "@dataType" : "Numeric",
              "$" : "=[Measure 1 (Somme)]"
            } ]
          },
          "@role" : "Body"
        } ],
        "@duplicateRowAggregation" : "true"
      },
      "layout" : {
        "zone" : [ {
          "child" : [ {
            "@row" : 0,
            "@rowSpan" : 1,
            "@column" : 0,
            "@columnSpan" : 1,
            "@id" : 773
          } ],
          "@horizontalType" : "Body",
          "@verticalType" : "Body"
        }, {
          "child" : [ {
            "@row" : 0,
            "@rowSpan" : 1,
            "@column" : 0,
            "@columnSpan" : 1,
            "@id" : 775
          } ],
          "@horizontalType" : "Body",
          "@verticalType" : "Header"
        }, {
          "child" : [ {
            "@row" : 0,
            "@rowSpan" : 1,
            "@column" : 0,
            "@columnSpan" : 1,
            "@id" : 777
          } ],
          "@horizontalType" : "Header",
          "@verticalType" : "Body"
        }, {
          "child" : [ {
            "@row" : 0,
            "@rowSpan" : 1,
            "@column" : 0,
            "@columnSpan" : 1,
            "@id" : 779
          } ],
          "@horizontalType" : "Header",
          "@verticalType" : "Header"
        } ],
        "@showHeader" : "true",
        "@showFooter" : "false"
      }
    },
    "position" : {
      "@newVerticalPage" : "false",
      "@oneVerticalPage" : "false",
      "@repeatOnEveryVerticalPage" : "false",
      "@newHorizontalPage" : "false",
      "@oneHorizontalPage" : "false",
      "@verticalAnchorType" : "None",
      "@horizontalAnchorType" : "None",
      "@y" : "1.0",
      "@x" : "1.0"
    },
    "hide" : {
      "@always" : "false",
      "@whenEmpty" : "false"
    },
    "style" : {
      "border" : {
        "top" : {
          "@thickness" : "None",
          "@rgb" : "#dddddf",
          "@style" : "Plain"
        },
        "bottom" : {
          "@thickness" : "None",
          "@rgb" : "#dddddf",
          "@style" : "Plain"
        },
        "left" : {
          "@thickness" : "None",
          "@rgb" : "#dddddf",
          "@style" : "Plain"
        },
        "right" : {
          "@thickness" : "None",
          "@rgb" : "#dddddf",
          "@style" : "Plain"
        }
      },
      "background" : {
        "@width" : "0.0",
        "@height" : "0.0"
      },
      "alternateColor" : {
        "@frequency" : "2",
        "@rgb" : "#ff0000"
      }
    },
    "@type" : "XTable"
  }
}
10 |10000 characters needed characters left characters exceeded

Hi Emily,

What version are you using?

GET /raylight/v1/about

Dan

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Eric FESTINGER
Oct 28, 2016 at 06:06 AM
0

hi Emily

"except what was inadvertently changed during the POJO/JSON back and forth": may you please show the differences between what you intially sent to create the element, and what you received through the GET?

Thanks,

eric

Share
10 |10000 characters needed characters left characters exceeded
Anthony MULLER
Nov 09, 2016 at 02:56 PM
0

Emily,

Do you still have an error?

Regards,

Anthony

Share
10 |10000 characters needed characters left characters exceeded
Anthony MULLER
Nov 25, 2016 at 08:15 AM
0

Emily,

Do you still need support?

Regards,

Anthony

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Anthony, thanks for your response; I thought I had updated this thread but it turns out I never submitted the new comment. Issue is solved. :)

0
Emily Sergent Dec 01, 2016 at 08:13 AM
0

Hi Eric,

I found the error... it turns out that I was inadvertently reading and transforming a string value to an integer inadvertently, and then sending it back without double quotes. Thanks for the help!

Emily

Share
10 |10000 characters needed characters left characters exceeded