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_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,
  • "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_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,
  • "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
is_public
boolean 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",
  • "is_public": true
}
Response samples
application/json
{
  • "created": 0,
  • "created_by": 0,
  • "default_branch": "string",
  • "deleted": 0,
  • "description": "string",
  • "fork_id": 0,
  • "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,
  • "updated": 0
}

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
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,
  • "name": "string",
  • "target": "string"
}
Response samples
application/json
{
  • "commit": {
    },
  • "name": "string",
  • "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.

Responses
204

No Content

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
{
  • "message": "string",
  • "values": {
    }
}

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