pullreq

List pull requests

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..

state
Array of strings

The state of the pull requests to include in the result.

Items Enum: "closed" "merged" "open"
source_repo_identifier
string

Source repository ref of the pull requests.

source_branch
string

Source branch of the pull requests.

target_branch
string

Target branch of the pull requests.

query
string

The substring by which the pull requests are filtered.

created_by
Array of integers

List of principal IDs who created pull requests.

order
string
Default: "asc"

The order of the output.

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

The data by which the pull requests are sorted.

Enum: "created" "edited" "merged" "number" "updated"
created_lt
integer >= 0

The result should contain only entries created before this timestamp (unix millis).

created_gt
integer >= 0

The result should contain only entries created after this timestamp (unix millis).

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

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

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

Create pull request

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
is_draft
boolean
source_branch
string
source_repo_ref
string
target_branch
string
title
string
Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/pullreq
Request samples
application/json
{
  • "description": "string",
  • "is_draft": true,
  • "source_branch": "string",
  • "source_repo_ref": "string",
  • "target_branch": "string",
  • "title": "string"
}
Response samples
application/json
{
  • "author": {
    },
  • "closed": 0,
  • "created": 0,
  • "description": "string",
  • "edited": 0,
  • "is_draft": true,
  • "merge_base_sha": "string",
  • "merge_check_status": "string",
  • "merge_conflicts": [
    ],
  • "merge_method": "merge",
  • "merge_target_sha": "string",
  • "merged": 0,
  • "merger": {
    },
  • "number": 0,
  • "source_branch": "string",
  • "source_repo_id": 0,
  • "source_sha": "string",
  • "state": "closed",
  • "stats": {
    },
  • "target_branch": "string",
  • "target_repo_id": 0,
  • "title": "string"
}

Get pull request

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}
Request samples
Response samples
application/json
{
  • "author": {
    },
  • "closed": 0,
  • "created": 0,
  • "description": "string",
  • "edited": 0,
  • "is_draft": true,
  • "merge_base_sha": "string",
  • "merge_check_status": "string",
  • "merge_conflicts": [
    ],
  • "merge_method": "merge",
  • "merge_target_sha": "string",
  • "merged": 0,
  • "merger": {
    },
  • "number": 0,
  • "source_branch": "string",
  • "source_repo_id": 0,
  • "source_sha": "string",
  • "state": "closed",
  • "stats": {
    },
  • "target_branch": "string",
  • "target_repo_id": 0,
  • "title": "string"
}

Update pull request

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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
title
string
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

patch/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}
Request samples
application/json
{
  • "description": "string",
  • "title": "string"
}
Response samples
application/json
{
  • "author": {
    },
  • "closed": 0,
  • "created": 0,
  • "description": "string",
  • "edited": 0,
  • "is_draft": true,
  • "merge_base_sha": "string",
  • "merge_check_status": "string",
  • "merge_conflicts": [
    ],
  • "merge_method": "merge",
  • "merge_target_sha": "string",
  • "merged": 0,
  • "merger": {
    },
  • "number": 0,
  • "source_branch": "string",
  • "source_repo_id": 0,
  • "source_sha": "string",
  • "state": "closed",
  • "stats": {
    },
  • "target_branch": "string",
  • "target_repo_id": 0,
  • "title": "string"
}

List activities

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

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

kind
Array of strings

The kind of the pull request activity to include in the result.

Items Enum: "change-comment" "comment" "system"
type
Array of strings

The type of the pull request activity to include in the result.

Items Enum: "branch-delete" "branch-update" "code-comment" "comment" "merge" "review-submit" "state-change" "title-change"
after
integer >= 0

The result should contain only entries created at and after this timestamp (unix millis).

before
integer >= 0

The result should contain only entries created before this timestamp (unix millis).

limit
integer [ 1 .. 100 ]
Default: 30

The maximum number of results to return.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

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

