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 |
---|---|---|---|
| Integer | Id of the Project | Required |
| String | Name for the new integration. | Required |
| Integer | The Id of the master integration. For more information, see Get all Integrations. | Required |
| String | The name of the master integration. For more information, see Get all Integrations. | Required |
| Array | An array of objects with the values for the integration. | Required |
| Object | An object containing a project name as an alternative to projectId. The following properties can be set:
| Optional |
| Object | Object consisting of integration properties. | Optional |
| Object | An object containing allowAllPipelineSources property. Set Example "permissions": { "pipelineSources": { "allowAllPipelineSources": true } | Optional |
| Array | An array of the environments to which the integration is to be available. | Optional |
| Boolean |
| 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