The compare command is used to compare two branches.
JSON Input Data Format

    {
        "id": string,
        "frombranch": string,
        "tobranch": string
    }

id * | Specifies the ID of the repository.
frombranch * | Specifies the name of the branch to be compared with the destination branch.
tobranch * | Specifies the name of the branch that will serve as the destination for the compare.

* Indicates a mandatory field.

Code Snippets
Here are several code snippets provided for your direct use. Simply select your preferred tool/language by clicking on it.
Successful Response

    {
        "result": "OK",
        "payload": "################################################################################\ndiff --git develop/myfile.txt main/myfile.txt\nnew file mode 100644\nindex 0000000..086747a\n--- develop/add object to main\n+++ main/myfile.txt\n@@ -0,0 +1,2 @@\n+This is a test\n+and anither test\n\\ No newline at end of file"
    }

Failed Response

    {
        "result": "ERR",
        "message": "Error message ..."
    }