curl --request POST \
--url https://us.infisical.com/api/v1/secret-syncs/gitlab \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"projectId": "<string>",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "<string>",
"secretPath": "<string>",
"syncOptions": {
"initialSyncBehavior": "overwrite-destination",
"keySchema": "<string>",
"disableSecretDeletion": true
},
"destinationConfig": {
"scope": "project",
"projectId": "<string>",
"projectName": "<string>",
"targetEnvironment": "*",
"shouldProtectSecrets": false,
"shouldMaskSecrets": false,
"shouldHideSecrets": false
},
"description": "<string>",
"isAutoSyncEnabled": true
}
'{
"secretSync": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"projectId": "<string>",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"syncOptions": {
"initialSyncBehavior": "overwrite-destination",
"keySchema": "<string>",
"disableSecretDeletion": true
},
"connection": {
"app": "gitlab",
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"environment": {
"slug": "<string>",
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"folder": {
"id": "<string>",
"path": "<string>"
},
"destination": "gitlab",
"destinationConfig": {
"scope": "project",
"projectId": "<string>",
"projectName": "<string>",
"targetEnvironment": "*",
"shouldProtectSecrets": false,
"shouldMaskSecrets": false,
"shouldHideSecrets": false
},
"description": "<string>",
"isAutoSyncEnabled": true,
"version": 1,
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"syncStatus": "<string>",
"lastSyncJobId": "<string>",
"lastSyncMessage": "<string>",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"importStatus": "<string>",
"lastImportJobId": "<string>",
"lastImportMessage": "<string>",
"lastImportedAt": "2023-11-07T05:31:56Z",
"removeStatus": "<string>",
"lastRemoveJobId": "<string>",
"lastRemoveMessage": "<string>",
"lastRemovedAt": "2023-11-07T05:31:56Z"
}
}Create a GitLab Sync for the specified project environment.
curl --request POST \
--url https://us.infisical.com/api/v1/secret-syncs/gitlab \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"projectId": "<string>",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "<string>",
"secretPath": "<string>",
"syncOptions": {
"initialSyncBehavior": "overwrite-destination",
"keySchema": "<string>",
"disableSecretDeletion": true
},
"destinationConfig": {
"scope": "project",
"projectId": "<string>",
"projectName": "<string>",
"targetEnvironment": "*",
"shouldProtectSecrets": false,
"shouldMaskSecrets": false,
"shouldHideSecrets": false
},
"description": "<string>",
"isAutoSyncEnabled": true
}
'{
"secretSync": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"projectId": "<string>",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"syncOptions": {
"initialSyncBehavior": "overwrite-destination",
"keySchema": "<string>",
"disableSecretDeletion": true
},
"connection": {
"app": "gitlab",
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"environment": {
"slug": "<string>",
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"folder": {
"id": "<string>",
"path": "<string>"
},
"destination": "gitlab",
"destinationConfig": {
"scope": "project",
"projectId": "<string>",
"projectName": "<string>",
"targetEnvironment": "*",
"shouldProtectSecrets": false,
"shouldMaskSecrets": false,
"shouldHideSecrets": false
},
"description": "<string>",
"isAutoSyncEnabled": true,
"version": 1,
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"syncStatus": "<string>",
"lastSyncJobId": "<string>",
"lastSyncMessage": "<string>",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"importStatus": "<string>",
"lastImportJobId": "<string>",
"lastImportMessage": "<string>",
"lastImportedAt": "2023-11-07T05:31:56Z",
"removeStatus": "<string>",
"lastRemoveJobId": "<string>",
"lastRemoveMessage": "<string>",
"lastRemovedAt": "2023-11-07T05:31:56Z"
}
}The name of the GitLab Sync to create. Must be slug-friendly.
1 - 64The ID of the project to create the sync in.
1The ID of the GitLab Connection to use for syncing.
The slug of the project environment to sync secrets from.
1 - 64The folder path to sync secrets from.
1Optional parameters to modify how secrets are synced.
Show child attributes
Specify how Infisical should resolve the initial sync to the GitLab destination.
overwrite-destination Specify the format to use for structuring secret keys in the GitLab destination.
Enable this flag to prevent removal of secrets from the GitLab destination when syncing.
Show child attributes
The GitLab scope that secrets should be synced to. (default: project)
project The GitLab Project ID to sync secrets to.
1The GitLab Project Name to sync secrets to.
1The GitLab environment scope that secrets should be synced to. (default: *)
Whether variables should be protected
Whether variables should be masked in logs
Whether variables should be hidden
An optional description for the GitLab Sync.
256Whether secrets should be automatically synced when changes occur at the source location or not.
Default Response
Show child attributes
Optional parameters to modify how secrets are synced.
Show child attributes
Specify how Infisical should resolve the initial sync to the GitLab destination.
overwrite-destination Specify the format to use for structuring secret keys in the GitLab destination.
Enable this flag to prevent removal of secrets from the GitLab destination when syncing.
gitlab Show child attributes
The GitLab scope that secrets should be synced to. (default: project)
project The GitLab Project ID to sync secrets to.
1The GitLab Project Name to sync secrets to.
1The GitLab environment scope that secrets should be synced to. (default: *)
Whether variables should be protected
Whether variables should be masked in logs
Whether variables should be hidden
Was this page helpful?