Add a Project Integration

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Adds a project integration..

Security: Requires a valid user

Usage: POST api/v1/projectIntegrations

Produces: application/json

Request Parameters:

Parameter

Type

Description

Required/Optional

projectId

Integer

Id of the Project

Required

name

String

Name for the new integration.

Required

masterIntegrationId

Integer

The Id of the master integration. For more information, see Get all Integrations.

Required

masterIntegrationName

String

The name of the master integration. For more information, see Get all Integrations.

Required

formJSONValues

Array

An array of objects with the values for the integration.

Required

project

Object

An object containing a project name as an alternative to projectId.

The following properties can be set:

  • name

  • key

Optional

propertyBag

Object

Object consisting of integration properties.

Optional

permissions

Object

An object containing allowAllPipelineSources property.

Set allowAllPipelineSources as true to allow all pipeline sources to use the integration.

Example

"permissions": {
    "pipelineSources": {
        "allowAllPipelineSources": true
    }

Optional

environments

Array

An array of the environments to which the integration is to be available.

Optional

isInternal

Boolean

  • Set this as false to create a Pipelines integration. These integrations can be used in pipeline YAML definitions.

  • Set this as true to create an Admin integration. These integrations can be used while creating dynamic node pools , and adding extension and template sources. These integrations cannot be used in pipeline YAML definitions.

    The types of integrations that can be added/managed here are:

    • Cloud service: For creating dynamic nodes in a dynamic node pool. For example, AWS Keys Integration , Google Cloud Integration, Azure Keys Integration , or others.AWS Keys IntegrationGoogle Cloud IntegrationAzure Keys Integration

      Dynamic nodes are build nodes that are spun up and down on-demand by Pipelines from a cloud service. They are managed through dynamic node pools.

    • Kubernetes Integration: For creating dynamic nodes in a dynamic node pool.Kubernetes Integration

    • Source control: For Pipelines extensibility source repositories. For example, GitHub Integration , Bitbucket Integration or others.GitHub IntegrationBitbucket Integration

Optional

Sample Request:

GitHub Integration

curl -L -X POST 'https://pipe-master.jfrog-pipelines.com/pipelines/api/v1/projectIntegrations' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
--data-raw '{
    "name": "myGithub",
    "projectId": 1,
    "masterIntegrationId": 20,
    "masterIntegrationName": "github",
    "formJSONValues": [
        {
            "label": "token",
            "value": "********"
        },
        {
            "label": "url",
            "value": "https://api.github.com"
        }
    ],
    "permissions": {
        "pipelineSources": {
            "allowAllPipelineSources": true
        }
    }
}'

Sample Response:

{
    "propertyBag": {},
    "permissions": {},
    "isInternal": false,
    "id": 39,
    "name": "myGithub",
    "projectId": 1,
    "masterIntegrationName": "github",
    "masterIntegrationType": "scm",
    "masterIntegrationId": 20,
    "createdByUserName": "admin",
    "updatedByUserName": "admin",
    "createdBy": 3,
    "updatedBy": 3,
    "providerId": 2,
    "updatedAt": "2021-04-30T09:50:32.585Z",
    "createdAt": "2021-04-30T09:50:32.585Z",
    "environments": null,
    "formJSONValues": [
        {
            "label": "token",
            "value": "********"
        },
        {
            "label": "url",
            "value": "https://api.github.com"
        }
    ]
}

Response Codes:

200: Success