HTTP Method Content format

booher04
Tera Guru

Having some trouble getting the correct format on the content section for a REST HTTP Method.  Trying to send data to MS Dynamics CRM, everything is correct with the end point and headers.  The issue is the format they are receiving the data.  The format they requested is attached.  I have done multiple of these for an Ansible POST however, this one is not working when setup the same.  I've tried multiple ways and here is the last:

{
"entity": "Note",
"message": "Create",
"description": "${description}",
"caseid": "${caseid}",
"ritm": "${ritm}"
}

 

I've also tried to use just { "lc_payload": "${content}" }.  The format didn't send correctly either. ANY help on this would  be greatly appreciated. 

7 REPLIES 7

Anil Lande
Kilo Patron

Hi,

can you please share what response is getting generated as per your current configuration?

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

{"error":{"code":"0x80048d19","message":"Error identified in Payload provided by the user for Entity :'', For more information on this error please follow this help link https://go.microsoft.com/fwlink/?linkid=2195293  ---->  InnerException : Microsoft.OData.ODataException: The parameter 'entity' in the request payload is not a valid parameter for the operation 'lc_crmsnow_inbound_customapi'.\r\n   at Microsoft.OData.ODataParameterReaderCore.GetParameterTypeReference(String parameterName)\r\n   at Microsoft.OData.JsonLight.ODataJsonLightParameterDeserializer.<>c__DisplayClass3_0.<ReadNextParameter>b__0(PropertyParsingResult propertyParsingResult, String parameterName)\r\n   at Microsoft.OData.JsonLight.ODataJsonLightDeserializer.ProcessProperty(PropertyAndAnnotationCollector propertyAndAnnotationCollector, Func`2 readPropertyAnnotationValue, Action`2 handleProperty)\r\n   at Microsoft.OData.JsonLight.ODataJsonLightParameterDeserializer.ReadNextParameter(PropertyAndAnnotationCollector propertyAndAnnotationCollector)\r\n   at Microsoft.OData.ODataParameterReaderCore.ReadImplementation()\r\n   at Microsoft.OData.ODataParameterReaderCore.InterceptException[T](Func`1 action)\r\n   at Microsoft.Crm.Extensibility.ODataV4.CrmODataActionPayloadDeserializer.Read(ODataMessageReader messageReader, Type type, ODataDeserializerContext readContext)\r\n   at System.Web.OData.Formatter.ODataMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger)."}}

Hi,

Please use the name of all of your properties as per the given JSON Schema. It is case sensitive 

You can try below:

 

{
"Entity": "Note",
"Message": "Create",

"Title":"Add your title here",
"Description": "${description}",
"CaseId": "${caseid}",
"RITM": "${ritm}"
}

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Anil - when I do this, I get the same error message when I use the "Test" related list link on the HTTP Method.