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": [
    ]
}