# GitLab

## Snapshot

<table><thead><tr><th width="425">Features</th><th>Details</th></tr></thead><tbody><tr><td>Release Status</td><td>Released</td></tr><tr><td>Source API Version</td><td>V4</td></tr><tr><td>Table Selection</td><td>Yes</td></tr><tr><td>Column Selection</td><td>Yes</td></tr><tr><td>Edit Integration</td><td>Yes</td></tr><tr><td>Replication Type Selection</td><td>No</td></tr><tr><td>Authentication Parameters</td><td>GitLab Company Name<br>GitLab API Key</td></tr><tr><td>Replication Type</td><td>Full Replication<br>Key Based Incremental</td></tr><tr><td>Replication Key</td><td>Date</td></tr><tr><td>Suggested Replication Frequency</td><td>1 hour</td></tr></tbody></table>

## Tables/APIs supported

<table data-header-hidden><thead><tr><th width="380">Tables/APIs Supported</th><th></th></tr></thead><tbody><tr><td>Projects</td><td>Groups</td></tr><tr><td>Epics</td><td>Project Milestones</td></tr><tr><td>Group Milestones</td><td>Releases</td></tr><tr><td>Tags</td><td>Todos</td></tr><tr><td>Issues</td><td>Comments</td></tr><tr><td>Commits</td><td>Merge Requests</td></tr><tr><td>Branches</td><td>Users</td></tr></tbody></table>

## Integrate GitLab with Daton

1. Sign in to Daton&#x20;
2. Select GitLab from the list of Integrations&#x20;
3. Provide Integration Name, Replication Frequency, and History. Integration name would be used in creating tables for the integration and cannot be changed later&#x20;
4. Provide your GitLab company name and API Key
5. Post successful authentication, you will be prompted to choose from the list of available tables
6. Then select all required fields for each table
7. Submit the integration

## Workflow

1. Integrations would be in Pending state initially and will be moved to Active state as soon as the first job loads data successfully on to the configured warehouse
2. Users would be able to edit/pause/re-activate/delete integration anytime
3. Users can view job status and process logs from the integration details page by clicking on the integration name from the active list

## GitLab Data

### Projects

Purpose: This API is used to fetch all the projects in your  GitLab Account

Source API Documentation: <https://docs.gitlab.com/ee/api/projects.html>

Replication: Key Based Incremental

Replication Key: last\_activity\_after, last\_activity\_before

**Fields**

| Name                  | Data Type |
| --------------------- | --------- |
| id                    | NUMERIC   |
| description           | STRING    |
| name                  | STRING    |
| name\_with\_namespace | STRING    |
| path                  | STRING    |
| path\_with\_namespace | STRING    |
| created\_at           | TIMESTAMP |
| default\_branch       | STRING    |
| tag\_list             | STRING    |
| topics                | STRING    |
| ssh\_url\_to\_repo    | STRING    |
| http\_url\_to\_repo   | STRING    |
| web\_url              | STRING    |
| readme\_url           | STRING    |
| avatar\_url           | STRING    |
| forks\_count          | NUMERIC   |
| star\_count           | NUMERIC   |
| last\_activity\_at    | TIMESTAMP |
| namespace             | RECORD    |

### Groups

Purpose: This API is used to fetch all the groups

Source API Documentation: <https://docs.gitlab.com/ee/api/groups.html>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name                                 | Data Type |
| ------------------------------------ | --------- |
| id                                   | NUMERIC   |
| name                                 | STRING    |
| path                                 | STRING    |
| description                          | STRING    |
| visibility                           | STRING    |
| share\_with\_group\_lock             | BOOLEAN   |
| require\_two\_factor\_authentication | BOOLEAN   |
| two\_factor\_grace\_period           | NUMERIC   |
| project\_creation\_level             | STRING    |
| subgroup\_creation\_level            | STRING    |
| lfs\_enabled                         | BOOLEAN   |
| default\_branch\_protection          | NUMERIC   |
| avatar\_url                          | STRING    |
| web\_url                             | STRING    |
| request\_access\_enabled             | BOOLEAN   |
| full\_name                           | STRING    |
| full\_path                           | STRING    |
| file\_template\_project\_id          | NUMERIC   |
| created\_at                          | TIMESTAMP |

### Epics (GitLab Premium Users Only)

Purpose: This API is used to fetch all the Epics under the groups. This is available only to GitLab Premium Self-managed, GitLab Premium SaaS and higher tiers

Source API Documentation: <https://docs.gitlab.com/ee/api/epics.html>

Replication: Key Based Incremental

Replication Key: updated\_after, updated\_before

**Fields**

