Skip to main content

Integrate Multiple Repositories

POST 

/code/api/v1/repositories

Onboard a list of repositories for a given integration Parameters:

NameRequiredTypeInDescription
idid or type are requiredstringbodyID of the integration to update
typeid or type are requiredstringbodyType of the integration to update
enum (github, githubEnterprise, gitlab, gitlabEnterprise, bitbucket, bitbucketEnterprise, azureRepos)
datayesarray<string>bodyList 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

Body

required
    data string[]required
    id string
    type integrationType (string)

    Possible values: [github, githubEnterprise, gitlab, gitlabEnterprise, bitbucket, bitbucketEnterprise, azureRepos]

Responses

Repositories Updated Successfully

Schema
    integrations object[]
  • Array [
  • created stringrequired
    id stringrequired
    updatedBy stringrequired
  • ]
  • message string
    success boolean
Loading...