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".
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
조회 수
답글
좋아요 수
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"
}
조회 수
답글
좋아요 수
I tried updating the request based on your response but still receiving the same error.
조회 수
답글
좋아요 수
Change to formatDate(now; YYYY-MM-DD).
조회 수
답글
좋아요 수
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"
조회 수
답글
좋아요 수
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).
조회 수
답글
좋아요 수