The json payload for a custom rule action that Asana sends to my app server appears to be malformed. The documentation shows it to be one way but the actual json I receive is very different.
This is what I’m getting.
{"data":"{\"workspace\":number,\"project\":number,\"target_object\":number,\"action_type\":\"string\",\"action\":\"string\",\"user\":number,\"idempotency_key\":\"string\",\"expires_at\":\"2023-01-12T15:27:13.793Z\"}"}
And this is what the docs say I should be getting.
{
"action": "string",
"action_type": "string",
"expires_at": "2019-04-15T01:01:46.055Z",
"idempotency_key": "string",
"target_object": "string",
"user": "54321",
"workspace": "12345"
}
Three things to note:
- The json I’m receiving is encapsulated in a “data” property whereas the docs example is not.
- The value of the “data” property is a string rather than additional json key/value pairs.
- The values for workspace, project, and target_object are represented as numbers instead of strings.
The rule that creates this json payload has a trigger of task due date being set. I checked a couple other trigger types and they produce the same unexpected behavior.
Is there something I can change on my end that would fix this, or am I overlooking something more obvious?