Git for Confluence Cloud
  • Git for Confluence Cloud
  • Release notes
    • August 6th, 2024
    • June 5 2024
    • June 7th, 2023
    • March 14th, 2023
    • October 20th, 2022
    • October 3rd, 2022
    • August 30, 2022
    • August 8th, 2022
    • July 25th, 2022
    • July 20th, 2022
    • June 30th, 2022
  • Installation
    • Installation
  • Git Support
    • Git providers
    • Filetypes
    • Demo Confluence pages
    • Demo videos
  • How to use the app
    • Share Git file macro
    • Share Git folder macro
    • Authorization
    • Shared Git files overview
    • Troubleshooting
  • Administration
    • Authentication methods
    • Migration of consent
    • User management
    • Audit log
  • Example use cases
    • Software architecture document
    • Public documentation
  • Security
    • F.A.Q.
    • OAuth scopes and API endpoints
      • Github OAuth scopes
      • Bitbucket OAuth scopes
      • Gitlab OAuth scopes
      • Azure DevOps OAuth scopes
    • Access token scopes and API endpoints
      • Github access token scopes
      • Bitbucket access token scopes
      • Gitlab access token scopes
      • Azure DevOps access token scopes
  • Relevant Links
    • Pricing
    • Privacy & Security
    • Marketplace
    • Support
    • Visualizer for Confluence
Powered by GitBook
On this page
  • API endpoints
  • Retrieve contents of a file from a repository
  • Retrieve contents of a folder from a repository
  • Downloading contents from a repository
  • Retrieve repository information
  • Verify access token
  1. Security
  2. Access token scopes and API endpoints

Gitlab access token scopes

Required scopes and used endpoints when connecting to Gitlab.

PreviousBitbucket access token scopesNextAzure DevOps access token scopes

Last updated 1 year ago

You can find documentation about creating access tokens here:

Git for Confluence requests the following scopes:

  • read_api

  • read_repository

API endpoints

These are the endpoints that are being called with a token.

Retrieve contents of a file from a repository

This endpoint is being used to retrieve the content of a file so that we can display it on a Confluence page for you. The content of this file is not being saved on the servers of Git for Confluence. This means that every time a file is being viewed on a Confluence page, we will have to retrieve it using this endpoint.

Retrieve contents of a folder from a repository

This endpoint is being used to retrieve the contents of a folder so that we can display it on a Confluence page for you. The content of this folder is not being saved on the servers of Git for Confluence. This means that every time a folder is being viewed on a Confluence page, we will have to retrieve it using this endpoint.

GraphQL queries

To retrieve all the required information of the git content in a folder Git for Confluence uses the following GraphQL queries.

{
    project {
        repository {
            tree {
                blobs
                trees
            }
        }
    }
}
{
    project {
        repository {
            blobs
        }
    }
}

Downloading contents from a repository

This endpoint is being used to generate a zip archive from a folder so you can download it from a Confluence page. This archive is not being saved on the server of Git for Confluence. This means that every time a folder is downloaded we will have to retrieve it using this endpoint.

Retrieve repository information

Sometimes an error can occur when retrieving a file from Gitlab. Gitlab tells us that the file can not be found if it does not exist, or if you do not have access to the file. Yet we would like to let you know what the actual problem is.

We use this endpoint to check if the repository exists, if that is the case we assume that the file does not exist and show that to you in the UI.

If we can not find the repository, we assume that you do not have access to the file that you are trying to share.

Verify access token

When configuring an access token for Gitlab, we use this endpoint to verify if the correct scopes have been enabled for this token.

https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token
Repository files API | GitLab
Repositories API | GitLab
Logo
Repositories API | GitLab
Logo
Projects API | GitLab
Personal access tokens API | GitLab
Logo
Logo
Logo