File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
- // This code sample is an example of some of the response headers data that is available with the V2 time entries endpoint.
1
+ // This code sample is an example of some of the response headers data that is available with the V2 time entries endpoint
2
+ // Response filtered to a date range - format of dates: yyyymmdd
2
3
// Endpoint Url: https://" + siteName + ".teamwork.com/projects/api/v2/time.json
3
4
const myHeaders = new Headers ( ) ;
4
5
const userName = "email address or API KEY here" ;
@@ -16,7 +17,7 @@ const requestOptions = {
16
17
} ;
17
18
18
19
async function fetcHeaders ( ) {
19
- let latestActivityUrl = "https://" + siteName + ".teamwork.com/projects/api/v2/time.json?page=" + page + "&pageSize=50&getTotals=true&projectId=&companyId=0&userId=&assignedTeamIds=&invoicedType=all&billableType=all&fromDate=&toDate=&sortBy=date&sortOrder=asc&onlyStarredProjects=false&includeArchivedProjects=false&matchAllTags=true&projectStatus=all"
20
+ let latestActivityUrl = "https://" + siteName + ".teamwork.com/projects/api/v2/time.json?page=" + page + "&pageSize=50&getTotals=true&projectId=&companyId=0&userId=&assignedTeamIds=&invoicedType=all&billableType=all&fromDate=20240701 &toDate=20240731 &sortBy=date&sortOrder=asc&onlyStarredProjects=false&includeArchivedProjects=false&matchAllTags=true&projectStatus=all"
20
21
const response = await fetch ( latestActivityUrl , requestOptions )
21
22
//console.log(response.headers) // Remove commenting at the start of this console log to get a full list of response headers for the endpoint
22
23
console . log ( "\nHeaders - Page and rate limit info" )
You can’t perform that action at this time.
0 commit comments