https://developer.adobe.com/workfront/api-explorer/
I'm trying to create a POST request for the "BudgetedHour (BGHR)" request
I'm having trouble figuring out how to properly format the body request or if I'm missing any additional steps. In my screenshot below I'm just using dummy data to get the request working successfully. The error its giving currently is "The operation failed with an error. [422] allocationDate cannot be null".
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
The issue is around encoding. The Body is just a text string. It doesn't auto-encode JSON. If you want JSON, you need to use something like a "Create JSON" or "Transform to JSON" module ahead of time. Otherwise, try something like this in the body:
{
"allocationDate": "{{formatDate({{now}};YYYY-MM-DDTHH:mm:ssZ;UTC)}}",
"ID": "12345"
}
Views
Replies
Total Likes
I tried updating the request based on your response but still receiving the same error.
Views
Replies
Total Likes
Change to formatDate(now; YYYY-MM-DD).
Views
Replies
Total Likes
Thanks for the suggestions! Still receiving an error regarding parameters used
The operation failed with an error. [422] Invalid Parameter: updates value "{ "allocationDate": "2023-08-08", "budgetedHours": 0, "plannedBudgetedHours": 0.000004, "projectID": "636947bf001be965ae14b1167f0452de", "roleID": "589b913f004177007e21a68fc51e641f", "userID": "5865311301e3b4412776839b39e9de32"},JSON parsing error at line 1, column 3"
Views
Replies
Total Likes
Not entirely sure, TBH. I suggest you do a bghr/search call, get one of the response bodies, and use that as a template for pushing. That's what I did, and it worked (as per my screenshots above).
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies