repository

List repositories

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

query
string

The substring which is used to filter the repositories by their path name.

sort
string
Default: "identifier"

The data by which the repositories are sorted.

Enum: "identifier" "created" "updated"
order
string
Default: "asc"

The order of the output.

Enum: "asc" "desc"
page
integer >= 1
Default: 1

The page to return.

limit
integer [ 1 .. 100 ]
Default: 30

The maximum number of results to return.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos
Request samples
Response samples
application/json
[
  • {
    }
]

Create repository

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
default_branch
string
description
string
fork_id
integer
git_ignore
string
identifier
string
is_public
boolean
license
string
parent_ref
string
readme
boolean
uid
string
Deprecated
Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/code/api/v1/repos
Request samples
application/json
{
  • "default_branch": "string",
  • "description": "string",
  • "fork_id": 0,
  • "git_ignore": "string",
  • "identifier": "string",
  • "is_public": true,
  • "license": "string",
  • "parent_ref": "string",
  • "readme": true,
  • "uid": "string"
}
Response samples
application/json
{
  • "created": 0,
  • "created_by": 0,
  • "default_branch": "string",
  • "deleted": 0,
  • "description": "string",
  • "fork_id": 0,
  • "git_ssh_url": "string",
  • "git_url": "string",
  • "id": 0,
  • "identifier": "string",
  • "importing": true,
  • "is_empty": true,
  • "is_public": true,
  • "num_closed_pulls": 0,
  • "num_forks": 0,
  • "num_merged_pulls": 0,
  • "num_open_pulls": 0,
  • "num_pulls": 0,
  • "parent_id": 0,
  • "path": "string",
  • "size": 0,
  • "size_updated": 0,
  • "state": 0,
  • "updated": 0
}

Soft delete repository

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

delete/code/api/v1/repos/{repo_identifier}
Request samples
Response samples
application/json
{
  • "deleted_at": 0
}

Get repository

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}
Request samples
Response samples
application/json
{
  • "created": 0,
  • "created_by": 0,
  • "default_branch": "string",
  • "deleted": 0,
  • "description": "string",
  • "fork_id": 0,
  • "git_ssh_url": "string",
  • "git_url": "string",
  • "id": 0,
  • "identifier": "string",
  • "importing": true,
  • "is_empty": true,
  • "is_public": true,
  • "num_closed_pulls": 0,
  • "num_forks": 0,
  • "num_merged_pulls": 0,
  • "num_open_pulls": 0,
  • "num_pulls": 0,
  • "parent_id": 0,
  • "path": "string",
  • "size": 0,
  • "size_updated": 0,
  • "state": 0,
  • "updated": 0
}

Update repository

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
description
string or null
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

patch/code/api/v1/repos/{repo_identifier}
Request samples
application/json
{
  • "description": "string"
}
Response samples
application/json
{
  • "created": 0,
  • "created_by": 0,
  • "default_branch": "string",
  • "deleted": 0,
  • "description": "string",
  • "fork_id": 0,
  • "git_ssh_url": "string",
  • "git_url": "string",
  • "id": 0,
  • "identifier": "string",
  • "importing": true,
  • "is_empty": true,
  • "is_public": true,
  • "num_closed_pulls": 0,
  • "num_forks": 0,
  • "num_merged_pulls": 0,
  • "num_open_pulls": 0,
  • "num_pulls": 0,
  • "parent_id": 0,
  • "path": "string",
  • "size": 0,
  • "size_updated": 0,
  • "state": 0,
  • "updated": 0
}

Download repo in archived format

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
git_ref
required
string
format
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

path
Array of strings

Without an optional path parameter, all files and subdirectories of the current working directory are included in the archive. If one or more paths are specified, only these are included.

prefix
string

Prepend / to paths in the archive.

attributes
string

Look for attributes in .gitattributes files in the working tree as well

time
string

Set modification time of archive entries. Without this option the committer time is used if is a commit or tag, and the current time if it is a tree.

compression
integer

Specify compression level. Larger values allow the command to spend more time to compress to smaller size.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

422

Unprocessable Entity

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/archive/{git_ref}.{format}
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Get git blame

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
path
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

