API versions

Overview

Starting with P4 Code Review 2022.1, we added a new set of v11 APIs to P4 Code Review that replace the v10 APIs. The v11 APIs refine and extend the v10 APIs while standardizing the endpoint and response pattern. The v9 and v10 APIs will continue to be available for some time, so if you are using them, you can continue to do so.

The current focus is on expanding the functionality of the v11 APIs. Improvements and new API endpoints for v11 are not backported to v9 and v10. Although v11 does not provide all the features that are in v9, in some areas v11 provides more features. We recommend that you choose v11 unless v11 lacks something you need that is available in v9. You can combine v9 and v11 APIs in your application.

Current API versions

API version P4 Code Review Release Date Description

v11

2022.1

March 2022

Extended the v10 APIs and further standardized the endpoint and response pattern for the new rich User Interface.

v10

2019.3

October 2019

Include support for integration with CI tools.

v9

2018.1

April 2018

Include support for append and replace changelist to a review, 2 Factor Authentication and mark a comment as read.

Unsupported API versions

API version P4 Code Review Release Date Description

v8

2017.4

December 2017

Include support for default reviewers on a project or project branch.

v7

2017.3

October 2017

Include support for groups as participants of a review and groups as moderators of a project branch.

v6

2017.1

May 2017

Include support for activity dashboard, archiving of inactive reviews, cleaning completed reviews and for voting reviews up and down.

v5

2016.3

December 2016

Include support for limiting comments to a specific review version.

v4

2016.2

October 2016

Include support for private projects, as well as file-level and line-level inline comments.

v3

2016.1 SP1

September 2016

Include new endpoint for comments.

v2

2016.1

May 2016

Include new endpoints for projects, groups, etc.

v1.2

2015.3

October 2015

Add author filter to the list reviews endpoint.

v1.1

2014.4

January 2015

Addition of required reviewers, and apiVersions.

v1

2014.3

July 2014

Initial release.

Get P4 Code Review version information

The version endpoint lets you see the currently-installed P4 Code Review version, the year of release, and the included API versions.

GET /api/version

Get P4 Code Review version and API versions:

https://myswarm.url/api/version

Example response:

{"apiVersions":[1,1.1,1.2,2,3,4,5,6,7,8,9,10,11],"version":"SWARM\/2022.1\/2139325(2022\/01\/28)","year":"2022"}

year refers to the year of the P4 Code Review release, which is not necessarily the current year.