Get status checks

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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}/pullreq/{pullreq_number}/checks
Request samples
Response samples
application/json
[
  • {
    }
]

Get code owners

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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

422

Unprocessable Entity

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/codeowners
Request samples
Response samples
application/json
{
  • "evaluation_entries": [
    ],
  • "file_sha": "string"
}

Create new pull request comment

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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
line_end
integer
line_end_new
boolean
line_start
integer
line_start_new
boolean
parent_id
integer
path
string
source_commit_sha
string
target_commit_sha
string
text
string
Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/comments
Request samples
application/json
{
  • "line_end": 0,
  • "line_end_new": true,
  • "line_start": 0,
  • "line_start_new": true,
  • "parent_id": 0,
  • "path": "string",
  • "source_commit_sha": "string",
  • "target_commit_sha": "string",
  • "text": "string"
}
Response samples
application/json
{
  • "author": {
    },
  • "code_comment": {
    },
  • "created": 0,
  • "deleted": 0,
  • "edited": 0,
  • "id": 0,
  • "kind": "change-comment",
  • "mentions": {
    },
  • "metadata": {
    },
  • "order": 0,
  • "parent_id": 0,
  • "payload": null,
  • "pullreq_id": 0,
  • "repo_id": 0,
  • "resolved": 0,
  • "resolver": {
    },
  • "sub_order": 0,
  • "text": "string",
  • "type": "branch-delete",
  • "updated": 0
}

Delete pull request comment

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
pullreq_comment_id
required
integer
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

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

delete/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/comments/{pullreq_comment_id}
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Update pull request comment

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
pullreq_comment_id
required
integer
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
text
string
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

patch/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/comments/{pullreq_comment_id}
Request samples
application/json
{
  • "text": "string"
}
Response samples
application/json
{
  • "author": {
    },
  • "code_comment": {
    },
  • "created": 0,
  • "deleted": 0,
  • "edited": 0,
  • "id": 0,
  • "kind": "change-comment",
  • "mentions": {
    },
  • "metadata": {
    },
  • "order": 0,
  • "parent_id": 0,
  • "payload": null,
  • "pullreq_id": 0,
  • "repo_id": 0,
  • "resolved": 0,
  • "resolver": {
    },
  • "sub_order": 0,
  • "text": "string",
  • "type": "branch-delete",
  • "updated": 0
}

Update status of pull request comment

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
pullreq_comment_id
required
integer
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
status
string (EnumPullReqCommentStatus)
Enum: "active" "resolved"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

put/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/comments/{pullreq_comment_id}/status
Request samples
application/json
{
  • "status": "active"
}
Response samples
application/json
{
  • "author": {
    },
  • "code_comment": {
    },
  • "created": 0,
  • "deleted": 0,
  • "edited": 0,
  • "id": 0,
  • "kind": "change-comment",
  • "mentions": {
    },
  • "metadata": {
    },
  • "order": 0,
  • "parent_id": 0,
  • "payload": null,
  • "pullreq_id": 0,
  • "repo_id": 0,
  • "resolved": 0,
  • "resolver": {
    },
  • "sub_order": 0,
  • "text": "string",
  • "type": "branch-delete",
  • "updated": 0
}

Apply pull request code comment suggestions

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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
message
string
Array of objects or null (PullreqSuggestionReference)
title
string
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

422

Unprocessable Entity

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/comments/apply-suggestions
Request samples
application/json
{
  • "bypass_rules": true,
  • "dry_run_rules": true,
  • "message": "string",
  • "suggestions": [
    ],
  • "title": "string"
}
Response samples
application/json
{
  • "commit_id": "string",
  • "dry_run_rules": true,
  • "rule_violations": [
    ]
}

List commits

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

Account Identifier for the Entity..

orgIdentifier
string

Organization Identifier for the Entity..

projectIdentifier
string