git_ref
string
Default: "{Repository Default Branch}"

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

line_from
integer
Default: 0

Line number from which the file data is considered

line_to
integer
Default: 0

Line number to which the file data is considered

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/blame/{path}
Request samples
Response samples
application/json
[
  • {
    }
]

List branches

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

include_commit
boolean
Default: false

Indicates whether optional commit information should be included in the response.

query
string

The substring by which the branches are filtered.

order
string
Default: "asc"

The order of the output.

Enum: "asc" "desc"
sort
string
Default: "name"

The data by which the branches are sorted.

Enum: "name" "date"
page
integer >= 1
Default: 1

The page to return.

limit
integer [ 1 .. 100 ]
Default: 30

The maximum number of results to return.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/branches
Request samples
Response samples
application/json
[
  • {
    }
]

Create branch

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
bypass_rules
boolean
dry_run_rules
boolean
name
string
target
string
Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

422

Unprocessable Entity

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/branches
Request samples
application/json
{
  • "bypass_rules": true,
  • "dry_run_rules": true,
  • "name": "string",
  • "target": "string"
}
Response samples
application/json
{
  • "commit": {
    },
  • "dry_run_rules": true,
  • "name": "string",
  • "rule_violations": [
    ],
  • "sha": "string"
}

Delete branch

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
branch_name
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

bypass_rules
boolean
Default: false

Bypass rule violations if possible.

dry_run_rules
boolean
Default: false

Dry run rules for operations

commit_sha
string

Commit SHA the branch is at

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

422

Unprocessable Entity

500

Internal Server Error

delete/code/api/v1/repos/{repo_identifier}/branches/{branch_name}
Request samples
Response samples
application/json
{
  • "dry_run_rules": true,
  • "rule_violations": [
    ]
}

Get branch

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
branch_name
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/branches/{branch_name}
Request samples
Response samples
application/json
{
  • "commit": {
    },
  • "name": "string",
  • "sha": "string"
}

Validate code owners file

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

git_ref
string
Default: "{Repository Default Branch}"

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

422

Unprocessable Entity

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/codeowners/validate
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

List commits

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

git_ref
string
Default: "{Repository Default Branch}"

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

after
string

The result should only contain commits that occurred after the provided reference.

path
string
Default: ""

Path for which commit information should be retrieved

since
integer

Epoch since when commit information should be retrieved.

until
integer

Epoch until when commit information should be retrieved.

committer
string

Committer pattern for which commit information should be retrieved.

page
integer >= 1
Default: 1

The page to return.

limit
integer [ 1 .. 100 ]
Default: 30

The maximum number of results to return.

include_stats
boolean
Default: false

Indicates whether optional stats should be included in the response.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/commits
Request samples
Response samples
application/json
[
  • {
    }
]

Commit files

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
Array of objects or null (RepoCommitFileAction)
branch
string
bypass_rules
boolean
dry_run_rules
boolean
message
string
new_branch
string
title
string
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

422

Unprocessable Entity

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/commits
Request samples
application/json
{
  • "actions": [
    ],
  • "branch": "string",
  • "bypass_rules": true,
  • "dry_run_rules": true,
  • "message": "string",
  • "new_branch": "string",
  • "title": "string"
}
Response samples
application/json
{
  • "commit_id": "string",
  • "dry_run_rules": true,
  • "rule_violations": [
    ]
}

Get commit

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
commit_sha
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/commits/{commit_sha}
Request samples
Response samples
application/json
{
  • "author": {
    },
  • "committer": {
    },
  • "message": "string",
  • "parent_shas": [
    ],
  • "sha": "string",
  • "stats": {
    },
  • "title": "string"
}

Get raw git diff of a commit

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
commit_sha
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/commits/{commit_sha}/diff
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Get commit divergence

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
max_count
integer
Array of objects or null (RepoCommitDivergenceRequest)
Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/commits/calculate-divergence
Request samples
application/json
{
  • "max_count": 0,
  • "requests": [
    ]
}
Response samples
application/json
[
  • {
    }
]

Get content of a file

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
path
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

git_ref
string
Default: "{Repository Default Branch}"

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

include_commit
boolean
Default: false

