Gitlip API (1.0.0)

Download OpenAPI specification:Download

This is the documentation for Gitlip API generated from OpenAPI spec.

Authentication

Gitlip offers two forms of authentication:

(1) Firestore ID token - this token is generated each time user signs into the web interface. It can be extracted with the use of browser devtools.

(2) Personal access token - this token can be generated in /settings page of the web interface.

Either of the above tokens can be supplied via the Authorization header for the API calls that require it. Some API endpoints don't require the token and they're therefore considered public.

me

Manage and access data of the currently signed in user

Get user ID

Get user ID for the current user.

Authorizations:
Firebase ID tokenPersonal access token

Responses

Response samples

Content type
application/json
{
  • "userId": "oNXepgrT8aYr8duUDKnLvlZw8Si2"
}

Get username

Get username for the current user.

Authorizations:
Firebase ID tokenPersonal access token

Responses

Response samples

Content type
application/json
{
  • "username": "userfoo"
}

Update username

Update username for the current user.

Authorizations:
Firebase ID tokenPersonal access token
Request Body schema: application/json
username
required
string

Username for the user

Responses

Request samples

Content type
application/json
{
  • "username": "userfoo"
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Delete username

Delete username for the current user.

Authorizations:
Firebase ID tokenPersonal access token

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get user profile

Get the profile for the current user.

Authorizations:
Firebase ID tokenPersonal access token

Responses

Response samples

Content type
application/json
{
  • "fullName": "John"
}

Update user profile

Updates the fields in the profile for the current user. Omitted fields are removed.

Authorizations:
Firebase ID tokenPersonal access token
Request Body schema: application/json
fullName
string

Full name of the user

Responses

Request samples

Content type
application/json
{
  • "fullName": "John"
}

Response samples

Content type
application/json
{
  • "fullName": "John"
}

Get user editor settings

Get the editor settings for the current user.

Authorizations:
Firebase ID tokenPersonal access token

Responses

Response samples

Content type
application/json
{
  • "highlightDesktop": true,
  • "highlightMobile": false,
  • "keymapsEnabledDesktop": true,
  • "lineNumbersDesktop": true,
  • "lineNumbersMobile": false
}

Update user editor settings

Updates the fields in the editor settings for the current user. Omitted fields are removed.

Authorizations:
Firebase ID tokenPersonal access token
Request Body schema: application/json
highlightDesktop
boolean

Syntax highlighting in the editor on desktop devices

highlightMobile
boolean

Syntax highlighting in the editor on mobile devices

keymapsEnabledDesktop
boolean

Keyboard shortcuts in the editor on mobile devices

lineNumbersDesktop
boolean

Line numbers shown in the editor on mobile devices

lineNumbersMobile
boolean

Line numbers shown in the editor on mobile devices

Responses

Request samples

Content type
application/json
{
  • "highlightDesktop": true,
  • "highlightMobile": false,
  • "keymapsEnabledDesktop": true,
  • "lineNumbersDesktop": true,
  • "lineNumbersMobile": false
}

Response samples

Content type
application/json
{
  • "highlightDesktop": true,
  • "highlightMobile": false,
  • "keymapsEnabledDesktop": true,
  • "lineNumbersDesktop": true,
  • "lineNumbersMobile": false
}

Get user email

Get the email for the current user.

Authorizations:
Firebase ID tokenPersonal access token

Responses

Response samples

Content type
application/json
{
  • "email": "john.doe@example.com"
}

Update user email

Updates the email for the current user. Note that the active login sessions with the old email are invalidated immediately.

Authorizations:
Firebase ID tokenPersonal access token
Request Body schema: application/json
email
required
string

User email

Responses

Request samples

Content type
application/json
{
  • "email": "john.doe@example.com"
}

Response samples

Content type
application/json
{
  • "email": "john.doe@example.com"
}

Get user avatar

Get avatar for the current user.

Authorizations:
Firebase ID tokenPersonal access token

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Update user avatar

Update the avatar for the current user. Any existing avatar is overwritten. Avatar needs to be smaller than 1 MB and in any for the following formats: gif, jpg, png .

Authorizations:
Firebase ID tokenPersonal access token
Request Body schema: application/octet-stream
string <binary>

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Delete user avatar

Delete avatar for the current user.

Authorizations:
Firebase ID tokenPersonal access token

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

List user tokens

List all Personal access tokens for the current user.

Authorizations:
Firebase ID tokenPersonal access token
query Parameters
orderBy
string
Default: "createdAt"
Enum: "createdAt" "label" "tokenId"

Field by which the results are ordered

direction
string
Default: "desc"
Enum: "asc" "desc"

Direction in which the results are ordered

startAt
string

Value of orderBy field to start listing at. It has to be an ISO timestamp if orderBy is "createdAt"

startAfter
string

Value of orderBy field to start listing after. It has to be an ISO timestamp if orderBy is "createdAt"

endAt
string

Value of orderBy field to end listing at. It has to be an ISO timestamp if orderBy is "createdAt"

endAfter
string

Value of orderBy field to end listing after. It has to be an ISO timestamp if orderBy is "createdAt"

limit
integer [ 1 .. 100 ]
Default: 10

Limits the number of results returned

Responses

Response samples

Content type
application/json
{
  • "tokens": [
    ]
}

Create a new token

Create a new personal access token that can subsequently be used to authenticate with the API.

Authorizations:
Firebase ID tokenPersonal access token
Request Body schema: application/json
label
string

Helpful metadata for token

Responses

Request samples

Content type
application/json
{
  • "label": "Token used in CI"
}

Response samples

Content type
application/json
{
  • "tokenId": "Tb2mM9zE1HbhSLhKFLhD",
  • "label": "Token used in CI",
  • "createdAt": "2023-01-03T16:14:55.312Z",
  • "secretValue": "2jrR/oz+UQ3HF5RMlt4pSSQc8FHEXv4HLtdMiRdxYZ2njsyQib2wCmNZUguMmQwh2g2mQjklWDOwkoyajFq6rA=="
}

Delete token

Delete token identified with token ID.

Authorizations:
Firebase ID tokenPersonal access token
path Parameters
tokenId
required
string

The ID of the token to be to be deleted.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

List user repos

List all repos for the current user.

Authorizations:
Firebase ID tokenPersonal access token
query Parameters
orderBy
string
Default: "createdAt"
Enum: "createdAt" "updatedAt"

Field by which the results are ordered

direction
string
Default: "desc"
Enum: "asc" "desc"

Direction in which the results are ordered

startAt
string

Value of orderBy field to start listing at. It has to be an ISO timestamp if orderBy is "createdAt" or "updatedAt"

startAfter
string

Value of orderBy field to start listing after. It has to be an ISO timestamp if orderBy is "createdAt" or "updatedAt"

endAt
string

Value of orderBy field to end listing at. It has to be an ISO timestamp if orderBy is "createdAt" or "updatedAt"

endAfter
string

Value of orderBy field to end listing after. It has to be an ISO timestamp if orderBy is "createdAt" or "updatedAt"

limit
integer [ 1 .. 100 ]
Default: 10

Limits the number of results returned

Responses

Response samples

Content type
application/json
{
  • "repos": [
    ]
}

Create a new repo

Create a new git repo.

Authorizations:
Firebase ID tokenPersonal access token
Request Body schema: application/json
name
string

Name of the repository

description
string

Description of the repository

type
string

Type of the repo

visibility
string

Visibility

featuredFiles
Array of strings

Featured files

Responses

Request samples

Content type
application/json
{
  • "name": "repo-foo",
  • "description": "This repo is cool",
  • "type": "regular",
  • "visibility": "private",
  • "featuredFiles": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "repo-foo",
  • "description": "This repo is cool",
  • "type": "regular",
  • "visibility": "private",
  • "featuredFiles": [
    ],
  • "updatedAt": "2023-01-03T16:14:55.312Z"
}

Get repo

Get information about the repo.

Authorizations:
Firebase ID tokenPersonal access token
path Parameters
repoName
required
string

Name of the repo

Responses

Response samples

Content type
application/json
{
  • "name": "repo-foo",
  • "description": "This repo is cool",
  • "type": "regular",
  • "visibility": "private",
  • "featuredFiles": [
    ],
  • "createdAt": "2023-01-03T16:14:55.312Z",
  • "updatedAt": "2023-01-03T16:14:55.312Z"
}

Delete repo

Delete all metadata and storage for the repo.

Authorizations:
Firebase ID tokenPersonal access token
path Parameters
repoName
required
string

Name of the repo

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Update repo

Update repo metadata.

Authorizations:
Firebase ID tokenPersonal access token
path Parameters
repoName
required
string

Name of the repo

Request Body schema: application/json
name
string

Name of the repository

description
string

Description of the repository

type
string

Type of the repo

visibility
string

Visibility

featuredFiles
Array of strings

Featured files

Responses

Request samples

Content type
application/json
{
  • "name": "repo-foo",
  • "description": "This repo is cool",
  • "type": "regular",
  • "visibility": "private",
  • "featuredFiles": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "repo-foo",
  • "description": "This repo is cool",
  • "type": "regular",
  • "visibility": "private",
  • "featuredFiles": [
    ],
  • "createdAt": "2023-01-03T16:14:55.312Z",
  • "updatedAt": "2023-01-03T16:14:55.312Z"
}

user

Access data from other users

Get username by user ID

Retrieve the username for the user identified by the ID.

path Parameters
userId
required
string

The ID for the user to be to be fetched.

Responses

Response samples

Content type
application/json
{
  • "username": "userfoo"
}

Get user ID by username

Retrieve the user ID for the user identified by username.

path Parameters
username
required
string

The name for the user to be to be fetched.

Responses

Response samples

Content type
application/json
{
  • "userId": "oNXepgrT8aYr8duUDKnLvlZw8Si2"
}

Get user profile by ID

Retrieve the profile for the user identified by ID.

path Parameters
userId
required
string

The ID for the user to be to be fetched.

Responses

Response samples

Content type
application/json
{
  • "fullName": "John"
}

Get user profile by username

Retrieve the profile for the user identified by username.

path Parameters
username
required
string

The name for the user to be to be fetched.

Responses

Response samples

Content type
application/json
{
  • "fullName": "John"
}

Get user avatar by ID

Retrieve the avatar for the user identified by ID.

path Parameters
userId
required
string

The ID for the user to be to be fetched.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get user avatar by username

Retrieve the avatar for the user identified by username.

path Parameters
username
required
string

The name for the user to be to be fetched.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get user avatar by email

Retrieve the avatar for the user identified by email.

path Parameters
email
required
string

The base64 encoded email of the user to be to be fetched.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

User ID

userId
required
string

User ID for the user

{
  • "userId": "oNXepgrT8aYr8duUDKnLvlZw8Si2"
}

Username

username
required
string

Username for the user

{
  • "username": "userfoo"
}

User Profile

fullName
string

Full name of the user

{
  • "fullName": "John"
}

User Editor Settings

highlightDesktop
boolean

Syntax highlighting in the editor on desktop devices

highlightMobile
boolean

Syntax highlighting in the editor on mobile devices

keymapsEnabledDesktop
boolean

Keyboard shortcuts in the editor on mobile devices

lineNumbersDesktop
boolean

Line numbers shown in the editor on mobile devices

lineNumbersMobile
boolean

Line numbers shown in the editor on mobile devices

{
  • "highlightDesktop": true,
  • "highlightMobile": false,
  • "keymapsEnabledDesktop": true,
  • "lineNumbersDesktop": true,
  • "lineNumbersMobile": false
}

User Email

email
required
string

User email

{
  • "email": "john.doe@example.com"
}

User Token

tokenId
string

Token identifier

label
string

Helpful metadata for token

{
  • "tokenId": "Tb2mM9zE1HbhSLhKFLhD",
  • "label": "Token used in CI"
}