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
200

OK

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",
  • "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",
  • "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

Security