Indicates whether optional commit information should be included in the response.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/content/{path}
Request samples
Response samples
application/json
{
  • "content": {
    },
  • "latest_commit": {
    },
  • "name": "string",
  • "path": "string",
  • "sha": "string",
  • "type": "file"
}

Update default branch

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
name
string
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/default-branch
Request samples
application/json
{
  • "name": "string"
}
Response samples
application/json
{
  • "created": 0,
  • "created_by": 0,
  • "default_branch": "string",
  • "deleted": 0,
  • "description": "string",
  • "fork_id": 0,
  • "git_ssh_url": "string",
  • "git_url": "string",
  • "id": 0,
  • "identifier": "string",
  • "importing": true,
  • "is_empty": true,
  • "is_public": true,
  • "num_closed_pulls": 0,
  • "num_forks": 0,
  • "num_merged_pulls": 0,
  • "num_open_pulls": 0,
  • "num_pulls": 0,
  • "parent_id": 0,
  • "path": "string",
  • "size": 0,
  • "size_updated": 0,
  • "state": 0,
  • "updated": 0
}

Get diff stats

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
range
required
string
Example: main..dev
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

path
Array of strings

provide path for diff operation

Responses
200

OK

401

Unauthorized

403

Forbidden

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/diff-stats/{range}
Request samples
Response samples
application/json
{
  • "additions": 0,
  • "commits": 0,
  • "deletions": 0,
  • "files_changed": 0
}

Get raw diff

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
range
required
string
Example: main..dev
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

path
Array of strings

provide path for diff operation

Responses
200

OK

401

Unauthorized

403

Forbidden

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/diff/{range}
Request samples
Response samples
[
  • {
    }
]

Get raw diff

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
range
required
string
Example: main..dev
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
Array
path
string
start_line
integer
Responses
200

OK

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/diff/{range}
Request samples
application/json
[
  • {
    }
]
Response samples
[
  • {
    }
]

Check mergeability

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
range
required
string
Example: main..dev
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

path
Array of strings

provide path for diff operation

Responses
200

OK

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/merge-check/{range}
Request samples
Response samples
application/json
{
  • "conflict_files": [
    ],
  • "mergeable": true
}

Get commit details

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

git_ref
string
Default: "{Repository Default Branch}"

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Request Body schema: application/json
paths
Array of strings or null
Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/path-details
Request samples
application/json
{
  • "paths": [
    ]
}
Response samples
application/json
{
  • "details": [
    ]
}

List all paths

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

git_ref
string
Default: "{Repository Default Branch}"

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

include_directories
boolean
Default: false

Indicates whether directories should be included in the response.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/paths
Request samples
Response samples
application/json
{
  • "directories": [
    ],
  • "files": [
    ]
}

Purge repository

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

deleted_at
required
integer

The exact time the resource was delete at in epoch format.

Responses
204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/purge
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Get raw file content

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
path
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

git_ref
string
Default: "{Repository Default Branch}"

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/raw/{path}
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Rebase a branch relative to another branch or a commit

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
base_branch
string
base_commit_sha
string (ShaSHA)

Git object hash

bypass_rules
boolean
dry_run
boolean
dry_run_rules
boolean
head_branch
string
head_commit_sha
string (ShaSHA)

Git object hash

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

422

Unprocessable Entity

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/rebase
Request samples
application/json
{
  • "base_branch": "string",
  • "base_commit_sha": "string",
  • "bypass_rules": true,
  • "dry_run": true,
  • "dry_run_rules": true,
  • "head_branch": "string",
  • "head_commit_sha": "string"
}
Response samples
application/json
{
  • "already_ancestor": true,
  • "conflict_files": [
    ],
  • "dry_run": true,
  • "dry_run_rules": true,
  • "new_head_branch_sha": "string",
  • "rule_violations": [
    ]
}

Restore repository

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

deleted_at
required
integer

The exact time the resource was delete at in epoch format.

