HTML into API REST

HTML into API REST

Hi,

I am trying to create request within SDP using REST API but I am having difficulties.

When I enter the description textually I have no problems. However, when I enter the description in HTML code it shows an error message indicating that the account cannot be found.

Query:

  1. data={
  2.     "operation": {
  3.         "details": {
  4.             "description": "<style type=\"text/css\">table{border-collapse: collapse;border:0;width:100%,background-color:#e0e0e0}center{ width:100%}.td_header_1{padding: 20px 0px;background-color: #1e1e34;width: 20%;text-align: center}.td_header_2{ padding: 20px 0px;font-size: 15px; color: #ffffff;background-color: #1e1e34;width: 80%;height: 20px;text-align: center}.logo{ margin: auto;width: 159px;height: 50px; padding-left: 15px}</style><table><tbody> <tr> <td> <center> <table> <tbody> <tr> <td class=\"td_header_1\"> <img class=\"logo\" src=\"\"> </td> <td class=\"td_header_2\"> Text </td> </tr> </tbody> </table> </center> </td> </tr> </tbody> </table>",
  5.             "technician:":"Johan",
  6.             "requester": "test",
  7.             "account": "Account",
  8.             "subject": "Testing API",
  9.             "requesttemplate": "Default Request",
  10.             "site": "Common Site"
  11.         }
  12.     }
  13. }
Response:
  1. {
  2.     "operation": {
  3.         "result": {
  4.             "message": "Mandatory element 'account' not found",
  5.             "status": "Failed"
  6.         }
  7.     }
  8. }

I hope your help.

Thanks.

                  New to ADSelfService Plus?