timelogs
Gets or lists a timelogs resource.
Overview​
| Name | timelogs |
| Type | Resource |
| Id | gitlab.issues.timelogs |
Fields​
The following fields are returned by SELECT queries:
- list
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
id | string | Internal ID of the timelog. |
project | object | Project identity (id, full_path, name) |
spent_at | string | Timestamp of when the time tracked was spent at. |
summary | string | Summary of how the time was spent. |
time_spent | integer | Time spent displayed in seconds. |
user | object | UserCore identity (id, username, name) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | host | end_date, end_time, group_id, project_id, sort, start_date, start_time, username | Find timelogs visible to the current user. Generated from the GitLab GraphQL schema field Query.timelogs (connection of Timelog nodes). |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
host | string | GitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST) |
end_date | string | List timelogs within a date range where the logged date is equal to or before endDate. |
end_time | string | List timelogs within a time range where the logged time is equal to or before endTime. |
group_id | string | List timelogs for a group. |
project_id | string | List timelogs for a project. |
sort | string | List timelogs in a particular order. |
start_date | string | List timelogs within a date range where the logged date is equal to or after startDate. |
start_time | string | List timelogs within a time range where the logged time is equal to or after startTime. |
username | string | List timelogs for a user. |
SELECT examples​
- list
Find timelogs visible to the current user. Generated from the GitLab GraphQL schema field Query.timelogs (connection of Timelog nodes).
SELECT
id,
project,
spent_at,
summary,
time_spent,
user
FROM gitlab.issues.timelogs
WHERE host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND end_date = '{{ end_date }}'
AND end_time = '{{ end_time }}'
AND group_id = '{{ group_id }}'
AND project_id = '{{ project_id }}'
AND sort = '{{ sort }}'
AND start_date = '{{ start_date }}'
AND start_time = '{{ start_time }}'
AND username = '{{ username }}'
;