Skip to main content
POST
/
api
/
v2
/
secret-scanning
/
data-sources
/
gitlab
cURL
curl --request POST \
  --url https://us.infisical.com/api/v2/secret-scanning/data-sources/gitlab \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "projectId": "<string>",
  "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "config": {
    "scope": "group",
    "groupId": 123,
    "groupName": "<string>",
    "includeProjects": [
      "*"
    ]
  },
  "description": "<string>",
  "isAutoScanEnabled": true
}
'
{
  "dataSource": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "projectId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "type": "gitlab",
    "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "connection": {
      "app": "gitlab",
      "name": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    },
    "config": {
      "scope": "group",
      "groupId": 123,
      "groupName": "<string>",
      "includeProjects": [
        "*"
      ]
    },
    "externalId": "<string>",
    "description": "<string>",
    "encryptedCredentials": "<unknown>",
    "isAutoScanEnabled": true,
    "isDisconnected": false
  }
}

Body

application/json
name
string
required

The name of the GitLab Data Source to create. Must be slug-friendly.

Required string length: 1 - 64
projectId
string
required

The ID of the project to create the GitLab Data Source in.

Minimum string length: 1
connectionId
string<uuid>
required

The ID of the GitLab Connection to use for this Data Source.

config
object
required
  • Option 1
  • Option 2
description
string | null

An optional description for the GitLab Data Source.

Maximum string length: 256
isAutoScanEnabled
boolean
default:true

Whether scans should be automatically performed when a push occurs to projects associated with this Data Source.

Response

Default Response

dataSource
GitLab · object
required