convert the interface numeric wrikeID to the API wrike ID

how to convert the numeric wrike id of a task to a wrike id for the api?

i do not want to crawl of search and program a whole framework just to get the wrike id

as i see it now i need to do a search and then fetch the id.. is there not a converting formula for the numeric id?

1 Kommentar
Spot On Innovative Approach Stellar Advice

i found the solution with the permalink field.

snippit to resolve the task id by the old permalink id in powershell

$v2wrikeid = xxxxxxx
$wriketaskData = Invoke-RestMethod -uri$v2wrikeid -Headers @{'Authorization' = ' bearer '+$accessToken} -Method get
echo $wrikeID


here i share some quick and dirty code to add an time entry to a task for a whole year every workday in powershell


#create wrike time entries for every workday for a whole year
# uncomment the $output line to actually do it, first test the print out

$accessToken = "yourv4token"
# the permalinkid
$v2wrikeid = XXXXXX

$wriketaskData = Invoke-RestMethod -uri$v2wrikeid -Headers @{'Authorization' = ' bearer '+$accessToken} -Method get

#Print week

$we = [System.DayOfWeek]::Saturday, [System.DayOfWeek]::Sunday

$date = Get-Date -Year $beginyear -Month $beginmonth -Day 1

for ($i=$beginmonth; $i -le 12; $i++)

$date = Get-Date -Year $beginyear -Month $i -Day 1

$lastDay = [DateTime]::DaysInMonth($date.Year, $date.Month)
$firstDate = [DateTime]::new($date.Year, $date.Month, 1)
$lastDate = [DateTime]::new($date.Year, $date.Month, $lastDay)

$workdays = 0

while ($now -le $lastDate){

$now = $now.AddDays(1)

if ($now.DayOfWeek -notin $we ) {

$payload = 'hours=0.5&trackedDate=' + ($now).Tostring("yyyy-MM-dd") + '&comment=' + ($now).Tostring("yyyy-MM-dd") + ': time entry subject |'
#uncomment to actually output, test it manually first before you loop.
##$output = Invoke-RestMethod -uri$wrikeID/timelogs -Headers @{'Authorization' = ' bearer '+$accessToken} -Method Post -body $payload
Remove-Variable payload





Folllowing List for Post: convert the interface numeric wrikeID to the API wrike ID
[this list is visible for admins and agents only]

Nach oben
Didn’t find what you were looking for? Write new post