Project Identifier for the Entity..

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}/pullreq/{pullreq_number}/commits
Request samples
Response samples
application/json
[
  • {
    }
]

Get file changes

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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

404

Not Found

500

Internal Server Error

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

Get file changes

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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

404

Not Found

500

Internal Server Error

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

List viewed files

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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

500

Internal Server Error

get/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/file-views
Request samples
Response samples
application/json
[
  • {
    }
]

Mark file as viewed

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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
commit_sha
string
path
string
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

put/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/file-views
Request samples
application/json
{
  • "commit_sha": "string",
  • "path": "string"
}
Response samples
application/json
{
  • "obsolete": true,
  • "path": "string",
  • "sha": "string"
}

Remove file view

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
file_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..

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

delete/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/file-views/{file_path}
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Merge

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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
boolean
message
string
method
string (EnumMergeMethod)
Enum: "merge" "rebase" "squash"
source_sha
string
title
string
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

409

Conflict

422

Unprocessable Entity

post/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/merge
Request samples
application/json
{
  • "bypass_rules": true,
  • "dry_run": true,
  • "message": "string",
  • "method": "merge",
  • "source_sha": "string",
  • "title": "string"
}
Response samples
application/json
{
  • "allowed_methods": [
    ],
  • "branch_deleted": true,
  • "conflict_files": [
    ],
  • "dry_run": true,
  • "minimum_required_approvals_count": 0,
  • "minimum_required_approvals_count_latest": 0,
  • "requires_code_owners_approval": true,
  • "requires_code_owners_approval_latest": true,
  • "requires_comment_resolution": true,
  • "requires_no_change_requests": true,
  • "rule_violations": [
    ],
  • "sha": "string"
}

Get metadata

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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}/pullreq/{pullreq_number}/metadata
Request samples
Response samples
application/json
{
  • "additions": 0,
  • "commits": 0,
  • "conversations": 0,
  • "deletions": 0,
  • "files_changed": 0,
  • "unresolved_count": 0
}

List reviewers

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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

500

Internal Server Error

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

Add reviewer

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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
reviewer_id
integer
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

put/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/reviewers
Request samples
application/json
{
  • "reviewer_id": 0
}
Response samples
application/json
{
  • "added_by": {
    },
  • "created": 0,
  • "latest_review_id": 0,
  • "review_decision": "approved",
  • "reviewer": {
    },
  • "sha": "string",
  • "type": "assigned",
  • "updated": 0
}

Remove reviewer

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
pullreq_reviewer_id
required
integer
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

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

delete/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/reviewers/{pullreq_reviewer_id}
Request samples
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Submit review

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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
commit_sha
string
decision
string (EnumPullReqReviewDecision)
Enum: "approved" "changereq" "pending" "reviewed"
Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/reviews
Request samples
application/json
{
  • "commit_sha": "string",
  • "decision": "approved"
}
Response samples
application/json
{
  • "message": "string",
  • "values": {
    }
}

Update state of pull request

Securityx-api-key
Request
path Parameters
repo_identifier
required
string
pullreq_number
required
integer
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
is_draft
boolean
state
string (EnumPullReqState)
Enum: "closed" "merged" "open"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/state
Request samples
application/json
{
  • "is_draft": true,
  • "state": "closed"
}
Response samples
application/json
{
  • "author": {
    },
  • "closed": 0,
  • "created": 0,
  • "description": "string",
  • "edited": 0,
  • "is_draft": true,
  • "merge_base_sha": "string",
  • "merge_check_status": "string",
  • "merge_conflicts": [
    ],
  • "merge_method": "merge",
  • "merge_target_sha": "string",
  • "merged": 0,
  • "merger": {
    },
  • "number": 0,
  • "source_branch": "string",
  • "source_repo_id": 0,
  • "source_sha": "string",
  • "state": "closed",
  • "stats": {
    },
  • "target_branch": "string",
  • "target_repo_id": 0,
  • "title": "string"
}