We are trying to consume the APi architectApi.postArchitectSchedules, for this i have code snippet to set the body as input to this API and getting and error 400 bad request
var body = {
"name": "customer12x1x2",
"start": "2020-03-17T11:00:00.000",
"end": "2020-03-17T21:00:00.000",
"rrule": "FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=17"
};
return architectApi.postArchitectSchedules({body1});
Error :- 1. body: {message: "[Request body must not be null]", code: "constraint.validation", status: 400}
2. error: Error: Bad Request at h.
Request sent : var body = {
"name":"customeredited13245a",
"start": "2020-03-17T11:00:00.000",
"end": "2020-03-17T21:00:00.000",
};
alert("calling the method");
The correlation ID doesn't show anything other than the error about not sending a body.
Especially since it works in one place and not the other, it seems likely that there's an error in your code somewhere. Also, make sure you're using the latest version of the SDK so the methods it offers match the current state of the API itself and the SDK documentation.
thank you for that suggestion, it worked, i was using older version of SDK, now updated my code to refer the latest version and it worked. you saved my day, thank you so much