0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
3 commentaires
Avatar
Stephanie Westbrook

Hi Marco, thanks so much for reaching out, I just wanted to let you know that I'm moving this post to our API section and one of our API gurus is going to take a look! 

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
Avatar
Pavel M

Hi Marco! From the first look it seems like your parameters are not recognized by Wrike for some reason. What tool are you using for your calls? Could you please make sure parameters are url-encoded and not passed in JSON body, for instance?

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Hi Pavel,

I'm facing the same issue when trying to extract the time log for a certain period through Python code it gives me the time log before that date entry and in Postman it will give entries of that date along with entries of the date after.

Postman "https://www.wrike.com/api/v4/timelogs?trackedDate={"start":"2024-03-12"}&trackedDate={"end":"2024-03-12"}"
This gives me the time log entries from 2024-03-12 to 2024-03-14.

Python code:
with open('access_token.txt', 'r') as file:

    ACCESS_TOKEN = file.read().strip()

HEADERS = {
    'Authorization': f'Bearer {ACCESS_TOKEN}',
    #'Content-Type': 'application/json',
}

def get_timelog():
    params = {
        'trackedDate': '{"start":"2024-03-13"}',
        'trackedDate': '{"end":"2024-03-13"}'
    }
    response = requests.get(endpoint, headers=HEADERS, params=params)

This gives me all the time log entries before 2024-03-12.

Thanks


0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Folllowing List for Post: Get timelogs by account returns me wrong dates
[this list is visible for admins and agents only]

Haut de la page
Didn’t find what you were looking for? Write new post