Request Body schema: application/json
new_identifier
string or null
new_parent_ref
string or null
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/restore
Request samples
application/json
{
  • "new_identifier": "string",
  • "new_parent_ref": "string"
}
Response samples
application/json
{
  • "created": 0,
  • "created_by": 0,
  • "default_branch": "string",
  • "deleted": 0,
  • "description": "string",
  • "fork_id": 0,
  • "git_ssh_url": "string",
  • "git_url": "string",
  • "id": 0,
  • "identifier": "string",
  • "importing": true,
  • "is_empty": true,
  • "is_public": true,
  • "num_closed_pulls": 0,
  • "num_forks": 0,
  • "num_merged_pulls": 0,
  • "num_open_pulls": 0,
  • "num_pulls": 0,
  • "parent_id": 0,
  • "path": "string",
  • "size": 0,
  • "size_updated": 0,
  • "state": 0,
  • "updated": 0
}

List protection rules

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

query
string

The substring by which the repository protection rules are filtered.

order
string
Default: "asc"

The order of the output.

Enum: "asc" "desc"
sort
string
Default: "created_at"

The field by which the protection rules are sorted.

Enum: "created_at" "identifier" "uid" "updated_at"
page
integer >= 1
Default: 1

The page to return.

limit
integer [ 1 .. 100 ]
Default: 30

The maximum number of results to return.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/rules
Request samples
Response samples
application/json
[
  • {
    }
]

Add protection rule

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
ProtectionBranch (object) (OpenapiRuleDefinition)
description
string
identifier
string
object or null (ProtectionPattern)
state
string or null (EnumRuleState)
Enum: "active" "disabled" "monitor"
type
string (OpenapiRuleType)
Value: "branch"
uid
string
Deprecated
Responses
201

Created

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/rules
Request samples
application/json
{
  • "definition": {
    },
  • "description": "string",
  • "identifier": "string",
  • "pattern": {
    },
  • "state": "active",
  • "type": "branch",
  • "uid": "string"
}
Response samples
application/json
{
  • "created": 0,
  • "created_by": {
    },
  • "definition": {
    },
  • "description": "string",
  • "identifier": "string",
  • "pattern": {
    },
  • "state": "active",
  • "type": "branch",
  • "updated": 0,
  • "user_groups": {
    },
  • "users": {
    }
}

Delete protection rule

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
rule_uid
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

delete/code/api/v1/repos/{repo_identifier}/rules/{rule_uid}
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Get protection rule

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
rule_uid
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/rules/{rule_uid}
Request samples
Response samples
application/json
{
  • "created": 0,
  • "created_by": {
    },
  • "definition": {
    },
  • "description": "string",
  • "identifier": "string",
  • "pattern": {
    },
  • "state": "active",
  • "type": "branch",
  • "updated": 0,
  • "user_groups": {
    },
  • "users": {
    }
}

Update protection rule

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
rule_uid
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
ProtectionBranch (object) (OpenapiRuleDefinition)
description
string or null
identifier
string or null
object or null (ProtectionPattern)
state
string or null (EnumRuleState)
Enum: "active" "disabled" "monitor"
type
string (OpenapiRuleType)
Value: "branch"
uid
string or null
Deprecated
Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

patch/code/api/v1/repos/{repo_identifier}/rules/{rule_uid}
Request samples
application/json
{
  • "definition": {
    },
  • "description": "string",
  • "identifier": "string",
  • "pattern": {
    },
  • "state": "active",
  • "type": "branch",
  • "uid": "string"
}
Response samples
application/json
{
  • "created": 0,
  • "created_by": {
    },
  • "definition": {
    },
  • "description": "string",
  • "identifier": "string",
  • "pattern": {
    },
  • "state": "active",
  • "type": "branch",
  • "updated": 0,
  • "user_groups": {
    },
  • "users": {
    }
}

Get general settings

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/settings/general
Request samples
Response samples
application/json
{
  • "file_size_limit": 0
}

Update general settings

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
file_size_limit
integer or null
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

patch/code/api/v1/repos/{repo_identifier}/settings/general
Request samples
application/json
{
  • "file_size_limit": 0
}
Response samples
application/json
{
  • "file_size_limit": 0
}

Get security settings

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/settings/security
Request samples
Response samples
application/json
{
  • "secret_scanning_enabled": true,
  • "vulnerability_scanning_mode": "disabled"
}

