Created
August 20, 2024 14:24
-
-
Save alejoasotelo/89933bf89c7139a775147709cb7e812c to your computer and use it in GitHub Desktop.
Toggl HTTP API v9 for Rest Client VS Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@apiToken = | |
@baseURL = https://api.track.toggl.com/api/v9/ | |
@workspaceId = {{workspaces.response.body.$[0].id}} | |
// Busca un workspace id por su nombre. Cambiar MY_NAME por el name de tu workspace | |
@projectIdByName = {{projects_by_workspace.response.body.$[?(@.name == 'MY_NAME')].id}} | |
### | |
# @name me | |
GET {{baseURL}}me HTTP/1.1 | |
Authorization: Basic {{apiToken}}:api_token | |
Content-Type: application/json | |
### | |
# @name workspaces | |
GET {{baseURL}}workspaces HTTP/1.1 | |
Authorization: Basic {{apiToken}}:api_token | |
Content-Type: application/json | |
### | |
# @name projects_by_workspace | |
GET {{baseURL}}workspaces/{{workspaceId}}/projects HTTP/1.1 | |
Authorization: Basic {{apiToken}}:api_token | |
Content-Type: application/json | |
### | |
# @name project_by_workspace | |
GET {{baseURL}}workspaces/{{workspaceId}}/projects/{{projectIdByName}} HTTP/1.1 | |
Authorization: Basic {{apiToken}}:api_token | |
Content-Type: application/json | |
### | |
# @name me_time_entries | |
GET {{baseURL}}me/time_entries?start_date=2024-07-01&end_date=2024-08-01&meta=true&include_sharing=true HTTP/1.1 | |
Authorization: Basic {{apiToken}}:api_token | |
Content-Type: application/json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment