Integrate Multiple Repositories
POST/code/api/v1/repositories
Onboard a list of repositories for a given integration Parameters:
Name | Required | Type | In | Description |
---|---|---|---|---|
id | id or type are required | string | body | ID of the integration to update |
type | id or type are required | string | body | Type of the integration to update enum (github, githubEnterprise, gitlab, gitlabEnterprise, bitbucket, bitbucketEnterprise, azureRepos) |
data | yes | array<string> | body | List of repositories to update the integration |
In case both id and type provided only id will take into consideration
example1:
{
"id": "123123-123123-123123-123123",
"data": ["orevron/terragoat", "orevron/platform"]
}
example2:
{
"type": "github",
"data": ["orevron/terragoat", "orevron/platform"]
}
response: example1:
{ "success": true }
example2:
{
"success": false,
"integrations": [
{ "id": "123-123-123", "created": "2022-01-16T17:09:14.167Z", "updateBy": "oevron@paloaltonetworks.com" },
{ "id": "321-321-321", "created": "2022-01-12T17:10:14.167Z", "updateBy": "oevron@paloaltonetworks.com" }
]
}
example3:
{ "success": false, "message": "ID or type of integration must be provided"}
status code 206 when more than one integration found for provided type status code 404 when integration is not found within the customer integrations status code 422 when both id and type not provided status code 500 when something went wrong with the server
Request
- application/json
Body
required
data string[]required
id string
type integrationType (string)
Possible values: [github
, githubEnterprise
, gitlab
, gitlabEnterprise
, bitbucket
, bitbucketEnterprise
, azureRepos
]
Responses
- 200
- 422
Repositories Updated Successfully
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
integrations object[]
created stringrequired
id stringrequired
updatedBy stringrequired
message string
success boolean
{
"integrations": [
{
"created": "string",
"id": "string",
"updatedBy": "string"
}
],
"message": "string",
"success": true
}
Request arguments validation error
Loading...