Update security settings

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
secret_scanning_enabled
boolean or null
vulnerability_scanning_mode
string or null (SettingsVulnerabilityScanningMode)
Enum: "disabled" "detect" "block"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

patch/code/api/v1/repos/{repo_identifier}/settings/security
Request samples
application/json
{
  • "secret_scanning_enabled": true,
  • "vulnerability_scanning_mode": "disabled"
}
Response samples
application/json
{
  • "secret_scanning_enabled": true,
  • "vulnerability_scanning_mode": "disabled"
}

Squashes commits in a branch relative to another branch or a commit

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
base_branch
string
base_commit_sha
string (ShaSHA)

Git object hash

bypass_rules
boolean
dry_run
boolean
dry_run_rules
boolean
head_branch
string
head_commit_sha
string (ShaSHA)

Git object hash

message
string
title
string
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

422

Unprocessable Entity

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/squash
Request samples
application/json
{
  • "base_branch": "string",
  • "base_commit_sha": "string",
  • "bypass_rules": true,
  • "dry_run": true,
  • "dry_run_rules": true,
  • "head_branch": "string",
  • "head_commit_sha": "string",
  • "message": "string",
  • "title": "string"
}
Response samples
application/json
{
  • "conflict_files": [
    ],
  • "dry_run": true,
  • "dry_run_rules": true,
  • "new_head_branch_sha": "string",
  • "rule_violations": [
    ]
}

Get repository summary

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/summary
Request samples
Response samples
application/json
{
  • "branch_count": 0,
  • "default_branch_commit_count": 0,
  • "pull_req_summary": {
    },
  • "tag_count": 0
}

List tags

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

include_commit
boolean
Default: false

Indicates whether optional commit information should be included in the response.

query
string

The substring by which the tags are filtered.

order
string
Default: "asc"

The order of the output.

Enum: "asc" "desc"
sort
string
Default: "name"

The data by which the tags are sorted.

Enum: "name" "date"
page
integer >= 1
Default: 1

The page to return.

limit
integer [ 1 .. 100 ]
Default: 30

The maximum number of results to return.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/tags
Request samples
Response samples
application/json
[
  • {
    }
]

Create tag

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
bypass_rules
boolean
message
string
name
string
target
string
Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

409

Conflict

422

Unprocessable Entity

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/tags
Request samples
application/json
{
  • "bypass_rules": true,
  • "message": "string",
  • "name": "string",
  • "target": "string"
}
Response samples
application/json
{
  • "commit": {
    },
  • "is_annotated": true,
  • "message": "string",
  • "name": "string",
  • "sha": "string",
  • "tagger": {
    },
  • "title": "string"
}

Delete tag

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
tag_name
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

bypass_rules
boolean
Default: false

Bypass rule violations if possible.

Responses
204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict

422

Unprocessable Entity

500

Internal Server Error

delete/code/api/v1/repos/{repo_identifier}/tags/{tag_name}
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Import repository

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

Request Body schema: application/json
description
string
identifier
string
parent_ref
string
pipelines
string (ImporterPipelineOption)
Enum: "convert" "ignore"
object (ImporterProvider)
provider_repo
string
uid
string
Deprecated
Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/code/api/v1/repos/import
Request samples
application/json
{
  • "description": "string",
  • "identifier": "string",
  • "parent_ref": "string",
  • "pipelines": "convert",
  • "provider": {
    },
  • "provider_repo": "string",
  • "uid": "string"
}
Response samples
application/json
{
  • "created": 0,
  • "created_by": 0,
  • "default_branch": "string",
  • "deleted": 0,
  • "description": "string",
  • "fork_id": 0,
  • "git_ssh_url": "string",
  • "git_url": "string",
  • "id": 0,
  • "identifier": "string",
  • "importing": true,
  • "is_empty": true,
  • "is_public": true,
  • "num_closed_pulls": 0,
  • "num_forks": 0,
  • "num_merged_pulls": 0,
  • "num_open_pulls": 0,
  • "num_pulls": 0,
  • "parent_id": 0,
  • "path": "string",
  • "size": 0,
  • "size_updated": 0,
  • "state": 0,
  • "updated": 0
}