Im trying to access Time Report via Upwork GraphQL API using this query:
query {
timeReport(filter: { organizationId_eq: "12345679", timeReportDate_bt: { rangeStart: "2023-11-01", rangeEnd: "2023-11-02" } }) {
dateWorkedOn
task
taskDescription
totalHoursWorked
}
}
Upwork returns me an error: "2023-11-01 date could not be parsed".
I already tried different date and datetime formats, YYYY-MM-DD, MM/DD/YYYY, ISO, Unix timestamp - every time error message is the same, it can't parse the date.
Upworks' documentation isn't helpfull at all:
{
"rangeStart": "xyz789",
"rangeEnd": "xyz789"
}
Can someone suggest, which date format is expected by Upwork GraphQL API?
After a week of waiting, I got an answer from Upwork support on my ticket:
a format that has been used internally is "20231214" (without dashes).
I tested it, and it works. Overall, Upwork GraphQL API documentation is incomplete and outdated. Much more useful is their GraphQL Explorer tool which allows you to view schema and test your requests.