Skip to content

Commit 0a22f76

Browse files
authored
Update Get endpoint response headers.js
1 parent b0fe6cf commit 0a22f76

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Get endpoint response headers.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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
23
// Endpoint Url: https://" + siteName + ".teamwork.com/projects/api/v2/time.json
34
const myHeaders = new Headers();
45
const userName = "email address or API KEY here";
@@ -16,7 +17,7 @@ const requestOptions = {
1617
};
1718

1819
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"
2021
const response = await fetch(latestActivityUrl, requestOptions)
2122
//console.log(response.headers) // Remove commenting at the start of this console log to get a full list of response headers for the endpoint
2223
console.log("\nHeaders - Page and rate limit info")

0 commit comments

Comments
 (0)