| Name                               | Data Type |
| ---------------------------------- | --------- |
| id                                 | NUMERIC   |
| iid                                | NUMERIC   |
| group\_id                          | NUMERIC   |
| parent\_id                         | NUMERIC   |
| parent\_iid                        | NUMERIC   |
| title                              | STRING    |
| description                        | STRING    |
| state                              | STRING    |
| confidential                       | STRING    |
| web\_url                           | STRING    |
| reference                          | STRING    |
| references                         | RECORD    |
| author                             | RECORD    |
| start\_date\_is\_fixed             | BOOLEAN   |
| end\_date                          | DATE      |
| due\_date                          | DATE      |
| due\_date\_is\_fixed               | BOOLEAN   |
| due\_date\_from\_milestones        | DATE      |
| due\_date\_from\_inherited\_source | DATE      |
| created\_at                        | TIMESTAMP |
| updated\_at                        | TIMESTAMP |
| closed\_at                         | TIMESTAMP |
| upvotes                            | NUMERIC   |
| downvotes                          | NUMERIC   |
| color                              | STRING    |
| \_links                            | RECORD    |

### Project Milestones

Purpose: This API is used to fetch the milestones of all the projects

Source API Documentation: <https://docs.gitlab.com/ee/api/milestones.html>

Replication: Key Based Incremental

Replication Key: last\_activity\_after, last\_activity\_before

**Fields**

| Name        | Data Type |
| ----------- | --------- |
| id          | NUMERIC   |
| iid         | NUMERIC   |
| project\_id | NUMERIC   |
| title       | STRING    |
| description | STRING    |
| due\_date   | DATE      |
| start\_date | DATE      |
| state       | STRING    |
| updated\_at | TIMESTAMP |
| created\_at | TIMESTAMP |
| expired     | BOOLEAN   |

### Group Milestones

Purpose: This API is used to fetch milestones of all the groups

Source API Documentation: <https://docs.gitlab.com/ee/api/group_milestones.html>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name        | Data Type |
| ----------- | --------- |
| id          | NUMERIC   |
| iid         | NUMERIC   |
| group\_id   | NUMERIC   |
| title       | STRING    |
| description | STRING    |
| due\_date   | DATE      |
| start\_date | DATE      |
| state       | STRING    |
| updated\_at | TIMESTAMP |
| created\_at | TIMESTAMP |
| expired     | BOOLEAN   |
| web\_url    | STRING    |

### Releases

Purpose: This API is used to fetch the releases project wise

Source API Documentation: <https://docs.gitlab.com/ee/api/releases/>

Replication: Key Based Incremental

Replication Key: last\_activity\_after, last\_activity\_before

**Fields**

| Name         | Data Type |
| ------------ | --------- |
| tag\_name    | STRING    |
| description  | STRING    |
| name         | STRING    |
| created\_at  | TIMESTAMP |
| released\_at | TIMESTAMP |
| author       | RECORD    |
| commit       | RECORD    |
| milestones   | RECORD    |
| commit\_path | STRING    |
| tag\_path    | STRING    |
| assets       | RECORD    |
| evidences    | RECORD    |

### Tags

Purpose: This API is used to get a list of repository tags from a project

Source API Documentation: <https://docs.gitlab.com/ee/api/tags.html>

Replication: Key Based Incremental

Replication Key:  last\_activity\_after, last\_activity\_before

**Fields**

| Name        | Data Type |
| ----------- | --------- |
| commit      | RECORD    |
| release     | RECORD    |
| name        | STRING    |
| target      | STRING    |
| protected   | BOOLEAN   |
| project\_id | STRING    |

### Todos

Purpose: This API is used to fetch all to-dos that are done and pending

Source API Documentation: <https://docs.gitlab.com/ee/api/todos.html>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name         | Data Type |
| ------------ | --------- |
| id           | NUMERIC   |
| project      | RECORD    |
| author       | RECORD    |
| action\_name | STRING    |
| target\_type | STRING    |
| target       | RECORD    |
| target\_url  | STRING    |
| body         | STRING    |
| state        | STRING    |
| created\_at  | TIMESTAMP |
| updated\_at  | TIMESTAMP |

### Issues

Purpose: This API is used to fetch all the issues in the account

Source API Documentation: <https://docs.gitlab.com/ee/api/issues.html>&#x20;

Replication: Key Based Incremental

Replication Key: updated\_after, updated\_before

**Fields**

| Name                     | Data Type |
| ------------------------ | --------- |
| state                    | STRING    |
| description              | STRING    |
| author                   | RECORD    |
| milestone                | RECORD    |
| project\_id              | NUMERIC   |
| assignees                | RECORD    |
| assignee                 | RECORD    |
| type                     | STRING    |
| updated\_at              | TIMESTAMP |
| id                       | NUMERIC   |
| title                    | STRING    |
| created\_at              | TIMESTAMP |
| iid                      | NUMERIC   |
| labels                   | STRING    |
| upvotes                  | NUMERIC   |
| downvotes                | NUMERIC   |
| merge\_requests\_count   | NUMERIC   |
| user\_notes\_count       | NUMERIC   |
| due\_date                | DATE      |
| web\_url                 | STRING    |
| references               | RECORD    |
| time\_stats              | RECORD    |
| has\_tasks               | BOOLEAN   |
| task\_status             | STRING    |
| confidential             | BOOLEAN   |
| discussion\_locked       | BOOLEAN   |
| issue\_type              | STRING    |
| severity                 | STRING    |
| \_links                  | RECORD    |
| task\_completion\_status | RECORD    |

### Comments

Purpose: This API is used to fetch all comments in issues, epics, snippets and merge requests

Source API Documentation: <https://docs.gitlab.com/ee/api/notes.html>

Replication: Key Based Incremental

Replication Key: updated\_after, updated\_before

**Fields**

| Name           | Data Type |
| -------------- | --------- |
| id             | NUMERIC   |
| body           | STRING    |
| author         | RECORD    |
| created\_at    | TIMESTAMP |
| updated\_at    | TIMESTAMP |
| system         | BOOLEAN   |
| noteable\_id   | NUMERIC   |
| noteable\_type | STRING    |
| noteable\_iid  | NUMERIC   |
| resolvable     | BOOLEAN   |
| confidential   | BOOLEAN   |
| internal       | BOOLEAN   |

### Commits

Purpose: This API is used to fetch the commits made in all the projects. In commit responses, created\_at and commited\_date are identical.

Source API Documentation: <https://docs.gitlab.com/ee/api/commits.html>

Replication: Key Based Incremental

Replication Key: since, until

**Fields**

| Name             | Data Type |
| ---------------- | --------- |
| id               | STRING    |
| short\_id        | STRING    |
| title            | STRING    |
| author\_name     | STRING    |
| author\_email    | STRING    |
| authored\_date   | TIMESTAMP |
| committer\_name  | STRING    |
| committer\_email | STRING    |
| committed\_date  | TIMESTAMP |
| created\_at      | TIMESTAMP |
| message          | STRING    |
| parent\_ids      | STRING    |
| web\_url         | STRING    |
| project\_id      | STRING    |

### Merge Requests

Purpose: This API is used to fetch all the merge requests made by all users

Source API Documentation: <https://docs.gitlab.com/ee/api/merge_requests.html>

Replication: Key Based Incremental

Replication Key: updated\_after, updated\_before

**Fields**

| Name                            | Data Type |
| ------------------------------- | --------- |
| id                              | NUMERIC   |
| iid                             | NUMERIC   |
| project\_id                     | NUMERIC   |
| title                           | STRING    |
| description                     | STRING    |
| state                           | STRING    |
| merged\_by                      | RECORD    |
| merge\_user                     | RECORD    |
| merged\_at                      | TIMESTAMP |
| created\_at                     | TIMESTAMP |
| updated\_at                     | TIMESTAMP |
| target\_branch                  | STRING    |
| source\_branch                  | STRING    |
| upvotes                         | NUMERIC   |
| downvotes                       | NUMERIC   |
| author                          | RECORD    |
| assignee                        | RECORD    |
| assignees                       | RECORD    |
| reviewers                       | RECORD    |
| source\_project\_id             | NUMERIC   |
| target\_project\_id             | NUMERIC   |
| labels                          | STRING    |
| draft                           | BOOLEAN   |
| work\_in\_progress              | BOOLEAN   |
| milestone                       | RECORD    |
| merge\_when\_pipeline\_succeeds | BOOLEAN   |
| merge\_status                   | STRING    |
| detailed\_merge\_status         | STRING    |
| sha                             | STRING    |
| user\_notes\_count              | NUMERIC   |
| should\_remove\_source\_branch  | BOOLEAN   |
| force\_remove\_source\_branch   | BOOLEAN   |
| allow\_collaboration            | BOOLEAN   |
| allow\_maintainer\_to\_push     | BOOLEAN   |
| web\_url                        | STRING    |
| references                      | RECORD    |
| time\_stats                     | RECORD    |
| squash                          | BOOLEAN   |
| task\_completion\_status        | RECORD    |

### Branches

Purpose: This API is used to fetch branches under all projects

Source API Documentation: <https://docs.gitlab.com/ee/api/branches.html>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name                   | Data Type |
| ---------------------- | --------- |
| name                   | STRING    |
| merged                 | BOOLEAN   |
| protected              | BOOLEAN   |
| default                | BOOLEAN   |
| developers\_can\_push  | BOOLEAN   |
| developers\_can\_merge | BOOLEAN   |
| can\_push              | BOOLEAN   |
| web\_url               | STRING    |
| commit                 | RECORD    |
| project\_id            | STRING    |

### **Users**

Purpose: This API is used to fetch all users

Source API Documentation: <https://docs.gitlab.com/ee/api/users.html>&#x20;

Replication: Full Replication

Replication Key: NA

**Fields**

| Name        | Data Type |
| ----------- | --------- |
| id          | NUMERIC   |
| username    | STRING    |
| name        | STRING    |
| state       | STRING    |
| avatar\_url | STRING    |
| web\_url    | STRING    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://daton-sarasanalytics.gitbook.io/daton/integrations/data-sources/productivity-trackers/gitlab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
